notebook 7.3.0a1__py3-none-any.whl → 7.3.0b0__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 +10 -2
- notebook/static/113.bundle.js +1 -1
- notebook/static/1198.bundle.js +1 -1
- notebook/static/134.bundle.js +1 -1
- notebook/static/1408.bundle.js +1 -1
- notebook/static/1496.bundle.js +1 -1
- notebook/static/1584.bundle.js +1 -1
- notebook/static/1647.bundle.js +1 -1
- notebook/static/1650.bundle.js +1 -1
- notebook/static/1684.bundle.js +1 -1
- notebook/static/170.bundle.js +1 -1
- notebook/static/1809.bundle.js +1 -1
- notebook/static/1827.bundle.js +1 -1
- notebook/static/1828.bundle.js +1 -1
- notebook/static/1833.bundle.js +1 -1
- notebook/static/1958.bundle.js +1 -1
- notebook/static/1962.bundle.js +1 -1
- notebook/static/2007.bundle.js +1 -1
- notebook/static/2065.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/{3030.bundle.js → 2323.bundle.js} +1 -1
- notebook/static/2401.bundle.js +1 -1
- notebook/static/2424.bundle.js +377 -0
- notebook/static/2479.bundle.js +1 -1
- notebook/static/2489.bundle.js +1 -1
- notebook/static/2607.bundle.js +1 -1
- notebook/static/2615.bundle.js +1 -1
- notebook/static/2636.bundle.js +1 -1
- notebook/static/2756.bundle.js +1 -1
- notebook/static/2813.bundle.js +1 -1
- notebook/static/2866.bundle.js +1 -1
- notebook/static/2924.bundle.js +1 -1
- notebook/static/2944.bundle.js +1 -1
- notebook/static/2955.bundle.js +1 -0
- notebook/static/3129.bundle.js +1 -1
- notebook/static/3146.bundle.js +1 -1
- notebook/static/3187.bundle.js +1 -1
- notebook/static/3213.bundle.js +1 -1
- notebook/static/3301.bundle.js +1 -1
- notebook/static/3325.bundle.js +1 -1
- notebook/static/3340.bundle.js +1 -1
- notebook/static/3360.bundle.js +1 -1
- notebook/static/{1261.bundle.js → 3463.bundle.js} +1 -1
- notebook/static/3466.bundle.js +1 -1
- notebook/static/35.bundle.js +1 -1
- notebook/static/3512.bundle.js +1 -1
- notebook/static/3676.bundle.js +1 -1
- notebook/static/3680.bundle.js +1 -1
- notebook/static/374.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/409.bundle.js +1 -1
- notebook/static/4212.bundle.js +1 -1
- notebook/static/4242.bundle.js +79 -0
- notebook/static/4271.bundle.js +1 -1
- notebook/static/4291.bundle.js +1 -1
- notebook/static/4382.bundle.js +1 -1
- notebook/static/4526.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/4811.bundle.js +1 -1
- notebook/static/4837.bundle.js +1 -1
- notebook/static/5099.bundle.js +1 -1
- notebook/static/5135.bundle.js +1 -1
- notebook/static/5166.bundle.js +1 -1
- notebook/static/5234.bundle.js +1 -1
- notebook/static/5254.bundle.js +1 -1
- notebook/static/5261.bundle.js +1 -1
- notebook/static/5263.bundle.js +1 -0
- notebook/static/5313.bundle.js +1 -1
- notebook/static/5325.bundle.js +1 -1
- notebook/static/5346.bundle.js +1 -1
- notebook/static/5426.bundle.js +1 -1
- notebook/static/5430.bundle.js +653 -0
- notebook/static/545.bundle.js +1 -1
- notebook/static/5451.bundle.js +1 -1
- notebook/static/5573.bundle.js +1 -1
- notebook/static/5601.bundle.js +1 -1
- notebook/static/5649.bundle.js +3 -3
- notebook/static/5733.bundle.js +1 -1
- notebook/static/5850.bundle.js +1 -1
- notebook/static/5912.bundle.js +1 -1
- notebook/static/5921.bundle.js +1 -1
- notebook/static/6017.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/6271.bundle.js +1 -1
- notebook/static/6345.bundle.js +1 -1
- notebook/static/6604.bundle.js +1 -1
- notebook/static/6621.bundle.js +1 -1
- notebook/static/6627.bundle.js +1 -1
- notebook/static/6648.bundle.js +1 -0
- notebook/static/6731.bundle.js +1 -1
- notebook/static/6748.bundle.js +1 -1
- notebook/static/677.bundle.js +1 -1
- notebook/static/6815.bundle.js +1 -1
- notebook/static/6853.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/6999.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/7369.bundle.js +1 -1
- notebook/static/7386.bundle.js +1 -1
- notebook/static/7391.bundle.js +1 -1
- notebook/static/7543.bundle.js +1 -1
- notebook/static/7603.bundle.js +1 -1
- notebook/static/7639.bundle.js +1 -1
- notebook/static/7655.bundle.js +1 -1
- notebook/static/7684.bundle.js +1 -1
- notebook/static/7812.bundle.js +1 -1
- notebook/static/7819.bundle.js +1 -1
- notebook/static/7821.bundle.js +1 -1
- notebook/static/7854.bundle.js +1 -1
- notebook/static/7866.bundle.js +1 -0
- notebook/static/7900.bundle.js +1 -1
- notebook/static/7906.bundle.js +1 -1
- notebook/static/8010.bundle.js +1 -1
- notebook/static/8032.bundle.js +1 -1
- notebook/static/8285.bundle.js +1 -1
- notebook/static/8471.bundle.js +1 -1
- notebook/static/8579.bundle.js +1 -1
- notebook/static/8633.bundle.js +1 -1
- notebook/static/8635.bundle.js +41 -0
- notebook/static/8771.bundle.js +1 -1
- notebook/static/8781.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/9136.bundle.js +1 -1
- notebook/static/9151.bundle.js +1 -1
- notebook/static/9161.bundle.js +1 -1
- notebook/static/9268.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/9605.bundle.js +1 -1
- notebook/static/9638.bundle.js +1 -1
- notebook/static/9672.bundle.js +352 -0
- 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 -0
- notebook/static/9821.bundle.js +1 -1
- notebook/static/9852.bundle.js +1 -1
- notebook/static/bundle.js +1 -1
- notebook/static/third-party-licenses.json +124 -130
- notebook/templates/consoles.html +1 -1
- notebook/templates/edit.html +1 -1
- notebook/templates/error.html +1 -1
- notebook/templates/notebooks.html +1 -1
- notebook/templates/terminals.html +1 -1
- notebook/templates/tree.html +1 -1
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/package.json.orig +17 -17
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/documentsearch-extension/package.json.orig +5 -5
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/package.json.orig +6 -6
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/package.json.orig +11 -11
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/package.json.orig +18 -18
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/widget.json +0 -1
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/package.json +13 -13
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/package.json.orig +12 -12
- notebook-7.3.0b0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.67f8b11d2af855286118.js +1 -0
- notebook-7.3.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/600.25341cef1598f2727482.js → notebook-7.3.0b0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/907.767373e59d0c0e33ef12.js +1 -1
- notebook-7.3.0b0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.50419fa0a72e54064396.js +1 -0
- notebook-7.3.0b0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.fd0956ebf15f666a19f8.js +1 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/third-party-licenses.json +2 -2
- {notebook-7.3.0a1.dist-info → notebook-7.3.0b0.dist-info}/METADATA +2 -2
- {notebook-7.3.0a1.dist-info → notebook-7.3.0b0.dist-info}/RECORD +210 -218
- notebook/static/1226.bundle.js +0 -1
- notebook/static/1750.bundle.js +0 -1
- notebook/static/1884.bundle.js +0 -386
- notebook/static/4045.bundle.js +0 -1
- notebook/static/4434.bundle.js +0 -1
- notebook/static/5018.bundle.js +0 -1
- notebook/static/5712.bundle.js +0 -1
- notebook/static/6164.bundle.js +0 -1
- notebook/static/6318.bundle.js +0 -1
- notebook/static/6619.bundle.js +0 -1
- notebook/static/6898.bundle.js +0 -1
- notebook/static/7506.bundle.js +0 -703
- notebook/static/7579.bundle.js +0 -1
- notebook/static/8054.bundle.js +0 -1
- notebook/static/8647.bundle.js +0 -1
- notebook/static/8723.bundle.js +0 -1
- notebook/static/9734.bundle.js +0 -1
- notebook/static/9906.bundle.js +0 -1
- notebook-7.3.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.45e1d3167710e94c3d26.js +0 -1
- notebook-7.3.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.b94c92715d631efb4a8f.js +0 -1
- notebook-7.3.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.8ca922abea871b34db72.js +0 -1
- /notebook/static/{7506.bundle.js.LICENSE.txt → 4242.bundle.js.LICENSE.txt} +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/etc/jupyter/jupyter_server_config.d/notebook.json +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/applications/jupyter-notebook.desktop +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/icons/hicolor/scalable/apps/notebook.svg +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/menus.json +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/pages.json +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/shell.json +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/title.json +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/top.json +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/zen.json +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/open.json +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/checkpoints.json +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/edit-notebook-metadata.json +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/kernel-logo.json +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/scroll-output.json +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/file-actions.json +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/interface-switcher.json +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/launch-tree.json +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/93.eae3497dd223d842d198.js +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/style.js +0 -0
- {notebook-7.3.0a1.dist-info → notebook-7.3.0b0.dist-info}/WHEEL +0 -0
- {notebook-7.3.0a1.dist-info → notebook-7.3.0b0.dist-info}/entry_points.txt +0 -0
- {notebook-7.3.0a1.dist-info → notebook-7.3.0b0.dist-info}/licenses/LICENSE +0 -0
notebook/static/893.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[893],{30893:(e,t,o)=>{o.r(t),o.d(t,{default:()=>T,fileUploadStatus:()=>B});var r=o(27961),n=o(15465),a=o(44548),i=o(94624),s=o(73684),l=o(87844),d=o(93223),c=o(54252),u=o(25291),m=o(12668),p=o(33625),h=o(16934);const w="FileBrowser",f="@jupyterlab/filebrowser-extension:browser";var g;!function(e){e.copy="filebrowser:copy",e.copyDownloadLink="filebrowser:copy-download-link",e.cut="filebrowser:cut",e.del="filebrowser:delete",e.download="filebrowser:download",e.duplicate="filebrowser:duplicate",e.hideBrowser="filebrowser:hide-main",e.goToPath="filebrowser:go-to-path",e.goUp="filebrowser:go-up",e.openPath="filebrowser:open-path",e.openUrl="filebrowser:open-url",e.open="filebrowser:open",e.openBrowserTab="filebrowser:open-browser-tab",e.paste="filebrowser:paste",e.createNewDirectory="filebrowser:create-new-directory",e.createNewFile="filebrowser:create-new-file",e.createNewMarkdownFile="filebrowser:create-new-markdown-file",e.refresh="filebrowser:refresh",e.rename="filebrowser:rename",e.copyShareableLink="filebrowser:share-main",e.copyPath="filebrowser:copy-path",e.showBrowser="filebrowser:activate",e.shutdown="filebrowser:shutdown",e.toggleBrowser="filebrowser:toggle-main",e.toggleNavigateToCurrentDirectory="filebrowser:toggle-navigate-to-current-directory",e.toggleLastModified="filebrowser:toggle-last-modified",e.toggleShowFullPath="filebrowser:toggle-show-full-path",e.toggleFileSize="filebrowser:toggle-file-size",e.toggleSortNotebooksFirst="filebrowser:toggle-sort-notebooks-first",e.search="filebrowser:search",e.toggleHiddenFiles="filebrowser:toggle-hidden-files",e.toggleFileCheckboxes="filebrowser:toggle-file-checkboxes"}(g||(g={}));const b="filebrowser",y={id:f,description:"Set up the default file browser (commands, settings,...).",requires:[s.IDefaultFileBrowser,s.IFileBrowserFactory,u.ITranslator],optional:[r.ILayoutRestorer,l.ISettingRegistry,r.ITreePathUpdater,n.ICommandPalette],provides:s.IFileBrowserCommands,autoStart:!0,activate:async(e,t,o,r,i,s,l,d)=>{const c=t;i&&i.add(c,b);const u=a.PageConfig.getOption("preferredPath");return u&&await c.model.cd(u),function(e,t,o,r,i,s){const l=r.load("jupyterlab"),{docRegistry:d,commands:c}=e,{tracker:u}=o;c.addCommand(g.del,{execute:()=>{const e=u.currentWidget;if(e)return e.delete()},icon:m.closeIcon.bindprops({stylesheet:"menuItem"}),label:l.__("Delete"),mnemonic:0}),c.addCommand(g.copy,{execute:()=>{const e=u.currentWidget;if(e)return e.copy()},icon:m.copyIcon.bindprops({stylesheet:"menuItem"}),label:l.__("Copy"),mnemonic:0}),c.addCommand(g.cut,{execute:()=>{const e=u.currentWidget;if(e)return e.cut()},icon:m.cutIcon.bindprops({stylesheet:"menuItem"}),label:l.__("Cut")}),c.addCommand(g.duplicate,{execute:()=>{const e=u.currentWidget;if(e)return e.duplicate()},icon:m.copyIcon.bindprops({stylesheet:"menuItem"}),label:l.__("Duplicate")}),c.addCommand(g.goToPath,{label:l.__("Update the file browser to display the provided `path`."),execute:async e=>{var n;const a=e.path||"",i=!(null!==(n=null==e?void 0:e.dontShowBrowser)&&void 0!==n&&n);try{if("directory"!==(await k.navigateToPath(a,t,o,r)).type&&i){const e=k.getBrowserForPath(a,t,o);if(e){e.clearSelectedItems();const t=a.split("/"),o=t[t.length-1];o&&await e.selectItemByName(o)}}}catch(e){console.warn(`${g.goToPath} failed to go to: ${a}`,e)}if(i)return c.execute(g.showBrowser,{path:a})}}),c.addCommand(g.goUp,{label:"go up",execute:async()=>{const e=k.getBrowserForPath("",t,o);if(!e)return;const{model:r}=e;await r.restored,e.goUp()}}),c.addCommand(g.openPath,{label:e=>e.path?l.__("Open %1",e.path):l.__("Open from Path…"),caption:e=>e.path?l.__("Open %1",e.path):l.__("Open from path"),execute:async e=>{var r;let a;if(a=(null==e?void 0:e.path)?e.path:null!==(r=(await n.InputDialog.getText({label:l.__("Path"),placeholder:"/path/relative/to/jlab/root",title:l.__("Open Path"),okLabel:l.__("Open")})).value)&&void 0!==r?r:void 0,a)try{const r="/"!==a&&a.endsWith("/");r&&(a=a.slice(0,a.length-1));const n=k.getBrowserForPath(a,t,o),{services:i}=n.model.manager,s=await i.contents.get(a,{content:!1});if(r&&"directory"!==s.type)throw new Error(`Path ${a}/ is not a directory`);if(await c.execute(g.goToPath,{path:a,dontShowBrowser:e.dontShowBrowser}),"directory"===s.type)return;return c.execute("docmanager:open",{path:a})}catch(e){return e.response&&404===e.response.status&&(e.message=l.__("Could not find path: %1",a)),(0,n.showErrorMessage)(l.__("Cannot open"),e)}}}),s&&s.addItem({command:g.openPath,category:l.__("File Operations")}),c.addCommand(g.open,{execute:e=>{const t=e.factory||void 0,o=u.currentWidget;if(!o)return;const{contents:r}=o.model.manager.services;return Promise.all(Array.from((0,p.map)(o.selectedItems(),(e=>{if("directory"===e.type){const t=r.localPath(e.path);return o.model.cd(`/${t}`)}return c.execute("docmanager:open",{factory:t,path:e.path})}))))},icon:e=>{var t;const o=e.factory||void 0;if(o){const e=d.getFileType(o);return null===(t=null==e?void 0:e.icon)||void 0===t?void 0:t.bindprops({stylesheet:"menuItem"})}return m.folderIcon.bindprops({stylesheet:"menuItem"})},label:e=>e.label||e.factory||l.__("Open"),mnemonic:0}),c.addCommand(g.paste,{execute:()=>{const e=u.currentWidget;if(e)return e.paste()},icon:m.pasteIcon.bindprops({stylesheet:"menuItem"}),label:l.__("Paste"),mnemonic:0}),c.addCommand(g.createNewDirectory,{execute:()=>{const e=u.currentWidget;if(e)return e.createNewDirectory()},icon:m.newFolderIcon.bindprops({stylesheet:"menuItem"}),label:l.__("New Folder")}),c.addCommand(g.createNewFile,{execute:()=>{const e=u.currentWidget;if(e)return e.createNewFile({ext:"txt"})},icon:m.textEditorIcon.bindprops({stylesheet:"menuItem"}),label:l.__("New File")}),c.addCommand(g.createNewMarkdownFile,{execute:()=>{const e=u.currentWidget;if(e)return e.createNewFile({ext:"md"})},icon:m.markdownIcon.bindprops({stylesheet:"menuItem"}),label:l.__("New Markdown File")}),c.addCommand(g.refresh,{execute:e=>{const t=u.currentWidget;if(t)return t.model.refresh()},icon:m.refreshIcon.bindprops({stylesheet:"menuItem"}),caption:l.__("Refresh the file browser."),label:l.__("Refresh File List")}),c.addCommand(g.rename,{execute:e=>{const t=u.currentWidget;if(t)return t.rename()},isVisible:()=>!!u.currentWidget&&1===Array.from(u.currentWidget.selectedItems()).length,icon:m.editIcon.bindprops({stylesheet:"menuItem"}),label:l.__("Rename"),mnemonic:0}),c.addCommand(g.copyPath,{execute:()=>{var e;const t=u.currentWidget;if(!t)return;const o=t.selectedItems().next();if(!o.done)if("true"===a.PageConfig.getOption("copyAbsolutePath")){const t=a.PathExt.joinWithLeadingSlash(null!==(e=a.PageConfig.getOption("serverRoot"))&&void 0!==e?e:"",o.value.path);n.Clipboard.copyToSystem(t)}else n.Clipboard.copyToSystem(o.value.path)},isVisible:()=>!!u.currentWidget&&1===Array.from(u.currentWidget.selectedItems()).length,icon:m.fileIcon.bindprops({stylesheet:"menuItem"}),label:l.__("Copy Path")}),c.addCommand(g.shutdown,{execute:()=>{const e=u.currentWidget;if(e)return e.shutdownKernels()},icon:m.stopIcon.bindprops({stylesheet:"menuItem"}),label:l.__("Shut Down Kernel")}),c.addCommand(g.toggleLastModified,{label:l.__("Show Last Modified Column"),isToggled:()=>t.showLastModifiedColumn,execute:()=>{const e=!t.showLastModifiedColumn,o="showLastModifiedColumn";if(i)return i.set(f,o,e).catch((e=>{console.error(`Failed to set ${o} setting`)}))}}),c.addCommand(g.toggleShowFullPath,{label:l.__("Show Full Path"),isToggled:()=>t.showFullPath,execute:()=>{const e=!t.showFullPath,o="showFullPath";if(i)return i.set(f,o,e).catch((e=>{console.error(`Failed to set ${o} setting`)}))}}),c.addCommand(g.toggleSortNotebooksFirst,{label:l.__("Sort Notebooks Above Files"),isToggled:()=>t.sortNotebooksFirst,execute:()=>{const e=!t.sortNotebooksFirst,o="sortNotebooksFirst";if(i)return i.set(f,o,e).catch((e=>{console.error(`Failed to set ${o} setting`)}))}}),c.addCommand(g.toggleFileSize,{label:l.__("Show File Size Column"),isToggled:()=>t.showFileSizeColumn,execute:()=>{const e=!t.showFileSizeColumn,o="showFileSizeColumn";if(i)return i.set(f,o,e).catch((e=>{console.error(`Failed to set ${o} setting`)}))}}),c.addCommand(g.toggleHiddenFiles,{label:l.__("Show Hidden Files"),isToggled:()=>t.showHiddenFiles,isVisible:()=>"true"===a.PageConfig.getOption("allow_hidden_files"),execute:()=>{const e=!t.showHiddenFiles;if(i)return i.set(f,"showHiddenFiles",e).catch((e=>{console.error("Failed to set showHiddenFiles setting")}))}}),c.addCommand(g.toggleFileCheckboxes,{label:l.__("Show File Checkboxes"),isToggled:()=>t.showFileCheckboxes,execute:()=>{const e=!t.showFileCheckboxes;if(i)return i.set(f,"showFileCheckboxes",e).catch((e=>{console.error("Failed to set showFileCheckboxes setting")}))}}),c.addCommand(g.search,{label:l.__("Search on File Names"),execute:()=>alert("search")})}(e,c,o,r,s,d),Promise.all([e.restored,c.model.restored]).then((()=>{l&&c.model.pathChanged.connect(((e,t)=>{l(t.newValue)})),s&&s.load(f).then((e=>{const t={navigateToCurrentDirectory:!1,showLastModifiedColumn:!0,showFileSizeColumn:!1,showHiddenFiles:!1,showFileCheckboxes:!1,sortNotebooksFirst:!1,showFullPath:!1},o={filterDirectories:!0};function r(e){let r;for(r in t){const o=e.get(r).composite;t[r]=o,c[r]=o}const n=e.get("filterDirectories").composite;o.filterDirectories=n,c.model.filterDirectories=n}e.changed.connect(r),r(e)}))})),{openPath:g.openPath}}},_={id:"@jupyterlab/filebrowser-extension:factory",description:"Provides the file browser factory.",provides:s.IFileBrowserFactory,requires:[i.IDocumentManager,u.ITranslator],optional:[d.IStateDB,r.JupyterLab.IInfo],activate:async(e,t,o,r,a)=>{const i=new n.WidgetTracker({namespace:b});return{createFileBrowser:(e,n={})=>{var l;const d=new s.FilterFileBrowserModel({translator:o,auto:null===(l=n.auto)||void 0===l||l,manager:t,driveName:n.driveName||"",refreshInterval:n.refreshInterval,refreshStandby:()=>a&&!a.isConnected||"when-hidden",state:null===n.state?void 0:n.state||r||void 0}),c=n.restore,u=new s.FileBrowser({id:e,model:d,restore:c,translator:o});return i.add(u),u},tracker:i}}},F={id:"@jupyterlab/filebrowser-extension:default-file-browser",description:"Provides the default file browser",provides:s.IDefaultFileBrowser,requires:[s.IFileBrowserFactory],optional:[r.IRouter,r.JupyterFrontEnd.ITreeResolver,r.ILabShell,u.ITranslator],activate:async(e,t,o,r,n,a)=>{const{commands:i}=e,s=(null!=a?a:u.nullTranslator).load("jupyterlab"),l=t.createFileBrowser("filebrowser",{auto:!1,restore:!1});l.node.setAttribute("role","region"),l.node.setAttribute("aria-label",s.__("File Browser Section")),l.node.setAttribute("title",s.__("File Browser")),l.title.icon=m.folderIcon;const d=()=>{const t=e.commands.keyBindings.find((e=>e.command===g.toggleBrowser));if(t){const e=t.keys.map(h.CommandRegistry.formatKeystroke).join(", ");l.title.caption=s.__("File Browser (%1)",e)}else l.title.caption=s.__("File Browser")};return d(),e.commands.keyBindingChanged.connect((()=>{d()})),k.restoreBrowser(l,i,o,r,e,n),l}},v={id:"@jupyterlab/filebrowser-extension:download",description:"Adds the download file commands. Disabling this plugin will NOT disable downloading files from the server, if the user enters the appropriate download URLs.",requires:[s.IFileBrowserFactory,u.ITranslator],autoStart:!0,activate:(e,t,o)=>{const r=o.load("jupyterlab"),{commands:a}=e,{tracker:i}=t;a.addCommand(g.download,{execute:()=>{const e=i.currentWidget;if(e)return e.download()},icon:m.downloadIcon.bindprops({stylesheet:"menuItem"}),label:r.__("Download")}),a.addCommand(g.copyDownloadLink,{execute:()=>{const e=i.currentWidget;if(e)return e.model.manager.services.contents.getDownloadUrl(e.selectedItems().next().value.path).then((e=>{n.Clipboard.copyToSystem(e)}))},isVisible:()=>!!i.currentWidget&&1===Array.from(i.currentWidget.selectedItems()).length,icon:m.copyIcon.bindprops({stylesheet:"menuItem"}),label:r.__("Copy Download Link"),mnemonic:0})}},C={id:"@jupyterlab/filebrowser-extension:widget",description:"Adds the file browser to the application shell.",requires:[i.IDocumentManager,s.IDefaultFileBrowser,s.IFileBrowserFactory,l.ISettingRegistry,n.IToolbarWidgetRegistry,u.ITranslator,r.ILabShell,s.IFileBrowserCommands],optional:[n.ICommandPalette],autoStart:!0,activate:(e,t,o,r,a,i,l,d,c,u)=>{const{commands:p}=e,{tracker:h}=r,b=l.load("jupyterlab");i.addFactory(w,"uploader",(e=>new s.Uploader({model:e.model,translator:l}))),i.addFactory(w,"fileNameSearcher",(e=>{const t=(0,m.FilenameSearcher)({updateFilter:(t,o)=>{e.model.setFilter((e=>t(e.name.toLowerCase())))},useFuzzyFilter:!0,placeholder:b.__("Filter files by name"),forceRefresh:!0});return t.addClass("jp-FileBrowser-filterBox"),t})),(0,n.setToolbar)(o,(0,n.createToolbarFactory)(i,a,w,C.id,l)),d.add(o,"left",{rank:100,type:"File Browser"}),p.addCommand(g.toggleBrowser,{label:b.__("File Browser"),execute:()=>o.isHidden?p.execute(g.showBrowser,void 0):p.execute(g.hideBrowser,void 0)}),p.addCommand(g.showBrowser,{label:b.__("Open the file browser for the provided `path`."),execute:e=>{const t=e.path||"",n=k.getBrowserForPath(t,o,r);if(n)if(o!==n){const e=["left","right"];for(const t of e)for(const e of d.widgets(t))if(e.contains(n))return void d.activateById(e.id)}else d.activateById(o.id)}}),p.addCommand(g.hideBrowser,{label:b.__("Hide the file browser."),execute:()=>{const e=h.currentWidget;e&&!e.isHidden&&d.collapseLeft()}}),p.addCommand(g.toggleNavigateToCurrentDirectory,{label:b.__("Show Active File in File Browser"),isToggled:()=>o.navigateToCurrentDirectory,execute:()=>{const e=!o.navigateToCurrentDirectory;return a.set(f,"navigateToCurrentDirectory",e).catch((e=>{console.error("Failed to set navigateToCurrentDirectory setting")}))}}),u&&u.addItem({command:g.toggleNavigateToCurrentDirectory,category:b.__("File Operations")}),d.restored.then((e=>{e.fresh&&"single-document"!==d.mode&&p.execute(g.showBrowser,void 0)})),Promise.all([e.restored,o.model.restored]).then((()=>{d.currentChanged.connect((async(e,n)=>{if(o.navigateToCurrentDirectory&&n.newValue){const{newValue:e}=n,a=t.contextForWidget(e);if(a){const{path:e}=a;try{await k.navigateToPath(e,o,r,l)}catch(t){console.warn(`${g.goToPath} failed to open: ${e}`,t)}}}}))}))}},I={id:"@jupyterlab/filebrowser-extension:share-file",description:'Adds the "Copy Shareable Link" command; useful for JupyterHub deployment for example.',requires:[s.IFileBrowserFactory,u.ITranslator],autoStart:!0,activate:(e,t,o)=>{const r=o.load("jupyterlab"),{commands:i}=e,{tracker:s}=t;i.addCommand(g.copyShareableLink,{execute:()=>{const e=s.currentWidget,t=null==e?void 0:e.selectedItems().next();void 0===t||t.done||n.Clipboard.copyToSystem(a.PageConfig.getUrl({workspace:a.PageConfig.defaultWorkspace,treePath:t.value.path,toShare:!0}))},isVisible:()=>!!s.currentWidget&&1===Array.from(s.currentWidget.selectedItems()).length,icon:m.linkIcon.bindprops({stylesheet:"menuItem"}),label:r.__("Copy Shareable Link")})}},x={id:"@jupyterlab/filebrowser-extension:open-with",description:"Adds the open-with feature allowing an user to pick the non-preferred document viewer.",requires:[s.IFileBrowserFactory],autoStart:!0,activate:(e,t)=>{const{docRegistry:o}=e,{tracker:r}=t;let n=[];e.contextMenu.opened.connect((function(e){var t,a;const i=null!==(a=null===(t=e.menu.items.find((e=>{var t;return"submenu"===e.type&&"jp-contextmenu-open-with"===(null===(t=e.submenu)||void 0===t?void 0:t.id)})))||void 0===t?void 0:t.submenu)&&void 0!==a?a:null;if(!i)return;n.forEach((e=>e.dispose())),n.length=0,i.clearItems();const s=r.currentWidget?k.OpenWith.intersection((0,p.map)(r.currentWidget.selectedItems(),(e=>k.OpenWith.getFactories(o,e)))):new Set;n=[...s].map((e=>i.addItem({args:{factory:e.name,label:e.label||e.name},command:g.open})))}))}},P={id:"@jupyterlab/filebrowser-extension:open-browser-tab",description:"Adds the open-in-new-browser-tab features.",requires:[s.IFileBrowserFactory,u.ITranslator],autoStart:!0,activate:(e,t,o)=>{const{commands:r}=e,n=o.load("jupyterlab"),{tracker:i}=t;r.addCommand(g.openBrowserTab,{execute:e=>{const t=i.currentWidget;if(!t)return;const o=e.mode;return Promise.all(Array.from((0,p.map)(t.selectedItems(),(e=>{if("single-document"!==o)return r.execute("docmanager:open-browser-tab",{path:e.path});{const t=a.PageConfig.getUrl({mode:"single-document",treePath:e.path}),o=window.open();if(!o)throw new Error("Failed to open new browser tab.");o.opener=null,o.location.href=t}}))))},icon:m.addIcon.bindprops({stylesheet:"menuItem"}),label:e=>"single-document"===e.mode?n.__("Open in Simple Mode"):n.__("Open in New Browser Tab"),mnemonic:0})}},B={id:"@jupyterlab/filebrowser-extension:file-upload-status",description:"Adds a file upload status widget.",autoStart:!0,requires:[s.IFileBrowserFactory,u.ITranslator],optional:[c.IStatusBar],activate:(e,t,o,r)=>{if(!r)return;const n=new s.FileUploadStatus({tracker:t.tracker,translator:o});r.registerStatusItem("@jupyterlab/filebrowser-extension:file-upload-status",{item:n,align:"middle",isActive:()=>!!n.model&&n.model.items.length>0,activeStateChanged:n.model.stateChanged})}},S={id:"@jupyterlab/filebrowser-extension:open-url",description:'Adds the feature "Open files from remote URLs".',autoStart:!0,requires:[s.IDefaultFileBrowser,u.ITranslator],optional:[n.ICommandPalette],activate:(e,t,o,r)=>{const{commands:i}=e,s=o.load("jupyterlab"),l=g.openUrl;i.addCommand(l,{label:e=>e.url?s.__("Open %1",e.url):s.__("Open from URL…"),caption:e=>e.url?s.__("Open %1",e.url):s.__("Open from URL"),execute:async e=>{var o,r,l;let d=null!==(o=null==e?void 0:e.url)&&void 0!==o?o:"";if(d||(d=null!==(r=(await n.InputDialog.getText({label:s.__("URL"),placeholder:"https://example.com/path/to/file",title:s.__("Open URL"),okLabel:s.__("Open")})).value)&&void 0!==r?r:void 0),!d)return;let c,u="";try{const e=await fetch(d);c=await e.blob(),u=null!==(l=e.headers.get("Content-Type"))&&void 0!==l?l:""}catch(e){return e.response&&200!==e.response.status&&(e.message=s.__("Could not open URL: %1",d)),(0,n.showErrorMessage)(s.__("Cannot fetch"),e)}try{const e=a.PathExt.basename(d),o=new File([c],e,{type:u}),r=await t.model.upload(o);return i.execute("docmanager:open",{path:r.path})}catch(e){return(0,n.showErrorMessage)(s._p("showErrorMessage","Upload Error"),e)}}}),r&&r.addItem({command:l,category:s.__("File Operations")})}},T=[_,F,y,I,B,v,C,x,P,S];var k;!function(e){let t;e.getBrowserForPath=function(e,t,o){const{tracker:r}=o,n=t.model.manager.services.contents.driveName(e);if(n){return r.find((e=>e.model.driveName===n))||void console.warn(`${g.goToPath} failed to find filebrowser for path: ${e}`)}return t},e.navigateToPath=async function(t,o,r,n){const i=n.load("jupyterlab"),s=e.getBrowserForPath(t,o,r);if(!s)throw new Error(i.__("No browser for path"));const{services:l}=s.model.manager,d=l.contents.localPath(t);await l.ready;const c=await l.contents.get(t,{content:!1}),{model:u}=s;return await u.restored,"directory"===c.type?await u.cd(`/${d}`):await u.cd(`/${a.PathExt.dirname(d)}`),c},e.restoreBrowser=async function(e,t,o,r,n,a){const i="jp-mod-restoring";if(e.addClass(i),!o)return await e.model.restore(e.id),await e.model.refresh(),void e.removeClass(i);const s=async()=>{o.routed.disconnect(s);const n=await(null==r?void 0:r.paths);(null==n?void 0:n.file)||(null==n?void 0:n.browser)?(await e.model.restore(e.id,!1),n.file&&await t.execute(g.openPath,{path:n.file,dontShowBrowser:!0}),n.browser&&await t.execute(g.openPath,{path:n.browser,dontShowBrowser:!0})):(await e.model.restore(e.id),await e.model.refresh()),e.removeClass(i),(null==a?void 0:a.isEmpty("main"))&&t.execute("launcher:create")};o.routed.connect(s)},function(e){e.getFactories=function(e,t){const o=e.preferredWidgetFactories(t.path),r=e.getWidgetFactory("notebook");return r&&"notebook"===t.type&&-1===o.indexOf(r)&&o.unshift(r),o},e.intersection=function(e){let t;for(const o of e){if(void 0===t){t=new Set(o);continue}if(0===t.size)return t;let e=new Set;for(const r of o)t.has(r)&&e.add(r);t=e}return null!=t?t:new Set}}(t=e.OpenWith||(e.OpenWith={}))}(k||(k={}))}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[893],{30893:(e,t,o)=>{o.r(t),o.d(t,{default:()=>B,fileUploadStatus:()=>P});var r=o(73852),n=o(53876),a=o(20754),i=o(7073),s=o(58427),l=o(3012),d=o(45556),c=o(33441),u=o(93050),m=o(76878),p=o(14931),h=o(86072);const w="FileBrowser",g="@jupyterlab/filebrowser-extension:browser";var f;!function(e){e.copy="filebrowser:copy",e.copyDownloadLink="filebrowser:copy-download-link",e.cut="filebrowser:cut",e.del="filebrowser:delete",e.download="filebrowser:download",e.duplicate="filebrowser:duplicate",e.hideBrowser="filebrowser:hide-main",e.goToPath="filebrowser:go-to-path",e.goUp="filebrowser:go-up",e.openPath="filebrowser:open-path",e.openUrl="filebrowser:open-url",e.open="filebrowser:open",e.openBrowserTab="filebrowser:open-browser-tab",e.paste="filebrowser:paste",e.createNewDirectory="filebrowser:create-new-directory",e.createNewFile="filebrowser:create-new-file",e.createNewMarkdownFile="filebrowser:create-new-markdown-file",e.refresh="filebrowser:refresh",e.rename="filebrowser:rename",e.copyShareableLink="filebrowser:share-main",e.copyPath="filebrowser:copy-path",e.showBrowser="filebrowser:activate",e.shutdown="filebrowser:shutdown",e.toggleBrowser="filebrowser:toggle-main",e.toggleFileFilter="filebrowser:toggle-file-filter",e.toggleNavigateToCurrentDirectory="filebrowser:toggle-navigate-to-current-directory",e.toggleLastModified="filebrowser:toggle-last-modified",e.toggleShowFullPath="filebrowser:toggle-show-full-path",e.toggleFileSize="filebrowser:toggle-file-size",e.toggleSortNotebooksFirst="filebrowser:toggle-sort-notebooks-first",e.search="filebrowser:search",e.toggleHiddenFiles="filebrowser:toggle-hidden-files",e.toggleSingleClick="filebrowser:toggle-single-click-navigation",e.toggleFileCheckboxes="filebrowser:toggle-file-checkboxes"}(f||(f={}));const b="filebrowser",y={id:g,description:"Set up the default file browser (commands, settings,...).",requires:[s.IDefaultFileBrowser,s.IFileBrowserFactory,u.ITranslator],optional:[r.ILayoutRestorer,l.ISettingRegistry,r.ITreePathUpdater,n.ICommandPalette],provides:s.IFileBrowserCommands,autoStart:!0,activate:async(e,t,o,r,i,s,l,d)=>{const c=t;i&&i.add(c,b);const u=a.PageConfig.getOption("preferredPath");return u&&await c.model.cd(u),function(e,t,o,r,i,s){const l=r.load("jupyterlab"),{docRegistry:d,commands:c}=e,{tracker:u}=o;c.addCommand(f.del,{execute:()=>{const e=u.currentWidget;if(e)return e.delete()},icon:m.closeIcon.bindprops({stylesheet:"menuItem"}),label:l.__("Delete"),mnemonic:0}),c.addCommand(f.copy,{execute:()=>{const e=u.currentWidget;if(e)return e.copy()},icon:m.copyIcon.bindprops({stylesheet:"menuItem"}),label:l.__("Copy"),mnemonic:0}),c.addCommand(f.cut,{execute:()=>{const e=u.currentWidget;if(e)return e.cut()},icon:m.cutIcon.bindprops({stylesheet:"menuItem"}),label:l.__("Cut")}),c.addCommand(f.duplicate,{execute:()=>{const e=u.currentWidget;if(e)return e.duplicate()},icon:m.copyIcon.bindprops({stylesheet:"menuItem"}),label:l.__("Duplicate")}),c.addCommand(f.goToPath,{label:l.__("Update the file browser to display the provided `path`."),execute:async e=>{var n;const a=e.path||"",i=!(null!==(n=null==e?void 0:e.dontShowBrowser)&&void 0!==n&&n);try{if("directory"!==(await T.navigateToPath(a,t,o,r)).type&&i){const e=T.getBrowserForPath(a,t,o);if(e){e.clearSelectedItems();const t=a.split("/"),o=t[t.length-1];o&&await e.selectItemByName(o)}}}catch(e){console.warn(`${f.goToPath} failed to go to: ${a}`,e)}if(i)return c.execute(f.showBrowser,{path:a})}}),c.addCommand(f.goUp,{label:"go up",execute:async()=>{const e=T.getBrowserForPath("",t,o);if(!e)return;const{model:r}=e;await r.restored,e.goUp()}}),c.addCommand(f.openPath,{label:e=>e.path?l.__("Open %1",e.path):l.__("Open from Path…"),caption:e=>e.path?l.__("Open %1",e.path):l.__("Open from path"),execute:async e=>{var r;let a;if(a=(null==e?void 0:e.path)?e.path:null!==(r=(await n.InputDialog.getText({label:l.__("Path"),placeholder:"/path/relative/to/jlab/root",title:l.__("Open Path"),okLabel:l.__("Open")})).value)&&void 0!==r?r:void 0,a)try{const r="/"!==a&&a.endsWith("/");r&&(a=a.slice(0,a.length-1));const n=T.getBrowserForPath(a,t,o),{services:i}=n.model.manager,s=await i.contents.get(a,{content:!1});if(r&&"directory"!==s.type)throw new Error(`Path ${a}/ is not a directory`);if(await c.execute(f.goToPath,{path:a,dontShowBrowser:e.dontShowBrowser}),"directory"===s.type)return;return c.execute("docmanager:open",{path:a})}catch(e){return e.response&&404===e.response.status&&(e.message=l.__("Could not find path: %1",a)),(0,n.showErrorMessage)(l.__("Cannot open"),e)}}}),s&&s.addItem({command:f.openPath,category:l.__("File Operations")}),c.addCommand(f.open,{execute:e=>{const t=e.factory||void 0,o=u.currentWidget;if(!o)return;const{contents:r}=o.model.manager.services;return Promise.all(Array.from((0,p.map)(o.selectedItems(),(e=>{if("directory"===e.type){const t=r.localPath(e.path);return o.model.cd(`/${t}`)}return c.execute("docmanager:open",{factory:t,path:e.path})}))))},icon:e=>{var t;const o=e.factory||void 0;if(o){const e=d.getFileType(o);return null===(t=null==e?void 0:e.icon)||void 0===t?void 0:t.bindprops({stylesheet:"menuItem"})}return m.folderIcon.bindprops({stylesheet:"menuItem"})},label:e=>e.label||e.factory||l.__("Open"),mnemonic:0}),c.addCommand(f.paste,{execute:()=>{const e=u.currentWidget;if(e)return e.paste()},icon:m.pasteIcon.bindprops({stylesheet:"menuItem"}),label:l.__("Paste"),mnemonic:0}),c.addCommand(f.createNewDirectory,{execute:()=>{const e=u.currentWidget;if(e)return e.createNewDirectory()},icon:m.newFolderIcon.bindprops({stylesheet:"menuItem"}),label:l.__("New Folder")}),c.addCommand(f.createNewFile,{execute:()=>{const e=u.currentWidget;if(e)return e.createNewFile({ext:"txt"})},icon:m.textEditorIcon.bindprops({stylesheet:"menuItem"}),label:l.__("New File")}),c.addCommand(f.createNewMarkdownFile,{execute:()=>{const e=u.currentWidget;if(e)return e.createNewFile({ext:"md"})},icon:m.markdownIcon.bindprops({stylesheet:"menuItem"}),label:l.__("New Markdown File")}),c.addCommand(f.refresh,{execute:e=>{const t=u.currentWidget;if(t)return t.model.refresh()},icon:m.refreshIcon.bindprops({stylesheet:"menuItem"}),caption:l.__("Refresh the file browser."),label:l.__("Refresh File List")}),c.addCommand(f.rename,{execute:e=>{const t=u.currentWidget;if(t)return t.rename()},isVisible:()=>!!u.currentWidget&&1===Array.from(u.currentWidget.selectedItems()).length,icon:m.editIcon.bindprops({stylesheet:"menuItem"}),label:l.__("Rename"),mnemonic:0}),c.addCommand(f.copyPath,{execute:()=>{var e;const t=u.currentWidget;if(!t)return;const o=t.selectedItems().next();if(!o.done)if("true"===a.PageConfig.getOption("copyAbsolutePath")){const t=a.PathExt.joinWithLeadingSlash(null!==(e=a.PageConfig.getOption("serverRoot"))&&void 0!==e?e:"",o.value.path);n.Clipboard.copyToSystem(t)}else n.Clipboard.copyToSystem(o.value.path)},isVisible:()=>!!u.currentWidget&&1===Array.from(u.currentWidget.selectedItems()).length,icon:m.fileIcon.bindprops({stylesheet:"menuItem"}),label:l.__("Copy Path")}),c.addCommand(f.shutdown,{execute:()=>{const e=u.currentWidget;if(e)return e.shutdownKernels()},icon:m.stopIcon.bindprops({stylesheet:"menuItem"}),label:l.__("Shut Down Kernel")}),c.addCommand(f.toggleFileFilter,{execute:()=>{t.showFileFilter=!t.showFileFilter,c.notifyCommandChanged(f.toggleFileFilter)},isToggled:()=>t.showFileFilter,icon:m.filterIcon.bindprops({stylesheet:"menuItem"}),label:l.__("Toggle File Filter")}),c.addCommand(f.toggleLastModified,{label:l.__("Show Last Modified Column"),isToggled:()=>t.showLastModifiedColumn,execute:()=>{const e=!t.showLastModifiedColumn,o="showLastModifiedColumn";if(i)return i.set(g,o,e).catch((e=>{console.error(`Failed to set ${o} setting`)}))}}),c.addCommand(f.toggleShowFullPath,{label:l.__("Show Full Path"),isToggled:()=>t.showFullPath,execute:()=>{const e=!t.showFullPath,o="showFullPath";if(i)return i.set(g,o,e).catch((e=>{console.error(`Failed to set ${o} setting`)}))}}),c.addCommand(f.toggleSortNotebooksFirst,{label:l.__("Sort Notebooks Above Files"),isToggled:()=>t.sortNotebooksFirst,execute:()=>{const e=!t.sortNotebooksFirst,o="sortNotebooksFirst";if(i)return i.set(g,o,e).catch((e=>{console.error(`Failed to set ${o} setting`)}))}}),c.addCommand(f.toggleFileSize,{label:l.__("Show File Size Column"),isToggled:()=>t.showFileSizeColumn,execute:()=>{const e=!t.showFileSizeColumn,o="showFileSizeColumn";if(i)return i.set(g,o,e).catch((e=>{console.error(`Failed to set ${o} setting`)}))}}),c.addCommand(f.toggleSingleClick,{label:l.__("Enable Single Click Navigation"),isToggled:()=>t.singleClickNavigation,execute:()=>{const e=!t.singleClickNavigation;if(i)return i.set(g,"singleClickNavigation",e).catch((e=>{console.error("Failed to set singleClickNavigation setting")}))}}),c.addCommand(f.toggleHiddenFiles,{label:l.__("Show Hidden Files"),isToggled:()=>t.showHiddenFiles,isVisible:()=>"true"===a.PageConfig.getOption("allow_hidden_files"),execute:()=>{const e=!t.showHiddenFiles;if(i)return i.set(g,"showHiddenFiles",e).catch((e=>{console.error("Failed to set showHiddenFiles setting")}))}}),c.addCommand(f.toggleFileCheckboxes,{label:l.__("Show File Checkboxes"),isToggled:()=>t.showFileCheckboxes,execute:()=>{const e=!t.showFileCheckboxes;if(i)return i.set(g,"showFileCheckboxes",e).catch((e=>{console.error("Failed to set showFileCheckboxes setting")}))}}),c.addCommand(f.search,{label:l.__("Search on File Names"),execute:()=>alert("search")})}(e,c,o,r,s,d),Promise.all([e.restored,c.model.restored]).then((()=>{l&&c.model.pathChanged.connect(((e,t)=>{l(t.newValue)})),s&&s.load(g).then((e=>{const t={navigateToCurrentDirectory:!1,singleClickNavigation:!1,showLastModifiedColumn:!0,showFileSizeColumn:!1,showHiddenFiles:!1,showFileCheckboxes:!1,sortNotebooksFirst:!1,showFullPath:!1},o={filterDirectories:!0};function r(e){let r;for(r in t){const o=e.get(r).composite;t[r]=o,c[r]=o}const n=e.get("filterDirectories").composite;o.filterDirectories=n,c.model.filterDirectories=n}e.changed.connect(r),r(e)}))})),{openPath:f.openPath}}},F={id:"@jupyterlab/filebrowser-extension:factory",description:"Provides the file browser factory.",provides:s.IFileBrowserFactory,requires:[i.IDocumentManager,u.ITranslator],optional:[d.IStateDB,r.JupyterLab.IInfo],activate:async(e,t,o,r,a)=>{const i=new n.WidgetTracker({namespace:b});return{createFileBrowser:(e,n={})=>{var l;const d=null===n.state?void 0:n.state||r||void 0,c=new s.FilterFileBrowserModel({translator:o,auto:null===(l=n.auto)||void 0===l||l,manager:t,driveName:n.driveName||"",refreshInterval:n.refreshInterval,refreshStandby:()=>a&&!a.isConnected||"when-hidden",state:d}),u=n.restore,m=new s.FileBrowser({id:e,model:c,restore:u,translator:o,state:d});return i.add(m),m},tracker:i}}},_={id:"@jupyterlab/filebrowser-extension:default-file-browser",description:"Provides the default file browser",provides:s.IDefaultFileBrowser,requires:[s.IFileBrowserFactory],optional:[r.IRouter,r.JupyterFrontEnd.ITreeResolver,r.ILabShell,u.ITranslator],activate:async(e,t,o,r,n,a)=>{const{commands:i}=e,s=(null!=a?a:u.nullTranslator).load("jupyterlab"),l=t.createFileBrowser("filebrowser",{auto:!1,restore:!1});l.node.setAttribute("role","region"),l.node.setAttribute("aria-label",s.__("File Browser Section")),l.title.icon=m.folderIcon;const d=()=>{const t=e.commands.keyBindings.find((e=>e.command===f.toggleBrowser));if(t){const e=t.keys.map(h.CommandRegistry.formatKeystroke).join(", ");l.title.caption=s.__("File Browser (%1)",e)}else l.title.caption=s.__("File Browser")};return d(),e.commands.keyBindingChanged.connect((()=>{d()})),T.restoreBrowser(l,i,o,r,e,n),l}},v={id:"@jupyterlab/filebrowser-extension:download",description:"Adds the download file commands. Disabling this plugin will NOT disable downloading files from the server, if the user enters the appropriate download URLs.",requires:[s.IFileBrowserFactory,u.ITranslator],autoStart:!0,activate:(e,t,o)=>{const r=o.load("jupyterlab"),{commands:a}=e,{tracker:i}=t;a.addCommand(f.download,{execute:()=>{const e=i.currentWidget;if(e)return e.download()},icon:m.downloadIcon.bindprops({stylesheet:"menuItem"}),label:r.__("Download")}),a.addCommand(f.copyDownloadLink,{execute:()=>{const e=i.currentWidget;if(e)return e.model.manager.services.contents.getDownloadUrl(e.selectedItems().next().value.path).then((e=>{n.Clipboard.copyToSystem(e)}))},isVisible:()=>!!i.currentWidget&&1===Array.from(i.currentWidget.selectedItems()).length,icon:m.copyIcon.bindprops({stylesheet:"menuItem"}),label:r.__("Copy Download Link"),mnemonic:0})}},C={id:"@jupyterlab/filebrowser-extension:widget",description:"Adds the file browser to the application shell.",requires:[i.IDocumentManager,s.IDefaultFileBrowser,s.IFileBrowserFactory,l.ISettingRegistry,n.IToolbarWidgetRegistry,u.ITranslator,r.ILabShell,s.IFileBrowserCommands],optional:[n.ICommandPalette],autoStart:!0,activate:(e,t,o,r,a,i,l,d,c,u)=>{const{commands:m}=e,{tracker:p}=r,h=l.load("jupyterlab");i.addFactory(w,"uploader",(e=>new s.Uploader({model:e.model,translator:l}))),(0,n.setToolbar)(o,(0,n.createToolbarFactory)(i,a,w,C.id,l)),d.add(o,"left",{rank:100,type:"File Browser"}),m.addCommand(f.toggleBrowser,{label:h.__("File Browser"),execute:()=>o.isHidden?m.execute(f.showBrowser,void 0):m.execute(f.hideBrowser,void 0)}),m.addCommand(f.showBrowser,{label:h.__("Open the file browser for the provided `path`."),execute:e=>{const t=e.path||"",n=T.getBrowserForPath(t,o,r);if(n)if(o!==n){const e=["left","right"];for(const t of e)for(const e of d.widgets(t))if(e.contains(n))return void d.activateById(e.id)}else d.activateById(o.id)}}),m.addCommand(f.hideBrowser,{label:h.__("Hide the file browser."),execute:()=>{const e=p.currentWidget;e&&!e.isHidden&&d.collapseLeft()}}),m.addCommand(f.toggleNavigateToCurrentDirectory,{label:h.__("Show Active File in File Browser"),isToggled:()=>o.navigateToCurrentDirectory,execute:()=>{const e=!o.navigateToCurrentDirectory;return a.set(g,"navigateToCurrentDirectory",e).catch((e=>{console.error("Failed to set navigateToCurrentDirectory setting")}))}}),u&&u.addItem({command:f.toggleNavigateToCurrentDirectory,category:h.__("File Operations")}),d.restored.then((e=>{e.fresh&&"single-document"!==d.mode&&m.execute(f.showBrowser,void 0)})),Promise.all([e.restored,o.model.restored]).then((()=>{d.currentChanged.connect((async(e,n)=>{if(o.navigateToCurrentDirectory&&n.newValue){const{newValue:e}=n,a=t.contextForWidget(e);if(a){const{path:e}=a;try{await T.navigateToPath(e,o,r,l)}catch(t){console.warn(`${f.goToPath} failed to open: ${e}`,t)}}}}))}))}},I={id:"@jupyterlab/filebrowser-extension:share-file",description:'Adds the "Copy Shareable Link" command; useful for JupyterHub deployment for example.',requires:[s.IFileBrowserFactory,u.ITranslator],autoStart:!0,activate:(e,t,o)=>{const r=o.load("jupyterlab"),{commands:i}=e,{tracker:s}=t;i.addCommand(f.copyShareableLink,{execute:()=>{const e=s.currentWidget,t=null==e?void 0:e.selectedItems().next();void 0===t||t.done||n.Clipboard.copyToSystem(a.PageConfig.getUrl({workspace:a.PageConfig.defaultWorkspace,treePath:t.value.path,toShare:!0}))},isVisible:()=>!!s.currentWidget&&1===Array.from(s.currentWidget.selectedItems()).length,icon:m.linkIcon.bindprops({stylesheet:"menuItem"}),label:r.__("Copy Shareable Link")})}},x={id:"@jupyterlab/filebrowser-extension:open-with",description:"Adds the open-with feature allowing an user to pick the non-preferred document viewer.",requires:[s.IFileBrowserFactory],autoStart:!0,activate:(e,t)=>{const{docRegistry:o}=e,{tracker:r}=t;let n=[];e.contextMenu.opened.connect((function(e){var t,a;const i=null!==(a=null===(t=e.menu.items.find((e=>{var t;return"submenu"===e.type&&"jp-contextmenu-open-with"===(null===(t=e.submenu)||void 0===t?void 0:t.id)})))||void 0===t?void 0:t.submenu)&&void 0!==a?a:null;if(!i)return;n.forEach((e=>e.dispose())),n.length=0,i.clearItems();const s=r.currentWidget?T.OpenWith.intersection((0,p.map)(r.currentWidget.selectedItems(),(e=>T.OpenWith.getFactories(o,e)))):new Set;n=[...s].map((e=>i.addItem({args:{factory:e.name,label:e.label||e.name},command:f.open})))}))}},k={id:"@jupyterlab/filebrowser-extension:open-browser-tab",description:"Adds the open-in-new-browser-tab features.",requires:[s.IFileBrowserFactory,u.ITranslator],autoStart:!0,activate:(e,t,o)=>{const{commands:r}=e,n=o.load("jupyterlab"),{tracker:i}=t;r.addCommand(f.openBrowserTab,{execute:e=>{const t=i.currentWidget;if(!t)return;const o=e.mode;return Promise.all(Array.from((0,p.map)(t.selectedItems(),(e=>{if("single-document"!==o)return r.execute("docmanager:open-browser-tab",{path:e.path});{const t=a.PageConfig.getUrl({mode:"single-document",treePath:e.path}),o=window.open();if(!o)throw new Error("Failed to open new browser tab.");o.opener=null,o.location.href=t}}))))},icon:m.addIcon.bindprops({stylesheet:"menuItem"}),label:e=>"single-document"===e.mode?n.__("Open in Simple Mode"):n.__("Open in New Browser Tab"),mnemonic:0})}},P={id:"@jupyterlab/filebrowser-extension:file-upload-status",description:"Adds a file upload status widget.",autoStart:!0,requires:[s.IFileBrowserFactory,u.ITranslator],optional:[c.IStatusBar],activate:(e,t,o,r)=>{if(!r)return;const n=new s.FileUploadStatus({tracker:t.tracker,translator:o});r.registerStatusItem("@jupyterlab/filebrowser-extension:file-upload-status",{item:n,align:"middle",isActive:()=>!!n.model&&n.model.items.length>0,activeStateChanged:n.model.stateChanged})}},S={id:"@jupyterlab/filebrowser-extension:open-url",description:'Adds the feature "Open files from remote URLs".',autoStart:!0,requires:[s.IDefaultFileBrowser,u.ITranslator],optional:[n.ICommandPalette],activate:(e,t,o,r)=>{const{commands:i}=e,s=o.load("jupyterlab"),l=f.openUrl;i.addCommand(l,{label:e=>e.url?s.__("Open %1",e.url):s.__("Open from URL…"),caption:e=>e.url?s.__("Open %1",e.url):s.__("Open from URL"),execute:async e=>{var o,r,l;let d=null!==(o=null==e?void 0:e.url)&&void 0!==o?o:"";if(d||(d=null!==(r=(await n.InputDialog.getText({label:s.__("URL"),placeholder:"https://example.com/path/to/file",title:s.__("Open URL"),okLabel:s.__("Open")})).value)&&void 0!==r?r:void 0),!d)return;let c,u="";try{const e=await fetch(d);c=await e.blob(),u=null!==(l=e.headers.get("Content-Type"))&&void 0!==l?l:""}catch(e){return e.response&&200!==e.response.status&&(e.message=s.__("Could not open URL: %1",d)),(0,n.showErrorMessage)(s.__("Cannot fetch"),e)}try{const e=a.PathExt.basename(d),o=new File([c],e,{type:u}),r=await t.model.upload(o);return i.execute("docmanager:open",{path:r.path})}catch(e){return(0,n.showErrorMessage)(s._p("showErrorMessage","Upload Error"),e)}}}),r&&r.addItem({command:l,category:s.__("File Operations")})}},B=[F,_,y,I,P,v,C,x,k,S];var T;!function(e){let t;e.getBrowserForPath=function(e,t,o){const{tracker:r}=o,n=t.model.manager.services.contents.driveName(e);if(n){return r.find((e=>e.model.driveName===n))||void console.warn(`${f.goToPath} failed to find filebrowser for path: ${e}`)}return t},e.navigateToPath=async function(t,o,r,n){const i=n.load("jupyterlab"),s=e.getBrowserForPath(t,o,r);if(!s)throw new Error(i.__("No browser for path"));const{services:l}=s.model.manager,d=l.contents.localPath(t);await l.ready;const c=await l.contents.get(t,{content:!1}),{model:u}=s;return await u.restored,"directory"===c.type?await u.cd(`/${d}`):await u.cd(`/${a.PathExt.dirname(d)}`),c},e.restoreBrowser=async function(e,t,o,r,n,a){const i="jp-mod-restoring";if(e.addClass(i),!o)return await e.model.restore(e.id),await e.model.refresh(),void e.removeClass(i);const s=async()=>{o.routed.disconnect(s);const n=await(null==r?void 0:r.paths);(null==n?void 0:n.file)||(null==n?void 0:n.browser)?(await e.model.restore(e.id,!1),n.file&&await t.execute(f.openPath,{path:n.file,dontShowBrowser:!0}),n.browser&&await t.execute(f.openPath,{path:n.browser,dontShowBrowser:!0})):(await e.model.restore(e.id),await e.model.refresh()),e.removeClass(i),(null==a?void 0:a.isEmpty("main"))&&t.execute("launcher:create")};o.routed.connect(s)},function(e){e.getFactories=function(e,t){const o=e.preferredWidgetFactories(t.path),r=e.getWidgetFactory("notebook");return r&&"notebook"===t.type&&-1===o.indexOf(r)&&o.unshift(r),o},e.intersection=function(e){let t;for(const o of e){if(void 0===t){t=new Set(o);continue}if(0===t.size)return t;let e=new Set;for(const r of o)t.has(r)&&e.add(r);t=e}return null!=t?t:new Set}}(t=e.OpenWith||(e.OpenWith={}))}(T||(T={}))}}]);
|
notebook/static/901.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[901],{67863:(e,t,r)=>{r.d(t,{L:()=>s,c:()=>o});var i=r(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[901],{67863:(e,t,r)=>{r.d(t,{L:()=>s,c:()=>o});var i=r(21961),n=r(80480);const s=new i.Token("@jupyterlab/application:ILayoutRestorer","A service providing application layout restoration functionality. Use this to have your activities restored across page loads."),a="layout-restorer:data";class o{constructor(e){this._deferred=new Array,this._deferredMainArea=null,this._firstDone=!1,this._promisesDone=!1,this._promises=[],this._restored=new i.PromiseDelegate,this._trackers=new Set,this._widgets=new Map,this._mode="multiple-document",this._connector=e.connector,this._first=e.first,this._registry=e.registry,e.mode&&(this._mode=e.mode),this._first.then((()=>{this._firstDone=!0})).then((()=>Promise.all(this._promises))).then((()=>{this._promisesDone=!0,this._trackers.clear()})).then((()=>{this._restored.resolve(void 0)}))}get isDeferred(){return this._deferred.length>0}get restored(){return this._restored.promise}add(e,t){d.nameProperty.set(e,t),this._widgets.set(t,e),e.disposed.connect(this._onWidgetDisposed,this)}async fetch(){var e;const t={fresh:!0,mainArea:null,downArea:null,leftArea:null,rightArea:null,topArea:null,relativeSizes:null},r=this._connector.fetch(a);try{const[i]=await Promise.all([r,this.restored]);if(!i)return t;const{main:n,down:s,left:a,right:o,relativeSizes:d,top:c}=i,l=!1;let u=null;"multiple-document"===this._mode?u=this._rehydrateMainArea(n):this._deferredMainArea=n;const h=this._rehydrateDownArea(s);return{fresh:l,mainArea:u,downArea:h,leftArea:this._rehydrateSideArea(a),rightArea:this._rehydrateSideArea(o),relativeSizes:d||null,topArea:null!==(e=c)&&void 0!==e?e:null}}catch(e){return t}}async restore(e,t){if(this._firstDone)throw new Error("restore() must be called before `first` has resolved.");const{namespace:r}=e;if(this._trackers.has(r))throw new Error(`The tracker "${r}" is already restored.`);const{args:n,command:s,name:a,when:o}=t;this._trackers.add(r),e.widgetAdded.connect(((e,t)=>{const i=a(t);i&&this.add(t,`${r}:${i}`)}),this),e.widgetUpdated.connect(((e,t)=>{const i=a(t);if(i){const e=`${r}:${i}`;d.nameProperty.set(t,e),this._widgets.set(e,t)}}));const c=this._first;if("multiple-document"==this._mode){const t=e.restore({args:n||(()=>i.JSONExt.emptyObject),command:s,connector:this._connector,name:a,registry:this._registry,when:o?[c].concat(o):c}).catch((e=>{console.error(e)}));return this._promises.push(t),t}e.defer({args:n||(()=>i.JSONExt.emptyObject),command:s,connector:this._connector,name:a,registry:this._registry,when:o?[c].concat(o):c}),this._deferred.push(e)}async restoreDeferred(){if(!this.isDeferred)return null;const e=Promise.resolve(),t=this._deferred.map((t=>e.then((()=>t.restore()))));return this._deferred.length=0,await Promise.all(t),this._rehydrateMainArea(this._deferredMainArea)}save(e){if(!this._promisesDone){const e="save() was called prematurely.";return console.warn(e),Promise.reject(e)}const t={};return t.main=this.isDeferred?this._deferredMainArea:this._dehydrateMainArea(e.mainArea),t.down=this._dehydrateDownArea(e.downArea),t.left=this._dehydrateSideArea(e.leftArea),t.right=this._dehydrateSideArea(e.rightArea),t.relativeSizes=e.relativeSizes,t.top={...e.topArea},this._connector.save(a,t)}_dehydrateMainArea(e){return e?d.serializeMain(e):null}_rehydrateMainArea(e){return e?d.deserializeMain(e,this._widgets):null}_dehydrateDownArea(e){if(!e)return null;const t={size:e.size};if(e.currentWidget){const r=d.nameProperty.get(e.currentWidget);r&&(t.current=r)}return e.widgets&&(t.widgets=e.widgets.map((e=>d.nameProperty.get(e))).filter((e=>!!e))),t}_rehydrateDownArea(e){var t;if(!e)return{currentWidget:null,size:0,widgets:null};const r=this._widgets,i=e.current&&r.has(`${e.current}`)?r.get(`${e.current}`):null,n=Array.isArray(e.widgets)?e.widgets.map((e=>r.has(`${e}`)?r.get(`${e}`):null)).filter((e=>!!e)):null;return{currentWidget:i,size:null!==(t=e.size)&&void 0!==t?t:0,widgets:n}}_dehydrateSideArea(e){if(!e)return null;const t={collapsed:e.collapsed,visible:e.visible};if(e.currentWidget){const r=d.nameProperty.get(e.currentWidget);r&&(t.current=r)}return e.widgets&&(t.widgets=e.widgets.map((e=>d.nameProperty.get(e))).filter((e=>!!e))),e.widgetStates&&(t.widgetStates=e.widgetStates),t}_rehydrateSideArea(e){var t,r;if(!e)return{collapsed:!0,currentWidget:null,visible:!0,widgets:null,widgetStates:{null:{sizes:null,expansionStates:null}}};const i=this._widgets,n=null!==(t=e.collapsed)&&void 0!==t&&t,s=e.current&&i.has(`${e.current}`)?i.get(`${e.current}`):null,a=Array.isArray(e.widgets)?e.widgets.map((e=>i.has(`${e}`)?i.get(`${e}`):null)).filter((e=>!!e)):null,o=e.widgetStates;return{collapsed:n,currentWidget:s,widgets:a,visible:null===(r=e.visible)||void 0===r||r,widgetStates:o}}_onWidgetDisposed(e){const t=d.nameProperty.get(e);this._widgets.delete(t)}}var d;!function(e){function t(r){return r&&r.type?"tab-area"===r.type?{type:"tab-area",currentIndex:r.currentIndex,widgets:r.widgets.map((t=>e.nameProperty.get(t))).filter((e=>!!e))}:{type:"split-area",orientation:r.orientation,sizes:r.sizes,children:r.children.map(t).filter((e=>!!e))}:null}function r(e,t){if(!e)return null;const i=e.type||"unknown";if("unknown"===i||"tab-area"!==i&&"split-area"!==i)return console.warn(`Attempted to deserialize unknown type: ${i}`),null;if("tab-area"===i){const{currentIndex:r,widgets:i}=e,n={type:"tab-area",currentIndex:r||0,widgets:i&&i.map((e=>t.get(e))).filter((e=>!!e))||[]};return n.currentIndex>n.widgets.length-1&&(n.currentIndex=0),n}const{orientation:n,sizes:s,children:a}=e;return{type:"split-area",orientation:n,sizes:s||[],children:a&&a.map((e=>r(e,t))).filter((e=>!!e))||[]}}e.nameProperty=new n.AttachedProperty({name:"name",create:e=>""}),e.serializeMain=function(r){const i={dock:r&&r.dock&&t(r.dock.main)||null};if(r&&r.currentWidget){const t=e.nameProperty.get(r.currentWidget);t&&(i.current=t)}return i},e.deserializeMain=function(e,t){if(!e)return null;const i=e.current||null,n=e.dock||null;return{currentWidget:i&&t.has(i)&&t.get(i)||null,dock:n?{main:r(n,t)}:null}}}(d||(d={}))},75677:(e,t,r)=>{r.d(t,{aX:()=>y,as:()=>h,w2:()=>u});var i=r(53876),n=r(23764),s=r(58194),a=r(93050),o=r(76878),d=r(21961),c=r(80480),l=r(67863);const u=new d.Token("@jupyterlab/application:IMimeDocumentTracker","A widget tracker for documents rendered using a mime renderer extension. Use this if you want to list and interact with documents rendered by such extensions.");function h(e){const t=[],r=new i.WidgetTracker({namespace:"application-mimedocuments"});return e.forEach((e=>{let i=e.default;e.hasOwnProperty("__esModule")||(i=e),Array.isArray(i)||(i=[i]),i.forEach((e=>{t.push(y(r,e))}))})),t.push({id:"@jupyterlab/application:mimedocument",description:"Provides a mime document widget tracker.",optional:[l.L],provides:u,autoStart:!0,activate:(e,t)=>(t&&t.restore(r,{command:"docmanager:open",args:e=>({path:e.context.path,factory:g.factoryNameProperty.get(e)}),name:e=>`${e.context.path}:${g.factoryNameProperty.get(e)}`}),r)}),t}function y(e,t){return{id:t.id,description:t.description,requires:[s.IRenderMimeRegistry,a.ITranslator],autoStart:!0,activate:(r,i,s)=>{if(void 0!==t.rank?i.addFactory(t.rendererFactory,t.rank):i.addFactory(t.rendererFactory),!t.documentWidgetFactoryOptions)return;const a=r.docRegistry;let d=[];d=Array.isArray(t.documentWidgetFactoryOptions)?t.documentWidgetFactoryOptions:[t.documentWidgetFactoryOptions],t.fileTypes&&t.fileTypes.forEach((e=>{e.icon&&(e={...e,icon:o.LabIcon.resolve({icon:e.icon})}),r.docRegistry.addFileType(e)})),d.forEach((r=>{const o=r.toolbarFactory?e=>r.toolbarFactory(e.content.renderer):void 0,d=new n.MimeDocumentFactory({renderTimeout:t.renderTimeout,dataType:t.dataType,rendermime:i,modelName:r.modelName,name:r.name,primaryFileType:a.getFileType(r.primaryFileType),fileTypes:r.fileTypes,defaultFor:r.defaultFor,defaultRendered:r.defaultRendered,toolbarFactory:o,translator:s,factory:t.rendererFactory});a.addWidgetFactory(d),d.widgetCreated.connect(((t,r)=>{g.factoryNameProperty.set(r,d.name),r.context.pathChanged.connect((()=>{e.save(r)})),e.add(r)}))}))}}}var g;!function(e){e.factoryNameProperty=new c.AttachedProperty({name:"factoryName",create:()=>{}})}(g||(g={}))},20389:(e,t,r)=>{r.d(t,{J:()=>s});var i=r(49901),n=r(2159);class s{constructor(e){this._busyCount=0,this._dirtyCount=0,this._busySignal=new n.Signal(e),this._dirtySignal=new n.Signal(e)}get busySignal(){return this._busySignal}get dirtySignal(){return this._dirtySignal}get isBusy(){return this._busyCount>0}get isDirty(){return this._dirtyCount>0}setDirty(){const e=this.isDirty;return this._dirtyCount++,this.isDirty!==e&&this._dirtySignal.emit(this.isDirty),new i.DisposableDelegate((()=>{const e=this.isDirty;this._dirtyCount=Math.max(0,this._dirtyCount-1),this.isDirty!==e&&this._dirtySignal.emit(this.isDirty)}))}setBusy(){const e=this.isBusy;return this._busyCount++,this.isBusy!==e&&this._busySignal.emit(this.isBusy),new i.DisposableDelegate((()=>{const e=this.isBusy;this._busyCount--,this.isBusy!==e&&this._busySignal.emit(this.isBusy)}))}}}}]);
|
notebook/static/9068.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[9068],{59068:(l,n,e)=>{e.r(n),e.d(n,{jupyterIcon:()=>m});const m=new(e(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[9068],{59068:(l,n,e)=>{e.r(n),e.d(n,{jupyterIcon:()=>m});const m=new(e(76878).LabIcon)({name:"notebook-ui-components:jupyter",svgstr:'<svg width="189" height="51" version="2.0" viewBox="0 0 189 51" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>Jupyter</title>\n <g class="jp-icon3" transform="translate(-1638 -2093)" fill="#616161">\n <g style="mix-blend-mode:normal">\n <g style="mix-blend-mode:normal">\n <g style="mix-blend-mode:normal">\n <g style="mix-blend-mode:normal">\n <g style="mix-blend-mode:normal">\n <use transform="translate(1688.9 2106.2)" style="mix-blend-mode:normal" xlink:href="#path0_fill"/>\n </g>\n </g>\n <g style="mix-blend-mode:normal">\n <g style="mix-blend-mode:normal">\n <use transform="translate(1705.4 2106.2)" style="mix-blend-mode:normal" xlink:href="#path1_fill"/>\n </g>\n </g>\n <g style="mix-blend-mode:normal">\n <g style="mix-blend-mode:normal">\n <use transform="translate(1730.2 2105.7)" style="mix-blend-mode:normal" xlink:href="#path2_fill"/>\n </g>\n </g>\n <g style="mix-blend-mode:normal">\n <g style="mix-blend-mode:normal">\n <use transform="translate(1752.9 2106.2)" style="mix-blend-mode:normal" xlink:href="#path3_fill"/>\n </g>\n </g>\n <g style="mix-blend-mode:normal">\n <g style="mix-blend-mode:normal">\n <use transform="translate(1775.8 2100)" style="mix-blend-mode:normal" xlink:href="#path4_fill"/>\n </g>\n </g>\n <g style="mix-blend-mode:normal">\n <g style="mix-blend-mode:normal">\n <use transform="translate(1791.8 2105.7)" style="mix-blend-mode:normal" xlink:href="#path5_fill"/>\n </g>\n </g>\n <g style="mix-blend-mode:normal">\n <g style="mix-blend-mode:normal">\n <use transform="translate(1815.8 2105.7)" style="mix-blend-mode:normal" xlink:href="#path6_fill"/>\n </g>\n </g>\n </g>\n </g>\n <g style="mix-blend-mode:normal">\n <g style="mix-blend-mode:normal">\n <g style="mix-blend-mode:normal">\n <use transform="translate(1669.3 2093.3)" fill="#767677" style="mix-blend-mode:normal" xlink:href="#path7_fill"/>\n </g>\n </g>\n <g style="mix-blend-mode:normal">\n <g style="mix-blend-mode:normal">\n <use transform="translate(1639.7 2124)" fill="#F37726" style="mix-blend-mode:normal" xlink:href="#path8_fill"/>\n </g>\n </g>\n <g style="mix-blend-mode:normal">\n <g style="mix-blend-mode:normal">\n <use transform="translate(1639.7 2097.5)" fill="#F37726" style="mix-blend-mode:normal" xlink:href="#path9_fill"/>\n </g>\n </g>\n <g style="mix-blend-mode:normal">\n <g style="mix-blend-mode:normal">\n <use transform="translate(1639.8 2135.8)" fill="#989798" style="mix-blend-mode:normal" xlink:href="#path10_fill"/>\n </g>\n </g>\n <g style="mix-blend-mode:normal">\n <g style="mix-blend-mode:normal">\n <use transform="translate(1638.4 2098.1)" fill="#6F7070" style="mix-blend-mode:normal" xlink:href="#path11_fill"/>\n </g>\n </g>\n </g>\n </g>\n </g>\n <defs>\n <path id="path0_fill" d="m5.6259 17.928c0 5.1461-0.3925 6.8263-1.4392 8.0666-1.1426 1.0559-2.637 1.6399-4.1867 1.6362l0.39251 3.0612c2.402 0.0333 4.7305-0.8352 6.5331-2.4366 1.8753-1.9529 2.5295-4.6535 2.5295-8.7967v-19.458h-3.8378v17.954l0.00872-0.0264z"/>\n <path id="path1_fill" d="m17.741 15.623c0 2.2168 0 4.1696 0.1744 5.8498h-3.3581l-0.218-3.5187h-0.0873c-0.7069 1.2298-1.7261 2.2473-2.9526 2.9477-1.2265 0.7005-2.6159 1.0585-4.0252 1.0372-3.3145 0-7.2744-1.8649-7.2744-9.3948v-12.544h3.8378v11.902c0 4.0817 1.2211 6.8262 4.7014 6.8262 1.0917-0.0201 2.1533-0.3647 3.0516-0.9907 0.8984-0.6259 1.5936-1.5053 1.9986-2.5279 0.2328-0.6395 0.351-1.3157 0.3489-1.9969v-13.195h3.8379v15.605h-0.0349z"/>\n <path id="path2_fill" d="m0.17445 7.5363c0-2.7446-0.087223-4.9613-0.17445-7.0374h3.4453l0.17445 3.677h0.08722c0.75374-1.3174 1.85-2.4022 3.1705-3.137 1.3205-0.73485 2.8149-1.0919 4.322-1.0326 5.0939 0 8.9317 4.3983 8.9317 10.908 0 7.7147-4.6141 11.524-9.5946 11.524-1.2785 0.0541-2.5489-0.2281-3.6867-0.8187-1.1377-0.5907-2.1036-1.4696-2.8028-2.5504h-0.08723v11.656h-3.7942v-23.223l0.008722 0.03519zm3.7942 5.7179c0.01001 0.5349 0.0684 1.0679 0.17444 1.5922 0.31262 1.3003 1.0491 2.4571 2.0914 3.2849 1.0423 0.8279 2.33 1.2788 3.6567 1.2805 4.0559 0 6.4022-3.3691 6.4022-8.2864 0-4.3016-2.2242-7.9786-6.2714-7.9786-1.3611 0.03841-2.6704 0.53457-3.7198 1.4096-1.0494 0.87505-1.7786 2.0788-2.0718 3.4198-0.15373 0.51742-0.24166 1.0524-0.26167 1.5922v3.6858z"/>\n <path id="path3_fill" d="m4.1606 0 4.6141 12.676c0.47973 1.4163 1.0031 3.1053 1.352 4.3984h0.0872c0.3925-1.2843 0.8286-2.9293 1.352-4.4775l4.1867-12.588h4.0559l-5.7481 15.297c-2.7475 7.3541-4.6141 11.128-7.2308 13.433-1.3222 1.2403-2.9429 2.1106-4.7014 2.5246l-0.95946-3.2811c1.2303-0.4134 2.3704-1.0615 3.3581-1.9089 1.3957-1.1762 2.5006-2.664 3.2273-4.3456 0.15514-0.2904 0.25848-0.606 0.30528-0.9324-0.03445-0.3518-0.12272-0.696-0.26167-1.0205l-7.7978-19.766h4.1867l-0.02616-0.0087967z"/>\n <path id="path4_fill" d="m7.0215 0v6.1577h5.4864v2.9733h-5.4864v11.559c0 2.639 0.7414 4.1696 2.8784 4.1696 0.74972 0.0118 1.4976-0.077 2.2242-0.2639l0.1744 2.9293c-1.0915 0.3877-2.2451 0.5667-3.4017 0.5278-0.76701 0.0474-1.535-0.0744-2.2506-0.357-0.71554-0.2826-1.3614-0.7191-1.8925-1.2792-1.0903-1.1523-1.4828-3.0612-1.4828-5.5858v-11.7h-3.2709v-2.9733h3.2709v-5.1461l3.7506-1.0116z"/>\n <path id="path5_fill" d="m3.6285 11.928c0.08723 5.278 3.4017 7.4508 7.2308 7.4508 2.0019 0.0634 3.9934-0.3149 5.8353-1.1084l0.6542 2.7886c-2.2069 0.9347-4.585 1.3874-6.9779 1.3283-6.4894 0-10.371-4.3456-10.371-10.82 0-6.4743 3.7506-11.568 9.8912-11.568 6.8819 0 8.7223 6.1577 8.7223 10.107-0.0065 0.6091-0.0501 1.2172-0.1308 1.8209h-14.854zm11.243-2.7885c0.0436-2.4807-1.003-6.3424-5.3119-6.3424-3.8814 0-5.5736 3.633-5.8789 6.3424h11.199-0.0087z"/>\n <path id="path6_fill" d="m0.17445 7.1785c0-2.5246-0.043612-4.6974-0.17445-6.6943h3.3581l0.13083 4.2136h0.17445c0.95946-2.8853 3.2709-4.6974 5.8353-4.6974 0.36765-0.0054214 0.73435 0.038958 1.0902 0.13195v3.677c-0.4296-0.09447-0.86861-0.13874-1.3083-0.13195-2.7039 0-4.6141 2.0848-5.1375 5.0053-0.10796 0.60107-0.16631 1.2101-0.17445 1.8209v11.436h-3.7942v-14.761z"/>\n <path id="path7_fill" d="m5.8935 2.844c0.02536 0.58765-0.12268 1.1697-0.42538 1.6724-0.3027 0.50277-0.74647 0.9037-1.2752 1.1521-0.52869 0.24837-1.1186 0.333-1.6949 0.2432-0.57639-0.08981-1.1134-0.35001-1.5432-0.7477-0.42973-0.39768-0.73284-0.91498-0.87099-1.4864-0.13815-0.57146-0.10513-1.1714 0.094877-1.7239 0.20001-0.55254 0.55803-1.0328 1.0288-1.3801 0.47072-0.34728 1.033-0.54595 1.6157-0.57087 0.78063-0.033384 1.5425 0.24712 2.1182 0.77988 0.57569 0.53276 0.91814 1.2742 0.95211 2.0614z"/>\n <path id="path8_fill" d="m18.265 7.1341c-7.8501 0-14.706-2.8765-18.265-7.1341 1.3254 3.8204 3.7956 7.1308 7.0686 9.473 3.2731 2.3422 7.1871 3.6004 11.2 3.6004s7.9273-1.2582 11.2-3.6004c3.273-2.3422 5.7432-5.6526 7.0686-9.473-3.5675 4.2576-10.423 7.1341-18.273 7.1341z"/>\n <path id="path9_fill" d="m18.273 5.9393c7.8502 0 14.706 2.8765 18.265 7.1341-1.3254-3.8204-3.7956-7.1308-7.0686-9.473-3.2731-2.3422-7.1871-3.6004-11.2-3.6004s-7.9273 1.2582-11.2 3.6004c-3.273 2.3422-5.7432 5.6526-7.0686 9.473 3.5674-4.2488 10.423-7.1341 18.273-7.1341z"/>\n <path id="path10_fill" d="m7.4279 3.5834c0.03219 0.74092-0.15434 1.4748-0.53596 2.1088s-0.94118 1.1394-1.6078 1.4525c-0.66664 0.31303-1.4104 0.41954-2.1371 0.30603s-1.4037-0.44193-1.9452-0.94368c-0.54151-0.50175-0.92323-1.1543-1.0968-1.8749-0.17359-0.72067-0.13125-1.4771 0.12166-2.1735 0.25291-0.69639 0.70502-1.3014 1.2991-1.7385 0.59407-0.4371 1.3034-0.68659 2.0381-0.7169 0.98278-0.040537 1.9414 0.31357 2.6657 0.9847 0.72432 0.67112 1.1552 1.6045 1.1983 2.5955z"/>\n <path id="path11_fill" d="m2.2747 4.3963c-0.43108 0.01879-0.858-0.09184-1.2267-0.31786-0.36872-0.22603-0.66266-0.55729-0.84462-0.95187s-0.24375-0.83473-0.17756-1.2648c0.066192-0.43001 0.25739-0.83055 0.5494-1.1509 0.29201-0.32037 0.6717-0.54618 1.091-0.64882 0.41931-0.10265 0.85939-0.077531 1.2645 0.072176 0.40515 0.14971 0.75716 0.41727 1.0115 0.76882 0.2543 0.35156 0.39947 0.7713 0.41713 1.2061 0.02364 0.58191-0.18257 1.1495-0.57338 1.5783-0.39081 0.42878-0.93431 0.6837-1.5113 0.70883z"/>\n </defs>\n</svg>\n'})}}]);
|