notebook 7.1.0a0__py3-none-any.whl → 7.1.0a1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of notebook might be problematic. Click here for more details.
- notebook/_version.py +1 -1
- notebook/app.py +5 -2
- notebook/static/1053.bundle.js +1 -1
- notebook/static/1157.bundle.js +1 -0
- notebook/static/1169.bundle.js +1 -1
- notebook/static/1198.bundle.js +1 -1
- notebook/static/131.bundle.js +2 -2
- notebook/static/1326.bundle.js +2 -0
- notebook/static/1337.bundle.js +1 -1
- notebook/static/134.bundle.js +1 -1
- notebook/static/1408.bundle.js +1 -1
- notebook/static/1496.bundle.js +1 -0
- notebook/static/1584.bundle.js +1 -1
- notebook/static/1604.bundle.js +1 -0
- notebook/static/1647.bundle.js +1 -1
- notebook/static/1650.bundle.js +1 -1
- notebook/static/1682.bundle.js +1 -1
- notebook/static/1684.bundle.js +1 -1
- notebook/static/1809.bundle.js +1 -1
- notebook/static/1827.bundle.js +1 -1
- notebook/static/1833.bundle.js +1 -1
- notebook/static/1835.bundle.js +1 -1
- notebook/static/1895.bundle.js +1 -0
- notebook/static/1950.bundle.js +1 -1
- notebook/static/1958.bundle.js +1 -1
- notebook/static/2007.bundle.js +1 -1
- notebook/static/2067.bundle.js +1 -1
- notebook/static/2088.bundle.js +1 -1
- notebook/static/2089.bundle.js +1 -1
- notebook/static/2122.bundle.js +1 -1
- notebook/static/2167.bundle.js +1 -1
- notebook/static/2184.bundle.js +1 -1
- notebook/static/2311.bundle.js +1 -1
- notebook/static/2401.bundle.js +1 -1
- notebook/static/2479.bundle.js +1 -1
- notebook/static/2489.bundle.js +1 -1
- notebook/static/2502.bundle.js +1 -0
- notebook/static/2512.bundle.js +1 -1
- notebook/static/2515.bundle.js +1 -0
- notebook/static/2552.bundle.js +1 -1
- notebook/static/2577.bundle.js +1 -0
- notebook/static/2607.bundle.js +1 -1
- notebook/static/2615.bundle.js +1 -1
- notebook/static/270.bundle.js +1 -1
- notebook/static/2866.bundle.js +1 -1
- notebook/static/2883.bundle.js +1 -1
- notebook/static/2913.bundle.js +1 -1
- notebook/static/2924.bundle.js +1 -1
- notebook/static/2944.bundle.js +1 -0
- notebook/static/3079.bundle.js +1 -1
- notebook/static/3129.bundle.js +1 -1
- notebook/static/3146.bundle.js +1 -1
- notebook/static/3190.bundle.js +2 -0
- notebook/static/3213.bundle.js +1 -1
- notebook/static/3301.bundle.js +1 -1
- notebook/static/3340.bundle.js +1 -1
- notebook/static/3360.bundle.js +1 -1
- notebook/static/3466.bundle.js +1 -1
- notebook/static/3512.bundle.js +1 -1
- notebook/static/3642.bundle.js +1 -0
- notebook/static/3676.bundle.js +1 -1
- notebook/static/3680.bundle.js +1 -1
- notebook/static/3768.bundle.js +1 -1
- notebook/static/377.bundle.js +1 -1
- notebook/static/3863.bundle.js +1 -1
- notebook/static/3881.bundle.js +1 -1
- notebook/static/4042.bundle.js +1 -1
- notebook/static/4058.bundle.js +1 -1
- notebook/static/4131.bundle.js +1 -1
- notebook/static/4166.bundle.js +1 -0
- notebook/static/4212.bundle.js +1 -1
- notebook/static/4271.bundle.js +1 -1
- notebook/static/4291.bundle.js +1 -1
- notebook/static/433.bundle.js +1 -0
- notebook/static/4382.bundle.js +1 -1
- notebook/static/4461.bundle.js +1 -0
- notebook/static/4499.bundle.js +1 -0
- notebook/static/4501.bundle.js +1 -0
- notebook/static/4526.bundle.js +1 -1
- notebook/static/4558.bundle.js +1 -1
- notebook/static/4588.bundle.js +1 -1
- notebook/static/4630.bundle.js +1 -1
- notebook/static/4645.bundle.js +1 -1
- notebook/static/4670.bundle.js +1 -1
- notebook/static/4810.bundle.js +1 -1
- notebook/static/4811.bundle.js +1 -1
- notebook/static/4837.bundle.js +1 -1
- notebook/static/4892.bundle.js +1 -0
- notebook/static/5088.bundle.js +1 -1
- notebook/static/5099.bundle.js +1 -1
- notebook/static/5115.bundle.js +1 -1
- notebook/static/5135.bundle.js +1 -1
- notebook/static/514.bundle.js +1 -1
- notebook/static/5313.bundle.js +1 -1
- notebook/static/5325.bundle.js +1 -1
- notebook/static/5346.bundle.js +1 -1
- notebook/static/5376.bundle.js +1 -0
- notebook/static/5426.bundle.js +1 -1
- notebook/static/5573.bundle.js +1 -1
- notebook/static/5601.bundle.js +1 -1
- notebook/static/5649.bundle.js +1 -1
- notebook/static/5733.bundle.js +1 -1
- notebook/static/5828.bundle.js +1 -1
- notebook/static/5850.bundle.js +1 -1
- notebook/static/5874.bundle.js +744 -0
- notebook/static/5874.bundle.js.LICENSE.txt +4 -0
- notebook/static/5912.bundle.js +1 -1
- notebook/static/5921.bundle.js +1 -1
- notebook/static/5982.bundle.js +1 -0
- notebook/static/6017.bundle.js +1 -1
- notebook/static/6027.bundle.js +1 -1
- notebook/static/6061.bundle.js +1 -1
- notebook/static/6139.bundle.js +1 -1
- notebook/static/62.bundle.js +1 -1
- notebook/static/6249.bundle.js +1 -0
- notebook/static/6256.bundle.js +1 -1
- notebook/static/6262.bundle.js +1 -0
- notebook/static/6271.bundle.js +1 -1
- notebook/static/6345.bundle.js +1 -1
- notebook/static/6405.bundle.js +1 -0
- notebook/static/6604.bundle.js +1 -1
- notebook/static/6621.bundle.js +1 -1
- notebook/static/6627.bundle.js +1 -1
- notebook/static/6731.bundle.js +1 -1
- notebook/static/6815.bundle.js +1 -1
- notebook/static/6853.bundle.js +1 -1
- notebook/static/{4842.bundle.js → 6869.bundle.js} +1 -1
- notebook/static/6893.bundle.js +1 -1
- notebook/static/690.bundle.js +1 -1
- notebook/static/6962.bundle.js +1 -1
- notebook/static/6972.bundle.js +1 -1
- notebook/static/6999.bundle.js +1 -1
- notebook/static/7154.bundle.js +1 -1
- notebook/static/7226.bundle.js +1 -1
- notebook/static/7252.bundle.js +1 -1
- notebook/static/7302.bundle.js +1 -1
- notebook/static/7333.bundle.js +2 -0
- notebook/static/7339.bundle.js +1 -0
- notebook/static/7369.bundle.js +1 -1
- notebook/static/7386.bundle.js +1 -1
- notebook/static/7391.bundle.js +1 -1
- notebook/static/7394.bundle.js +1 -1
- notebook/static/7427.bundle.js +1 -1
- notebook/static/7582.bundle.js +1 -1
- notebook/static/{7407.bundle.js → 7590.bundle.js} +1 -1
- notebook/static/7603.bundle.js +1 -1
- notebook/static/7639.bundle.js +1 -1
- notebook/static/7674.bundle.js +1 -1
- notebook/static/7684.bundle.js +1 -1
- notebook/static/7811.bundle.js +1 -1
- notebook/static/7819.bundle.js +1 -1
- notebook/static/7866.bundle.js +1 -1
- notebook/static/7900.bundle.js +1 -1
- notebook/static/7906.bundle.js +1 -1
- notebook/static/7943.bundle.js +1 -0
- notebook/static/8010.bundle.js +1 -1
- notebook/static/8032.bundle.js +1 -1
- notebook/static/8055.bundle.js +1 -0
- notebook/static/8579.bundle.js +1 -1
- notebook/static/8633.bundle.js +1 -1
- notebook/static/8771.bundle.js +1 -1
- notebook/static/8781.bundle.js +1 -0
- notebook/static/882.bundle.js +1 -0
- notebook/static/8845.bundle.js +1 -1
- notebook/static/8875.bundle.js +1 -1
- notebook/static/8907.bundle.js +1 -1
- notebook/static/8928.bundle.js +1 -1
- notebook/static/8929.bundle.js +1 -1
- notebook/static/893.bundle.js +1 -1
- notebook/static/901.bundle.js +1 -1
- notebook/static/9068.bundle.js +1 -1
- notebook/static/911.bundle.js +1 -1
- notebook/static/9151.bundle.js +1 -1
- notebook/static/9161.bundle.js +1 -1
- notebook/static/9239.bundle.js +1 -1
- notebook/static/9250.bundle.js +1 -1
- notebook/static/9268.bundle.js +1 -1
- notebook/static/9284.bundle.js +1 -0
- notebook/static/9308.bundle.js +1 -1
- notebook/static/9335.bundle.js +1 -1
- notebook/static/9341.bundle.js +1 -1
- notebook/static/9380.bundle.js +1 -1
- notebook/static/9466.bundle.js +1 -0
- notebook/static/9554.bundle.js +1 -0
- notebook/static/9605.bundle.js +1 -1
- notebook/static/9638.bundle.js +1 -1
- notebook/static/9680.bundle.js +1 -1
- notebook/static/9685.bundle.js +1 -1
- notebook/static/9752.bundle.js +1 -1
- notebook/static/9799.bundle.js +1 -1
- notebook/static/9821.bundle.js +1 -1
- notebook/static/9852.bundle.js +1 -1
- notebook/static/9987.bundle.js +1 -0
- notebook/static/bundle.js +1 -1
- notebook/static/third-party-licenses.json +177 -111
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/package.json.orig +15 -15
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/documentsearch-extension/package.json.orig +5 -5
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/package.json.orig +6 -6
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/package.json.orig +10 -10
- notebook-7.1.0a1.data/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/file-actions.json +17 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/package.json.orig +17 -17
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/package.json +12 -12
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/package.json.orig +11 -11
- notebook-7.1.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/50.e41798f78fa32030e149.js +1 -0
- notebook-7.1.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.9fa8bfe8da6242a4fc6b.js +1 -0
- notebook-7.1.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.79046a2eb17bde1af38c.js → notebook-7.1.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.faa0d74ec3a151a81a90.js +1 -1
- notebook-7.1.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/93.eae3497dd223d842d198.js +1 -0
- notebook-7.1.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.02d92bfa6cab99929020.js +1 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/third-party-licenses.json +4 -4
- {notebook-7.1.0a0.dist-info → notebook-7.1.0a1.dist-info}/METADATA +2 -2
- notebook-7.1.0a1.dist-info/RECORD +430 -0
- notebook/static/1306.bundle.js +0 -1
- notebook/static/1945.bundle.js +0 -1
- notebook/static/1964.bundle.js +0 -1
- notebook/static/3412.bundle.js +0 -1
- notebook/static/3434.bundle.js +0 -1
- notebook/static/3618.bundle.js +0 -1
- notebook/static/3672.bundle.js +0 -1
- notebook/static/3791.bundle.js +0 -1
- notebook/static/3993.bundle.js +0 -1
- notebook/static/4234.bundle.js +0 -1
- notebook/static/4793.bundle.js +0 -1
- notebook/static/4826.bundle.js +0 -1
- notebook/static/4867.bundle.js +0 -1
- notebook/static/5058.bundle.js +0 -1
- notebook/static/5329.bundle.js +0 -1
- notebook/static/5591.bundle.js +0 -1
- notebook/static/5642.bundle.js +0 -1
- notebook/static/6359.bundle.js +0 -1
- notebook/static/6667.bundle.js +0 -1
- notebook/static/6843.bundle.js +0 -1
- notebook/static/7763.bundle.js +0 -1
- notebook/static/7764.bundle.js +0 -1
- notebook/static/8723.bundle.js +0 -2
- notebook/static/880.bundle.js +0 -1
- notebook/static/8968.bundle.js +0 -1
- notebook/static/9086.bundle.js +0 -1
- notebook/static/9213.bundle.js +0 -2
- notebook/static/9381.bundle.js +0 -1
- notebook/static/9514.bundle.js +0 -1
- notebook/static/9545.bundle.js +0 -1
- notebook/static/973.bundle.js +0 -2
- notebook-7.1.0a0.data/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/file-actions.json +0 -10
- notebook-7.1.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.ffc2f99974c3b184be5a.js +0 -1
- notebook-7.1.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/776.c7baadfaddfd4518c935.js +0 -1
- notebook-7.1.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/922.0beff4620746e288bd5e.js +0 -1
- notebook-7.1.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.e73b0142911cf6300a74.js +0 -1
- notebook-7.1.0a0.dist-info/RECORD +0 -427
- /notebook/static/{9213.bundle.js.LICENSE.txt → 1326.bundle.js.LICENSE.txt} +0 -0
- /notebook/static/{8723.bundle.js.LICENSE.txt → 3190.bundle.js.LICENSE.txt} +0 -0
- /notebook/static/{973.bundle.js.LICENSE.txt → 7333.bundle.js.LICENSE.txt} +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/etc/jupyter/jupyter_server_config.d/notebook.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/applications/jupyter-notebook.desktop +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/icons/hicolor/scalable/apps/notebook.svg +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/menus.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/pages.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/shell.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/title.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/top.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/zen.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/open.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/checkpoints.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/kernel-logo.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/scroll-output.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/widget.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/interface-switcher.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/launch-tree.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/style.js +0 -0
- {notebook-7.1.0a0.dist-info → notebook-7.1.0a1.dist-info}/WHEEL +0 -0
- {notebook-7.1.0a0.dist-info → notebook-7.1.0a1.dist-info}/entry_points.txt +0 -0
- {notebook-7.1.0a0.dist-info → notebook-7.1.0a1.dist-info}/licenses/LICENSE +0 -0
notebook/static/9341.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[9341],{39341:(e,t,s)=>{s.r(t),s.d(t,{BreadCrumbs:()=>v,CHUNK_SIZE:()=>Z,DirListing:()=>q,FileBrowser:()=>$,FileBrowserModel:()=>Q,FileDialog:()=>se,FileUploadStatus:()=>pe,FilterFileBrowserModel:()=>te,IDefaultFileBrowser:()=>oe,IFileBrowserCommands:()=>ae,IFileBrowserFactory:()=>ne,LARGE_FILE_SIZE:()=>J,TogglableHiddenFileBrowserModel:()=>ee,Uploader:()=>le});var i=s(67569),r=s(79551),n=s(58977),o=s(22205),a=s(35111),l=s(82743),d=s(95895),h=s(33625),c=s(18395);const m="jp-BreadCrumbs-home",u="jp-BreadCrumbs-preferred",p="jp-BreadCrumbs-item",_=["/","../../","../",""],f="application/x-jupyter-icontents",g="jp-mod-dropTarget";class v extends a.Widget{constructor(e){super(),this.translator=e.translator||n.nullTranslator,this._trans=this.translator.load("jupyterlab"),this._model=e.model,this.addClass("jp-BreadCrumbs"),this._crumbs=w.createCrumbs(),this._crumbSeps=w.createCrumbSeparators();const t=l.PageConfig.getOption("preferredPath");this._hasPreferred=!(!t||"/"===t),this._hasPreferred&&this.node.appendChild(this._crumbs[w.Crumb.Preferred]),this.node.appendChild(this._crumbs[w.Crumb.Home]),this._model.refreshed.connect(this.update,this)}handleEvent(e){switch(e.type){case"click":this._evtClick(e);break;case"lm-dragenter":this._evtDragEnter(e);break;case"lm-dragleave":this._evtDragLeave(e);break;case"lm-dragover":this._evtDragOver(e);break;case"lm-drop":this._evtDrop(e);break;default:return}}onAfterAttach(e){super.onAfterAttach(e),this.update();const t=this.node;t.addEventListener("click",this),t.addEventListener("lm-dragenter",this),t.addEventListener("lm-dragleave",this),t.addEventListener("lm-dragover",this),t.addEventListener("lm-drop",this)}onBeforeDetach(e){super.onBeforeDetach(e);const t=this.node;t.removeEventListener("click",this),t.removeEventListener("lm-dragenter",this),t.removeEventListener("lm-dragleave",this),t.removeEventListener("lm-dragover",this),t.removeEventListener("lm-drop",this)}onUpdateRequest(e){const t=this._model.manager.services.contents.localPath(this._model.path);w.updateCrumbs(this._crumbs,this._crumbSeps,t,this._hasPreferred)}_evtClick(e){if(0!==e.button)return;let t=e.target;for(;t&&t!==this.node;){if(t.classList.contains(u))return this._model.cd(l.PageConfig.getOption("preferredPath")).catch((e=>(0,i.showErrorMessage)(this._trans.__("Open Error"),e))),e.preventDefault(),void e.stopPropagation();if(t.classList.contains(p)||t.classList.contains(m)){const s=h.ArrayExt.findFirstIndex(this._crumbs,(e=>e===t));return this._model.cd(_[s]).catch((e=>(0,i.showErrorMessage)(this._trans.__("Open Error"),e))),e.preventDefault(),void e.stopPropagation()}t=t.parentElement}}_evtDragEnter(e){if(e.mimeData.hasData(f)){const t=h.ArrayExt.findFirstIndex(this._crumbs,(t=>c.ElementExt.hitTest(t,e.clientX,e.clientY)));-1!==t&&t!==w.Crumb.Current&&(this._crumbs[t].classList.add(g),e.preventDefault(),e.stopPropagation())}}_evtDragLeave(e){e.preventDefault(),e.stopPropagation();const t=i.DOMUtils.findElement(this.node,g);t&&t.classList.remove(g)}_evtDragOver(e){e.preventDefault(),e.stopPropagation(),e.dropAction=e.proposedAction;const t=i.DOMUtils.findElement(this.node,g);t&&t.classList.remove(g);const s=h.ArrayExt.findFirstIndex(this._crumbs,(t=>c.ElementExt.hitTest(t,e.clientX,e.clientY)));-1!==s&&this._crumbs[s].classList.add(g)}_evtDrop(e){if(e.preventDefault(),e.stopPropagation(),"none"===e.proposedAction)return void(e.dropAction="none");if(!e.mimeData.hasData(f))return;e.dropAction=e.proposedAction;let t=e.target;for(;t&&t.parentElement;){if(t.classList.contains(g)){t.classList.remove(g);break}t=t.parentElement}const s=h.ArrayExt.findFirstIndex(this._crumbs,(e=>e===t));if(-1===s)return;const r=this._model,n=l.PathExt.resolve(r.path,_[s]),o=r.manager,a=[],c=e.mimeData.getData(f);for(const e of c){const t=o.services.contents.localPath(e),s=l.PathExt.basename(t),i=l.PathExt.join(n,s);a.push((0,d.renameFile)(o,e,i))}Promise.all(a).catch((e=>(0,i.showErrorMessage)(this._trans.__("Move Error"),e)))}}var w;!function(e){let t;!function(e){e[e.Home=0]="Home",e[e.Ellipsis=1]="Ellipsis",e[e.Parent=2]="Parent",e[e.Current=3]="Current",e[e.Preferred=4]="Preferred"}(t=e.Crumb||(e.Crumb={})),e.updateCrumbs=function(e,s,i,r){const n=e[0].parentNode,o=n.firstChild;for(;o&&o.nextSibling;)n.removeChild(o.nextSibling);r?(n.appendChild(e[t.Home]),n.appendChild(s[0])):n.appendChild(s[0]);const a=i.split("/");if(a.length>2){n.appendChild(e[t.Ellipsis]);const i=a.slice(0,a.length-2).join("/");e[t.Ellipsis].title=i,n.appendChild(s[1])}if(i){if(a.length>=2){e[t.Parent].textContent=a[a.length-2],n.appendChild(e[t.Parent]);const i=a.slice(0,a.length-1).join("/");e[t.Parent].title=i,n.appendChild(s[2])}e[t.Current].textContent=a[a.length-1],n.appendChild(e[t.Current]),e[t.Current].title=i,n.appendChild(s[3])}},e.createCrumbs=function(){const e=o.folderIcon.element({className:m,tag:"span",title:l.PageConfig.getOption("serverRoot")||"Jupyter Server Root",stylesheet:"breadCrumb"}),t=o.ellipsesIcon.element({className:p,tag:"span",stylesheet:"breadCrumb"}),s=document.createElement("span");s.className=p;const i=document.createElement("span");return i.className=p,[e,t,s,i,o.homeIcon.element({className:u,tag:"span",title:l.PageConfig.getOption("preferredPath")||"Jupyter Preferred Path",stylesheet:"breadCrumb"})]},e.createCrumbSeparators=function(){const e=[];for(let t=0;t<4;t++){const t=document.createElement("span");t.textContent="/",e.push(t)}return e}}(w||(w={}));var y=s(95051),b=s(20998),C=s(20805),E=s(49503),D=s(81997),L=s(24475);const I="jp-DirListing-header",x="jp-DirListing-headerItemIcon",k="jp-DirListing-content",F="jp-DirListing-itemText",P="jp-DirListing-itemIcon",N="jp-DirListing-itemModified",M="jp-DirListing-itemFileSize",S="jp-DirListing-checkboxWrapper",T="jp-id-name",j="jp-id-modified",A="jp-id-filesize",O="jp-LastModified-hidden",B="jp-FileSize-hidden",U="application/x-jupyter-icontents",R="jp-mod-dropTarget",V="jp-mod-selected",K="jp-mod-cut",z="jp-mod-multiSelected",H="jp-mod-running",W="jp-mod-descending",Y=!!navigator.platform.match(/Mac/i);class q extends a.Widget{constructor(e){super({node:(e.renderer||q.defaultRenderer).createNode()}),this._items=[],this._sortedItems=[],this._sortState={direction:"ascending",key:"name"},this._onItemOpened=new D.Signal(this),this._drag=null,this._dragData=null,this._selectTimer=-1,this._isCut=!1,this._prevPath="",this._clipboard=[],this._softSelection="",this.selection=Object.create(null),this._searchPrefix="",this._searchPrefixTimer=-1,this._inRename=!1,this._isDirty=!1,this._hiddenColumns=new Set,this._sortNotebooksFirst=!1,this._focusIndex=0,this.addClass("jp-DirListing"),this.translator=e.translator||n.nullTranslator,this._trans=this.translator.load("jupyterlab"),this._model=e.model,this._model.fileChanged.connect(this._onFileChanged,this),this._model.refreshed.connect(this._onModelRefreshed,this),this._model.pathChanged.connect(this._onPathChanged,this),this._editNode=document.createElement("input"),this._editNode.className="jp-DirListing-editor",this._manager=this._model.manager,this._renderer=e.renderer||q.defaultRenderer;const t=i.DOMUtils.findElement(this.node,I);this._hiddenColumns.add("file_size"),this._renderer.populateHeaderNode(t,this.translator,this._hiddenColumns),this._manager.activateRequested.connect(this._onActivateRequested,this)}dispose(){this._items.length=0,this._sortedItems.length=0,this._clipboard.length=0,super.dispose()}get model(){return this._model}get headerNode(){return i.DOMUtils.findElement(this.node,I)}get contentNode(){return i.DOMUtils.findElement(this.node,k)}get renderer(){return this._renderer}get sortState(){return this._sortState}get onItemOpened(){return this._onItemOpened}selectedItems(){const e=this._sortedItems;return(0,h.filter)(e,(e=>this.selection[e.path]))}sortedItems(){return this._sortedItems[Symbol.iterator]()}sort(e){this._sortedItems=X.sort(this.model.items(),e,this._sortNotebooksFirst),this._sortState=e,this.update()}rename(){return this._doRename()}cut(){this._isCut=!0,this._copy(),this.update()}copy(){this._copy()}paste(){if(!this._clipboard.length)return this._isCut=!1,Promise.resolve(void 0);const e=this._model.path,t=[];for(const s of this._clipboard)if(this._isCut){const i=this._manager.services.contents.localPath(s).split("/"),r=i[i.length-1],n=l.PathExt.join(e,r);t.push(this._model.manager.rename(s,n))}else t.push(this._model.manager.copy(s,e));for(const e of this._items)e.classList.remove(K);return this._clipboard.length=0,this._isCut=!1,this.removeClass("jp-mod-clipboard"),Promise.all(t).then((()=>{})).catch((e=>{(0,i.showErrorMessage)(this._trans._p("showErrorMessage","Paste Error"),e)}))}async delete(){const e=this._sortedItems.filter((e=>this.selection[e.path]));if(!e.length)return;const t=1===e.length?this._trans.__("Are you sure you want to permanently delete: %1?",e[0].name):this._trans._n("Are you sure you want to permanently delete the %1 selected item?","Are you sure you want to permanently delete the %1 selected items?",e.length),s=await(0,i.showDialog)({title:this._trans.__("Delete"),body:t,buttons:[i.Dialog.cancelButton({label:this._trans.__("Cancel")}),i.Dialog.warnButton({label:this._trans.__("Delete")})],defaultButton:0});!this.isDisposed&&s.button.accept&&await this._delete(e.map((e=>e.path)));let r=this._focusIndex;const n=this._sortedItems.length-e.length-1;r>n&&(r=Math.max(0,n)),this._focusItem(r)}duplicate(){const e=this._model.path,t=[];for(const s of this.selectedItems())"directory"!==s.type&&t.push(this._model.manager.copy(s.path,e));return Promise.all(t).then((()=>{})).catch((e=>{(0,i.showErrorMessage)(this._trans._p("showErrorMessage","Duplicate file"),e)}))}async download(){await Promise.all(Array.from(this.selectedItems()).filter((e=>"directory"!==e.type)).map((e=>this._model.download(e.path))))}shutdownKernels(){const e=this._model,t=this._sortedItems,s=t.map((e=>e.path)),r=Array.from(this._model.sessions()).filter((e=>{const i=h.ArrayExt.firstIndexOf(s,e.path);return this.selection[t[i].path]})).map((t=>e.manager.services.sessions.shutdown(t.id)));return Promise.all(r).then((()=>{})).catch((e=>{(0,i.showErrorMessage)(this._trans._p("showErrorMessage","Shut down kernel"),e)}))}selectNext(e=!1){let t=-1;const s=Object.keys(this.selection),i=this._sortedItems;if(1===s.length||e){const e=s[s.length-1];t=h.ArrayExt.findFirstIndex(i,(t=>t.path===e)),t+=1,t===this._items.length&&(t=0)}else if(0===s.length)t=0;else{const e=s[s.length-1];t=h.ArrayExt.findFirstIndex(i,(t=>t.path===e))}-1!==t&&(this._selectItem(t,e),c.ElementExt.scrollIntoViewIfNeeded(this.contentNode,this._items[t]))}selectPrevious(e=!1){let t=-1;const s=Object.keys(this.selection),i=this._sortedItems;if(1===s.length||e){const e=s[0];t=h.ArrayExt.findFirstIndex(i,(t=>t.path===e)),t-=1,-1===t&&(t=this._items.length-1)}else if(0===s.length)t=this._items.length-1;else{const e=s[0];t=h.ArrayExt.findFirstIndex(i,(t=>t.path===e))}-1!==t&&(this._selectItem(t,e),c.ElementExt.scrollIntoViewIfNeeded(this.contentNode,this._items[t]))}selectByPrefix(){const e=this._searchPrefix.toLowerCase(),t=this._sortedItems,s=h.ArrayExt.findFirstIndex(t,(t=>t.name.toLowerCase().substr(0,e.length)===e));-1!==s&&(this._selectItem(s,!1),c.ElementExt.scrollIntoViewIfNeeded(this.contentNode,this._items[s]))}isSelected(e){const t=this._sortedItems;return 0!==Array.from((0,h.filter)(t,(t=>t.name===e&&this.selection[t.path]))).length}modelForClick(e){const t=this._sortedItems,s=X.hitTestNodes(this._items,e);if(-1!==s)return t[s]}clearSelectedItems(){this.selection=Object.create(null)}async selectItemByName(e,t=!1){if(await this.model.refresh(),this.isDisposed)throw new Error("File browser is disposed.");const s=this._sortedItems,i=h.ArrayExt.findFirstIndex(s,(t=>t.name===e));if(-1===i)throw new Error("Item does not exist.");this._selectItem(i,!1,t),E.MessageLoop.sendMessage(this,a.Widget.Msg.UpdateRequest),c.ElementExt.scrollIntoViewIfNeeded(this.contentNode,this._items[i])}handleEvent(e){switch(e.type){case"mousedown":this._evtMousedown(e);break;case"mouseup":this._evtMouseup(e);break;case"mousemove":this._evtMousemove(e);break;case"keydown":this.evtKeydown(e);break;case"click":this._evtClick(e);break;case"dblclick":this.evtDblClick(e);break;case"dragenter":case"dragover":this.addClass("jp-mod-native-drop"),e.preventDefault();break;case"dragleave":case"dragend":this.removeClass("jp-mod-native-drop");break;case"drop":this.removeClass("jp-mod-native-drop"),this.evtNativeDrop(e);break;case"scroll":this._evtScroll(e);break;case"lm-dragenter":this.evtDragEnter(e);break;case"lm-dragleave":this.evtDragLeave(e);break;case"lm-dragover":this.evtDragOver(e);break;case"lm-drop":this.evtDrop(e)}}onAfterAttach(e){super.onAfterAttach(e);const t=this.node,s=i.DOMUtils.findElement(t,k);t.addEventListener("mousedown",this),t.addEventListener("keydown",this),t.addEventListener("click",this),t.addEventListener("dblclick",this),s.addEventListener("dragenter",this),s.addEventListener("dragover",this),s.addEventListener("dragleave",this),s.addEventListener("dragend",this),s.addEventListener("drop",this),s.addEventListener("scroll",this),s.addEventListener("lm-dragenter",this),s.addEventListener("lm-dragleave",this),s.addEventListener("lm-dragover",this),s.addEventListener("lm-drop",this)}onBeforeDetach(e){super.onBeforeDetach(e);const t=this.node,s=i.DOMUtils.findElement(t,k);t.removeEventListener("mousedown",this),t.removeEventListener("keydown",this),t.removeEventListener("click",this),t.removeEventListener("dblclick",this),s.removeEventListener("scroll",this),s.removeEventListener("dragover",this),s.removeEventListener("dragover",this),s.removeEventListener("dragleave",this),s.removeEventListener("dragend",this),s.removeEventListener("drop",this),s.removeEventListener("lm-dragenter",this),s.removeEventListener("lm-dragleave",this),s.removeEventListener("lm-dragover",this),s.removeEventListener("lm-drop",this),document.removeEventListener("mousemove",this,!0),document.removeEventListener("mouseup",this,!0)}onAfterShow(e){this._isDirty&&(this.sort(this.sortState),this.update())}onUpdateRequest(e){var t;this._isDirty=!1;const s=this._sortedItems,r=this._items,n=i.DOMUtils.findElement(this.node,k),o=this._renderer;for(this.removeClass(z),this.removeClass(V);r.length>s.length;)n.removeChild(r.pop());for(;r.length<s.length;){const e=o.createItemNode(this._hiddenColumns);e.classList.add("jp-DirListing-item"),r.push(e),n.appendChild(e)}r.forEach(((e,t)=>{e.classList.remove(V),e.classList.remove(H),e.classList.remove(K);const s=o.getCheckboxNode(e);s&&(s.checked=!1);const i=o.getNameNode(e);i&&(i.tabIndex=t===this._focusIndex?0:-1)}));const a=o.getCheckboxNode(this.headerNode);if(a){const e=Object.keys(this.selection).length,t=s.length>0&&e===s.length,i=!t&&e>0;a.checked=t,a.indeterminate=i,a.dataset.checked=String(t),a.dataset.indeterminate=String(i);const r=this.translator.load("jupyterlab");null==a||a.setAttribute("aria-label",t||i?r.__("Deselect all files and directories"):r.__("Select all files and directories"))}s.forEach(((e,t)=>{const s=r[t],i=this._manager.registry.getFileTypeForModel(e);o.updateItemNode(s,e,i,this.translator,this._hiddenColumns,this.selection[e.path]),this.selection[e.path]&&this._isCut&&this._model.path===this._prevPath&&s.classList.add(K),s.setAttribute("data-isdir","directory"===e.type?"true":"false")}));const l=Object.keys(this.selection).length;l&&(this.addClass(V),l>1&&this.addClass(z));const d=s.map((e=>e.path));for(const e of this._model.sessions()){const s=h.ArrayExt.firstIndexOf(d,e.path),i=r[s];if(i){let s=null===(t=e.kernel)||void 0===t?void 0:t.name;const r=this._model.specs;if(i.classList.add(H),r&&s){const e=r.kernelspecs[s];s=e?e.display_name:this._trans.__("unknown")}i.title=this._trans.__("%1\nKernel: %2",i.title,s)}}this._prevPath=this._model.path}onResize(e){const{width:t}=-1===e.width?this.node.getBoundingClientRect():e;this.toggleClass("jp-DirListing-narrow",t<250)}setColumnVisibility(e,t){t?this._hiddenColumns.delete(e):this._hiddenColumns.add(e),this.headerNode.innerHTML="",this._renderer.populateHeaderNode(this.headerNode,this.translator,this._hiddenColumns)}setNotebooksFirstSorting(e){let t=this._sortNotebooksFirst;this._sortNotebooksFirst=e,this._sortNotebooksFirst!==t&&this.sort(this._sortState)}isWithinCheckboxHitArea(e){let t=e.target;for(;t;){if(t.classList.contains(S))return!0;t=t.parentElement}return!1}_evtClick(e){const t=e.target,s=this.headerNode,i=this._renderer;if(s.contains(t)){const t=i.getCheckboxNode(s);if(t&&this.isWithinCheckboxHitArea(e))"false"===t.dataset.indeterminate&&"false"===t.dataset.checked?this._sortedItems.forEach((e=>this.selection[e.path]=!0)):this.clearSelectedItems(),this.update();else{const t=this.renderer.handleHeaderClick(s,e);t&&this.sort(t)}}else this._focusItem(this._focusIndex)}_evtScroll(e){this.headerNode.scrollLeft=this.contentNode.scrollLeft}_evtMousedown(e){if(e.target===this._editNode)return;if(this._editNode.parentNode){if(this._editNode===e.target)return;this._editNode.focus(),this._editNode.blur(),clearTimeout(this._selectTimer)}let t=X.hitTestNodes(this._items,e);-1!==t&&(this.handleFileSelect(e),0!==e.button&&clearTimeout(this._selectTimer),Y&&e.ctrlKey||2===e.button||0===e.button&&(this._dragData={pressX:e.clientX,pressY:e.clientY,index:t},document.addEventListener("mouseup",this,!0),document.addEventListener("mousemove",this,!0)))}_evtMouseup(e){if(this._softSelection&&(e.metaKey||e.shiftKey||e.ctrlKey||0!==e.button||(this.clearSelectedItems(),this.selection[this._softSelection]=!0,this.update()),this._softSelection=""),0===e.button&&this._focusItem(this._focusIndex),0!==e.button||!this._drag)return document.removeEventListener("mousemove",this,!0),void document.removeEventListener("mouseup",this,!0);e.preventDefault(),e.stopPropagation()}_evtMousemove(e){if(e.preventDefault(),e.stopPropagation(),this._drag||!this._dragData)return;const t=this._dragData,s=Math.abs(e.clientX-t.pressX),i=Math.abs(e.clientY-t.pressY);s<5&&i<5||this._startDrag(t.index,e.clientX,e.clientY)}handleOpen(e){if(this._onItemOpened.emit(e),"directory"===e.type){const t=this._manager.services.contents.localPath(e.path);this._model.cd(`/${t}`).catch((e=>(0,i.showErrorMessage)(this._trans._p("showErrorMessage","Open directory"),e)))}else{const t=e.path;this._manager.openOrReveal(t)}}_getNextFocusIndex(e,t){const s=e+t;return-1===s||s===this._items.length?e:s}_handleArrowY(e,t){if(e.altKey||e.metaKey)return;if(!this._items.length)return;if(!e.target.classList.contains(F))return;e.stopPropagation(),e.preventDefault();const s=this._focusIndex;let i=this._getNextFocusIndex(s,t);t>0&&0===s&&!e.ctrlKey&&0===Object.keys(this.selection).length&&(i=0),e.shiftKey?this._handleMultiSelect(i):e.ctrlKey||this._selectItem(i,e.shiftKey,!1),this._focusItem(i),this.update()}async goUp(){const e=this.model;if(e.path!==e.rootPath)try{await e.cd("..")}catch(t){console.warn(`Failed to go to parent directory of ${e.path}`,t)}}evtKeydown(e){if(!this._inRename){switch(e.keyCode){case 13:if(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;e.preventDefault(),e.stopPropagation();for(const e of this.selectedItems())this.handleOpen(e);return;case 38:return void this._handleArrowY(e,-1);case 40:return void this._handleArrowY(e,1);case 32:if(e.ctrlKey){if(e.metaKey||e.shiftKey||e.altKey)return;const t=this._items[this._focusIndex];if(!t.contains(e.target)||!t.contains(document.activeElement))return;e.stopPropagation(),e.preventDefault();const{path:s}=this._sortedItems[this._focusIndex];return this.selection[s]?delete this.selection[s]:this.selection[s]=!0,void this.update()}}if(void 0!==e.key&&1===e.key.length&&(" "!==e.key&&32!==e.keyCode||"checkbox"!==e.target.type)){if(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;this._searchPrefix+=e.key,clearTimeout(this._searchPrefixTimer),this._searchPrefixTimer=window.setTimeout((()=>{this._searchPrefix=""}),1e3),this.selectByPrefix(),e.stopPropagation(),e.preventDefault()}}}evtDblClick(e){if(0!==e.button)return;if(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;if(this.isWithinCheckboxHitArea(e))return;e.preventDefault(),e.stopPropagation(),clearTimeout(this._selectTimer),this._editNode.blur();const t=e.target,s=h.ArrayExt.findFirstIndex(this._items,(e=>e.contains(t)));if(-1===s)return;const i=this._sortedItems[s];this.handleOpen(i)}evtNativeDrop(e){var t,s,r;const n=null===(t=e.dataTransfer)||void 0===t?void 0:t.files;if(!n||0===n.length)return;const o=null===(s=e.dataTransfer)||void 0===s?void 0:s.items.length;if(o){for(let t=0;t<o;t++){let s=null===(r=e.dataTransfer)||void 0===r?void 0:r.items[t].webkitGetAsEntry();(null==s?void 0:s.isDirectory)&&(console.log("currently not supporting drag + drop for folders"),(0,i.showDialog)({title:this._trans.__("Error Uploading Folder"),body:this._trans.__("Drag and Drop is currently not supported for folders"),buttons:[i.Dialog.cancelButton({label:this._trans.__("Close")})]}))}e.preventDefault();for(let e=0;e<n.length;e++)this._model.upload(n[e])}}evtDragEnter(e){if(e.mimeData.hasData(U)){const t=X.hitTestNodes(this._items,e);if(-1===t)return;const s=this._sortedItems[t];if("directory"!==s.type||this.selection[s.path])return;e.target.classList.add(R),e.preventDefault(),e.stopPropagation()}}evtDragLeave(e){e.preventDefault(),e.stopPropagation();const t=i.DOMUtils.findElement(this.node,R);t&&t.classList.remove(R)}evtDragOver(e){e.preventDefault(),e.stopPropagation(),e.dropAction=e.proposedAction;const t=i.DOMUtils.findElement(this.node,R);t&&t.classList.remove(R);const s=X.hitTestNodes(this._items,e);this._items[s].classList.add(R)}evtDrop(e){if(e.preventDefault(),e.stopPropagation(),clearTimeout(this._selectTimer),"none"===e.proposedAction)return void(e.dropAction="none");if(!e.mimeData.hasData(U))return;let t=e.target;for(;t&&t.parentElement;){if(t.classList.contains(R)){t.classList.remove(R);break}t=t.parentElement}const s=h.ArrayExt.firstIndexOf(this._items,t),r=this._sortedItems;let n=this._model.path;"directory"===r[s].type&&(n=l.PathExt.join(n,r[s].name));const o=this._manager,a=[],c=e.mimeData.getData(U);e.ctrlKey&&"move"===e.proposedAction?e.dropAction="copy":e.dropAction=e.proposedAction;for(const t of c){const s=o.services.contents.localPath(t),i=l.PathExt.basename(s),r=l.PathExt.join(n,i);r!==t&&("copy"===e.dropAction?a.push(o.copy(t,n)):a.push((0,d.renameFile)(o,t,r)))}Promise.all(a).catch((e=>{(0,i.showErrorMessage)(this._trans._p("showErrorMessage","Error while copying/moving files"),e)}))}_startDrag(e,t,s){let i=Object.keys(this.selection);const r=this._items[e],n=this._sortedItems;let o,a;if(r.classList.contains(V)){const e=i[0];a=n.find((t=>t.path===e)),o=this.selectedItems()}else a=n[e],i=[a.path],o=[a];if(!a)return;const l=this._manager.registry.getFileTypeForModel(a),d=this.renderer.createDragImage(r,i.length,this._trans,l);this._drag=new C.Drag({dragImage:d,mimeData:new b.MimeData,supportedActions:"move",proposedAction:"move"}),this._drag.mimeData.setData(U,i);const h=this.model.manager.services;for(const e of o)this._drag.mimeData.setData("application/x-jupyter-icontentsrich",{model:e,withContent:async()=>await h.contents.get(e.path)});if(a&&"directory"!==a.type){const e=i.slice(1).reverse();this._drag.mimeData.setData("application/vnd.lumino.widget-factory",(()=>{if(!a)return;const t=a.path;let s=this._manager.findWidget(t);if(s||(s=this._manager.open(a.path)),e.length){const t=new b.PromiseDelegate;t.promise.then((()=>{let t=s;e.forEach((e=>{const s={ref:null==t?void 0:t.id,mode:"tab-after"};t=this._manager.openOrReveal(e,void 0,void 0,s),this._manager.openOrReveal(a.path)}))})),t.resolve(void 0)}return s}))}document.removeEventListener("mousemove",this,!0),document.removeEventListener("mouseup",this,!0),clearTimeout(this._selectTimer),this._drag.start(t,s).then((e=>{this._drag=null,clearTimeout(this._selectTimer)}))}handleFileSelect(e){const t=this._sortedItems,s=X.hitTestNodes(this._items,e);if(clearTimeout(this._selectTimer),-1===s)return;this._softSelection="";const i=t[s].path,r=Object.keys(this.selection),n=0===e.button&&!(Y&&e.ctrlKey)&&this.isWithinCheckboxHitArea(e);if(Y&&e.metaKey||!Y&&e.ctrlKey||n)this.selection[i]?delete this.selection[i]:this.selection[i]=!0,this._focusItem(s);else if(e.shiftKey)this._handleMultiSelect(s),this._focusItem(s);else{if(!(i in this.selection&&r.length>1))return this._selectItem(s,!1,!0);this._softSelection=i}this.update()}_focusItem(e){const t=this._items;if(0===t.length)return this._focusIndex=0,void this.node.focus();this._focusIndex=e;const s=t[e],i=this.renderer.getNameNode(s);i&&(i.tabIndex=0,i.focus())}_allSelectedBetween(e,t){if(e===t)return;const[s,i]=e<t?[e+1,t]:[t+1,e];return this._sortedItems.slice(s,i).reduce(((e,t)=>e&&this.selection[t.path]),!0)}_handleMultiSelect(e){const t=this._sortedItems,s=this._focusIndex,i=t[e];let r=!0;if(e===s)return void(this.selection[i.path]=!0);if(this.selection[i.path])if(1===Math.abs(e-s)){const i=t[s],r=t[s+(e<s?1:-1)];!this.selection[i.path]||r&&this.selection[r.path]||delete this.selection[i.path]}else this._allSelectedBetween(s,e)&&(r=!1);const n=s<e?1:-1;for(let i=s;i!==e+n;i+=n)if(r){if(i===s)continue;this.selection[t[i].path]=!0}else{if(i===e)continue;delete this.selection[t[i].path]}}_copy(){this._clipboard.length=0;for(const e of this.selectedItems())this._clipboard.push(e.path)}async _delete(e){await Promise.all(e.map((e=>this._model.manager.deleteFile(e).catch((e=>{(0,i.showErrorMessage)(this._trans._p("showErrorMessage","Delete Failed"),e)})))))}async _doRename(){this._inRename=!0;const e=Object.keys(this.selection);if(0===e.length)return this._inRename=!1,Promise.resolve("");const t=this._sortedItems;let{path:s}=t[this._focusIndex];this.selection[s]||(s=e.slice(-1)[0]);const r=h.ArrayExt.findFirstIndex(t,(e=>e.path===s)),n=this._items[r],o=t[r],a=this.renderer.getNameNode(n),c=o.name;this._editNode.value=c,this._selectItem(r,!1,!0);const m=await X.userInputForRename(a,this._editNode,c);if(this.isDisposed)throw this._inRename=!1,new Error("File browser is disposed.");let u=m;if(m&&m!==c)if((0,d.isValidFileName)(m)){const e=this._manager,t=l.PathExt.join(this._model.path,c),s=l.PathExt.join(this._model.path,m);try{await(0,d.renameFile)(e,t,s)}catch(e){"File not renamed"!==e&&(0,i.showErrorMessage)(this._trans._p("showErrorMessage","Rename Error"),e),u=c}if(this.isDisposed)throw this._inRename=!1,new Error("File browser is disposed.")}else(0,i.showErrorMessage)(this._trans.__("Rename Error"),Error(this._trans._p("showErrorMessage",'"%1" is not a valid name for a file. Names must have nonzero length, and cannot include "/", "\\", or ":"',m))),u=c;else u=c;if(!this.isDisposed&&1===Object.keys(this.selection).length&&this.selection[o.path])try{await this.selectItemByName(u,!0)}catch(e){console.warn("After rename, failed to select file",u)}return this._inRename=!1,u}_selectItem(e,t,s=!0){const i=this._sortedItems;t||this.clearSelectedItems();const r=i[e].path;this.selection[r]=!0,s&&this._focusItem(e),this.update()}_onModelRefreshed(){const e=Object.keys(this.selection);this.clearSelectedItems();for(const t of this._model.items()){const s=t.path;-1!==e.indexOf(s)&&(this.selection[s]=!0)}this.isVisible?this.sort(this.sortState):this._isDirty=!0}_onPathChanged(){this.clearSelectedItems(),this.sort(this.sortState),requestAnimationFrame((()=>{this._focusItem(0)}))}_onFileChanged(e,t){const s=t.newValue;if(!s)return;const i=s.name;"new"===t.type&&i&&this.selectItemByName(i).catch((()=>{}))}_onActivateRequested(e,t){if(l.PathExt.dirname(t)!==this._model.path)return;const s=l.PathExt.basename(t);this.selectItemByName(s).catch((()=>{}))}}var X;!function(e){class t{createNode(){const e=document.createElement("div"),t=document.createElement("div"),s=document.createElement("ul");return s.className=k,t.className=I,e.appendChild(t),e.appendChild(s),e.tabIndex=-1,e}populateHeaderNode(e,t,s){const r=(t=t||n.nullTranslator).load("jupyterlab"),o=this.createHeaderItemNode(r.__("Name")),a=document.createElement("div"),l=this.createHeaderItemNode(r.__("Last Modified")),d=this.createHeaderItemNode(r.__("File Size"));if(o.classList.add(T),o.classList.add(V),l.classList.add(j),d.classList.add(A),a.classList.add("jp-id-narrow"),a.textContent="...",!(null==s?void 0:s.has("is_selected"))){const t=this.createCheckboxWrapperNode({alwaysVisible:!0});e.appendChild(t)}e.appendChild(o),e.appendChild(a),e.appendChild(l),e.appendChild(d),(null==s?void 0:s.has("last_modified"))?l.classList.add(O):l.classList.remove(O),(null==s?void 0:s.has("file_size"))?d.classList.add(B):d.classList.remove(B),X.updateCaret(i.DOMUtils.findElement(o,x),"right","up")}handleHeaderClick(e,t){const s=i.DOMUtils.findElement(e,T),r=i.DOMUtils.findElement(e,j),n=i.DOMUtils.findElement(e,A),o={direction:"ascending",key:"name"},a=t.target,l=i.DOMUtils.findElement(r,x),d=i.DOMUtils.findElement(n,x),h=i.DOMUtils.findElement(s,x);return s.contains(a)?(s.classList.contains(V)?s.classList.contains(W)?(s.classList.remove(W),X.updateCaret(h,"right","up")):(o.direction="descending",s.classList.add(W),X.updateCaret(h,"right","down")):(s.classList.remove(W),X.updateCaret(h,"right","up")),s.classList.add(V),r.classList.remove(V),r.classList.remove(W),n.classList.remove(V),n.classList.remove(W),X.updateCaret(l,"left"),X.updateCaret(d,"left"),o):r.contains(a)?(o.key="last_modified",r.classList.contains(V)?r.classList.contains(W)?(r.classList.remove(W),X.updateCaret(l,"left","up")):(o.direction="descending",r.classList.add(W),X.updateCaret(l,"left","down")):(r.classList.remove(W),X.updateCaret(l,"left","up")),r.classList.add(V),s.classList.remove(V),s.classList.remove(W),n.classList.remove(V),n.classList.remove(W),X.updateCaret(h,"right"),X.updateCaret(d,"left"),o):n.contains(a)?(o.key="file_size",n.classList.contains(V)?n.classList.contains(W)?(n.classList.remove(W),X.updateCaret(d,"left","up")):(o.direction="descending",n.classList.add(W),X.updateCaret(d,"left","down")):(n.classList.remove(W),X.updateCaret(d,"left","up")),n.classList.add(V),s.classList.remove(V),s.classList.remove(W),r.classList.remove(V),r.classList.remove(W),X.updateCaret(h,"right"),X.updateCaret(l,"left"),o):o}createItemNode(e){const t=document.createElement("li"),s=document.createElement("span"),i=document.createElement("span"),r=document.createElement("span"),n=document.createElement("span");if(s.className=P,i.className=F,r.className=N,n.className=M,!(null==e?void 0:e.has("is_selected"))){const e=this.createCheckboxWrapperNode();t.appendChild(e)}return t.appendChild(s),t.appendChild(i),t.appendChild(r),t.appendChild(n),(null==e?void 0:e.has("last_modified"))?r.classList.add(O):r.classList.remove(O),(null==e?void 0:e.has("file_size"))?n.classList.add(B):n.classList.remove(B),t}createCheckboxWrapperNode(e){const t=document.createElement("label");t.classList.add(S);const s=document.createElement("input");return s.type="checkbox",s.addEventListener("click",(e=>{e.preventDefault()})),(null==e?void 0:e.alwaysVisible)?t.classList.add("jp-mod-visible"):s.tabIndex=-1,t.appendChild(s),t}updateItemNode(e,t,s,r,a,d){d&&e.classList.add(V),s=s||y.DocumentRegistry.getDefaultTextFileType(r);const{icon:c,iconClass:m,name:u}=s,p=(r=r||n.nullTranslator).load("jupyterlab"),_=i.DOMUtils.findElement(e,P),f=i.DOMUtils.findElement(e,F),g=i.DOMUtils.findElement(e,N),v=i.DOMUtils.findElement(e,M),w=i.DOMUtils.findElement(e,S),b=!(null==a?void 0:a.has("is_selected"));if(w&&!b)e.removeChild(w);else if(b&&!w){const t=this.createCheckboxWrapperNode();e.insertBefore(t,_)}(null==a?void 0:a.has("last_modified"))?g.classList.add(O):g.classList.remove(O),(null==a?void 0:a.has("file_size"))?v.classList.add(B):v.classList.remove(B),o.LabIcon.resolveElement({icon:c,iconClass:(0,o.classes)(m,"jp-Icon"),container:_,className:P,stylesheet:"listing"});let C=p.__("Name: %1",t.name);if(null!==t.size&&void 0!==t.size){const e=X.formatFileSize(t.size,1,1024);v.textContent=e,C+=p.__("\nSize: %1",X.formatFileSize(t.size,1,1024))}else v.textContent="";if(t.path){const e=l.PathExt.dirname(t.path);e&&(C+=p.__("\nPath: %1",e.substr(0,50)),e.length>50&&(C+="..."))}t.created&&(C+=p.__("\nCreated: %1",l.Time.format(new Date(t.created)))),t.last_modified&&(C+=p.__("\nModified: %1",l.Time.format(new Date(t.last_modified)))),C+=p.__("\nWritable: %1",t.writable),e.title=C,e.setAttribute("data-file-type",u),t.name.startsWith(".")?e.setAttribute("data-is-dot","true"):e.removeAttribute("data-is-dot");const E=t.indices?t.indices:[];let D=h.StringExt.highlight(t.name,E,L.h.mark);f&&L.VirtualDOM.render(L.h.span(D),f);const I=null==w?void 0:w.querySelector('input[type="checkbox"]');if(I){let e;e="directory"===s.contentType?d?p.__('Deselect directory "%1"',D):p.__('Select directory "%1"',D):d?p.__('Deselect file "%1"',D):p.__('Select file "%1"',D),I.setAttribute("aria-label",e),I.checked=null!=d&&d}let x="",k="";t.last_modified&&(x=l.Time.formatHuman(new Date(t.last_modified)),k=l.Time.format(new Date(t.last_modified))),g.textContent=x,g.title=k}getNameNode(e){return i.DOMUtils.findElement(e,F)}getCheckboxNode(e){return e.querySelector(`.${S} input[type=checkbox]`)}createDragImage(e,t,s,r){const n=e.cloneNode(!0),o=i.DOMUtils.findElement(n,N),a=i.DOMUtils.findElement(n,P);return n.removeChild(o),r?(a.textContent=r.iconLabel||"",a.className=r.iconClass||""):(a.textContent="",a.className=""),a.classList.add("jp-DragIcon"),t>1&&(i.DOMUtils.findElement(n,F).textContent=s._n("%1 Item","%1 Items",t)),n}createHeaderItemNode(e){const t=document.createElement("div"),s=document.createElement("span"),i=document.createElement("span");return t.className="jp-DirListing-headerItem",s.className="jp-DirListing-headerItemText",i.className=x,s.textContent=e,t.appendChild(s),t.appendChild(i),t}}e.Renderer=t,e.defaultRenderer=new t}(q||(q={})),function(e){e.userInputForRename=function(e,t,s){const i=e.parentElement;i.replaceChild(t,e),t.focus();const r=t.value.lastIndexOf(".");return-1===r?t.setSelectionRange(0,t.value.length):t.setSelectionRange(0,r),new Promise((r=>{t.onblur=()=>{i.replaceChild(e,t),r(t.value)},t.onkeydown=i=>{switch(i.keyCode){case 13:i.stopPropagation(),i.preventDefault(),t.blur();break;case 27:i.stopPropagation(),i.preventDefault(),t.value=s,t.blur(),e.focus()}}}))},e.sort=function(e,t,s=!1){const i=Array.from(e),r="descending"===t.direction?1:-1;function n(e){return"directory"===e.type?2:"notebook"===e.type&&s?1:0}function o(e){return(t,i)=>{if(function(e,t){return s?e.type!==t.type:"directory"===e.type!=("directory"===t.type)}(t,i))return n(i)-n(t);const o=e(t,i);return 0!==o?o*r:t.name.localeCompare(i.name)}}return"last_modified"===t.key?i.sort(o(((e,t)=>new Date(e.last_modified).getTime()-new Date(t.last_modified).getTime()))):"file_size"===t.key?i.sort(o(((e,t)=>{var s,i;return(null!==(s=e.size)&&void 0!==s?s:0)-(null!==(i=t.size)&&void 0!==i?i:0)}))):i.sort(o(((e,t)=>t.name.localeCompare(e.name)))),i},e.hitTestNodes=function(e,t){return h.ArrayExt.findFirstIndex(e,(e=>c.ElementExt.hitTest(e,t.clientX,t.clientY)||t.target===e))},e.formatFileSize=function(e,t,s){if(0===e)return"0 B";const i=t||2,r=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],n=Math.floor(Math.log(e)/Math.log(s));return n>=0&&n<r.length?parseFloat((e/Math.pow(s,n)).toFixed(i))+" "+r[n]:String(e)},e.updateCaret=function(e,t,s){s?("down"===s?o.caretDownIcon:o.caretUpIcon).element({container:e,tag:"span",stylesheet:"listingHeaderItem",float:t}):(o.LabIcon.remove(e),e.className=x)}}(X||(X={}));class $ extends o.SidePanel{constructor(e){var t;super({content:new a.Panel,translator:e.translator}),this._directoryPending=null,this._filePending=null,this._showLastModifiedColumn=!0,this._showFileSizeColumn=!1,this._showHiddenFiles=!1,this._showFileCheckboxes=!1,this._sortNotebooksFirst=!1,this.addClass("jp-FileBrowser"),this.toolbar.addClass("jp-FileBrowser-toolbar"),this.id=e.id;const s=this.translator=null!==(t=e.translator)&&void 0!==t?t:n.nullTranslator,i=this.model=e.model,r=e.renderer;i.connectionFailure.connect(this._onConnectionFailure,this),this._manager=i.manager,this.toolbar.node.setAttribute("role","navigation"),this.toolbar.node.setAttribute("aria-label",this._trans.__("file browser")),this.mainPanel=new a.Panel,this.mainPanel.addClass("jp-FileBrowser-Panel"),this.mainPanel.title.label=this._trans.__("File Browser"),this.crumbs=new v({model:i,translator:s}),this.crumbs.addClass("jp-FileBrowser-crumbs"),this.listing=this.createDirListing({model:i,renderer:r,translator:s}),this.listing.addClass("jp-FileBrowser-listing"),this.mainPanel.addWidget(this.crumbs),this.mainPanel.addWidget(this.listing),this.addWidget(this.mainPanel),!1!==e.restore&&i.restore(this.id)}get navigateToCurrentDirectory(){return this._navigateToCurrentDirectory}set navigateToCurrentDirectory(e){this._navigateToCurrentDirectory=e}get showLastModifiedColumn(){return this._showLastModifiedColumn}set showLastModifiedColumn(e){this.listing.setColumnVisibility?(this.listing.setColumnVisibility("last_modified",e),this._showLastModifiedColumn=e):console.warn("Listing does not support toggling column visibility")}get showFileSizeColumn(){return this._showFileSizeColumn}set showFileSizeColumn(e){this.listing.setColumnVisibility?(this.listing.setColumnVisibility("file_size",e),this._showFileSizeColumn=e):console.warn("Listing does not support toggling column visibility")}get showHiddenFiles(){return this._showHiddenFiles}set showHiddenFiles(e){this.model.showHiddenFiles(e),this._showHiddenFiles=e}get showFileCheckboxes(){return this._showFileCheckboxes}set showFileCheckboxes(e){this.listing.setColumnVisibility?(this.listing.setColumnVisibility("is_selected",e),this._showFileCheckboxes=e):console.warn("Listing does not support toggling column visibility")}get sortNotebooksFirst(){return this._sortNotebooksFirst}set sortNotebooksFirst(e){this.listing.setNotebooksFirstSorting?(this.listing.setNotebooksFirstSorting(e),this._sortNotebooksFirst=e):console.warn("Listing does not support sorting notebooks first")}selectedItems(){return this.listing.selectedItems()}async selectItemByName(e){await this.listing.selectItemByName(e)}clearSelectedItems(){this.listing.clearSelectedItems()}rename(){return this.listing.rename()}cut(){this.listing.cut()}copy(){this.listing.copy()}paste(){return this.listing.paste()}async _createNew(e){try{const t=await this._manager.newUntitled(e);return await this.listing.selectItemByName(t.name,!0),await this.rename(),t}catch(e){throw(0,i.showErrorMessage)(this._trans.__("Error"),e),e}}async createNewDirectory(){if(this._directoryPending)return this._directoryPending;this._directoryPending=this._createNew({path:this.model.path,type:"directory"});try{return await this._directoryPending}finally{this._directoryPending=null}}async createNewFile(e){if(this._filePending)return this._filePending;this._filePending=this._createNew({path:this.model.path,type:"file",ext:e.ext});try{return await this._filePending}finally{this._filePending=null}}delete(){return this.listing.delete()}duplicate(){return this.listing.duplicate()}download(){return this.listing.download()}async goUp(){return this.listing.goUp()}shutdownKernels(){return this.listing.shutdownKernels()}selectNext(){this.listing.selectNext()}selectPrevious(){this.listing.selectPrevious()}modelForClick(e){return this.listing.modelForClick(e)}createDirListing(e){return new q(e)}_onConnectionFailure(e,t){if(t instanceof r.ServerConnection.ResponseError&&404===t.response.status){const e=this._trans.__("Directory not found");t.message=this._trans.__('Directory not found: "%1"',this.model.path),(0,i.showErrorMessage)(e,t)}}}var G=s(97934);const J=15728640,Z=1048576;class Q{constructor(e){var t;this._connectionFailure=new D.Signal(this),this._fileChanged=new D.Signal(this),this._items=[],this._key="",this._pathChanged=new D.Signal(this),this._paths=new Set,this._pending=null,this._pendingPath=null,this._refreshed=new D.Signal(this),this._sessions=[],this._state=null,this._isDisposed=!1,this._restored=new b.PromiseDelegate,this._uploads=[],this._uploadChanged=new D.Signal(this),this.manager=e.manager,this.translator=e.translator||n.nullTranslator,this._trans=this.translator.load("jupyterlab"),this._driveName=e.driveName||"",this._model={path:this.rootPath,name:l.PathExt.basename(this.rootPath),type:"directory",content:void 0,writable:!1,created:"unknown",last_modified:"unknown",mimetype:"text/plain",format:"text"},this._state=e.state||null;const s=e.refreshInterval||1e4,{services:i}=e.manager;i.contents.fileChanged.connect(this.onFileChanged,this),i.sessions.runningChanged.connect(this.onRunningChanged,this),this._unloadEventListener=e=>{if(this._uploads.length>0){const t=this._trans.__("Files still uploading");return e.returnValue=t,t}},window.addEventListener("beforeunload",this._unloadEventListener),this._poll=new G.Poll({auto:null===(t=e.auto)||void 0===t||t,name:"@jupyterlab/filebrowser:Model",factory:()=>this.cd("."),frequency:{interval:s,backoff:!0,max:3e5},standby:e.refreshStandby||"when-hidden"})}get connectionFailure(){return this._connectionFailure}get driveName(){return this._driveName}get restored(){return this._restored.promise}get fileChanged(){return this._fileChanged}get path(){return this._model?this._model.path:""}get rootPath(){return this._driveName?this._driveName+":":""}get pathChanged(){return this._pathChanged}get refreshed(){return this._refreshed}get specs(){return this.manager.services.kernelspecs.specs}get isDisposed(){return this._isDisposed}get uploadChanged(){return this._uploadChanged}uploads(){return this._uploads[Symbol.iterator]()}dispose(){this.isDisposed||(window.removeEventListener("beforeunload",this._unloadEventListener),this._isDisposed=!0,this._poll.dispose(),this._sessions.length=0,this._items.length=0,D.Signal.clearData(this))}items(){return this._items[Symbol.iterator]()}sessions(){return this._sessions[Symbol.iterator]()}async refresh(){await this._poll.refresh(),await this._poll.tick,this._refreshed.emit(void 0)}async cd(e="."){if(e="."!==e?this.manager.services.contents.resolvePath(this._model.path,e):this._pendingPath||this._model.path,this._pending){if(e===this._pendingPath)return this._pending;await this._pending}const t=this.path;this._pendingPath=e,t!==e&&(this._sessions.length=0);const s=this.manager.services;return this._pending=s.contents.get(e,{content:!0}).then((i=>{this.isDisposed||(this.handleContents(i),this._pendingPath=null,this._pending=null,t!==e&&(this._state&&this._key&&this._state.save(this._key,{path:e}),this._pathChanged.emit({name:"path",oldValue:t,newValue:e})),this.onRunningChanged(s.sessions,s.sessions.running()),this._refreshed.emit(void 0))})).catch((t=>{if(this._pendingPath=null,this._pending=null,t.response&&404===t.response.status&&"/"!==e)return t.message=this._trans.__('Directory not found: "%1"',this._model.path),console.error(t),this._connectionFailure.emit(t),this.cd("/");this._connectionFailure.emit(t)})),this._pending}async download(e){const t=await this.manager.services.contents.getDownloadUrl(e),s=document.createElement("a");s.href=t,s.download="",document.body.appendChild(s),s.click(),document.body.removeChild(s)}async restore(e,t=!0){const{manager:s}=this,i=`file-browser-${e}:cwd`,r=this._state;if(!this._key)if(this._key=i,t&&r){await s.services.ready;try{const e=await r.fetch(i);if(!e)return void this._restored.resolve(void 0);const t=e.path;t&&await this.cd("/");const n=s.services.contents.localPath(t);await s.services.contents.get(t),await this.cd(n)}catch(e){await r.remove(i)}this._restored.resolve(void 0)}else this._restored.resolve(void 0)}async upload(e){const t=l.PageConfig.getNotebookVersion(),s=t<[4,0,0]||t>=[5,1,0],i=e.size>J;if(i&&!s){const t=this._trans.__("Cannot upload file (>%1 MB). %2",J/1048576,e.name);throw console.warn(t),t}if(i&&!await this._shouldUploadLarge(e))throw"Cancelled large file upload";if(await this._uploadCheckDisposed(),await this.refresh(),await this._uploadCheckDisposed(),this._items.find((t=>t.name===e.name))&&!await(0,d.shouldOverwrite)(e.name))throw"File not uploaded";await this._uploadCheckDisposed();const r=s&&e.size>Z;return await this._upload(e,r)}async _shouldUploadLarge(e){const{button:t}=await(0,i.showDialog)({title:this._trans.__("Large file size warning"),body:this._trans.__("The file size is %1 MB. Do you still want to upload it?",Math.round(e.size/1048576)),buttons:[i.Dialog.cancelButton({label:this._trans.__("Cancel")}),i.Dialog.warnButton({label:this._trans.__("Upload")})]});return t.accept}async _upload(e,t){let s=this._model.path;s=s?s+"/"+e.name:e.name;const i=e.name,r=async(t,r)=>{await this._uploadCheckDisposed();const n=new FileReader;n.readAsDataURL(t),await new Promise(((t,s)=>{n.onload=t,n.onerror=t=>s(`Failed to upload "${e.name}":`+t)})),await this._uploadCheckDisposed();const o=n.result.split(",")[1],a={type:"file",format:"base64",name:i,chunk:r,content:o};return await this.manager.services.contents.save(s,a)};if(!t)try{return await r(e)}catch(t){throw h.ArrayExt.removeFirstWhere(this._uploads,(t=>e.name===t.path)),t}let n,o={path:s,progress:0};this._uploadChanged.emit({name:"start",newValue:o,oldValue:null});for(let t=0;!n;t+=Z){const i=t+Z,a=i>=e.size,l=a?-1:i/Z,d={path:s,progress:t/e.size};let c;this._uploads.splice(this._uploads.indexOf(o)),this._uploads.push(d),this._uploadChanged.emit({name:"update",newValue:d,oldValue:o}),o=d;try{c=await r(e.slice(t,i),l)}catch(t){throw h.ArrayExt.removeFirstWhere(this._uploads,(t=>e.name===t.path)),this._uploadChanged.emit({name:"failure",newValue:o,oldValue:null}),t}a&&(n=c)}return this._uploads.splice(this._uploads.indexOf(o)),this._uploadChanged.emit({name:"finish",newValue:null,oldValue:o}),n}_uploadCheckDisposed(){return this.isDisposed?Promise.reject("Filemanager disposed. File upload canceled"):Promise.resolve()}handleContents(e){this._model={name:e.name,path:e.path,type:e.type,content:void 0,writable:e.writable,created:e.created,last_modified:e.last_modified,size:e.size,mimetype:e.mimetype,format:e.format},this._items=e.content,this._paths.clear(),e.content.forEach((e=>{this._paths.add(e.path)}))}onRunningChanged(e,t){this._populateSessions(t),this._refreshed.emit(void 0)}onFileChanged(e,t){const s=this._model.path,{sessions:i}=this.manager.services,{oldValue:r,newValue:n}=t;if(r&&r.path&&l.PathExt.dirname(r.path)===s?r:n&&n.path&&l.PathExt.dirname(n.path)===s?n:void 0)return this._poll.refresh(),this._populateSessions(i.running()),void this._fileChanged.emit(t)}_populateSessions(e){this._sessions.length=0;for(const t of e)this._paths.has(t.path)&&this._sessions.push(t)}}class ee extends Q{constructor(e){super(e),this._includeHiddenFiles=e.includeHiddenFiles||!1}items(){return this._includeHiddenFiles?super.items():(0,h.filter)(super.items(),(e=>!e.name.startsWith(".")))}showHiddenFiles(e){this._includeHiddenFiles=e,this.refresh()}}class te extends ee{constructor(e){var t,s;super(e),this._filter=null!==(t=e.filter)&&void 0!==t?t:e=>({}),this._filterDirectories=null===(s=e.filterDirectories)||void 0===s||s}get filterDirectories(){return this._filterDirectories}set filterDirectories(e){this._filterDirectories=e}items(){return(0,h.filter)(super.items(),(e=>{if(this._filterDirectories||"directory"!==e.type){const t=this._filter(e);return e.indices=null==t?void 0:t.indices,!!t}return!0}))}setFilter(e){this._filter=e,this.refresh()}}var se,ie;!function(e){function t(e){const t=e.translator||n.nullTranslator,s=t.load("jupyterlab"),r={title:e.title,buttons:[i.Dialog.cancelButton(),i.Dialog.okButton({label:s.__("Select")})],focusNodeSelector:e.focusNodeSelector,host:e.host,renderer:e.renderer,body:new re(e.manager,e.filter,t)};return new i.Dialog(r).launch()}e.getOpenFiles=t,e.getExistingDirectory=function(e){return t({...e,filter:e=>"directory"===e.type?{}:null})}}(se||(se={}));class re extends a.Widget{constructor(e,t,s,r){super();const l=(s=null!=s?s:n.nullTranslator).load("jupyterlab");this.addClass("jp-Open-Dialog"),this._browser=ie.createFilteredFileBrowser("filtered-file-browser-dialog",e,t,{},s,r),(0,i.setToolbar)(this._browser,(e=>[{name:"new-folder",widget:new i.ToolbarButton({icon:o.newFolderIcon,onClick:()=>{e.createNewDirectory()},tooltip:l.__("New Folder")})},{name:"refresher",widget:new i.ToolbarButton({icon:o.refreshIcon,onClick:()=>{e.model.refresh().catch((e=>{console.error("Failed to refresh file browser in open dialog.",e)}))},tooltip:l.__("Refresh File List")})}]));const d=new a.PanelLayout;d.addWidget(this._browser),this.layout=d}getValue(){const e=Array.from(this._browser.selectedItems());return 0===e.length?[{path:this._browser.model.path,name:l.PathExt.basename(this._browser.model.path),type:"directory",content:void 0,writable:!1,created:"unknown",last_modified:"unknown",mimetype:"text/plain",format:"text"}]:e}}!function(e){e.createFilteredFileBrowser=(e,t,s,i={},r,o)=>{r=r||n.nullTranslator;const a=new te({manager:t,filter:s,translator:r,driveName:i.driveName,refreshInterval:i.refreshInterval,filterDirectories:o});return new $({id:e,model:a,translator:r})}}(ie||(ie={}));const ne=new b.Token("@jupyterlab/filebrowser:IFileBrowserFactory","A factory object that creates file browsers.\n Use this if you want to create your own file browser (e.g., for a custom storage backend),\n or to interact with other file browsers that have been created by extensions."),oe=new b.Token("@jupyterlab/filebrowser:IDefaultFileBrowser","A service for the default file browser."),ae=new b.Token("@jupyterlab/filebrowser:IFileBrowserCommands","A token to ensure file browser commands are loaded.");class le extends o.ToolbarButton{constructor(e){super({icon:o.fileUploadIcon,label:e.label,onClick:()=>{this._input.click()},tooltip:de.translateToolTip(e.translator)}),this._onInputChanged=()=>{const e=Array.prototype.slice.call(this._input.files).map((e=>this.fileBrowserModel.upload(e)));Promise.all(e).catch((e=>{(0,i.showErrorMessage)(this._trans._p("showErrorMessage","Upload Error"),e)}))},this._onInputClicked=()=>{this._input.value=""},this._input=de.createUploadInput(),this.fileBrowserModel=e.model,this.translator=e.translator||n.nullTranslator,this._trans=this.translator.load("jupyterlab"),this._input.onclick=this._onInputClicked,this._input.onchange=this._onInputChanged,this.addClass("jp-id-upload")}}var de;!function(e){e.createUploadInput=function(){const e=document.createElement("input");return e.type="file",e.multiple=!0,e},e.translateToolTip=function(e){return(e=e||n.nullTranslator).load("jupyterlab").__("Upload Files")}}(de||(de={}));var he=s(22679),ce=s(78156),me=s.n(ce);function ue(e){const t=(e.translator||n.nullTranslator).load("jupyterlab");return me().createElement(he.GroupItem,{spacing:4},me().createElement(he.TextItem,{source:t.__("Uploading…")}),me().createElement(he.ProgressBar,{percentage:e.upload}))}class pe extends o.VDomRenderer{constructor(e){super(new pe.Model(e.tracker.currentWidget&&e.tracker.currentWidget.model)),this._onBrowserChange=(e,t)=>{this.model.browserModel=null===t?null:t.model},this.translator=e.translator||n.nullTranslator,this._trans=this.translator.load("jupyterlab"),this._tracker=e.tracker,this._tracker.currentChanged.connect(this._onBrowserChange)}render(){return this.model.items.length>0?this.model.items[0].complete?me().createElement(he.TextItem,{source:this._trans.__("Complete!")}):me().createElement(ue,{upload:this.model.items[0].progress,translator:this.translator}):me().createElement(ue,{upload:100,translator:this.translator})}dispose(){super.dispose(),this._tracker.currentChanged.disconnect(this._onBrowserChange)}}!function(e){class t extends o.VDomModel{constructor(e){super(),this._uploadChanged=(e,t)=>{if("start"===t.name)this._items.push({path:t.newValue.path,progress:100*t.newValue.progress,complete:!1});else if("update"===t.name){const e=h.ArrayExt.findFirstIndex(this._items,(e=>e.path===t.oldValue.path));-1!==e&&(this._items[e].progress=100*t.newValue.progress)}else if("finish"===t.name){const e=h.ArrayExt.findFirstValue(this._items,(e=>e.path===t.oldValue.path));e&&(e.complete=!0,setTimeout((()=>{h.ArrayExt.removeFirstOf(this._items,e),this.stateChanged.emit(void 0)}),2e3))}else"failure"===t.name&&h.ArrayExt.removeFirstWhere(this._items,(e=>e.path===t.newValue.path));this.stateChanged.emit(void 0)},this._items=[],this._browserModel=null,this.browserModel=e}get items(){return this._items}get browserModel(){return this._browserModel}set browserModel(e){const t=this._browserModel;t&&t.uploadChanged.disconnect(this._uploadChanged),this._browserModel=e,this._items=[],null!==this._browserModel&&this._browserModel.uploadChanged.connect(this._uploadChanged),this.stateChanged.emit(void 0)}}e.Model=t}(pe||(pe={}))}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[9341],{39341:(e,t,s)=>{s.r(t),s.d(t,{BreadCrumbs:()=>w,CHUNK_SIZE:()=>Z,DirListing:()=>q,FileBrowser:()=>$,FileBrowserModel:()=>Q,FileDialog:()=>se,FileUploadStatus:()=>pe,FilterFileBrowserModel:()=>te,IDefaultFileBrowser:()=>ae,IFileBrowserCommands:()=>oe,IFileBrowserFactory:()=>ne,LARGE_FILE_SIZE:()=>G,TogglableHiddenFileBrowserModel:()=>ee,Uploader:()=>le});var i=s(78036),r=s(91940),n=s(5944),a=s(70798),o=s(31516),l=s(13558),h=s(67115),d=s(33625),c=s(20998),m=s(18395);const u="jp-BreadCrumbs-home",p="jp-BreadCrumbs-preferred",_="jp-BreadCrumbs-item",f=["/","../../","../",""],g="application/x-jupyter-icontents",v="jp-mod-dropTarget";class w extends o.Widget{constructor(e){super(),this._previousState=null,this.translator=e.translator||n.nullTranslator,this._trans=this.translator.load("jupyterlab"),this._model=e.model,this._fullPath=e.fullPath||!1,this.addClass("jp-BreadCrumbs"),this._crumbs=y.createCrumbs(),this._crumbSeps=y.createCrumbSeparators();const t=l.PageConfig.getOption("preferredPath");this._hasPreferred=!(!t||"/"===t),this._hasPreferred&&this.node.appendChild(this._crumbs[y.Crumb.Preferred]),this.node.appendChild(this._crumbs[y.Crumb.Home]),this._model.refreshed.connect(this.update,this)}handleEvent(e){switch(e.type){case"click":this._evtClick(e);break;case"lm-dragenter":this._evtDragEnter(e);break;case"lm-dragleave":this._evtDragLeave(e);break;case"lm-dragover":this._evtDragOver(e);break;case"lm-drop":this._evtDrop(e);break;default:return}}get fullPath(){return this._fullPath}set fullPath(e){this._fullPath=e}onAfterAttach(e){super.onAfterAttach(e),this.update();const t=this.node;t.addEventListener("click",this),t.addEventListener("lm-dragenter",this),t.addEventListener("lm-dragleave",this),t.addEventListener("lm-dragover",this),t.addEventListener("lm-drop",this)}onBeforeDetach(e){super.onBeforeDetach(e);const t=this.node;t.removeEventListener("click",this),t.removeEventListener("lm-dragenter",this),t.removeEventListener("lm-dragleave",this),t.removeEventListener("lm-dragover",this),t.removeEventListener("lm-drop",this)}onUpdateRequest(e){const t={path:this._model.manager.services.contents.localPath(this._model.path),hasPreferred:this._hasPreferred,fullPath:this._fullPath};this._previousState&&c.JSONExt.deepEqual(t,this._previousState)||(this._previousState=t,y.updateCrumbs(this._crumbs,this._crumbSeps,t))}_evtClick(e){if(0!==e.button)return;let t=e.target;for(;t&&t!==this.node;){if(t.classList.contains(p))return this._model.cd(l.PageConfig.getOption("preferredPath")).catch((e=>(0,i.showErrorMessage)(this._trans.__("Open Error"),e))),e.preventDefault(),void e.stopPropagation();if(t.classList.contains(_)||t.classList.contains(u)){let s=d.ArrayExt.findFirstIndex(this._crumbs,(e=>e===t)),r=f[s];return this._fullPath&&s<0&&!t.classList.contains(u)&&(r=t.title),this._model.cd(r).catch((e=>(0,i.showErrorMessage)(this._trans.__("Open Error"),e))),e.preventDefault(),void e.stopPropagation()}t=t.parentElement}}_evtDragEnter(e){if(e.mimeData.hasData(g)){const t=d.ArrayExt.findFirstIndex(this._crumbs,(t=>m.ElementExt.hitTest(t,e.clientX,e.clientY)));-1!==t&&t!==y.Crumb.Current&&(this._crumbs[t].classList.add(v),e.preventDefault(),e.stopPropagation())}}_evtDragLeave(e){e.preventDefault(),e.stopPropagation();const t=i.DOMUtils.findElement(this.node,v);t&&t.classList.remove(v)}_evtDragOver(e){e.preventDefault(),e.stopPropagation(),e.dropAction=e.proposedAction;const t=i.DOMUtils.findElement(this.node,v);t&&t.classList.remove(v);const s=d.ArrayExt.findFirstIndex(this._crumbs,(t=>m.ElementExt.hitTest(t,e.clientX,e.clientY)));-1!==s&&this._crumbs[s].classList.add(v)}_evtDrop(e){if(e.preventDefault(),e.stopPropagation(),"none"===e.proposedAction)return void(e.dropAction="none");if(!e.mimeData.hasData(g))return;e.dropAction=e.proposedAction;let t=e.target;for(;t&&t.parentElement;){if(t.classList.contains(v)){t.classList.remove(v);break}t=t.parentElement}const s=d.ArrayExt.findFirstIndex(this._crumbs,(e=>e===t));if(-1===s)return;const r=this._model,n=l.PathExt.resolve(r.path,f[s]),a=r.manager,o=[],c=e.mimeData.getData(g);for(const e of c){const t=a.services.contents.localPath(e),s=l.PathExt.basename(t),i=l.PathExt.join(n,s);o.push((0,h.renameFile)(a,e,i))}Promise.all(o).catch((e=>(0,i.showErrorMessage)(this._trans.__("Move Error"),e)))}}var y;!function(e){let t;!function(e){e[e.Home=0]="Home",e[e.Ellipsis=1]="Ellipsis",e[e.Parent=2]="Parent",e[e.Current=3]="Current",e[e.Preferred=4]="Preferred"}(t=e.Crumb||(e.Crumb={})),e.updateCrumbs=function(e,s,i){const r=e[0].parentNode,n=r.firstChild;for(;n&&n.nextSibling;)r.removeChild(n.nextSibling);i.hasPreferred?(r.appendChild(e[t.Home]),r.appendChild(s[0])):r.appendChild(s[0]);const a=i.path.split("/");if(!i.fullPath&&a.length>2){r.appendChild(e[t.Ellipsis]);const i=a.slice(0,a.length-2).join("/");e[t.Ellipsis].title=i,r.appendChild(s[1])}if(i.path)if(i.fullPath)for(let e=0;e<a.length;e++){const t=document.createElement("span");t.className=_,t.textContent=a[e];const s=`/${a.slice(0,e+1).join("/")}`;t.title=s,r.appendChild(t);const i=document.createElement("span");i.textContent="/",r.appendChild(i)}else{if(a.length>=2){e[t.Parent].textContent=a[a.length-2],r.appendChild(e[t.Parent]);const i=a.slice(0,a.length-1).join("/");e[t.Parent].title=i,r.appendChild(s[2])}e[t.Current].textContent=a[a.length-1],r.appendChild(e[t.Current]),e[t.Current].title=i.path,r.appendChild(s[3])}},e.createCrumbs=function(){const e=a.folderIcon.element({className:u,tag:"span",title:l.PageConfig.getOption("serverRoot")||"Jupyter Server Root",stylesheet:"breadCrumb"}),t=a.ellipsesIcon.element({className:_,tag:"span",stylesheet:"breadCrumb"}),s=document.createElement("span");s.className=_;const i=document.createElement("span");return i.className=_,[e,t,s,i,a.homeIcon.element({className:p,tag:"span",title:l.PageConfig.getOption("preferredPath")||"Jupyter Preferred Path",stylesheet:"breadCrumb"})]},e.createCrumbSeparators=function(){const e=[];for(let t=0;t<4;t++){const t=document.createElement("span");t.textContent="/",e.push(t)}return e}}(y||(y={}));var b=s(46819),C=s(99615),E=s(49503),D=s(81997),L=s(24475);const I="jp-DirListing-header",x="jp-DirListing-headerItemIcon",k="jp-DirListing-content",P="jp-DirListing-itemText",F="jp-DirListing-itemIcon",N="jp-DirListing-itemModified",M="jp-DirListing-itemFileSize",S="jp-DirListing-checkboxWrapper",j="jp-id-name",T="jp-id-modified",A="jp-id-filesize",O="jp-LastModified-hidden",B="jp-FileSize-hidden",U="application/x-jupyter-icontents",R="jp-mod-dropTarget",V="jp-mod-selected",K="jp-mod-cut",z="jp-mod-multiSelected",H="jp-mod-running",W="jp-mod-descending",Y=!!navigator.platform.match(/Mac/i);class q extends o.Widget{constructor(e){super({node:(e.renderer||q.defaultRenderer).createNode()}),this._items=[],this._sortedItems=[],this._sortState={direction:"ascending",key:"name"},this._onItemOpened=new D.Signal(this),this._drag=null,this._dragData=null,this._selectTimer=-1,this._isCut=!1,this._prevPath="",this._clipboard=[],this._softSelection="",this.selection=Object.create(null),this._searchPrefix="",this._searchPrefixTimer=-1,this._inRename=!1,this._isDirty=!1,this._hiddenColumns=new Set,this._sortNotebooksFirst=!1,this._focusIndex=0,this.addClass("jp-DirListing"),this.translator=e.translator||n.nullTranslator,this._trans=this.translator.load("jupyterlab"),this._model=e.model,this._model.fileChanged.connect(this._onFileChanged,this),this._model.refreshed.connect(this._onModelRefreshed,this),this._model.pathChanged.connect(this._onPathChanged,this),this._editNode=document.createElement("input"),this._editNode.className="jp-DirListing-editor",this._manager=this._model.manager,this._renderer=e.renderer||q.defaultRenderer;const t=i.DOMUtils.findElement(this.node,I);this._hiddenColumns.add("file_size"),this._renderer.populateHeaderNode(t,this.translator,this._hiddenColumns),this._manager.activateRequested.connect(this._onActivateRequested,this)}dispose(){this._items.length=0,this._sortedItems.length=0,this._clipboard.length=0,super.dispose()}get model(){return this._model}get headerNode(){return i.DOMUtils.findElement(this.node,I)}get contentNode(){return i.DOMUtils.findElement(this.node,k)}get renderer(){return this._renderer}get sortState(){return this._sortState}get onItemOpened(){return this._onItemOpened}selectedItems(){const e=this._sortedItems;return(0,d.filter)(e,(e=>this.selection[e.path]))}sortedItems(){return this._sortedItems[Symbol.iterator]()}sort(e){this._sortedItems=X.sort(this.model.items(),e,this._sortNotebooksFirst),this._sortState=e,this.update()}rename(){return this._doRename()}cut(){this._isCut=!0,this._copy(),this.update()}copy(){this._copy()}paste(){if(!this._clipboard.length)return this._isCut=!1,Promise.resolve(void 0);const e=this._model.path,t=[];for(const s of this._clipboard)if(this._isCut){const i=this._manager.services.contents.localPath(s).split("/"),r=i[i.length-1],n=l.PathExt.join(e,r);t.push(this._model.manager.rename(s,n))}else t.push(this._model.manager.copy(s,e));for(const e of this._items)e.classList.remove(K);return this._clipboard.length=0,this._isCut=!1,this.removeClass("jp-mod-clipboard"),Promise.all(t).then((()=>{})).catch((e=>{(0,i.showErrorMessage)(this._trans._p("showErrorMessage","Paste Error"),e)}))}async delete(){const e=this._sortedItems.filter((e=>this.selection[e.path]));if(!e.length)return;const t=1===e.length?this._trans.__("Are you sure you want to permanently delete: %1?",e[0].name):this._trans._n("Are you sure you want to permanently delete the %1 selected item?","Are you sure you want to permanently delete the %1 selected items?",e.length),s=await(0,i.showDialog)({title:this._trans.__("Delete"),body:t,buttons:[i.Dialog.cancelButton({label:this._trans.__("Cancel")}),i.Dialog.warnButton({label:this._trans.__("Delete")})],defaultButton:0});!this.isDisposed&&s.button.accept&&await this._delete(e.map((e=>e.path)));let r=this._focusIndex;const n=this._sortedItems.length-e.length-1;r>n&&(r=Math.max(0,n)),this._focusItem(r)}duplicate(){const e=this._model.path,t=[];for(const s of this.selectedItems())"directory"!==s.type&&t.push(this._model.manager.copy(s.path,e));return Promise.all(t).then((()=>{})).catch((e=>{(0,i.showErrorMessage)(this._trans._p("showErrorMessage","Duplicate file"),e)}))}async download(){await Promise.all(Array.from(this.selectedItems()).filter((e=>"directory"!==e.type)).map((e=>this._model.download(e.path))))}shutdownKernels(){const e=this._model,t=this._sortedItems,s=t.map((e=>e.path)),r=Array.from(this._model.sessions()).filter((e=>{const i=d.ArrayExt.firstIndexOf(s,e.path);return this.selection[t[i].path]})).map((t=>e.manager.services.sessions.shutdown(t.id)));return Promise.all(r).then((()=>{})).catch((e=>{(0,i.showErrorMessage)(this._trans._p("showErrorMessage","Shut down kernel"),e)}))}selectNext(e=!1){let t=-1;const s=Object.keys(this.selection),i=this._sortedItems;if(1===s.length||e){const e=s[s.length-1];t=d.ArrayExt.findFirstIndex(i,(t=>t.path===e)),t+=1,t===this._items.length&&(t=0)}else if(0===s.length)t=0;else{const e=s[s.length-1];t=d.ArrayExt.findFirstIndex(i,(t=>t.path===e))}-1!==t&&(this._selectItem(t,e),m.ElementExt.scrollIntoViewIfNeeded(this.contentNode,this._items[t]))}selectPrevious(e=!1){let t=-1;const s=Object.keys(this.selection),i=this._sortedItems;if(1===s.length||e){const e=s[0];t=d.ArrayExt.findFirstIndex(i,(t=>t.path===e)),t-=1,-1===t&&(t=this._items.length-1)}else if(0===s.length)t=this._items.length-1;else{const e=s[0];t=d.ArrayExt.findFirstIndex(i,(t=>t.path===e))}-1!==t&&(this._selectItem(t,e),m.ElementExt.scrollIntoViewIfNeeded(this.contentNode,this._items[t]))}selectByPrefix(){const e=this._searchPrefix.toLowerCase(),t=this._sortedItems,s=d.ArrayExt.findFirstIndex(t,(t=>t.name.toLowerCase().substr(0,e.length)===e));-1!==s&&(this._selectItem(s,!1),m.ElementExt.scrollIntoViewIfNeeded(this.contentNode,this._items[s]))}isSelected(e){const t=this._sortedItems;return 0!==Array.from((0,d.filter)(t,(t=>t.name===e&&this.selection[t.path]))).length}modelForClick(e){const t=this._sortedItems,s=X.hitTestNodes(this._items,e);if(-1!==s)return t[s]}clearSelectedItems(){this.selection=Object.create(null)}async selectItemByName(e,t=!1){if(await this.model.refresh(),this.isDisposed)throw new Error("File browser is disposed.");const s=this._sortedItems,i=d.ArrayExt.findFirstIndex(s,(t=>t.name===e));if(-1===i)throw new Error("Item does not exist.");this._selectItem(i,!1,t),E.MessageLoop.sendMessage(this,o.Widget.Msg.UpdateRequest),m.ElementExt.scrollIntoViewIfNeeded(this.contentNode,this._items[i])}handleEvent(e){switch(e.type){case"mousedown":this._evtMousedown(e);break;case"mouseup":this._evtMouseup(e);break;case"mousemove":this._evtMousemove(e);break;case"keydown":this.evtKeydown(e);break;case"click":this._evtClick(e);break;case"dblclick":this.evtDblClick(e);break;case"dragenter":case"dragover":this.addClass("jp-mod-native-drop"),e.preventDefault();break;case"dragleave":case"dragend":this.removeClass("jp-mod-native-drop");break;case"drop":this.removeClass("jp-mod-native-drop"),this.evtNativeDrop(e);break;case"scroll":this._evtScroll(e);break;case"lm-dragenter":this.evtDragEnter(e);break;case"lm-dragleave":this.evtDragLeave(e);break;case"lm-dragover":this.evtDragOver(e);break;case"lm-drop":this.evtDrop(e)}}onAfterAttach(e){super.onAfterAttach(e);const t=this.node,s=i.DOMUtils.findElement(t,k);t.addEventListener("mousedown",this),t.addEventListener("keydown",this),t.addEventListener("click",this),t.addEventListener("dblclick",this),s.addEventListener("dragenter",this),s.addEventListener("dragover",this),s.addEventListener("dragleave",this),s.addEventListener("dragend",this),s.addEventListener("drop",this),s.addEventListener("scroll",this),s.addEventListener("lm-dragenter",this),s.addEventListener("lm-dragleave",this),s.addEventListener("lm-dragover",this),s.addEventListener("lm-drop",this)}onBeforeDetach(e){super.onBeforeDetach(e);const t=this.node,s=i.DOMUtils.findElement(t,k);t.removeEventListener("mousedown",this),t.removeEventListener("keydown",this),t.removeEventListener("click",this),t.removeEventListener("dblclick",this),s.removeEventListener("scroll",this),s.removeEventListener("dragover",this),s.removeEventListener("dragover",this),s.removeEventListener("dragleave",this),s.removeEventListener("dragend",this),s.removeEventListener("drop",this),s.removeEventListener("lm-dragenter",this),s.removeEventListener("lm-dragleave",this),s.removeEventListener("lm-dragover",this),s.removeEventListener("lm-drop",this),document.removeEventListener("mousemove",this,!0),document.removeEventListener("mouseup",this,!0)}onAfterShow(e){this._isDirty&&(this.sort(this.sortState),this.update())}onUpdateRequest(e){var t;this._isDirty=!1;const s=this._sortedItems,r=this._items,n=i.DOMUtils.findElement(this.node,k),a=this._renderer;for(this.removeClass(z),this.removeClass(V);r.length>s.length;)n.removeChild(r.pop());for(;r.length<s.length;){const e=a.createItemNode(this._hiddenColumns);e.classList.add("jp-DirListing-item"),r.push(e),n.appendChild(e)}r.forEach(((e,t)=>{e.classList.remove(V),e.classList.remove(H),e.classList.remove(K);const s=a.getCheckboxNode(e);s&&(s.checked=!1);const i=a.getNameNode(e);i&&(i.tabIndex=t===this._focusIndex?0:-1)}));const o=a.getCheckboxNode(this.headerNode);if(o){const e=Object.keys(this.selection).length,t=s.length>0&&e===s.length,i=!t&&e>0;o.checked=t,o.indeterminate=i,o.dataset.checked=String(t),o.dataset.indeterminate=String(i);const r=this.translator.load("jupyterlab");null==o||o.setAttribute("aria-label",t||i?r.__("Deselect all files and directories"):r.__("Select all files and directories"))}s.forEach(((e,t)=>{const s=r[t],i=this._manager.registry.getFileTypeForModel(e);a.updateItemNode(s,e,i,this.translator,this._hiddenColumns,this.selection[e.path]),this.selection[e.path]&&this._isCut&&this._model.path===this._prevPath&&s.classList.add(K),s.setAttribute("data-isdir","directory"===e.type?"true":"false")}));const l=Object.keys(this.selection).length;l&&(this.addClass(V),l>1&&this.addClass(z));const h=s.map((e=>e.path));for(const e of this._model.sessions()){const s=d.ArrayExt.firstIndexOf(h,e.path),i=r[s];if(i){let s=null===(t=e.kernel)||void 0===t?void 0:t.name;const r=this._model.specs;if(i.classList.add(H),r&&s){const e=r.kernelspecs[s];s=e?e.display_name:this._trans.__("unknown")}i.title=this._trans.__("%1\nKernel: %2",i.title,s)}}this._prevPath=this._model.path}onResize(e){const{width:t}=-1===e.width?this.node.getBoundingClientRect():e;this.toggleClass("jp-DirListing-narrow",t<250)}setColumnVisibility(e,t){t?this._hiddenColumns.delete(e):this._hiddenColumns.add(e),this.headerNode.innerHTML="",this._renderer.populateHeaderNode(this.headerNode,this.translator,this._hiddenColumns)}setNotebooksFirstSorting(e){let t=this._sortNotebooksFirst;this._sortNotebooksFirst=e,this._sortNotebooksFirst!==t&&this.sort(this._sortState)}isWithinCheckboxHitArea(e){let t=e.target;for(;t;){if(t.classList.contains(S))return!0;t=t.parentElement}return!1}_evtClick(e){const t=e.target,s=this.headerNode,i=this._renderer;if(s.contains(t)){const t=i.getCheckboxNode(s);if(t&&this.isWithinCheckboxHitArea(e))"false"===t.dataset.indeterminate&&"false"===t.dataset.checked?this._sortedItems.forEach((e=>this.selection[e.path]=!0)):this.clearSelectedItems(),this.update();else{const t=this.renderer.handleHeaderClick(s,e);t&&this.sort(t)}}else this._focusItem(this._focusIndex)}_evtScroll(e){this.headerNode.scrollLeft=this.contentNode.scrollLeft}_evtMousedown(e){if(e.target===this._editNode)return;if(this._editNode.parentNode){if(this._editNode===e.target)return;this._editNode.focus(),this._editNode.blur(),clearTimeout(this._selectTimer)}let t=X.hitTestNodes(this._items,e);-1!==t&&(this.handleFileSelect(e),0!==e.button&&clearTimeout(this._selectTimer),Y&&e.ctrlKey||2===e.button||0===e.button&&(this._dragData={pressX:e.clientX,pressY:e.clientY,index:t},document.addEventListener("mouseup",this,!0),document.addEventListener("mousemove",this,!0)))}_evtMouseup(e){if(this._softSelection&&(e.metaKey||e.shiftKey||e.ctrlKey||0!==e.button||(this.clearSelectedItems(),this.selection[this._softSelection]=!0,this.update()),this._softSelection=""),0===e.button&&this._focusItem(this._focusIndex),0!==e.button||!this._drag)return document.removeEventListener("mousemove",this,!0),void document.removeEventListener("mouseup",this,!0);e.preventDefault(),e.stopPropagation()}_evtMousemove(e){if(e.preventDefault(),e.stopPropagation(),this._drag||!this._dragData)return;const t=this._dragData,s=Math.abs(e.clientX-t.pressX),i=Math.abs(e.clientY-t.pressY);s<5&&i<5||this._startDrag(t.index,e.clientX,e.clientY)}handleOpen(e){if(this._onItemOpened.emit(e),"directory"===e.type){const t=this._manager.services.contents.localPath(e.path);this._model.cd(`/${t}`).catch((e=>(0,i.showErrorMessage)(this._trans._p("showErrorMessage","Open directory"),e)))}else{const t=e.path;this._manager.openOrReveal(t)}}_getNextFocusIndex(e,t){const s=e+t;return-1===s||s===this._items.length?e:s}_handleArrowY(e,t){if(e.altKey||e.metaKey)return;if(!this._items.length)return;if(!e.target.classList.contains(P))return;e.stopPropagation(),e.preventDefault();const s=this._focusIndex;let i=this._getNextFocusIndex(s,t);t>0&&0===s&&!e.ctrlKey&&0===Object.keys(this.selection).length&&(i=0),e.shiftKey?this._handleMultiSelect(i):e.ctrlKey||this._selectItem(i,e.shiftKey,!1),this._focusItem(i),this.update()}async goUp(){const e=this.model;if(e.path!==e.rootPath)try{await e.cd("..")}catch(t){console.warn(`Failed to go to parent directory of ${e.path}`,t)}}evtKeydown(e){if(!this._inRename){switch(e.keyCode){case 13:if(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;e.preventDefault(),e.stopPropagation();for(const e of this.selectedItems())this.handleOpen(e);return;case 38:return void this._handleArrowY(e,-1);case 40:return void this._handleArrowY(e,1);case 32:if(e.ctrlKey){if(e.metaKey||e.shiftKey||e.altKey)return;const t=this._items[this._focusIndex];if(!t.contains(e.target)||!t.contains(document.activeElement))return;e.stopPropagation(),e.preventDefault();const{path:s}=this._sortedItems[this._focusIndex];return this.selection[s]?delete this.selection[s]:this.selection[s]=!0,void this.update()}}if(void 0!==e.key&&1===e.key.length&&(" "!==e.key&&32!==e.keyCode||"checkbox"!==e.target.type)){if(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;this._searchPrefix+=e.key,clearTimeout(this._searchPrefixTimer),this._searchPrefixTimer=window.setTimeout((()=>{this._searchPrefix=""}),1e3),this.selectByPrefix(),e.stopPropagation(),e.preventDefault()}}}evtDblClick(e){if(0!==e.button)return;if(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;if(this.isWithinCheckboxHitArea(e))return;e.preventDefault(),e.stopPropagation(),clearTimeout(this._selectTimer),this._editNode.blur();const t=e.target,s=d.ArrayExt.findFirstIndex(this._items,(e=>e.contains(t)));if(-1===s)return;const i=this._sortedItems[s];this.handleOpen(i)}evtNativeDrop(e){var t,s,r;const n=null===(t=e.dataTransfer)||void 0===t?void 0:t.files;if(!n||0===n.length)return;const a=null===(s=e.dataTransfer)||void 0===s?void 0:s.items.length;if(a){for(let t=0;t<a;t++){let s=null===(r=e.dataTransfer)||void 0===r?void 0:r.items[t].webkitGetAsEntry();(null==s?void 0:s.isDirectory)&&(console.log("currently not supporting drag + drop for folders"),(0,i.showDialog)({title:this._trans.__("Error Uploading Folder"),body:this._trans.__("Drag and Drop is currently not supported for folders"),buttons:[i.Dialog.cancelButton({label:this._trans.__("Close")})]}))}e.preventDefault();for(let e=0;e<n.length;e++)this._model.upload(n[e])}}evtDragEnter(e){if(e.mimeData.hasData(U)){const t=X.hitTestNodes(this._items,e);if(-1===t)return;const s=this._sortedItems[t];if("directory"!==s.type||this.selection[s.path])return;e.target.classList.add(R),e.preventDefault(),e.stopPropagation()}}evtDragLeave(e){e.preventDefault(),e.stopPropagation();const t=i.DOMUtils.findElement(this.node,R);t&&t.classList.remove(R)}evtDragOver(e){e.preventDefault(),e.stopPropagation(),e.dropAction=e.proposedAction;const t=i.DOMUtils.findElement(this.node,R);t&&t.classList.remove(R);const s=X.hitTestNodes(this._items,e);this._items[s].classList.add(R)}evtDrop(e){if(e.preventDefault(),e.stopPropagation(),clearTimeout(this._selectTimer),"none"===e.proposedAction)return void(e.dropAction="none");if(!e.mimeData.hasData(U))return;let t=e.target;for(;t&&t.parentElement;){if(t.classList.contains(R)){t.classList.remove(R);break}t=t.parentElement}const s=d.ArrayExt.firstIndexOf(this._items,t),r=this._sortedItems;let n=this._model.path;"directory"===r[s].type&&(n=l.PathExt.join(n,r[s].name));const a=this._manager,o=[],c=e.mimeData.getData(U);e.ctrlKey&&"move"===e.proposedAction?e.dropAction="copy":e.dropAction=e.proposedAction;for(const t of c){const s=a.services.contents.localPath(t),i=l.PathExt.basename(s),r=l.PathExt.join(n,i);r!==t&&("copy"===e.dropAction?o.push(a.copy(t,n)):o.push((0,h.renameFile)(a,t,r)))}Promise.all(o).catch((e=>{(0,i.showErrorMessage)(this._trans._p("showErrorMessage","Error while copying/moving files"),e)}))}_startDrag(e,t,s){let i=Object.keys(this.selection);const r=this._items[e],n=this._sortedItems;let a,o;if(r.classList.contains(V)){const e=i[0];o=n.find((t=>t.path===e)),a=this.selectedItems()}else o=n[e],i=[o.path],a=[o];if(!o)return;const l=this._manager.registry.getFileTypeForModel(o),h=this.renderer.createDragImage(r,i.length,this._trans,l);this._drag=new C.Drag({dragImage:h,mimeData:new c.MimeData,supportedActions:"move",proposedAction:"move"}),this._drag.mimeData.setData(U,i);const d=this.model.manager.services;for(const e of a)this._drag.mimeData.setData("application/x-jupyter-icontentsrich",{model:e,withContent:async()=>await d.contents.get(e.path)});if(o&&"directory"!==o.type){const e=i.slice(1).reverse();this._drag.mimeData.setData("application/vnd.lumino.widget-factory",(()=>{if(!o)return;const t=o.path;let s=this._manager.findWidget(t);if(s||(s=this._manager.open(o.path)),e.length){const t=new c.PromiseDelegate;t.promise.then((()=>{let t=s;e.forEach((e=>{const s={ref:null==t?void 0:t.id,mode:"tab-after"};t=this._manager.openOrReveal(e,void 0,void 0,s),this._manager.openOrReveal(o.path)}))})),t.resolve(void 0)}return s}))}document.removeEventListener("mousemove",this,!0),document.removeEventListener("mouseup",this,!0),clearTimeout(this._selectTimer),this._drag.start(t,s).then((e=>{this._drag=null,clearTimeout(this._selectTimer)}))}handleFileSelect(e){const t=this._sortedItems,s=X.hitTestNodes(this._items,e);if(clearTimeout(this._selectTimer),-1===s)return;this._softSelection="";const i=t[s].path,r=Object.keys(this.selection),n=0===e.button&&!(Y&&e.ctrlKey)&&this.isWithinCheckboxHitArea(e);if(Y&&e.metaKey||!Y&&e.ctrlKey||n)this.selection[i]?delete this.selection[i]:this.selection[i]=!0,this._focusItem(s);else if(e.shiftKey)this._handleMultiSelect(s),this._focusItem(s);else{if(!(i in this.selection&&r.length>1))return this._selectItem(s,!1,!0);this._softSelection=i}this.update()}_focusItem(e){const t=this._items;if(0===t.length)return this._focusIndex=0,void this.node.focus();this._focusIndex=e;const s=t[e],i=this.renderer.getNameNode(s);i&&(i.tabIndex=0,i.focus())}_allSelectedBetween(e,t){if(e===t)return;const[s,i]=e<t?[e+1,t]:[t+1,e];return this._sortedItems.slice(s,i).reduce(((e,t)=>e&&this.selection[t.path]),!0)}_handleMultiSelect(e){const t=this._sortedItems,s=this._focusIndex,i=t[e];let r=!0;if(e===s)return void(this.selection[i.path]=!0);if(this.selection[i.path])if(1===Math.abs(e-s)){const i=t[s],r=t[s+(e<s?1:-1)];!this.selection[i.path]||r&&this.selection[r.path]||delete this.selection[i.path]}else this._allSelectedBetween(s,e)&&(r=!1);const n=s<e?1:-1;for(let i=s;i!==e+n;i+=n)if(r){if(i===s)continue;this.selection[t[i].path]=!0}else{if(i===e)continue;delete this.selection[t[i].path]}}_copy(){this._clipboard.length=0;for(const e of this.selectedItems())this._clipboard.push(e.path)}async _delete(e){await Promise.all(e.map((e=>this._model.manager.deleteFile(e).catch((e=>{(0,i.showErrorMessage)(this._trans._p("showErrorMessage","Delete Failed"),e)})))))}async _doRename(){this._inRename=!0;const e=Object.keys(this.selection);if(0===e.length)return this._inRename=!1,Promise.resolve("");const t=this._sortedItems;let{path:s}=t[this._focusIndex];this.selection[s]||(s=e.slice(-1)[0]);const r=d.ArrayExt.findFirstIndex(t,(e=>e.path===s)),n=this._items[r],a=t[r],o=this.renderer.getNameNode(n),c=a.name;this._editNode.value=c,this._selectItem(r,!1,!0);const m=await X.userInputForRename(o,this._editNode,c);if(this.isDisposed)throw this._inRename=!1,new Error("File browser is disposed.");let u=m;if(m&&m!==c)if((0,h.isValidFileName)(m)){const e=this._manager,t=l.PathExt.join(this._model.path,c),s=l.PathExt.join(this._model.path,m);try{await(0,h.renameFile)(e,t,s)}catch(e){"File not renamed"!==e&&(0,i.showErrorMessage)(this._trans._p("showErrorMessage","Rename Error"),e),u=c}if(this.isDisposed)throw this._inRename=!1,new Error("File browser is disposed.")}else(0,i.showErrorMessage)(this._trans.__("Rename Error"),Error(this._trans._p("showErrorMessage",'"%1" is not a valid name for a file. Names must have nonzero length, and cannot include "/", "\\", or ":"',m))),u=c;else u=c;if(!this.isDisposed&&1===Object.keys(this.selection).length&&this.selection[a.path])try{await this.selectItemByName(u,!0)}catch(e){console.warn("After rename, failed to select file",u)}return this._inRename=!1,u}_selectItem(e,t,s=!0){const i=this._sortedItems;t||this.clearSelectedItems();const r=i[e].path;this.selection[r]=!0,s&&this._focusItem(e),this.update()}_onModelRefreshed(){const e=Object.keys(this.selection);this.clearSelectedItems();for(const t of this._model.items()){const s=t.path;-1!==e.indexOf(s)&&(this.selection[s]=!0)}this.isVisible?this.sort(this.sortState):this._isDirty=!0}_onPathChanged(){this.clearSelectedItems(),this.sort(this.sortState),requestAnimationFrame((()=>{this._focusItem(0)}))}_onFileChanged(e,t){const s=t.newValue;if(!s)return;const i=s.name;"new"===t.type&&i&&this.selectItemByName(i).catch((()=>{}))}_onActivateRequested(e,t){if(l.PathExt.dirname(t)!==this._model.path)return;const s=l.PathExt.basename(t);this.selectItemByName(s).catch((()=>{}))}}var X;!function(e){class t{createNode(){const e=document.createElement("div"),t=document.createElement("div"),s=document.createElement("ul");return s.setAttribute("data-lm-dragscroll","true"),s.className=k,t.className=I,e.appendChild(t),e.appendChild(s),e.tabIndex=-1,e}populateHeaderNode(e,t,s){const r=(t=t||n.nullTranslator).load("jupyterlab"),a=this.createHeaderItemNode(r.__("Name")),o=document.createElement("div"),l=this.createHeaderItemNode(r.__("Last Modified")),h=this.createHeaderItemNode(r.__("File Size"));if(a.classList.add(j),a.classList.add(V),l.classList.add(T),h.classList.add(A),o.classList.add("jp-id-narrow"),o.textContent="...",!(null==s?void 0:s.has("is_selected"))){const t=this.createCheckboxWrapperNode({alwaysVisible:!0});e.appendChild(t)}e.appendChild(a),e.appendChild(o),e.appendChild(l),e.appendChild(h),(null==s?void 0:s.has("last_modified"))?l.classList.add(O):l.classList.remove(O),(null==s?void 0:s.has("file_size"))?h.classList.add(B):h.classList.remove(B),X.updateCaret(i.DOMUtils.findElement(a,x),"right","up")}handleHeaderClick(e,t){const s=i.DOMUtils.findElement(e,j),r=i.DOMUtils.findElement(e,T),n=i.DOMUtils.findElement(e,A),a={direction:"ascending",key:"name"},o=t.target,l=i.DOMUtils.findElement(r,x),h=i.DOMUtils.findElement(n,x),d=i.DOMUtils.findElement(s,x);return s.contains(o)?(s.classList.contains(V)?s.classList.contains(W)?(s.classList.remove(W),X.updateCaret(d,"right","up")):(a.direction="descending",s.classList.add(W),X.updateCaret(d,"right","down")):(s.classList.remove(W),X.updateCaret(d,"right","up")),s.classList.add(V),r.classList.remove(V),r.classList.remove(W),n.classList.remove(V),n.classList.remove(W),X.updateCaret(l,"left"),X.updateCaret(h,"left"),a):r.contains(o)?(a.key="last_modified",r.classList.contains(V)?r.classList.contains(W)?(r.classList.remove(W),X.updateCaret(l,"left","up")):(a.direction="descending",r.classList.add(W),X.updateCaret(l,"left","down")):(r.classList.remove(W),X.updateCaret(l,"left","up")),r.classList.add(V),s.classList.remove(V),s.classList.remove(W),n.classList.remove(V),n.classList.remove(W),X.updateCaret(d,"right"),X.updateCaret(h,"left"),a):n.contains(o)?(a.key="file_size",n.classList.contains(V)?n.classList.contains(W)?(n.classList.remove(W),X.updateCaret(h,"left","up")):(a.direction="descending",n.classList.add(W),X.updateCaret(h,"left","down")):(n.classList.remove(W),X.updateCaret(h,"left","up")),n.classList.add(V),s.classList.remove(V),s.classList.remove(W),r.classList.remove(V),r.classList.remove(W),X.updateCaret(d,"right"),X.updateCaret(l,"left"),a):a}createItemNode(e){const t=document.createElement("li"),s=document.createElement("span"),i=document.createElement("span"),r=document.createElement("span"),n=document.createElement("span");if(s.className=F,i.className=P,r.className=N,n.className=M,!(null==e?void 0:e.has("is_selected"))){const e=this.createCheckboxWrapperNode();t.appendChild(e)}return t.appendChild(s),t.appendChild(i),t.appendChild(r),t.appendChild(n),(null==e?void 0:e.has("last_modified"))?r.classList.add(O):r.classList.remove(O),(null==e?void 0:e.has("file_size"))?n.classList.add(B):n.classList.remove(B),t}createCheckboxWrapperNode(e){const t=document.createElement("label");t.classList.add(S);const s=document.createElement("input");return s.type="checkbox",s.addEventListener("click",(e=>{e.preventDefault()})),(null==e?void 0:e.alwaysVisible)?t.classList.add("jp-mod-visible"):s.tabIndex=-1,t.appendChild(s),t}updateItemNode(e,t,s,r,o,h){h&&e.classList.add(V),s=s||b.DocumentRegistry.getDefaultTextFileType(r);const{icon:c,iconClass:m,name:u}=s,p=(r=r||n.nullTranslator).load("jupyterlab"),_=i.DOMUtils.findElement(e,F),f=i.DOMUtils.findElement(e,P),g=i.DOMUtils.findElement(e,N),v=i.DOMUtils.findElement(e,M),w=i.DOMUtils.findElement(e,S),y=!(null==o?void 0:o.has("is_selected"));if(w&&!y)e.removeChild(w);else if(y&&!w){const t=this.createCheckboxWrapperNode();e.insertBefore(t,_)}(null==o?void 0:o.has("last_modified"))?g.classList.add(O):g.classList.remove(O),(null==o?void 0:o.has("file_size"))?v.classList.add(B):v.classList.remove(B),a.LabIcon.resolveElement({icon:c,iconClass:(0,a.classes)(m,"jp-Icon"),container:_,className:F,stylesheet:"listing"});let C=p.__("Name: %1",t.name);if(null!==t.size&&void 0!==t.size){const e=X.formatFileSize(t.size,1,1024);v.textContent=e,C+=p.__("\nSize: %1",X.formatFileSize(t.size,1,1024))}else v.textContent="";if(t.path){const e=l.PathExt.dirname(t.path);e&&(C+=p.__("\nPath: %1",e.substr(0,50)),e.length>50&&(C+="..."))}t.created&&(C+=p.__("\nCreated: %1",l.Time.format(new Date(t.created)))),t.last_modified&&(C+=p.__("\nModified: %1",l.Time.format(new Date(t.last_modified)))),C+=p.__("\nWritable: %1",t.writable),e.title=C,e.setAttribute("data-file-type",u),t.name.startsWith(".")?e.setAttribute("data-is-dot","true"):e.removeAttribute("data-is-dot");const E=t.indices?t.indices:[];let D=d.StringExt.highlight(t.name,E,L.h.mark);f&&L.VirtualDOM.render(L.h.span(D),f);const I=null==w?void 0:w.querySelector('input[type="checkbox"]');if(I){let e;e="directory"===s.contentType?h?p.__('Deselect directory "%1"',D):p.__('Select directory "%1"',D):h?p.__('Deselect file "%1"',D):p.__('Select file "%1"',D),I.setAttribute("aria-label",e),I.checked=null!=h&&h}let x="",k="";t.last_modified&&(x=l.Time.formatHuman(new Date(t.last_modified)),k=l.Time.format(new Date(t.last_modified))),g.textContent=x,g.title=k}getNameNode(e){return i.DOMUtils.findElement(e,P)}getCheckboxNode(e){return e.querySelector(`.${S} input[type=checkbox]`)}createDragImage(e,t,s,r){const n=e.cloneNode(!0),a=i.DOMUtils.findElement(n,N),o=i.DOMUtils.findElement(n,F);return n.removeChild(a),r?(o.textContent=r.iconLabel||"",o.className=r.iconClass||""):(o.textContent="",o.className=""),o.classList.add("jp-DragIcon"),t>1&&(i.DOMUtils.findElement(n,P).textContent=s._n("%1 Item","%1 Items",t)),n}createHeaderItemNode(e){const t=document.createElement("div"),s=document.createElement("span"),i=document.createElement("span");return t.className="jp-DirListing-headerItem",s.className="jp-DirListing-headerItemText",i.className=x,s.textContent=e,t.appendChild(s),t.appendChild(i),t}}e.Renderer=t,e.defaultRenderer=new t}(q||(q={})),function(e){e.userInputForRename=function(e,t,s){const i=e.parentElement;i.replaceChild(t,e),t.focus();const r=t.value.lastIndexOf(".");return-1===r?t.setSelectionRange(0,t.value.length):t.setSelectionRange(0,r),new Promise((r=>{t.onblur=()=>{i.replaceChild(e,t),r(t.value)},t.onkeydown=i=>{switch(i.keyCode){case 13:i.stopPropagation(),i.preventDefault(),t.blur();break;case 27:i.stopPropagation(),i.preventDefault(),t.value=s,t.blur(),e.focus()}}}))},e.sort=function(e,t,s=!1){const i=Array.from(e),r="descending"===t.direction?1:-1;function n(e){return"directory"===e.type?2:"notebook"===e.type&&s?1:0}function a(e){return(t,i)=>{if(function(e,t){return s?e.type!==t.type:"directory"===e.type!=("directory"===t.type)}(t,i))return n(i)-n(t);const a=e(t,i);return 0!==a?a*r:t.name.localeCompare(i.name)}}return"last_modified"===t.key?i.sort(a(((e,t)=>new Date(e.last_modified).getTime()-new Date(t.last_modified).getTime()))):"file_size"===t.key?i.sort(a(((e,t)=>{var s,i;return(null!==(s=e.size)&&void 0!==s?s:0)-(null!==(i=t.size)&&void 0!==i?i:0)}))):i.sort(a(((e,t)=>t.name.localeCompare(e.name)))),i},e.hitTestNodes=function(e,t){return d.ArrayExt.findFirstIndex(e,(e=>m.ElementExt.hitTest(e,t.clientX,t.clientY)||t.target===e))},e.formatFileSize=function(e,t,s){if(0===e)return"0 B";const i=t||2,r=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],n=Math.floor(Math.log(e)/Math.log(s));return n>=0&&n<r.length?parseFloat((e/Math.pow(s,n)).toFixed(i))+" "+r[n]:String(e)},e.updateCaret=function(e,t,s){s?("down"===s?a.caretDownIcon:a.caretUpIcon).element({container:e,tag:"span",stylesheet:"listingHeaderItem",float:t}):(a.LabIcon.remove(e),e.className=x)}}(X||(X={}));class $ extends a.SidePanel{constructor(e){var t;super({content:new o.Panel,translator:e.translator}),this._directoryPending=null,this._filePending=null,this._showLastModifiedColumn=!0,this._showFileSizeColumn=!1,this._showHiddenFiles=!1,this._showFileCheckboxes=!1,this._sortNotebooksFirst=!1,this.addClass("jp-FileBrowser"),this.toolbar.addClass("jp-FileBrowser-toolbar"),this.id=e.id;const s=this.translator=null!==(t=e.translator)&&void 0!==t?t:n.nullTranslator,i=this.model=e.model,r=e.renderer;i.connectionFailure.connect(this._onConnectionFailure,this),this._manager=i.manager,this.toolbar.node.setAttribute("aria-label",this._trans.__("file browser")),this.mainPanel=new o.Panel,this.mainPanel.addClass("jp-FileBrowser-Panel"),this.mainPanel.title.label=this._trans.__("File Browser"),this.crumbs=new w({model:i,translator:s}),this.crumbs.addClass("jp-FileBrowser-crumbs"),this.listing=this.createDirListing({model:i,renderer:r,translator:s}),this.listing.addClass("jp-FileBrowser-listing"),this.mainPanel.addWidget(this.crumbs),this.mainPanel.addWidget(this.listing),this.addWidget(this.mainPanel),!1!==e.restore&&i.restore(this.id)}get navigateToCurrentDirectory(){return this._navigateToCurrentDirectory}set navigateToCurrentDirectory(e){this._navigateToCurrentDirectory=e}get showLastModifiedColumn(){return this._showLastModifiedColumn}set showLastModifiedColumn(e){this.listing.setColumnVisibility?(this.listing.setColumnVisibility("last_modified",e),this._showLastModifiedColumn=e):console.warn("Listing does not support toggling column visibility")}get showFullPath(){return this.crumbs.fullPath}set showFullPath(e){this.crumbs.fullPath=e}get showFileSizeColumn(){return this._showFileSizeColumn}set showFileSizeColumn(e){this.listing.setColumnVisibility?(this.listing.setColumnVisibility("file_size",e),this._showFileSizeColumn=e):console.warn("Listing does not support toggling column visibility")}get showHiddenFiles(){return this._showHiddenFiles}set showHiddenFiles(e){this.model.showHiddenFiles(e),this._showHiddenFiles=e}get showFileCheckboxes(){return this._showFileCheckboxes}set showFileCheckboxes(e){this.listing.setColumnVisibility?(this.listing.setColumnVisibility("is_selected",e),this._showFileCheckboxes=e):console.warn("Listing does not support toggling column visibility")}get sortNotebooksFirst(){return this._sortNotebooksFirst}set sortNotebooksFirst(e){this.listing.setNotebooksFirstSorting?(this.listing.setNotebooksFirstSorting(e),this._sortNotebooksFirst=e):console.warn("Listing does not support sorting notebooks first")}selectedItems(){return this.listing.selectedItems()}async selectItemByName(e){await this.listing.selectItemByName(e)}clearSelectedItems(){this.listing.clearSelectedItems()}rename(){return this.listing.rename()}cut(){this.listing.cut()}copy(){this.listing.copy()}paste(){return this.listing.paste()}async _createNew(e){try{const t=await this._manager.newUntitled(e);return await this.listing.selectItemByName(t.name,!0),await this.rename(),t}catch(e){throw(0,i.showErrorMessage)(this._trans.__("Error"),e),e}}async createNewDirectory(){if(this._directoryPending)return this._directoryPending;this._directoryPending=this._createNew({path:this.model.path,type:"directory"});try{return await this._directoryPending}finally{this._directoryPending=null}}async createNewFile(e){if(this._filePending)return this._filePending;this._filePending=this._createNew({path:this.model.path,type:"file",ext:e.ext});try{return await this._filePending}finally{this._filePending=null}}delete(){return this.listing.delete()}duplicate(){return this.listing.duplicate()}download(){return this.listing.download()}async goUp(){return this.listing.goUp()}shutdownKernels(){return this.listing.shutdownKernels()}selectNext(){this.listing.selectNext()}selectPrevious(){this.listing.selectPrevious()}modelForClick(e){return this.listing.modelForClick(e)}createDirListing(e){return new q(e)}_onConnectionFailure(e,t){if(t instanceof r.ServerConnection.ResponseError&&404===t.response.status){const e=this._trans.__("Directory not found");t.message=this._trans.__('Directory not found: "%1"',this.model.path),(0,i.showErrorMessage)(e,t)}}}var J=s(97934);const G=15728640,Z=1048576;class Q{constructor(e){var t;this._connectionFailure=new D.Signal(this),this._fileChanged=new D.Signal(this),this._items=[],this._key="",this._pathChanged=new D.Signal(this),this._paths=new Set,this._pending=null,this._pendingPath=null,this._refreshed=new D.Signal(this),this._sessions=[],this._state=null,this._isDisposed=!1,this._restored=new c.PromiseDelegate,this._uploads=[],this._uploadChanged=new D.Signal(this),this.manager=e.manager,this.translator=e.translator||n.nullTranslator,this._trans=this.translator.load("jupyterlab"),this._driveName=e.driveName||"",this._model={path:this.rootPath,name:l.PathExt.basename(this.rootPath),type:"directory",content:void 0,writable:!1,created:"unknown",last_modified:"unknown",mimetype:"text/plain",format:"text"},this._state=e.state||null;const s=e.refreshInterval||1e4,{services:i}=e.manager;i.contents.fileChanged.connect(this.onFileChanged,this),i.sessions.runningChanged.connect(this.onRunningChanged,this),this._unloadEventListener=e=>{if(this._uploads.length>0){const t=this._trans.__("Files still uploading");return e.returnValue=t,t}},window.addEventListener("beforeunload",this._unloadEventListener),this._poll=new J.Poll({auto:null===(t=e.auto)||void 0===t||t,name:"@jupyterlab/filebrowser:Model",factory:()=>this.cd("."),frequency:{interval:s,backoff:!0,max:3e5},standby:e.refreshStandby||"when-hidden"})}get connectionFailure(){return this._connectionFailure}get driveName(){return this._driveName}get restored(){return this._restored.promise}get fileChanged(){return this._fileChanged}get path(){return this._model?this._model.path:""}get rootPath(){return this._driveName?this._driveName+":":""}get pathChanged(){return this._pathChanged}get refreshed(){return this._refreshed}get specs(){return this.manager.services.kernelspecs.specs}get isDisposed(){return this._isDisposed}get uploadChanged(){return this._uploadChanged}uploads(){return this._uploads[Symbol.iterator]()}dispose(){this.isDisposed||(window.removeEventListener("beforeunload",this._unloadEventListener),this._isDisposed=!0,this._poll.dispose(),this._sessions.length=0,this._items.length=0,D.Signal.clearData(this))}items(){return this._items[Symbol.iterator]()}sessions(){return this._sessions[Symbol.iterator]()}async refresh(){await this._poll.refresh(),await this._poll.tick,this._refreshed.emit(void 0)}async cd(e="."){if(e="."!==e?this.manager.services.contents.resolvePath(this._model.path,e):this._pendingPath||this._model.path,this._pending){if(e===this._pendingPath)return this._pending;await this._pending}const t=this.path;this._pendingPath=e,t!==e&&(this._sessions.length=0);const s=this.manager.services;return this._pending=s.contents.get(e,{content:!0}).then((i=>{this.isDisposed||(this.handleContents(i),this._pendingPath=null,this._pending=null,t!==e&&(this._state&&this._key&&this._state.save(this._key,{path:e}),this._pathChanged.emit({name:"path",oldValue:t,newValue:e})),this.onRunningChanged(s.sessions,s.sessions.running()),this._refreshed.emit(void 0))})).catch((t=>{if(this._pendingPath=null,this._pending=null,t.response&&404===t.response.status&&"/"!==e)return t.message=this._trans.__('Directory not found: "%1"',this._model.path),console.error(t),this._connectionFailure.emit(t),this.cd("/");this._connectionFailure.emit(t)})),this._pending}async download(e){const t=await this.manager.services.contents.getDownloadUrl(e),s=document.createElement("a");s.href=t,s.download="",document.body.appendChild(s),s.click(),document.body.removeChild(s)}async restore(e,t=!0){const{manager:s}=this,i=`file-browser-${e}:cwd`,r=this._state;if(!this._key)if(this._key=i,t&&r){await s.services.ready;try{const e=await r.fetch(i);if(!e)return void this._restored.resolve(void 0);const t=e.path;t&&await this.cd("/");const n=s.services.contents.localPath(t);await s.services.contents.get(t),await this.cd(n)}catch(e){await r.remove(i)}this._restored.resolve(void 0)}else this._restored.resolve(void 0)}async upload(e){const t=l.PageConfig.getNotebookVersion(),s=t<[4,0,0]||t>=[5,1,0],i=e.size>G;if(i&&!s){const t=this._trans.__("Cannot upload file (>%1 MB). %2",G/1048576,e.name);throw console.warn(t),t}if(i&&!await this._shouldUploadLarge(e))throw"Cancelled large file upload";if(await this._uploadCheckDisposed(),await this.refresh(),await this._uploadCheckDisposed(),this._items.find((t=>t.name===e.name))&&!await(0,h.shouldOverwrite)(e.name))throw"File not uploaded";await this._uploadCheckDisposed();const r=s&&e.size>Z;return await this._upload(e,r)}async _shouldUploadLarge(e){const{button:t}=await(0,i.showDialog)({title:this._trans.__("Large file size warning"),body:this._trans.__("The file size is %1 MB. Do you still want to upload it?",Math.round(e.size/1048576)),buttons:[i.Dialog.cancelButton({label:this._trans.__("Cancel")}),i.Dialog.warnButton({label:this._trans.__("Upload")})]});return t.accept}async _upload(e,t){let s=this._model.path;s=s?s+"/"+e.name:e.name;const i=e.name,r=async(t,r)=>{await this._uploadCheckDisposed();const n=new FileReader;n.readAsDataURL(t),await new Promise(((t,s)=>{n.onload=t,n.onerror=t=>s(`Failed to upload "${e.name}":`+t)})),await this._uploadCheckDisposed();const a=n.result.split(",")[1],o={type:"file",format:"base64",name:i,chunk:r,content:a};return await this.manager.services.contents.save(s,o)};if(!t)try{return await r(e)}catch(t){throw d.ArrayExt.removeFirstWhere(this._uploads,(t=>e.name===t.path)),t}let n,a={path:s,progress:0};this._uploadChanged.emit({name:"start",newValue:a,oldValue:null});for(let t=0;!n;t+=Z){const i=t+Z,o=i>=e.size,l=o?-1:i/Z,h={path:s,progress:t/e.size};let c;this._uploads.splice(this._uploads.indexOf(a)),this._uploads.push(h),this._uploadChanged.emit({name:"update",newValue:h,oldValue:a}),a=h;try{c=await r(e.slice(t,i),l)}catch(t){throw d.ArrayExt.removeFirstWhere(this._uploads,(t=>e.name===t.path)),this._uploadChanged.emit({name:"failure",newValue:a,oldValue:null}),t}o&&(n=c)}return this._uploads.splice(this._uploads.indexOf(a)),this._uploadChanged.emit({name:"finish",newValue:null,oldValue:a}),n}_uploadCheckDisposed(){return this.isDisposed?Promise.reject("Filemanager disposed. File upload canceled"):Promise.resolve()}handleContents(e){this._model={name:e.name,path:e.path,type:e.type,content:void 0,writable:e.writable,created:e.created,last_modified:e.last_modified,size:e.size,mimetype:e.mimetype,format:e.format},this._items=e.content,this._paths.clear(),e.content.forEach((e=>{this._paths.add(e.path)}))}onRunningChanged(e,t){this._populateSessions(t),this._refreshed.emit(void 0)}onFileChanged(e,t){const s=this._model.path,{sessions:i}=this.manager.services,{oldValue:r,newValue:n}=t;if(r&&r.path&&l.PathExt.dirname(r.path)===s?r:n&&n.path&&l.PathExt.dirname(n.path)===s?n:void 0)return this._poll.refresh(),this._populateSessions(i.running()),void this._fileChanged.emit(t)}_populateSessions(e){this._sessions.length=0;for(const t of e)this._paths.has(t.path)&&this._sessions.push(t)}}class ee extends Q{constructor(e){super(e),this._includeHiddenFiles=e.includeHiddenFiles||!1}items(){return this._includeHiddenFiles?super.items():(0,d.filter)(super.items(),(e=>!e.name.startsWith(".")))}showHiddenFiles(e){this._includeHiddenFiles=e,this.refresh()}}class te extends ee{constructor(e){var t,s;super(e),this._filter=null!==(t=e.filter)&&void 0!==t?t:e=>({}),this._filterDirectories=null===(s=e.filterDirectories)||void 0===s||s}get filterDirectories(){return this._filterDirectories}set filterDirectories(e){this._filterDirectories=e}items(){return(0,d.filter)(super.items(),(e=>{if(this._filterDirectories||"directory"!==e.type){const t=this._filter(e);return e.indices=null==t?void 0:t.indices,!!t}return!0}))}setFilter(e){this._filter=e,this.refresh()}}var se,ie;!function(e){async function t(e){const t=e.translator||n.nullTranslator,s=t.load("jupyterlab"),r=new re(e.manager,e.filter,t,e.defaultPath),a={title:e.title,buttons:[i.Dialog.cancelButton(),i.Dialog.okButton({label:s.__("Select")})],focusNodeSelector:e.focusNodeSelector,host:e.host,renderer:e.renderer,body:r};return await r.ready,new i.Dialog(a).launch()}e.getOpenFiles=t,e.getExistingDirectory=function(e){return t({...e,filter:e=>"directory"===e.type?{}:null})}}(se||(se={}));class re extends o.Widget{constructor(e,t,s,r,l){super(),this._ready=new c.PromiseDelegate;const h=(s=null!=s?s:n.nullTranslator).load("jupyterlab");this.addClass("jp-Open-Dialog"),ie.createFilteredFileBrowser("filtered-file-browser-dialog",e,t,{},s,r,l).then((e=>{this._browser=e,(0,i.setToolbar)(this._browser,(e=>[{name:"new-folder",widget:new i.ToolbarButton({icon:a.newFolderIcon,onClick:()=>{e.createNewDirectory()},tooltip:h.__("New Folder")})},{name:"refresher",widget:new i.ToolbarButton({icon:a.refreshIcon,onClick:()=>{e.model.refresh().catch((e=>{console.error("Failed to refresh file browser in open dialog.",e)}))},tooltip:h.__("Refresh File List")})}]));const t=new o.PanelLayout;t.addWidget(this._browser),this.layout=t,this._ready.resolve()})).catch((e=>{console.error("Error while creating file browser in open dialog",e),this._ready.reject(void 0)}))}getValue(){const e=Array.from(this._browser.selectedItems());return 0===e.length?[{path:this._browser.model.path,name:l.PathExt.basename(this._browser.model.path),type:"directory",content:void 0,writable:!1,created:"unknown",last_modified:"unknown",mimetype:"text/plain",format:"text"}]:e}get ready(){return this._ready.promise}}!function(e){e.createFilteredFileBrowser=async(e,t,s,i={},r,a,o)=>{r=r||n.nullTranslator;const l=new te({manager:t,filter:s,translator:r,driveName:i.driveName,refreshInterval:i.refreshInterval,filterDirectories:o});return a&&await l.cd(a),new $({id:e,model:l,translator:r})}}(ie||(ie={}));const ne=new c.Token("@jupyterlab/filebrowser:IFileBrowserFactory","A factory object that creates file browsers.\n Use this if you want to create your own file browser (e.g., for a custom storage backend),\n or to interact with other file browsers that have been created by extensions."),ae=new c.Token("@jupyterlab/filebrowser:IDefaultFileBrowser","A service for the default file browser."),oe=new c.Token("@jupyterlab/filebrowser:IFileBrowserCommands","A token to ensure file browser commands are loaded.");class le extends a.ToolbarButton{constructor(e){super({icon:a.fileUploadIcon,label:e.label,onClick:()=>{this._input.click()},tooltip:he.translateToolTip(e.translator)}),this._onInputChanged=()=>{const e=Array.prototype.slice.call(this._input.files).map((e=>this.fileBrowserModel.upload(e)));Promise.all(e).catch((e=>{(0,i.showErrorMessage)(this._trans._p("showErrorMessage","Upload Error"),e)}))},this._onInputClicked=()=>{this._input.value=""},this._input=he.createUploadInput(),this.fileBrowserModel=e.model,this.translator=e.translator||n.nullTranslator,this._trans=this.translator.load("jupyterlab"),this._input.onclick=this._onInputClicked,this._input.onchange=this._onInputChanged,this.addClass("jp-id-upload")}}var he;!function(e){e.createUploadInput=function(){const e=document.createElement("input");return e.type="file",e.multiple=!0,e},e.translateToolTip=function(e){return(e=e||n.nullTranslator).load("jupyterlab").__("Upload Files")}}(he||(he={}));var de=s(72881),ce=s(78156),me=s.n(ce);function ue(e){const t=(e.translator||n.nullTranslator).load("jupyterlab");return me().createElement(de.GroupItem,{spacing:4},me().createElement(de.TextItem,{source:t.__("Uploading…")}),me().createElement(de.ProgressBar,{percentage:e.upload}))}class pe extends a.VDomRenderer{constructor(e){super(new pe.Model(e.tracker.currentWidget&&e.tracker.currentWidget.model)),this._onBrowserChange=(e,t)=>{this.model.browserModel=null===t?null:t.model},this.translator=e.translator||n.nullTranslator,this._trans=this.translator.load("jupyterlab"),this._tracker=e.tracker,this._tracker.currentChanged.connect(this._onBrowserChange)}render(){return this.model.items.length>0?this.model.items[0].complete?me().createElement(de.TextItem,{source:this._trans.__("Complete!")}):me().createElement(ue,{upload:this.model.items[0].progress,translator:this.translator}):me().createElement(ue,{upload:100,translator:this.translator})}dispose(){super.dispose(),this._tracker.currentChanged.disconnect(this._onBrowserChange)}}!function(e){class t extends a.VDomModel{constructor(e){super(),this._uploadChanged=(e,t)=>{if("start"===t.name)this._items.push({path:t.newValue.path,progress:100*t.newValue.progress,complete:!1});else if("update"===t.name){const e=d.ArrayExt.findFirstIndex(this._items,(e=>e.path===t.oldValue.path));-1!==e&&(this._items[e].progress=100*t.newValue.progress)}else if("finish"===t.name){const e=d.ArrayExt.findFirstValue(this._items,(e=>e.path===t.oldValue.path));e&&(e.complete=!0,setTimeout((()=>{d.ArrayExt.removeFirstOf(this._items,e),this.stateChanged.emit(void 0)}),2e3))}else"failure"===t.name&&d.ArrayExt.removeFirstWhere(this._items,(e=>e.path===t.newValue.path));this.stateChanged.emit(void 0)},this._items=[],this._browserModel=null,this.browserModel=e}get items(){return this._items}get browserModel(){return this._browserModel}set browserModel(e){const t=this._browserModel;t&&t.uploadChanged.disconnect(this._uploadChanged),this._browserModel=e,this._items=[],null!==this._browserModel&&this._browserModel.uploadChanged.connect(this._uploadChanged),this.stateChanged.emit(void 0)}}e.Model=t}(pe||(pe={}))}}]);
|
notebook/static/9380.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[9380],{19380:(e,t,o)=>{o.r(t),o.d(t,{default:()=>c});var a=o(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[9380],{19380:(e,t,o)=>{o.r(t),o.d(t,{default:()=>c});var a=o(78036),n=o(7420),r=o(5944),u=o(37772),l=o(78156);const s=[{text:"About Jupyter",url:"https://jupyter.org"},{text:"Markdown Reference",url:"https://commonmark.org/help/"},{text:"Documentation",url:"https://jupyter-notebook.readthedocs.io/en/stable/"}];var p;!function(e){e.open="help:open",e.about="help:about"}(p||(p={}));const c=[{id:"@jupyter-notebook/help-extension:open",autoStart:!0,description:"A plugin to open the about section with resources",activate:e=>{const{commands:t}=e;t.addCommand(p.open,{label:e=>e.text,execute:e=>{const t=e.url;window.open(t)}})}},{id:"@jupyter-notebook/help-extension:about",autoStart:!0,requires:[r.ITranslator],optional:[n.IMainMenu,a.ICommandPalette],description:"Plugin to add a command to show an About Jupyter Notebook and Markdown Reference",activate:(e,t,o,n)=>{const{commands:r}=e,c=t.load("notebook"),b=c.__("Help");r.addCommand(p.about,{label:c.__("About %1",e.name),execute:()=>{const t=l.createElement(l.Fragment,null,l.createElement("span",{className:"jp-AboutNotebook-header"},l.createElement(u.jupyterIcon.react,{width:"196px",height:"auto"}))),o=c.__("JUPYTER NOTEBOOK ON GITHUB"),n=c.__("CONTRIBUTOR LIST"),r=l.createElement("span",null,l.createElement("a",{href:"https://github.com/jupyter/notebook",target:"_blank",rel:"noopener noreferrer",className:"jp-Button-flat jp-AboutNotebook-about-externalLinks"},o),l.createElement("a",{href:"https://github.com/jupyter/notebook/pulse",target:"_blank",rel:"noopener noreferrer",className:"jp-Button-flat jp-AboutNotebook-about-externalLinks"},n)),s=c.__("Version: %1",e.version),p=c.__("© 2021-2023 Jupyter Notebook Contributors"),b=l.createElement(l.Fragment,null,l.createElement("span",{className:"jp-AboutNotebook-version"},s),l.createElement("div",null,r),l.createElement("span",{className:"jp-AboutNotebook-about-copyright"},p)),m=new a.Dialog({title:t,body:b,buttons:[a.Dialog.createButton({label:c.__("Dismiss"),className:"jp-AboutNotebook-about-button jp-mod-reject jp-mod-styled"})]});m.addClass("jp-AboutNotebook"),m.launch()}}),n&&n.addItem({command:p.about,category:b});const m=s.map((e=>({args:e,command:p.open})));o&&o.helpMenu.addGroup(m,30)}}]}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[9466],{99466:(t,e,n)=>{n.d(e,{d:()=>B,p:()=>r,s:()=>D});var s=n(23617),i=n(77019),u=function(){var t=function(t,e,n,s){for(n=n||{},s=t.length;s--;n[t[s]]=e);return n},e=[1,16],n=[1,17],s=[1,18],i=[1,37],u=[1,38],r=[1,24],a=[1,22],c=[1,23],o=[1,29],l=[1,30],h=[1,31],A=[1,32],p=[1,33],d=[1,34],y=[1,25],E=[1,26],C=[1,27],m=[1,28],b=[1,42],f=[1,39],F=[1,40],g=[1,41],k=[1,43],T=[1,9],B=[1,8,9],D=[1,54],_=[1,55],S=[1,56],N=[1,57],L=[1,58],$=[1,59],v=[1,60],O=[1,8,9,38],I=[1,71],x=[1,8,9,12,13,21,36,38,41,58,59,60,61,62,63,64,69,71],R=[1,8,9,12,13,19,21,36,38,41,45,58,59,60,61,62,63,64,69,71,84,86,87,88,89],P=[13,84,86,87,88,89],w=[13,63,64,84,86,87,88,89],U=[13,58,59,60,61,62,84,86,87,88,89],G=[1,90],M=[1,8,9,36,38,41],Y=[1,8,9,21],z={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,className:17,classLiteralName:18,GENERICTYPE:19,relationStatement:20,LABEL:21,namespaceStatement:22,classStatement:23,memberStatement:24,annotationStatement:25,clickStatement:26,cssClassStatement:27,noteStatement:28,direction:29,acc_title:30,acc_title_value:31,acc_descr:32,acc_descr_value:33,acc_descr_multiline_value:34,namespaceIdentifier:35,STRUCT_START:36,classStatements:37,STRUCT_STOP:38,NAMESPACE:39,classIdentifier:40,STYLE_SEPARATOR:41,members:42,CLASS:43,ANNOTATION_START:44,ANNOTATION_END:45,MEMBER:46,SEPARATOR:47,relation:48,NOTE_FOR:49,noteText:50,NOTE:51,direction_tb:52,direction_bt:53,direction_rl:54,direction_lr:55,relationType:56,lineType:57,AGGREGATION:58,EXTENSION:59,COMPOSITION:60,DEPENDENCY:61,LOLLIPOP:62,LINE:63,DOTTED_LINE:64,CALLBACK:65,LINK:66,LINK_TARGET:67,CLICK:68,CALLBACK_NAME:69,CALLBACK_ARGS:70,HREF:71,CSSCLASS:72,commentToken:73,textToken:74,graphCodeTokens:75,textNoTagsToken:76,TAGSTART:77,TAGEND:78,"==":79,"--":80,PCT:81,DEFAULT:82,SPACE:83,MINUS:84,keywords:85,UNICODE_TEXT:86,NUM:87,ALPHA:88,BQUOTE_STR:89,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",19:"GENERICTYPE",21:"LABEL",30:"acc_title",31:"acc_title_value",32:"acc_descr",33:"acc_descr_value",34:"acc_descr_multiline_value",36:"STRUCT_START",38:"STRUCT_STOP",39:"NAMESPACE",41:"STYLE_SEPARATOR",43:"CLASS",44:"ANNOTATION_START",45:"ANNOTATION_END",46:"MEMBER",47:"SEPARATOR",49:"NOTE_FOR",51:"NOTE",52:"direction_tb",53:"direction_bt",54:"direction_rl",55:"direction_lr",58:"AGGREGATION",59:"EXTENSION",60:"COMPOSITION",61:"DEPENDENCY",62:"LOLLIPOP",63:"LINE",64:"DOTTED_LINE",65:"CALLBACK",66:"LINK",67:"LINK_TARGET",68:"CLICK",69:"CALLBACK_NAME",70:"CALLBACK_ARGS",71:"HREF",72:"CSSCLASS",75:"graphCodeTokens",77:"TAGSTART",78:"TAGEND",79:"==",80:"--",81:"PCT",82:"DEFAULT",83:"SPACE",84:"MINUS",85:"keywords",86:"UNICODE_TEXT",87:"NUM",88:"ALPHA",89:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,2],[17,1],[17,1],[17,2],[17,2],[17,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[22,4],[22,5],[35,2],[37,1],[37,2],[37,3],[23,1],[23,3],[23,4],[23,6],[40,2],[40,3],[25,4],[42,1],[42,2],[24,1],[24,2],[24,1],[24,1],[20,3],[20,4],[20,4],[20,5],[28,3],[28,2],[29,1],[29,1],[29,1],[29,1],[48,3],[48,2],[48,2],[48,1],[56,1],[56,1],[56,1],[56,1],[56,1],[57,1],[57,1],[26,3],[26,4],[26,3],[26,4],[26,4],[26,5],[26,3],[26,4],[26,4],[26,5],[26,4],[26,5],[26,5],[26,6],[27,3],[73,1],[73,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[76,1],[76,1],[76,1],[76,1],[16,1],[16,1],[16,1],[16,1],[18,1],[50,1]],performAction:function(t,e,n,s,i,u,r){var a=u.length-1;switch(i){case 8:this.$=u[a-1];break;case 9:case 11:case 12:this.$=u[a];break;case 10:case 13:this.$=u[a-1]+u[a];break;case 14:case 15:this.$=u[a-1]+"~"+u[a]+"~";break;case 16:s.addRelation(u[a]);break;case 17:u[a-1].title=s.cleanupLabel(u[a]),s.addRelation(u[a-1]);break;case 26:this.$=u[a].trim(),s.setAccTitle(this.$);break;case 27:case 28:this.$=u[a].trim(),s.setAccDescription(this.$);break;case 29:s.addClassesToNamespace(u[a-3],u[a-1]);break;case 30:s.addClassesToNamespace(u[a-4],u[a-1]);break;case 31:this.$=u[a],s.addNamespace(u[a]);break;case 32:case 42:this.$=[u[a]];break;case 33:this.$=[u[a-1]];break;case 34:u[a].unshift(u[a-2]),this.$=u[a];break;case 36:s.setCssClass(u[a-2],u[a]);break;case 37:s.addMembers(u[a-3],u[a-1]);break;case 38:s.setCssClass(u[a-5],u[a-3]),s.addMembers(u[a-5],u[a-1]);break;case 39:this.$=u[a],s.addClass(u[a]);break;case 40:this.$=u[a-1],s.addClass(u[a-1]),s.setClassLabel(u[a-1],u[a]);break;case 41:s.addAnnotation(u[a],u[a-2]);break;case 43:u[a].push(u[a-1]),this.$=u[a];break;case 44:case 46:case 47:break;case 45:s.addMember(u[a-1],s.cleanupLabel(u[a]));break;case 48:this.$={id1:u[a-2],id2:u[a],relation:u[a-1],relationTitle1:"none",relationTitle2:"none"};break;case 49:this.$={id1:u[a-3],id2:u[a],relation:u[a-1],relationTitle1:u[a-2],relationTitle2:"none"};break;case 50:this.$={id1:u[a-3],id2:u[a],relation:u[a-2],relationTitle1:"none",relationTitle2:u[a-1]};break;case 51:this.$={id1:u[a-4],id2:u[a],relation:u[a-2],relationTitle1:u[a-3],relationTitle2:u[a-1]};break;case 52:s.addNote(u[a],u[a-1]);break;case 53:s.addNote(u[a]);break;case 54:s.setDirection("TB");break;case 55:s.setDirection("BT");break;case 56:s.setDirection("RL");break;case 57:s.setDirection("LR");break;case 58:this.$={type1:u[a-2],type2:u[a],lineType:u[a-1]};break;case 59:this.$={type1:"none",type2:u[a],lineType:u[a-1]};break;case 60:this.$={type1:u[a-1],type2:"none",lineType:u[a]};break;case 61:this.$={type1:"none",type2:"none",lineType:u[a]};break;case 62:this.$=s.relationType.AGGREGATION;break;case 63:this.$=s.relationType.EXTENSION;break;case 64:this.$=s.relationType.COMPOSITION;break;case 65:this.$=s.relationType.DEPENDENCY;break;case 66:this.$=s.relationType.LOLLIPOP;break;case 67:this.$=s.lineType.LINE;break;case 68:this.$=s.lineType.DOTTED_LINE;break;case 69:case 75:this.$=u[a-2],s.setClickEvent(u[a-1],u[a]);break;case 70:case 76:this.$=u[a-3],s.setClickEvent(u[a-2],u[a-1]),s.setTooltip(u[a-2],u[a]);break;case 71:this.$=u[a-2],s.setLink(u[a-1],u[a]);break;case 72:this.$=u[a-3],s.setLink(u[a-2],u[a-1],u[a]);break;case 73:this.$=u[a-3],s.setLink(u[a-2],u[a-1]),s.setTooltip(u[a-2],u[a]);break;case 74:this.$=u[a-4],s.setLink(u[a-3],u[a-2],u[a]),s.setTooltip(u[a-3],u[a-1]);break;case 77:this.$=u[a-3],s.setClickEvent(u[a-2],u[a-1],u[a]);break;case 78:this.$=u[a-4],s.setClickEvent(u[a-3],u[a-2],u[a-1]),s.setTooltip(u[a-3],u[a]);break;case 79:this.$=u[a-3],s.setLink(u[a-2],u[a]);break;case 80:this.$=u[a-4],s.setLink(u[a-3],u[a-1],u[a]);break;case 81:this.$=u[a-4],s.setLink(u[a-3],u[a-1]),s.setTooltip(u[a-3],u[a]);break;case 82:this.$=u[a-5],s.setLink(u[a-4],u[a-2],u[a]),s.setTooltip(u[a-4],u[a-1]);break;case 83:s.setCssClass(u[a-1],u[a])}},table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:35,17:19,18:36,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:e,32:n,34:s,35:20,39:i,40:21,43:u,44:r,46:a,47:c,49:o,51:l,52:h,53:A,54:p,55:d,65:y,66:E,68:C,72:m,84:b,86:f,87:F,88:g,89:k},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(T,[2,5],{8:[1,44]}),{8:[1,45]},t(B,[2,16],{21:[1,46]}),t(B,[2,18]),t(B,[2,19]),t(B,[2,20]),t(B,[2,21]),t(B,[2,22]),t(B,[2,23]),t(B,[2,24]),t(B,[2,25]),{31:[1,47]},{33:[1,48]},t(B,[2,28]),t(B,[2,44],{48:49,56:52,57:53,13:[1,50],21:[1,51],58:D,59:_,60:S,61:N,62:L,63:$,64:v}),{36:[1,61]},t(O,[2,35],{36:[1,63],41:[1,62]}),t(B,[2,46]),t(B,[2,47]),{16:64,84:b,86:f,87:F,88:g},{16:35,17:65,18:36,84:b,86:f,87:F,88:g,89:k},{16:35,17:66,18:36,84:b,86:f,87:F,88:g,89:k},{16:35,17:67,18:36,84:b,86:f,87:F,88:g,89:k},{13:[1,68]},{16:35,17:69,18:36,84:b,86:f,87:F,88:g,89:k},{13:I,50:70},t(B,[2,54]),t(B,[2,55]),t(B,[2,56]),t(B,[2,57]),t(x,[2,11],{16:35,18:36,17:72,19:[1,73],84:b,86:f,87:F,88:g,89:k}),t(x,[2,12],{19:[1,74]}),{15:75,16:76,84:b,86:f,87:F,88:g},{16:35,17:77,18:36,84:b,86:f,87:F,88:g,89:k},t(R,[2,97]),t(R,[2,98]),t(R,[2,99]),t(R,[2,100]),t([1,8,9,12,13,19,21,36,38,41,58,59,60,61,62,63,64,69,71],[2,101]),t(T,[2,6],{10:5,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,17:19,35:20,40:21,16:35,18:36,5:78,30:e,32:n,34:s,39:i,43:u,44:r,46:a,47:c,49:o,51:l,52:h,53:A,54:p,55:d,65:y,66:E,68:C,72:m,84:b,86:f,87:F,88:g,89:k}),{5:79,10:5,16:35,17:19,18:36,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:e,32:n,34:s,35:20,39:i,40:21,43:u,44:r,46:a,47:c,49:o,51:l,52:h,53:A,54:p,55:d,65:y,66:E,68:C,72:m,84:b,86:f,87:F,88:g,89:k},t(B,[2,17]),t(B,[2,26]),t(B,[2,27]),{13:[1,81],16:35,17:80,18:36,84:b,86:f,87:F,88:g,89:k},{48:82,56:52,57:53,58:D,59:_,60:S,61:N,62:L,63:$,64:v},t(B,[2,45]),{57:83,63:$,64:v},t(P,[2,61],{56:84,58:D,59:_,60:S,61:N,62:L}),t(w,[2,62]),t(w,[2,63]),t(w,[2,64]),t(w,[2,65]),t(w,[2,66]),t(U,[2,67]),t(U,[2,68]),{8:[1,86],23:87,37:85,40:21,43:u},{16:88,84:b,86:f,87:F,88:g},{42:89,46:G},{45:[1,91]},{13:[1,92]},{13:[1,93]},{69:[1,94],71:[1,95]},{16:96,84:b,86:f,87:F,88:g},{13:I,50:97},t(B,[2,53]),t(B,[2,102]),t(x,[2,13]),t(x,[2,14]),t(x,[2,15]),{36:[2,31]},{15:98,16:76,36:[2,9],84:b,86:f,87:F,88:g},t(M,[2,39],{11:99,12:[1,100]}),t(T,[2,7]),{9:[1,101]},t(Y,[2,48]),{16:35,17:102,18:36,84:b,86:f,87:F,88:g,89:k},{13:[1,104],16:35,17:103,18:36,84:b,86:f,87:F,88:g,89:k},t(P,[2,60],{56:105,58:D,59:_,60:S,61:N,62:L}),t(P,[2,59]),{38:[1,106]},{23:87,37:107,40:21,43:u},{8:[1,108],38:[2,32]},t(O,[2,36],{36:[1,109]}),{38:[1,110]},{38:[2,42],42:111,46:G},{16:35,17:112,18:36,84:b,86:f,87:F,88:g,89:k},t(B,[2,69],{13:[1,113]}),t(B,[2,71],{13:[1,115],67:[1,114]}),t(B,[2,75],{13:[1,116],70:[1,117]}),{13:[1,118]},t(B,[2,83]),t(B,[2,52]),{36:[2,10]},t(M,[2,40]),{13:[1,119]},{1:[2,4]},t(Y,[2,50]),t(Y,[2,49]),{16:35,17:120,18:36,84:b,86:f,87:F,88:g,89:k},t(P,[2,58]),t(B,[2,29]),{38:[1,121]},{23:87,37:122,38:[2,33],40:21,43:u},{42:123,46:G},t(O,[2,37]),{38:[2,43]},t(B,[2,41]),t(B,[2,70]),t(B,[2,72]),t(B,[2,73],{67:[1,124]}),t(B,[2,76]),t(B,[2,77],{13:[1,125]}),t(B,[2,79],{13:[1,127],67:[1,126]}),{14:[1,128]},t(Y,[2,51]),t(B,[2,30]),{38:[2,34]},{38:[1,129]},t(B,[2,74]),t(B,[2,78]),t(B,[2,80]),t(B,[2,81],{67:[1,130]}),t(M,[2,8]),t(O,[2,38]),t(B,[2,82])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],75:[2,31],98:[2,10],101:[2,4],111:[2,43],122:[2,34]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=[0],n=[],s=[null],i=[],u=this.table,r="",a=0,c=0,o=i.slice.call(arguments,1),l=Object.create(this.lexer),h={yy:{}};for(var A in this.yy)Object.prototype.hasOwnProperty.call(this.yy,A)&&(h.yy[A]=this.yy[A]);l.setInput(t,h.yy),h.yy.lexer=l,h.yy.parser=this,void 0===l.yylloc&&(l.yylloc={});var p=l.yylloc;i.push(p);var d=l.options&&l.options.ranges;"function"==typeof h.yy.parseError?this.parseError=h.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var y,E,C,m,b,f,F,g,k,T={};;){if(E=e[e.length-1],this.defaultActions[E]?C=this.defaultActions[E]:(null==y&&(k=void 0,"number"!=typeof(k=n.pop()||l.lex()||1)&&(k instanceof Array&&(k=(n=k).pop()),k=this.symbols_[k]||k),y=k),C=u[E]&&u[E][y]),void 0===C||!C.length||!C[0]){var B;for(b in g=[],u[E])this.terminals_[b]&&b>2&&g.push("'"+this.terminals_[b]+"'");B=l.showPosition?"Parse error on line "+(a+1)+":\n"+l.showPosition()+"\nExpecting "+g.join(", ")+", got '"+(this.terminals_[y]||y)+"'":"Parse error on line "+(a+1)+": Unexpected "+(1==y?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(B,{text:l.match,token:this.terminals_[y]||y,line:l.yylineno,loc:p,expected:g})}if(C[0]instanceof Array&&C.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+y);switch(C[0]){case 1:e.push(y),s.push(l.yytext),i.push(l.yylloc),e.push(C[1]),y=null,c=l.yyleng,r=l.yytext,a=l.yylineno,p=l.yylloc;break;case 2:if(f=this.productions_[C[1]][1],T.$=s[s.length-f],T._$={first_line:i[i.length-(f||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(f||1)].first_column,last_column:i[i.length-1].last_column},d&&(T._$.range=[i[i.length-(f||1)].range[0],i[i.length-1].range[1]]),void 0!==(m=this.performAction.apply(T,[r,c,a,h.yy,C[1],s,i].concat(o))))return m;f&&(e=e.slice(0,-1*f*2),s=s.slice(0,-1*f),i=i.slice(0,-1*f)),e.push(this.productions_[C[1]][0]),s.push(T.$),i.push(T._$),F=u[e[e.length-2]][e[e.length-1]],e.push(F);break;case 3:return!0}}return!0}},K={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===s.length?this.yylloc.first_column:0)+s[s.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,s,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var u in i)this[u]=i[u];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),u=0;u<i.length;u++)if((n=this._input.match(this.rules[i[u]]))&&(!e||n[0].length>e[0].length)){if(e=n,s=u,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[u])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,s){switch(n){case 0:return 52;case 1:return 53;case 2:return 54;case 3:return 55;case 4:case 5:case 14:case 29:case 34:case 38:case 45:break;case 6:return this.begin("acc_title"),30;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),32;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 19:case 22:case 24:case 56:case 59:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 33:return 8;case 15:case 16:return 7;case 17:case 35:case 43:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 69;case 23:return 70;case 25:return"STR";case 26:this.begin("string");break;case 27:return this.begin("namespace"),39;case 28:case 37:return this.popState(),8;case 30:return this.begin("namespace-body"),36;case 31:case 41:return this.popState(),38;case 32:case 42:return"EOF_IN_STRUCT";case 36:return this.begin("class"),43;case 39:return this.popState(),this.popState(),38;case 40:return this.begin("class-body"),36;case 44:return"OPEN_IN_STRUCT";case 46:return"MEMBER";case 47:return 72;case 48:return 65;case 49:return 66;case 50:return 68;case 51:return 49;case 52:return 51;case 53:return 44;case 54:return 45;case 55:return 71;case 57:return"GENERICTYPE";case 58:this.begin("generic");break;case 60:return"BQUOTE_STR";case 61:this.begin("bqstring");break;case 62:case 63:case 64:case 65:return 67;case 66:case 67:return 59;case 68:case 69:return 61;case 70:return 60;case 71:return 58;case 72:return 62;case 73:return 63;case 74:return 64;case 75:return 21;case 76:return 41;case 77:return 84;case 78:return"DOT";case 79:return"PLUS";case 80:return 81;case 81:case 82:return"EQUALS";case 83:return 88;case 84:return 12;case 85:return 14;case 86:return"PUNCTUATION";case 87:return 87;case 88:return 86;case 89:return 83;case 90:return 9}},rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,31,32,33,34,35,36,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},namespace:{rules:[26,27,28,29,30,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},"class-body":{rules:[26,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},class:{rules:[26,37,38,39,40,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},acc_descr:{rules:[9,26,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},acc_title:{rules:[7,26,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},callback_args:{rules:[22,23,26,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},callback_name:{rules:[19,20,21,26,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},href:{rules:[26,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},struct:{rules:[26,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},generic:{rules:[26,47,48,49,50,51,52,53,54,55,56,57,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},bqstring:{rules:[26,47,48,49,50,51,52,53,54,55,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},string:{rules:[24,25,26,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,36,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!0}}};function j(){this.yy={}}return z.lexer=K,j.prototype=z,z.Parser=j,new j}();u.parser=u;const r=u,a=["#","+","~","-",""];class c{constructor(t,e){this.memberType=e,this.visibility="",this.classifier="";const n=(0,i.d)(t,(0,i.c)());this.parseMember(n)}getDisplayDetails(){let t=this.visibility+(0,i.v)(this.id);return"method"===this.memberType&&(t+=`(${(0,i.v)(this.parameters.trim())})`,this.returnType&&(t+=" : "+(0,i.v)(this.returnType))),t=t.trim(),{displayText:t,cssStyle:this.parseClassifier()}}parseMember(t){let e="";if("method"===this.memberType){const n=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/,s=t.match(n);if(s){const t=s[1]?s[1].trim():"";if(a.includes(t)&&(this.visibility=t),this.id=s[2].trim(),this.parameters=s[3]?s[3].trim():"",e=s[4]?s[4].trim():"",this.returnType=s[5]?s[5].trim():"",""===e){const t=this.returnType.substring(this.returnType.length-1);t.match(/[$*]/)&&(e=t,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const n=t.length,s=t.substring(0,1),i=t.substring(n-1);a.includes(s)&&(this.visibility=s),i.match(/[*?]/)&&(e=i),this.id=t.substring(""===this.visibility?0:1,""===e?n:n-1)}this.classifier=e}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}}const o="classId-";let l=[],h={},A=[],p=0,d={},y=0,E=[];const C=t=>i.e.sanitizeText(t,(0,i.c)()),m=function(t){const e=i.e.sanitizeText(t,(0,i.c)());let n="",s=e;if(e.indexOf("~")>0){const t=e.split("~");s=C(t[0]),n=C(t[1])}return{className:s,type:n}},b=function(t){const e=i.e.sanitizeText(t,(0,i.c)()),{className:n,type:s}=m(e);if(Object.hasOwn(h,n))return;const u=i.e.sanitizeText(n,(0,i.c)());h[u]={id:u,type:s,label:u,cssClasses:[],methods:[],members:[],annotations:[],domId:o+u+"-"+p},p++},f=function(t){const e=i.e.sanitizeText(t,(0,i.c)());if(e in h)return h[e].domId;throw new Error("Class not found: "+e)},F=function(t,e){b(t);const n=m(t).className,s=h[n];if("string"==typeof e){const t=e.trim();t.startsWith("<<")&&t.endsWith(">>")?s.annotations.push(C(t.substring(2,t.length-2))):t.indexOf(")")>0?s.methods.push(new c(t,"method")):t&&s.members.push(new c(t,"attribute"))}},g=function(t,e){t.split(",").forEach((function(t){let n=t;t[0].match(/\d/)&&(n=o+n),void 0!==h[n]&&h[n].cssClasses.push(e)}))},k=function(t){let e=(0,s.Ys)(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=(0,s.Ys)("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),(0,s.Ys)(t).select("svg").selectAll("g.node").on("mouseover",(function(){const t=(0,s.Ys)(this);if(null===t.attr("title"))return;const n=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(t.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.top-14+document.body.scrollTop+"px"),e.html(e.html().replace(/<br\/>/g,"<br/>")),t.classed("hover",!0)})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),(0,s.Ys)(this).classed("hover",!1)}))};E.push(k);let T="TB";const B={setAccTitle:i.s,getAccTitle:i.g,getAccDescription:i.a,setAccDescription:i.b,getConfig:()=>(0,i.c)().class,addClass:b,bindFunctions:function(t){E.forEach((function(e){e(t)}))},clear:function(){l=[],h={},A=[],E=[],E.push(k),d={},y=0,(0,i.t)()},getClass:function(t){return h[t]},getClasses:function(){return h},getNotes:function(){return A},addAnnotation:function(t,e){const n=m(t).className;h[n].annotations.push(e)},addNote:function(t,e){const n={id:`note${A.length}`,class:e,text:t};A.push(n)},getRelations:function(){return l},addRelation:function(t){i.l.debug("Adding relation: "+JSON.stringify(t)),b(t.id1),b(t.id2),t.id1=m(t.id1).className,t.id2=m(t.id2).className,t.relationTitle1=i.e.sanitizeText(t.relationTitle1.trim(),(0,i.c)()),t.relationTitle2=i.e.sanitizeText(t.relationTitle2.trim(),(0,i.c)()),l.push(t)},getDirection:()=>T,setDirection:t=>{T=t},addMember:F,addMembers:function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach((e=>F(t,e))))},cleanupLabel:function(t){return t.startsWith(":")&&(t=t.substring(1)),C(t.trim())},lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},setClickEvent:function(t,e,n){t.split(",").forEach((function(t){(function(t,e,n){const s=i.e.sanitizeText(t,(0,i.c)());if("loose"!==(0,i.c)().securityLevel)return;if(void 0===e)return;const u=s;if(void 0!==h[u]){const t=f(u);let s=[];if("string"==typeof n){s=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<s.length;t++){let e=s[t].trim();'"'===e.charAt(0)&&'"'===e.charAt(e.length-1)&&(e=e.substr(1,e.length-2)),s[t]=e}}0===s.length&&s.push(t),E.push((function(){const n=document.querySelector(`[id="${t}"]`);null!==n&&n.addEventListener("click",(function(){i.u.runFunc(e,...s)}),!1)}))}})(t,e,n),h[t].haveCallback=!0})),g(t,"clickable")},setCssClass:g,setLink:function(t,e,n){const s=(0,i.c)();t.split(",").forEach((function(t){let u=t;t[0].match(/\d/)&&(u=o+u),void 0!==h[u]&&(h[u].link=i.u.formatUrl(e,s),"sandbox"===s.securityLevel?h[u].linkTarget="_top":h[u].linkTarget="string"==typeof n?C(n):"_blank")})),g(t,"clickable")},getTooltip:function(t,e){return e?d[e].classes[t].tooltip:h[t].tooltip},setTooltip:function(t,e){t.split(",").forEach((function(t){void 0!==e&&(h[t].tooltip=C(e))}))},lookUpDomId:f,setDiagramTitle:i.q,getDiagramTitle:i.r,setClassLabel:function(t,e){const n=i.e.sanitizeText(t,(0,i.c)());e&&(e=C(e));const{className:s}=m(n);h[s].label=e},addNamespace:function(t){void 0===d[t]&&(d[t]={id:t,classes:{},children:{},domId:o+t+"-"+y},y++)},addClassesToNamespace:function(t,e){void 0!==d[t]&&e.map((e=>{h[e].parent=t,d[t].classes[e]=h[e]}))},getNamespace:function(t){return d[t]},getNamespaces:function(){return d}},D=t=>`g.classGroup text {\n fill: ${t.nodeBorder||t.classText};\n stroke: none;\n font-family: ${t.fontFamily};\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n.nodeLabel, .edgeLabel {\n color: ${t.classText};\n}\n.edgeLabel .label rect {\n fill: ${t.mainBkg};\n}\n.label text {\n fill: ${t.classText};\n}\n.edgeLabel .label span {\n background: ${t.mainBkg};\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.classGroup line {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ${t.nodeBorder};\n font-size: 10px;\n}\n\n.relation {\n stroke: ${t.lineColor};\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n.dotted-line{\n stroke-dasharray: 1 2;\n}\n\n#compositionStart, .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopStart, .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopEnd, .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n}\n\n.classTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n`}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[9554],{74193:(e,t,n)=>{n.d(t,{a:()=>l});var r=n(51723);function l(e,t){var n=e.append("foreignObject").attr("width","100000"),l=n.append("xhtml:div");l.attr("xmlns","http://www.w3.org/1999/xhtml");var o=t.label;switch(typeof o){case"function":l.insert(o);break;case"object":l.insert((function(){return o}));break;default:l.html(o)}r.bg(l,t.labelStyle),l.style("display","inline-block"),l.style("white-space","nowrap");var a=l.node().getBoundingClientRect();return n.attr("width",a.width).attr("height",a.height),n}},51723:(e,t,n)=>{n.d(t,{$p:()=>d,O1:()=>a,WR:()=>p,bF:()=>o,bg:()=>c});var r=n(53541),l=n(48489);function o(e,t){return!!e.children(t).length}function a(e){return i(e.v)+":"+i(e.w)+":"+i(e.name)}var s=/:/g;function i(e){return e?String(e).replace(s,"\\:"):""}function c(e,t){t&&e.attr("style",t)}function d(e,t,n){t&&e.attr("class",t).attr("class",n+" "+e.attr("class"))}function p(e,t){var n=t.graph();if(r.Z(n)){var o=n.transition;if(l.Z(o))return o(e)}return e}},29554:(e,t,n)=>{n.d(t,{diagram:()=>s});var r=n(99284),l=(n(67406),n(23617));n(77019),n(36004),n(65479),n(21845),n(7259),n(51723),n(74193),n(12451),n(36735),n(87768),l.c_6;var o=n(28174);n(27693),n(7608),n(31699),n(81779);const a={},s={parser:r.p,db:r.f,renderer:o.f,styles:o.a,init:e=>{e.flowchart||(e.flowchart={}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,function(e){const t=Object.keys(e);for(const n of t)a[n]=e[n]}(e.flowchart),r.f.clear(),r.f.setGen("gen-1")}}},28174:(e,t,n)=>{n.d(t,{a:()=>h,f:()=>u});var r=n(67406),l=n(23617),o=n(77019),a=n(64892),s=n(74193),i=n(90267),c=n(42528);const d=(e,t)=>i.Z.lang.round(c.Z.parse(e)[t]);var p=n(14728);const b={},f=function(e,t,n,r,l,a){const i=r.select(`[id="${n}"]`);Object.keys(e).forEach((function(n){const r=e[n];let c="default";r.classes.length>0&&(c=r.classes.join(" ")),c+=" flowchart-label";const d=(0,o.k)(r.styles);let p,b=void 0!==r.text?r.text:r.id;if(o.l.info("vertex",r,r.labelType),"markdown"===r.labelType)o.l.info("vertex",r,r.labelType);else if((0,o.m)((0,o.c)().flowchart.htmlLabels)){const e={label:b.replace(/fa[blrs]?:fa-[\w-]+/g,(e=>`<i class='${e.replace(":"," ")}'></i>`))};p=(0,s.a)(i,e).node(),p.parentNode.removeChild(p)}else{const e=l.createElementNS("http://www.w3.org/2000/svg","text");e.setAttribute("style",d.labelStyle.replace("color:","fill:"));const t=b.split(o.e.lineBreakRegex);for(const n of t){const t=l.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),t.setAttribute("dy","1em"),t.setAttribute("x","1"),t.textContent=n,e.appendChild(t)}p=e}let f=0,w="";switch(r.type){case"round":f=5,w="rect";break;case"square":case"group":default:w="rect";break;case"diamond":w="question";break;case"hexagon":w="hexagon";break;case"odd":case"odd_right":w="rect_left_inv_arrow";break;case"lean_right":w="lean_right";break;case"lean_left":w="lean_left";break;case"trapezoid":w="trapezoid";break;case"inv_trapezoid":w="inv_trapezoid";break;case"circle":w="circle";break;case"ellipse":w="ellipse";break;case"stadium":w="stadium";break;case"subroutine":w="subroutine";break;case"cylinder":w="cylinder";break;case"doublecircle":w="doublecircle"}t.setNode(r.id,{labelStyle:d.labelStyle,shape:w,labelText:b,labelType:r.labelType,rx:f,ry:f,class:c,style:d.style,id:r.id,link:r.link,linkTarget:r.linkTarget,tooltip:a.db.getTooltip(r.id)||"",domId:a.db.lookUpDomId(r.id),haveCallback:r.haveCallback,width:"group"===r.type?500:void 0,dir:r.dir,type:r.type,props:r.props,padding:(0,o.c)().flowchart.padding}),o.l.info("setNode",{labelStyle:d.labelStyle,labelType:r.labelType,shape:w,labelText:b,rx:f,ry:f,class:c,style:d.style,id:r.id,domId:a.db.lookUpDomId(r.id),width:"group"===r.type?500:void 0,type:r.type,dir:r.dir,props:r.props,padding:(0,o.c)().flowchart.padding})}))},w=function(e,t,n){o.l.info("abc78 edges = ",e);let r,a,s=0,i={};if(void 0!==e.defaultStyle){const t=(0,o.k)(e.defaultStyle);r=t.style,a=t.labelStyle}e.forEach((function(n){s++;const c="L-"+n.start+"-"+n.end;void 0===i[c]?(i[c]=0,o.l.info("abc78 new entry",c,i[c])):(i[c]++,o.l.info("abc78 new entry",c,i[c]));let d=c+"-"+i[c];o.l.info("abc78 new link id to be used is",c,d,i[c]);const p="LS-"+n.start,f="LE-"+n.end,w={style:"",labelStyle:""};switch(w.minlen=n.length||1,"arrow_open"===n.type?w.arrowhead="none":w.arrowhead="normal",w.arrowTypeStart="arrow_open",w.arrowTypeEnd="arrow_open",n.type){case"double_arrow_cross":w.arrowTypeStart="arrow_cross";case"arrow_cross":w.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":w.arrowTypeStart="arrow_point";case"arrow_point":w.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":w.arrowTypeStart="arrow_circle";case"arrow_circle":w.arrowTypeEnd="arrow_circle"}let u="",h="";switch(n.stroke){case"normal":u="fill:none;",void 0!==r&&(u=r),void 0!==a&&(h=a),w.thickness="normal",w.pattern="solid";break;case"dotted":w.thickness="normal",w.pattern="dotted",w.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":w.thickness="thick",w.pattern="solid",w.style="stroke-width: 3.5px;fill:none;";break;case"invisible":w.thickness="invisible",w.pattern="solid",w.style="stroke-width: 0;fill:none;"}if(void 0!==n.style){const e=(0,o.k)(n.style);u=e.style,h=e.labelStyle}w.style=w.style+=u,w.labelStyle=w.labelStyle+=h,void 0!==n.interpolate?w.curve=(0,o.n)(n.interpolate,l.c_6):void 0!==e.defaultInterpolate?w.curve=(0,o.n)(e.defaultInterpolate,l.c_6):w.curve=(0,o.n)(b.curve,l.c_6),void 0===n.text?void 0!==n.style&&(w.arrowheadStyle="fill: #333"):(w.arrowheadStyle="fill: #333",w.labelpos="c"),w.labelType=n.labelType,w.label=n.text.replace(o.e.lineBreakRegex,"\n"),void 0===n.style&&(w.style=w.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),w.labelStyle=w.labelStyle.replace("color:","fill:"),w.id=d,w.classes="flowchart-link "+p+" "+f,t.setEdge(n.start,n.end,w,s)}))},u={setConf:function(e){const t=Object.keys(e);for(const n of t)b[n]=e[n]},addVertices:f,addEdges:w,getClasses:function(e,t){return t.db.getClasses()},draw:async function(e,t,n,s){o.l.info("Drawing flowchart");let i=s.db.getDirection();void 0===i&&(i="TD");const{securityLevel:c,flowchart:d}=(0,o.c)(),p=d.nodeSpacing||50,b=d.rankSpacing||50;let u;"sandbox"===c&&(u=(0,l.Ys)("#i"+t));const h="sandbox"===c?(0,l.Ys)(u.nodes()[0].contentDocument.body):(0,l.Ys)("body"),g="sandbox"===c?u.nodes()[0].contentDocument:document,y=new r.k({multigraph:!0,compound:!0}).setGraph({rankdir:i,nodesep:p,ranksep:b,marginx:0,marginy:0}).setDefaultEdgeLabel((function(){return{}}));let k;const x=s.db.getSubGraphs();o.l.info("Subgraphs - ",x);for(let e=x.length-1;e>=0;e--)k=x[e],o.l.info("Subgraph - ",k),s.db.addVertex(k.id,{text:k.title,type:k.labelType},"group",void 0,k.classes,k.dir);const v=s.db.getVertices(),m=s.db.getEdges();o.l.info("Edges",m);let T=0;for(T=x.length-1;T>=0;T--){k=x[T],(0,l.td_)("cluster").append("text");for(let e=0;e<k.nodes.length;e++)o.l.info("Setting up subgraphs",k.nodes[e],k.id),y.setParent(k.nodes[e],k.id)}f(v,y,t,h,g,s),w(m,y);const S=h.select(`[id="${t}"]`),_=h.select("#"+t+" g");if(await(0,a.r)(_,y,["point","circle","cross"],"flowchart",t),o.u.insertTitle(S,"flowchartTitleText",d.titleTopMargin,s.db.getDiagramTitle()),(0,o.o)(y,S,d.diagramPadding,d.useMaxWidth),s.db.indexNodes("subGraph"+T),!d.htmlLabels){const e=g.querySelectorAll('[id="'+t+'"] .edgeLabel .label');for(const t of e){const e=t.getBBox(),n=g.createElementNS("http://www.w3.org/2000/svg","rect");n.setAttribute("rx",0),n.setAttribute("ry",0),n.setAttribute("width",e.width),n.setAttribute("height",e.height),t.insertBefore(n,t.firstChild)}}Object.keys(v).forEach((function(e){const n=v[e];if(n.link){const r=(0,l.Ys)("#"+t+' [id="'+e+'"]');if(r){const e=g.createElementNS("http://www.w3.org/2000/svg","a");e.setAttributeNS("http://www.w3.org/2000/svg","class",n.classes.join(" ")),e.setAttributeNS("http://www.w3.org/2000/svg","href",n.link),e.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===c?e.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):n.linkTarget&&e.setAttributeNS("http://www.w3.org/2000/svg","target",n.linkTarget);const t=r.insert((function(){return e}),":first-child"),l=r.select(".label-container");l&&t.append((function(){return l.node()}));const o=r.select(".label");o&&t.append((function(){return o.node()}))}}}))}},h=e=>`.label {\n font-family: ${e.fontFamily};\n color: ${e.nodeTextColor||e.textColor};\n }\n .cluster-label text {\n fill: ${e.titleColor};\n }\n .cluster-label span,p {\n color: ${e.titleColor};\n }\n\n .label text,span,p {\n fill: ${e.nodeTextColor||e.textColor};\n color: ${e.nodeTextColor||e.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.mainBkg};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${e.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${e.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${e.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n rect {\n opacity: 0.5;\n background-color: ${e.edgeLabelBackground};\n fill: ${e.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${((e,t)=>{const n=d,r=n(e,"r"),l=n(e,"g"),o=n(e,"b");return p.Z(r,l,o,.5)})(e.edgeLabelBackground)};\n // background-color: \n }\n\n .cluster rect {\n fill: ${e.clusterBkg};\n stroke: ${e.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${e.titleColor};\n }\n\n .cluster span,p {\n color: ${e.titleColor};\n }\n /* .cluster div {\n color: ${e.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${e.fontFamily};\n font-size: 12px;\n background: ${e.tertiaryColor};\n border: 1px solid ${e.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${e.textColor};\n }\n`}}]);
|