notebook 7.1.0rc1__py3-none-any.whl → 7.1.1__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/__init__.py +1 -1
- notebook/_version.py +1 -1
- notebook/static/1198.bundle.js +1 -1
- notebook/static/131.bundle.js +1 -1
- notebook/static/1337.bundle.js +1 -1
- notebook/static/134.bundle.js +1 -1
- notebook/static/1388.bundle.js +1 -1
- notebook/static/1408.bundle.js +1 -1
- notebook/static/1495.bundle.js +1 -1
- notebook/static/1496.bundle.js +1 -1
- notebook/static/1647.bundle.js +1 -1
- notebook/static/1650.bundle.js +1 -1
- notebook/static/1664.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/1846.bundle.js +1 -1
- 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/214.bundle.js +1 -1
- notebook/static/2167.bundle.js +1 -1
- notebook/static/2184.bundle.js +1 -1
- notebook/static/2241.bundle.js +1 -1
- notebook/static/2311.bundle.js +1 -1
- notebook/static/2324.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/2512.bundle.js +1 -1
- notebook/static/2520.bundle.js +1 -1
- notebook/static/2577.bundle.js +1 -1
- notebook/static/2607.bundle.js +1 -1
- notebook/static/261.bundle.js +1 -1
- notebook/static/2615.bundle.js +1 -1
- notebook/static/2682.bundle.js +1 -1
- notebook/static/2692.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/3129.bundle.js +1 -1
- notebook/static/3146.bundle.js +1 -1
- notebook/static/3154.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/3340.bundle.js +1 -1
- notebook/static/3360.bundle.js +1 -1
- notebook/static/3466.bundle.js +1 -1
- notebook/static/3488.bundle.js +1 -1
- notebook/static/3512.bundle.js +1 -1
- notebook/static/3654.bundle.js +1 -1
- 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/4035.bundle.js +1 -1
- notebook/static/4042.bundle.js +1 -1
- notebook/static/4131.bundle.js +1 -1
- notebook/static/4212.bundle.js +1 -1
- notebook/static/4382.bundle.js +1 -1
- notebook/static/4558.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/5088.bundle.js +1 -1
- notebook/static/5099.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/5426.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/5912.bundle.js +1 -1
- notebook/static/5921.bundle.js +1 -1
- notebook/static/6017.bundle.js +1 -1
- notebook/static/6139.bundle.js +1 -1
- notebook/static/62.bundle.js +1 -1
- notebook/static/6256.bundle.js +1 -1
- notebook/static/6281.bundle.js +1 -1
- notebook/static/6345.bundle.js +1 -1
- notebook/static/6417.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/6640.bundle.js +1 -1
- notebook/static/6667.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/{1608.bundle.js → 7005.bundle.js} +1 -1
- notebook/static/7097.bundle.js +1 -1
- notebook/static/7153.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/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/755.bundle.js +1 -1
- notebook/static/7603.bundle.js +1 -1
- notebook/static/7639.bundle.js +1 -1
- notebook/static/7684.bundle.js +1 -1
- notebook/static/771.bundle.js +1 -0
- notebook/static/7811.bundle.js +1 -1
- notebook/static/7812.bundle.js +1 -1
- notebook/static/7819.bundle.js +1 -1
- notebook/static/7900.bundle.js +1 -1
- notebook/static/7906.bundle.js +1 -1
- notebook/static/7995.bundle.js +1 -1
- notebook/static/8579.bundle.js +1 -1
- notebook/static/8633.bundle.js +1 -1
- notebook/static/8768.bundle.js +1 -1
- notebook/static/8771.bundle.js +1 -1
- notebook/static/8781.bundle.js +1 -1
- notebook/static/8801.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/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/9680.bundle.js +1 -1
- notebook/static/9685.bundle.js +1 -1
- notebook/static/9752.bundle.js +1 -1
- notebook/static/9821.bundle.js +1 -1
- notebook/static/9852.bundle.js +1 -1
- notebook/static/9866.bundle.js +1 -1
- notebook/static/bundle.js +1 -1
- notebook/static/third-party-licenses.json +99 -99
- {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/package.json.orig +14 -14
- {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/documentsearch-extension/package.json.orig +4 -4
- {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/package.json.orig +6 -6
- {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/package.json.orig +9 -9
- {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/package.json.orig +15 -15
- {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/package.json +11 -11
- {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/package.json.orig +10 -10
- notebook-7.1.0rc1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/913.ed31b967ed65df80c2cf.js → notebook-7.1.1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/355.1213f16419258c4671ec.js +1 -1
- notebook-7.1.1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.c74a681c6a303d4da718.js +1 -0
- notebook-7.1.1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.32f48ad22cd5f6a8da04.js +1 -0
- notebook-7.1.0rc1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/93.eae3497dd223d842d198.js → notebook-7.1.1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/93.d3d4e56f2f961c2c2a13.js +1 -1
- notebook-7.1.1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.330dffb5180b5b71100a.js +1 -0
- {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/third-party-licenses.json +2 -2
- {notebook-7.1.0rc1.dist-info → notebook-7.1.1.dist-info}/METADATA +2 -2
- {notebook-7.1.0rc1.dist-info → notebook-7.1.1.dist-info}/RECORD +194 -194
- notebook/static/4837.bundle.js +0 -1
- notebook-7.1.0rc1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.7c69f17d842172804b2c.js +0 -1
- notebook-7.1.0rc1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.bf68c8ab6c905f205d45.js +0 -1
- notebook-7.1.0rc1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.de9e68f80570f96cb86a.js +0 -1
- {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/etc/jupyter/jupyter_server_config.d/notebook.json +0 -0
- {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/applications/jupyter-notebook.desktop +0 -0
- {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/icons/hicolor/scalable/apps/notebook.svg +0 -0
- {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/menus.json +0 -0
- {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/pages.json +0 -0
- {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/shell.json +0 -0
- {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/title.json +0 -0
- {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/top.json +0 -0
- {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/zen.json +0 -0
- {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/open.json +0 -0
- {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/checkpoints.json +0 -0
- {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/edit-notebook-metadata.json +0 -0
- {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/kernel-logo.json +0 -0
- {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/scroll-output.json +0 -0
- {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/file-actions.json +0 -0
- {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/widget.json +0 -0
- {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/interface-switcher.json +0 -0
- {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/launch-tree.json +0 -0
- {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/style.js +0 -0
- {notebook-7.1.0rc1.dist-info → notebook-7.1.1.dist-info}/WHEEL +0 -0
- {notebook-7.1.0rc1.dist-info → notebook-7.1.1.dist-info}/entry_points.txt +0 -0
- {notebook-7.1.0rc1.dist-info → notebook-7.1.1.dist-info}/licenses/LICENSE +0 -0
notebook/static/5733.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5733],{65733:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{APPLICATION_JAVASCRIPT_MIMETYPE:()=>APPLICATION_JAVASCRIPT_MIMETYPE,ExperimentalRenderedJavascript:()=>ExperimentalRenderedJavascript,TEXT_JAVASCRIPT_MIMETYPE:()=>TEXT_JAVASCRIPT_MIMETYPE,default:()=>__WEBPACK_DEFAULT_EXPORT__,rendererFactory:()=>rendererFactory});var _jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5733],{65733:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{APPLICATION_JAVASCRIPT_MIMETYPE:()=>APPLICATION_JAVASCRIPT_MIMETYPE,ExperimentalRenderedJavascript:()=>ExperimentalRenderedJavascript,TEXT_JAVASCRIPT_MIMETYPE:()=>TEXT_JAVASCRIPT_MIMETYPE,default:()=>__WEBPACK_DEFAULT_EXPORT__,rendererFactory:()=>rendererFactory});var _jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(56761),_jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_0__);const TEXT_JAVASCRIPT_MIMETYPE="text/javascript",APPLICATION_JAVASCRIPT_MIMETYPE="application/javascript";function evalInContext(code,element,document,window){return eval(code)}class ExperimentalRenderedJavascript extends _jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_0__.RenderedJavaScript{render(e){const _=this.translator.load("jupyterlab"),r=()=>{try{const _=e.data[this.mimeType];return _&&evalInContext(_,this.node,document,window),Promise.resolve()}catch(e){return Promise.reject(e)}};if(!e.trusted){const e=document.createElement("pre");e.textContent=_.__("Are you sure that you want to run arbitrary Javascript within your JupyterLab session?");const t=document.createElement("button");return t.textContent=_.__("Run"),this.node.appendChild(e),this.node.appendChild(t),t.onclick=e=>{this.node.textContent="",r()},Promise.resolve()}return r()}}const rendererFactory={safe:!1,mimeTypes:[TEXT_JAVASCRIPT_MIMETYPE,APPLICATION_JAVASCRIPT_MIMETYPE],createRenderer:e=>new ExperimentalRenderedJavascript(e)},extension={id:"@jupyterlab/javascript-extension:factory",description:"Adds renderer for JavaScript content.",rendererFactory,rank:0,dataType:"string"},__WEBPACK_DEFAULT_EXPORT__=extension}}]);
|
notebook/static/5912.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5912],{15912:(e,t,n)=>{n.r(t),n.d(t,{default:()=>p});var a,r=n(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5912],{15912:(e,t,n)=>{n.r(t),n.d(t,{default:()=>p});var a,r=n(49880),i=n(57797),o=n(87098),s=n(34127),c=n(17173),l=n(5390),m=n(6312),d=n(58499),h=n(11523),u=n(52018),_=n(31516);!function(e){e.copy="terminal:copy",e.createNew="terminal:create-new",e.open="terminal:open",e.refresh="terminal:refresh",e.increaseFont="terminal:increase-font",e.decreaseFont="terminal:decrease-font",e.paste="terminal:paste",e.setTheme="terminal:set-theme",e.shutdown="terminal:shut-down"}(a||(a={}));const g={activate:function(e,t,n,r,o,s,c,m,h){const p=n.load("jupyterlab"),{serviceManager:y,commands:f}=e,T=p.__("Terminal"),b=new i.WidgetTracker({namespace:"terminal"});if(!y.terminals.isAvailable())return console.warn("Disabling terminals plugin because they are not available on the server"),b;s&&s.restore(b,{command:a.createNew,args:e=>({name:e.content.session.name}),name:e=>e.content.session.name});const v={};function I(e){Object.keys(e.composite).forEach((t=>{v[t]=e.composite[t]}))}function C(){b.forEach((e=>function(e){const t=e.content;t&&Object.keys(v).forEach((e=>{t.setOption(e,v[e])}))}(e)))}if(t.load(g.id).then((e=>{I(e),C(),e.changed.connect((()=>{I(e),C()}))})).catch(w.showErrorMessage),null==m||m.themeChanged.connect(((e,t)=>{b.forEach((e=>{const t=e.content;"inherit"===t.getOption("theme")&&t.setOption("theme","inherit")}))})),function(e,t,n,r,o){const s=r.load("jupyterlab"),{commands:c,serviceManager:m}=e,h=()=>null!==t.currentWidget&&t.currentWidget===e.shell.currentWidget;c.addCommand(a.createNew,{label:e=>e.isPalette?s.__("New Terminal"):s.__("Terminal"),caption:s.__("Start a new terminal session"),icon:e=>e.isPalette?void 0:u.terminalIcon,execute:async n=>{const a=n.name,s=n.cwd,c=s?m.contents.localPath(s):void 0;let h;h=a?(await l.TerminalAPI.listRunning()).map((e=>e.name)).includes(a)?m.terminals.connectTo({model:{name:a}}):await m.terminals.startNew({name:a,cwd:c}):await m.terminals.startNew({cwd:c});const _=new d.Terminal(h,o,r);_.title.icon=u.terminalIcon,_.title.label="...";const g=new i.MainAreaWidget({content:_,reveal:_.ready});return e.shell.add(g,"main",{type:"Terminal"}),t.add(g),e.shell.activateById(g.id),g}}),c.addCommand(a.open,{label:s.__("Open a terminal by its `name`."),execute:n=>{const r=n.name,i=t.find((e=>e.content.session.name===r||!1));if(!i)return c.execute(a.createNew,{name:r});e.shell.activateById(i.id)}}),c.addCommand(a.refresh,{label:s.__("Refresh Terminal"),caption:s.__("Refresh the current terminal session"),execute:async()=>{const n=t.currentWidget;if(n){e.shell.activateById(n.id);try{await n.content.refresh(),n&&n.content.activate()}catch(e){w.showErrorMessage(e)}}},icon:e=>e.isPalette?void 0:u.refreshIcon.bindprops({stylesheet:"menuItem"}),isEnabled:h}),c.addCommand(a.copy,{execute:()=>{var e;const n=null===(e=t.currentWidget)||void 0===e?void 0:e.content;if(!n)return;const a=n.getSelection();a&&i.Clipboard.copyToSystem(a)},isEnabled:()=>{var e;if(!h())return!1;const n=null===(e=t.currentWidget)||void 0===e?void 0:e.content;return!!n&&n.hasSelection()},icon:u.copyIcon.bindprops({stylesheet:"menuItem"}),label:s.__("Copy")}),c.addCommand(a.paste,{execute:async()=>{var e;const n=null===(e=t.currentWidget)||void 0===e?void 0:e.content;if(!n)return;const a=window.navigator.clipboard,r=await a.readText();r&&n.paste(r)},isEnabled:()=>{var e;return Boolean(h()&&(null===(e=t.currentWidget)||void 0===e?void 0:e.content))},icon:u.pasteIcon.bindprops({stylesheet:"menuItem"}),label:s.__("Paste")}),c.addCommand(a.shutdown,{label:s.__("Shutdown Terminal"),execute:()=>{const e=t.currentWidget;if(e)return e.content.session.shutdown()},isEnabled:h}),c.addCommand(a.increaseFont,{label:s.__("Increase Terminal Font Size"),execute:async()=>{const{fontSize:e}=o;if(e&&e<72)try{await n.set(g.id,"fontSize",e+1)}catch(e){w.showErrorMessage(e)}}}),c.addCommand(a.decreaseFont,{label:s.__("Decrease Terminal Font Size"),execute:async()=>{const{fontSize:e}=o;if(e&&e>9)try{await n.set(g.id,"fontSize",e-1)}catch(e){w.showErrorMessage(e)}}});const _={inherit:s.__("Inherit"),light:s.__("Light"),dark:s.__("Dark")};c.addCommand(a.setTheme,{label:e=>{if(void 0===e.theme)return s.__("Set terminal theme to the provided `theme`.");const t=e.theme,n=t in _?_[t]:s.__(t[0].toUpperCase()+t.slice(1));return e.isPalette?s.__("Use Terminal Theme: %1",n):n},caption:s.__("Set the terminal theme"),isToggled:e=>{const{theme:t}=o;return e.theme===t},execute:async e=>{const t=e.theme;try{await n.set(g.id,"theme",t),c.notifyCommandChanged(a.setTheme)}catch(e){console.log(e),w.showErrorMessage(e)}}})}(e,b,t,n,v),c){const e=new _.Menu({commands:f});e.title.label=p._p("menu","Terminal Theme"),e.addItem({command:a.setTheme,args:{theme:"inherit",displayName:p.__("Inherit"),isPalette:!1}}),e.addItem({command:a.setTheme,args:{theme:"light",displayName:p.__("Light"),isPalette:!1}}),e.addItem({command:a.setTheme,args:{theme:"dark",displayName:p.__("Dark"),isPalette:!1}}),c.settingsMenu.addGroup([{command:a.increaseFont},{command:a.decreaseFont},{type:"submenu",submenu:e}],40),c.fileMenu.newMenu.addItem({command:a.createNew,rank:20}),c.fileMenu.closeAndCleaners.add({id:a.shutdown,isEnabled:e=>null!==b.currentWidget&&b.has(e)})}return r&&([a.createNew,a.refresh,a.increaseFont,a.decreaseFont].forEach((e=>{r.addItem({command:e,category:T,args:{isPalette:!0}})})),r.addItem({command:a.setTheme,category:T,args:{theme:"inherit",displayName:p.__("Inherit"),isPalette:!0}}),r.addItem({command:a.setTheme,category:T,args:{theme:"light",displayName:p.__("Light"),isPalette:!0}}),r.addItem({command:a.setTheme,category:T,args:{theme:"dark",displayName:p.__("Dark"),isPalette:!0}})),o&&o.add({command:a.createNew,category:p.__("Other"),rank:0}),h&&function(e,t,n){const a=n.load("jupyterlab"),r=t.serviceManager.terminals;class i{constructor(e){this._model=e}open(){t.commands.execute("terminal:open",{name:this._model.name})}icon(){return u.terminalIcon}label(){return`terminals/${this._model.name}`}shutdown(){return r.shutdown(this._model.name)}}e.add({name:a.__("Terminals"),running:()=>Array.from(r.running()).map((e=>new i(e))),shutdownAll:()=>r.shutdownAll(),refreshRunning:()=>r.refreshRunning(),runningChanged:r.runningChanged,shutdownLabel:a.__("Shut Down"),shutdownAllLabel:a.__("Shut Down All"),shutdownAllConfirmationText:a.__("Are you sure you want to permanently shut down all running terminals?")})}(h,e,n),b},id:"@jupyterlab/terminal-extension:plugin",description:"Adds terminal and provides its tracker.",provides:d.ITerminalTracker,requires:[m.ISettingRegistry,h.ITranslator],optional:[i.ICommandPalette,o.ILauncher,r.ILayoutRestorer,s.IMainMenu,i.IThemeManager,c.IRunningSessionManagers],autoStart:!0},p=g;var w;!function(e){e.showErrorMessage=function(e){console.error(`Failed to configure ${g.id}: ${e.message}`)}}(w||(w={}))}}]);
|
notebook/static/5921.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5921],{75921:(e,t,n)=>{n.r(t),n.d(t,{ITableOfContentsRegistry:()=>h,ITableOfContentsTracker:()=>d,TableOfContents:()=>g,TableOfContentsFactory:()=>l,TableOfContentsItem:()=>v,TableOfContentsModel:()=>p,TableOfContentsPanel:()=>b,TableOfContentsRegistry:()=>x,TableOfContentsTracker:()=>y,TableOfContentsTree:()=>C,TableOfContentsUtils:()=>i,TableOfContentsWidget:()=>T});var s={};n.r(s),n.d(s,{getHeadingId:()=>P,getHeadings:()=>I,isMarkdown:()=>$});var i={};n.r(i),n.d(i,{Markdown:()=>s,NUMBERING_CLASS:()=>H,addPrefix:()=>O,clearNumbering:()=>j,filterHeadings:()=>A,getHTMLHeadings:()=>E,getPrefix:()=>S,isHTML:()=>k});var a=n(70788);class l{constructor(e){this.tracker=e}isApplicable(e){return!!this.tracker.has(e)}createNew(e,t){const n=this._createNew(e,t),s=e.context,i=()=>{n.refresh().catch((e=>{console.error("Failed to update the table of contents.",e)}))},l=new a.ActivityMonitor({signal:s.model.contentChanged,timeout:1e3});l.activityStopped.connect(i);const o=()=>{n.title=a.PathExt.basename(s.localPath)};return s.pathChanged.connect(o),s.ready.then((()=>{o(),i()})).catch((e=>{console.error(`Failed to initiate headings for ${s.localPath}.`)})),e.disposed.connect((()=>{l.activityStopped.disconnect(i),s.pathChanged.disconnect(o)})),n}}var o=n(70397),r=n(20998),c=n(81997);const h=new r.Token("@jupyterlab/toc:ITableOfContentsRegistry","A service to register table of content factory."),d=new r.Token("@jupyterlab/toc:ITableOfContentsTracker","A widget tracker for table of contents.");var g,u;!function(e){e.defaultConfig={baseNumbering:1,maximalDepth:4,numberingH1:!0,numberHeaders:!1,includeOutput:!0,syncCollapseState:!1}}(g||(g={}));class p extends o.VDomModel{constructor(e,t){super(),this.widget=e,this._activeHeading=null,this._activeHeadingChanged=new c.Signal(this),this._collapseChanged=new c.Signal(this),this._configuration=null!=t?t:{...g.defaultConfig},this._headings=new Array,this._headingsChanged=new c.Signal(this),this._isActive=!1,this._isRefreshing=!1,this._needsRefreshing=!1}get activeHeading(){return this._activeHeading}get activeHeadingChanged(){return this._activeHeadingChanged}get collapseChanged(){return this._collapseChanged}get configuration(){return this._configuration}get headings(){return this._headings}get headingsChanged(){return this._headingsChanged}get isActive(){return this._isActive}set isActive(e){this._isActive=e,this._isActive&&!this.isAlwaysActive&&this.refresh().catch((e=>{console.error("Failed to refresh ToC model.",e)}))}get isAlwaysActive(){return!1}get supportedOptions(){return["maximalDepth"]}get title(){return this._title}set title(e){e!==this._title&&(this._title=e,this.stateChanged.emit())}async refresh(){if(this._isRefreshing)return this._needsRefreshing=!0,Promise.resolve();this._isRefreshing=!0;try{const e=await this.getHeadings();if(this._needsRefreshing)return this._needsRefreshing=!1,this._isRefreshing=!1,this.refresh();e&&!u.areHeadingsEqual(e,this._headings)&&(this._headings=e,this.stateChanged.emit(),this._headingsChanged.emit())}finally{this._isRefreshing=!1}}setActiveHeading(e,t=!0){this._activeHeading!==e&&(this._activeHeading=e,this.stateChanged.emit()),t&&this._activeHeadingChanged.emit(this._activeHeading)}setConfiguration(e){const t={...this._configuration,...e};r.JSONExt.deepEqual(this._configuration,t)||(this._configuration=t,this.refresh().catch((e=>{console.error("Failed to update the table of contents.",e)})))}toggleCollapse(e){var t,n;if(e.heading)e.heading.collapsed=null!==(t=e.collapsed)&&void 0!==t?t:!e.heading.collapsed,this.stateChanged.emit(),this._collapseChanged.emit(e.heading);else{const t=null!==(n=e.collapsed)&&void 0!==n?n:!this.headings.some((e=>{var t;return!(null!==(t=e.collapsed)&&void 0!==t&&t)}));this.headings.forEach((e=>e.collapsed=t)),this.stateChanged.emit(),this._collapseChanged.emit(null)}}}!function(e){e.areHeadingsEqual=function(e,t){if(e.length===t.length){for(let n=0;n<e.length;n++)if(e[n].level!==t[n].level||e[n].text!==t[n].text||e[n].prefix!==t[n].prefix)return!1;return!0}return!1}}(u||(u={}));var f,m=n(31516),_=n(78156);class v extends _.PureComponent{render(){const{children:e,isActive:t,heading:n,onCollapse:s,onMouseDown:i}=this.props;return _.createElement("li",{className:"jp-tocItem"},_.createElement("div",{className:"jp-tocItem-heading "+(t?"jp-tocItem-active":""),onMouseDown:e=>{e.defaultPrevented||(e.preventDefault(),i(n))}},_.createElement("button",{className:"jp-tocItem-collapser",onClick:e=>{e.preventDefault(),s(n)},style:{visibility:e?"visible":"hidden"}},n.collapsed?_.createElement(o.caretRightIcon.react,{tag:"span",width:"20px"}):_.createElement(o.caretDownIcon.react,{tag:"span",width:"20px"})),_.createElement("span",{className:"jp-tocItem-content",title:n.text,...n.dataset},n.prefix,n.text)),e&&!n.collapsed&&_.createElement("ol",null,e))}}class C extends _.PureComponent{render(){const{documentType:e}=this.props;return _.createElement("ol",{className:"jp-TableOfContents-content","data-document-type":e},this.buildTree())}buildTree(){if(0===this.props.headings.length)return[];const e=t=>{const n=this.props.headings,s=new Array,i=n[t];let a=t+1;for(;a<n.length&&!(n[a].level<=i.level);){const[t,n]=e(a);s.push(t),a=n}return[_.createElement(v,{key:`${i.level}-${t}-${i.text}`,isActive:!!this.props.activeHeading&&i===this.props.activeHeading,heading:i,onMouseDown:this.props.setActiveHeading,onCollapse:this.props.onCollapseChange},s.length?s:null),a]},t=new Array;let n=0;for(;n<this.props.headings.length;){const[s,i]=e(n);t.push(s),n=i}return t}}class T extends o.VDomRenderer{constructor(e){super(e.model),this._placeholderHeadline=e.placeholderHeadline,this._placeholderText=e.placeholderText}render(){return this.model&&0!==this.model.headings.length?_.createElement(C,{activeHeading:this.model.activeHeading,documentType:this.model.documentType,headings:this.model.headings,onCollapseChange:e=>{this.model.toggleCollapse({heading:e})},setActiveHeading:e=>{this.model.setActiveHeading(e)}}):_.createElement("div",{className:"jp-TableOfContents-placeholder"},_.createElement("div",{className:"jp-TableOfContents-placeholderContent"},_.createElement("h3",null,this._placeholderHeadline),_.createElement("p",null,this._placeholderText)))}}class b extends o.SidePanel{constructor(e){super({content:new m.Panel,translator:e}),this._model=null,this.addClass("jp-TableOfContents"),this._title=new f.Header(this._trans.__("Table of Contents")),this.header.addWidget(this._title),this._treeview=new T({placeholderHeadline:this._trans.__("No Headings"),placeholderText:this._trans.__("The table of contents shows headings in notebooks and supported files.")}),this._treeview.addClass("jp-TableOfContents-tree"),this.content.addWidget(this._treeview)}get model(){return this._model}set model(e){var t,n;this._model!==e&&(null===(t=this._model)||void 0===t||t.stateChanged.disconnect(this._onTitleChanged,this),this._model=e,this._model&&(this._model.isActive=this.isVisible),null===(n=this._model)||void 0===n||n.stateChanged.connect(this._onTitleChanged,this),this._onTitleChanged(),this._treeview.model=this._model)}onAfterHide(e){super.onAfterHide(e),this._model&&(this._model.isActive=!1)}onBeforeShow(e){super.onBeforeShow(e),this._model&&(this._model.isActive=!0)}_onTitleChanged(){var e,t;this._title.setTitle(null!==(t=null===(e=this._model)||void 0===e?void 0:e.title)&&void 0!==t?t:this._trans.__("Table of Contents"))}}!function(e){class t extends m.Widget{constructor(e){const t=document.createElement("h2");t.textContent=e,t.classList.add("jp-text-truncated"),super({node:t}),this._title=t}setTitle(e){this._title.textContent=e}}e.Header=t}(f||(f={}));var w=n(2549);class x{constructor(){this._generators=new Map,this._idCounter=0}getModel(e,t){for(const n of this._generators.values())if(n.isApplicable(e))return n.createNew(e,t)}add(e){const t=this._idCounter++;return this._generators.set(t,e),new w.DisposableDelegate((()=>{this._generators.delete(t)}))}}class y{constructor(){this.modelMapping=new WeakMap}add(e,t){this.modelMapping.set(e,t)}get(e){const t=this.modelMapping.get(e);return!t||t.isDisposed?null:t}}const H="numbering-entry";function A(e,t,n=[]){const s={...g.defaultConfig,...t},i=n;let a=i.length;const l=new Array;for(const t of e){if(t.skip)continue;const e=t.level;if(e>0&&e<=s.maximalDepth){const n=S(e,a,i,s);a=e,l.push({...t,prefix:n})}}return l}function k(e){return"text/html"===e}function E(e,t=!0){var n;const s=document.createElement("div");s.innerHTML=e;const i=new Array,a=s.querySelectorAll("h1, h2, h3, h4, h5, h6");for(const e of a){const t=parseInt(e.tagName[1],10);i.push({text:null!==(n=e.textContent)&&void 0!==n?n:"",level:t,id:null==e?void 0:e.getAttribute("id"),skip:e.classList.contains("jp-toc-ignore")||e.classList.contains("tocSkip")})}return i}function O(e,t,n){let s=e.querySelector(t);if(!s)return null;if(s.querySelector(`span.${H}`)){const i=e.querySelectorAll(t);for(const e of i)if(!e.querySelector(`span.${H}`)){s=e,M(e,n);break}}else M(s,n);return s}function S(e,t,n,s){const{baseNumbering:i,numberingH1:a,numberHeaders:l}=s;let o="";if(l){const s=a?1:2;if(e>t){for(let s=t;s<e-1;s++)n[s]=0;n[e-1]=e===s?i:1}else n[e-1]+=1,e<t&&n.splice(e);a?o=n.map((e=>null!=e?e:0)).join(".")+". ":n.length>1&&(o=n.slice(1).map((e=>null!=e?e:0)).join(".")+". ")}return o}function M(e,t){e.insertAdjacentHTML("afterbegin",`<span class="${H}">${t}</span>`)}function j(e){null==e||e.querySelectorAll(`span.${H}`).forEach((e=>{e.remove()}))}var R=n(98244),N=n(8627);async function P(e,t,n,s){try{const i=document.createElement("div");await(0,N.renderMarkdown)({markdownParser:e,host:i,source:t,trusted:!1,sanitizer:null!=s?s:new R.Sanitizer,shouldTypeset:!1,resolver:null,linkHandler:null,latexTypesetter:null});const a=i.querySelector(`h${n}`);return a?a.id:null}catch(e){console.error("Failed to parse a heading.",e)}return null}function I(e){const t=e.split("\n"),n=new Array;let s,i=0;if("---"===t[i])for(let e=i+1;e<t.length;e++)if("---"===t[e]){i=e+1;break}for(;i<t.length;i++){const e=t[i];if(""===e)continue;if(e.startsWith("```")&&(s=!s),s)continue;const a=q(e,t[i+1]);a&&n.push({...a,line:i})}return n}const D=["text/x-ipythongfm","text/x-markdown","text/x-gfm","text/markdown"];function $(e){return D.includes(e)}function q(e,t){let n=e.match(/^([#]{1,6}) (.*)/);return n?{text:L(n[2]),level:n[1].length,raw:e,skip:U.test(n[0])}:t&&(n=t.match(/^ {0,3}([=]{2,}|[-]{2,})\s*$/),n)?{text:L(e),level:"="===n[1][0]?1:2,raw:[e,t].join("\n"),skip:U.test(e)}:(n=e.match(/<h([1-6]).*>(.*)<\/h\1>/i),n?{text:n[2],level:parseInt(n[1],10),skip:U.test(n[0]),raw:e}:null)}function L(e){return e.replace(/\[(.+)\]\(.+\)/g,"$1")}const U=/<\w+\s(.*?\s)?class="(.*?\s)?(jp-toc-ignore|tocSkip)(\s.*?)?"(\s.*?)?>/}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5921],{75921:(e,t,n)=>{n.r(t),n.d(t,{ITableOfContentsRegistry:()=>h,ITableOfContentsTracker:()=>d,TableOfContents:()=>g,TableOfContentsFactory:()=>l,TableOfContentsItem:()=>v,TableOfContentsModel:()=>p,TableOfContentsPanel:()=>b,TableOfContentsRegistry:()=>x,TableOfContentsTracker:()=>y,TableOfContentsTree:()=>C,TableOfContentsUtils:()=>i,TableOfContentsWidget:()=>T});var s={};n.r(s),n.d(s,{getHeadingId:()=>P,getHeadings:()=>I,isMarkdown:()=>$});var i={};n.r(i),n.d(i,{Markdown:()=>s,NUMBERING_CLASS:()=>H,addPrefix:()=>O,clearNumbering:()=>j,filterHeadings:()=>A,getHTMLHeadings:()=>E,getPrefix:()=>S,isHTML:()=>k});var a=n(74787);class l{constructor(e){this.tracker=e}isApplicable(e){return!!this.tracker.has(e)}createNew(e,t){const n=this._createNew(e,t),s=e.context,i=()=>{n.refresh().catch((e=>{console.error("Failed to update the table of contents.",e)}))},l=new a.ActivityMonitor({signal:s.model.contentChanged,timeout:1e3});l.activityStopped.connect(i);const o=()=>{n.title=a.PathExt.basename(s.localPath)};return s.pathChanged.connect(o),s.ready.then((()=>{o(),i()})).catch((e=>{console.error(`Failed to initiate headings for ${s.localPath}.`)})),e.disposed.connect((()=>{l.activityStopped.disconnect(i),s.pathChanged.disconnect(o)})),n}}var o=n(52018),r=n(20998),c=n(81997);const h=new r.Token("@jupyterlab/toc:ITableOfContentsRegistry","A service to register table of content factory."),d=new r.Token("@jupyterlab/toc:ITableOfContentsTracker","A widget tracker for table of contents.");var g,u;!function(e){e.defaultConfig={baseNumbering:1,maximalDepth:4,numberingH1:!0,numberHeaders:!1,includeOutput:!0,syncCollapseState:!1}}(g||(g={}));class p extends o.VDomModel{constructor(e,t){super(),this.widget=e,this._activeHeading=null,this._activeHeadingChanged=new c.Signal(this),this._collapseChanged=new c.Signal(this),this._configuration=null!=t?t:{...g.defaultConfig},this._headings=new Array,this._headingsChanged=new c.Signal(this),this._isActive=!1,this._isRefreshing=!1,this._needsRefreshing=!1}get activeHeading(){return this._activeHeading}get activeHeadingChanged(){return this._activeHeadingChanged}get collapseChanged(){return this._collapseChanged}get configuration(){return this._configuration}get headings(){return this._headings}get headingsChanged(){return this._headingsChanged}get isActive(){return this._isActive}set isActive(e){this._isActive=e,this._isActive&&!this.isAlwaysActive&&this.refresh().catch((e=>{console.error("Failed to refresh ToC model.",e)}))}get isAlwaysActive(){return!1}get supportedOptions(){return["maximalDepth"]}get title(){return this._title}set title(e){e!==this._title&&(this._title=e,this.stateChanged.emit())}async refresh(){if(this._isRefreshing)return this._needsRefreshing=!0,Promise.resolve();this._isRefreshing=!0;try{const e=await this.getHeadings();if(this._needsRefreshing)return this._needsRefreshing=!1,this._isRefreshing=!1,this.refresh();e&&!u.areHeadingsEqual(e,this._headings)&&(this._headings=e,this.stateChanged.emit(),this._headingsChanged.emit())}finally{this._isRefreshing=!1}}setActiveHeading(e,t=!0){this._activeHeading!==e&&(this._activeHeading=e,this.stateChanged.emit()),t&&this._activeHeadingChanged.emit(this._activeHeading)}setConfiguration(e){const t={...this._configuration,...e};r.JSONExt.deepEqual(this._configuration,t)||(this._configuration=t,this.refresh().catch((e=>{console.error("Failed to update the table of contents.",e)})))}toggleCollapse(e){var t,n;if(e.heading)e.heading.collapsed=null!==(t=e.collapsed)&&void 0!==t?t:!e.heading.collapsed,this.stateChanged.emit(),this._collapseChanged.emit(e.heading);else{const t=null!==(n=e.collapsed)&&void 0!==n?n:!this.headings.some((e=>{var t;return!(null!==(t=e.collapsed)&&void 0!==t&&t)}));this.headings.forEach((e=>e.collapsed=t)),this.stateChanged.emit(),this._collapseChanged.emit(null)}}}!function(e){e.areHeadingsEqual=function(e,t){if(e.length===t.length){for(let n=0;n<e.length;n++)if(e[n].level!==t[n].level||e[n].text!==t[n].text||e[n].prefix!==t[n].prefix)return!1;return!0}return!1}}(u||(u={}));var f,m=n(31516),_=n(78156);class v extends _.PureComponent{render(){const{children:e,isActive:t,heading:n,onCollapse:s,onMouseDown:i}=this.props;return _.createElement("li",{className:"jp-tocItem"},_.createElement("div",{className:"jp-tocItem-heading "+(t?"jp-tocItem-active":""),onMouseDown:e=>{e.defaultPrevented||(e.preventDefault(),i(n))}},_.createElement("button",{className:"jp-tocItem-collapser",onClick:e=>{e.preventDefault(),s(n)},style:{visibility:e?"visible":"hidden"}},n.collapsed?_.createElement(o.caretRightIcon.react,{tag:"span",width:"20px"}):_.createElement(o.caretDownIcon.react,{tag:"span",width:"20px"})),_.createElement("span",{className:"jp-tocItem-content",title:n.text,...n.dataset},n.prefix,n.text)),e&&!n.collapsed&&_.createElement("ol",null,e))}}class C extends _.PureComponent{render(){const{documentType:e}=this.props;return _.createElement("ol",{className:"jp-TableOfContents-content","data-document-type":e},this.buildTree())}buildTree(){if(0===this.props.headings.length)return[];const e=t=>{const n=this.props.headings,s=new Array,i=n[t];let a=t+1;for(;a<n.length&&!(n[a].level<=i.level);){const[t,n]=e(a);s.push(t),a=n}return[_.createElement(v,{key:`${i.level}-${t}-${i.text}`,isActive:!!this.props.activeHeading&&i===this.props.activeHeading,heading:i,onMouseDown:this.props.setActiveHeading,onCollapse:this.props.onCollapseChange},s.length?s:null),a]},t=new Array;let n=0;for(;n<this.props.headings.length;){const[s,i]=e(n);t.push(s),n=i}return t}}class T extends o.VDomRenderer{constructor(e){super(e.model),this._placeholderHeadline=e.placeholderHeadline,this._placeholderText=e.placeholderText}render(){return this.model&&0!==this.model.headings.length?_.createElement(C,{activeHeading:this.model.activeHeading,documentType:this.model.documentType,headings:this.model.headings,onCollapseChange:e=>{this.model.toggleCollapse({heading:e})},setActiveHeading:e=>{this.model.setActiveHeading(e)}}):_.createElement("div",{className:"jp-TableOfContents-placeholder"},_.createElement("div",{className:"jp-TableOfContents-placeholderContent"},_.createElement("h3",null,this._placeholderHeadline),_.createElement("p",null,this._placeholderText)))}}class b extends o.SidePanel{constructor(e){super({content:new m.Panel,translator:e}),this._model=null,this.addClass("jp-TableOfContents"),this._title=new f.Header(this._trans.__("Table of Contents")),this.header.addWidget(this._title),this._treeview=new T({placeholderHeadline:this._trans.__("No Headings"),placeholderText:this._trans.__("The table of contents shows headings in notebooks and supported files.")}),this._treeview.addClass("jp-TableOfContents-tree"),this.content.addWidget(this._treeview)}get model(){return this._model}set model(e){var t,n;this._model!==e&&(null===(t=this._model)||void 0===t||t.stateChanged.disconnect(this._onTitleChanged,this),this._model=e,this._model&&(this._model.isActive=this.isVisible),null===(n=this._model)||void 0===n||n.stateChanged.connect(this._onTitleChanged,this),this._onTitleChanged(),this._treeview.model=this._model)}onAfterHide(e){super.onAfterHide(e),this._model&&(this._model.isActive=!1)}onBeforeShow(e){super.onBeforeShow(e),this._model&&(this._model.isActive=!0)}_onTitleChanged(){var e,t;this._title.setTitle(null!==(t=null===(e=this._model)||void 0===e?void 0:e.title)&&void 0!==t?t:this._trans.__("Table of Contents"))}}!function(e){class t extends m.Widget{constructor(e){const t=document.createElement("h2");t.textContent=e,t.classList.add("jp-text-truncated"),super({node:t}),this._title=t}setTitle(e){this._title.textContent=e}}e.Header=t}(f||(f={}));var w=n(2549);class x{constructor(){this._generators=new Map,this._idCounter=0}getModel(e,t){for(const n of this._generators.values())if(n.isApplicable(e))return n.createNew(e,t)}add(e){const t=this._idCounter++;return this._generators.set(t,e),new w.DisposableDelegate((()=>{this._generators.delete(t)}))}}class y{constructor(){this.modelMapping=new WeakMap}add(e,t){this.modelMapping.set(e,t)}get(e){const t=this.modelMapping.get(e);return!t||t.isDisposed?null:t}}const H="numbering-entry";function A(e,t,n=[]){const s={...g.defaultConfig,...t},i=n;let a=i.length;const l=new Array;for(const t of e){if(t.skip)continue;const e=t.level;if(e>0&&e<=s.maximalDepth){const n=S(e,a,i,s);a=e,l.push({...t,prefix:n})}}return l}function k(e){return"text/html"===e}function E(e,t=!0){var n;const s=document.createElement("div");s.innerHTML=e;const i=new Array,a=s.querySelectorAll("h1, h2, h3, h4, h5, h6");for(const e of a){const t=parseInt(e.tagName[1],10);i.push({text:null!==(n=e.textContent)&&void 0!==n?n:"",level:t,id:null==e?void 0:e.getAttribute("id"),skip:e.classList.contains("jp-toc-ignore")||e.classList.contains("tocSkip")})}return i}function O(e,t,n){let s=e.querySelector(t);if(!s)return null;if(s.querySelector(`span.${H}`)){const i=e.querySelectorAll(t);for(const e of i)if(!e.querySelector(`span.${H}`)){s=e,M(e,n);break}}else M(s,n);return s}function S(e,t,n,s){const{baseNumbering:i,numberingH1:a,numberHeaders:l}=s;let o="";if(l){const s=a?1:2;if(e>t){for(let s=t;s<e-1;s++)n[s]=0;n[e-1]=e===s?i:1}else n[e-1]+=1,e<t&&n.splice(e);a?o=n.map((e=>null!=e?e:0)).join(".")+". ":n.length>1&&(o=n.slice(1).map((e=>null!=e?e:0)).join(".")+". ")}return o}function M(e,t){e.insertAdjacentHTML("afterbegin",`<span class="${H}">${t}</span>`)}function j(e){null==e||e.querySelectorAll(`span.${H}`).forEach((e=>{e.remove()}))}var R=n(57797),N=n(56761);async function P(e,t,n,s){try{const i=document.createElement("div");await(0,N.renderMarkdown)({markdownParser:e,host:i,source:t,trusted:!1,sanitizer:null!=s?s:new R.Sanitizer,shouldTypeset:!1,resolver:null,linkHandler:null,latexTypesetter:null});const a=i.querySelector(`h${n}`);return a?a.id:null}catch(e){console.error("Failed to parse a heading.",e)}return null}function I(e){const t=e.split("\n"),n=new Array;let s,i=0;if("---"===t[i])for(let e=i+1;e<t.length;e++)if("---"===t[e]){i=e+1;break}for(;i<t.length;i++){const e=t[i];if(""===e)continue;if(e.startsWith("```")&&(s=!s),s)continue;const a=q(e,t[i+1]);a&&n.push({...a,line:i})}return n}const D=["text/x-ipythongfm","text/x-markdown","text/x-gfm","text/markdown"];function $(e){return D.includes(e)}function q(e,t){let n=e.match(/^([#]{1,6}) (.*)/);return n?{text:L(n[2]),level:n[1].length,raw:e,skip:U.test(n[0])}:t&&(n=t.match(/^ {0,3}([=]{2,}|[-]{2,})\s*$/),n)?{text:L(e),level:"="===n[1][0]?1:2,raw:[e,t].join("\n"),skip:U.test(e)}:(n=e.match(/<h([1-6]).*>(.*)<\/h\1>/i),n?{text:n[2],level:parseInt(n[1],10),skip:U.test(n[0]),raw:e}:null)}function L(e){return e.replace(/\[(.+)\]\(.+\)/g,"$1")}const U=/<\w+\s(.*?\s)?class="(.*?\s)?(jp-toc-ignore|tocSkip)(\s.*?)?"(\s.*?)?>/}}]);
|
notebook/static/6017.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6017],{36017:(e,r,t)=>{t.d(r,{CSVSearchProvider:()=>c});var i=t(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6017],{36017:(e,r,t)=>{t.d(r,{CSVSearchProvider:()=>c});var i=t(2354),s=t(3771),n=t(11404);class c extends n.SearchProvider{constructor(){super(...arguments),this.isReadOnly=!0}static createNew(e,r){return new c(e)}static isApplicable(e){return e instanceof s.DocumentWidget&&e.content instanceof i.CSVViewer}clearHighlight(){return Promise.resolve()}highlightNext(e){return this.widget.content.searchService.find(this._query),Promise.resolve(void 0)}highlightPrevious(e){return this.widget.content.searchService.find(this._query,!0),Promise.resolve(void 0)}replaceCurrentMatch(e,r){return Promise.resolve(!1)}replaceAllMatches(e){return Promise.resolve(!1)}startQuery(e){return this._query=e,this.widget.content.searchService.find(e),Promise.resolve()}endQuery(){return this.widget.content.searchService.clear(),Promise.resolve()}}}}]);
|
notebook/static/6139.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6139],{56139:(e,t,o)=>{o.r(t),o.d(t,{default:()=>g});var i,a=o(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6139],{56139:(e,t,o)=>{o.r(t),o.d(t,{default:()=>g});var i,a=o(49880),n=o(57797),r=o(69988),l=o(11523);!function(e){e.resetImage="imageviewer:reset-image",e.zoomIn="imageviewer:zoom-in",e.zoomOut="imageviewer:zoom-out",e.flipHorizontal="imageviewer:flip-horizontal",e.flipVertical="imageviewer:flip-vertical",e.rotateClockwise="imageviewer:rotate-clockwise",e.rotateCounterclockwise="imageviewer:rotate-counterclockwise",e.invertColors="imageviewer:invert-colors"}(i||(i={}));const c=["png","gif","jpeg","bmp","ico","tiff"],d="Image",s="Image (Text)",m=["svg","xbm"],u=new RegExp(`[.](${m.join("|")})$`),g={activate:function(e,t,o,a){const l=t.load("jupyterlab");function g(t,o){var i,a;o.context.pathChanged.connect((()=>{v.save(o)})),v.add(o);const n=e.docRegistry.getFileTypesForPath(o.context.path);n.length>0&&(o.title.icon=n[0].icon,o.title.iconClass=null!==(i=n[0].iconClass)&&void 0!==i?i:"",o.title.iconLabel=null!==(a=n[0].iconLabel)&&void 0!==a?a:"")}[new r.ImageViewerFactory({name:d,label:l.__("Image"),modelName:"base64",fileTypes:[...c,...m],defaultFor:c,readOnly:!0}),new r.ImageViewerFactory({name:s,label:l.__("Image (Text)"),modelName:"text",fileTypes:m,defaultFor:m,readOnly:!0})].forEach((t=>{e.docRegistry.addWidgetFactory(t),t.widgetCreated.connect(g)}));const v=new n.WidgetTracker({namespace:"image-widget"});if(a&&a.restore(v,{command:"docmanager:open",args:e=>({path:e.context.path,factory:u.test(e.context.path)?s:d}),name:e=>e.context.path}),function(e,t,o){const i=o.load("jupyterlab"),{commands:a,shell:n}=e;function r(){return null!==t.currentWidget&&t.currentWidget===n.currentWidget}a.addCommand("imageviewer:zoom-in",{execute:function(){var e;const o=null===(e=t.currentWidget)||void 0===e?void 0:e.content;o&&(o.scale=o.scale>1?o.scale+.5:2*o.scale)},label:i.__("Zoom In"),isEnabled:r}),a.addCommand("imageviewer:zoom-out",{execute:function(){var e;const o=null===(e=t.currentWidget)||void 0===e?void 0:e.content;o&&(o.scale=o.scale>1?o.scale-.5:o.scale/2)},label:i.__("Zoom Out"),isEnabled:r}),a.addCommand("imageviewer:reset-image",{execute:function(){var e;const o=null===(e=t.currentWidget)||void 0===e?void 0:e.content;o&&(o.scale=1,o.colorinversion=0,o.resetRotationFlip())},label:i.__("Reset Image"),isEnabled:r}),a.addCommand("imageviewer:rotate-clockwise",{execute:function(){var e;const o=null===(e=t.currentWidget)||void 0===e?void 0:e.content;o&&o.rotateClockwise()},label:i.__("Rotate Clockwise"),isEnabled:r}),a.addCommand("imageviewer:rotate-counterclockwise",{execute:function(){var e;const o=null===(e=t.currentWidget)||void 0===e?void 0:e.content;o&&o.rotateCounterclockwise()},label:i.__("Rotate Counterclockwise"),isEnabled:r}),a.addCommand("imageviewer:flip-horizontal",{execute:function(){var e;const o=null===(e=t.currentWidget)||void 0===e?void 0:e.content;o&&o.flipHorizontal()},label:i.__("Flip image horizontally"),isEnabled:r}),a.addCommand("imageviewer:flip-vertical",{execute:function(){var e;const o=null===(e=t.currentWidget)||void 0===e?void 0:e.content;o&&o.flipVertical()},label:i.__("Flip image vertically"),isEnabled:r}),a.addCommand("imageviewer:invert-colors",{execute:function(){var e;const o=null===(e=t.currentWidget)||void 0===e?void 0:e.content;o&&(o.colorinversion+=1,o.colorinversion%=2)},label:i.__("Invert Colors"),isEnabled:r})}(e,v,t),o){const e=l.__("Image Viewer");[i.zoomIn,i.zoomOut,i.resetImage,i.rotateClockwise,i.rotateCounterclockwise,i.flipHorizontal,i.flipVertical,i.invertColors].forEach((t=>{o.addItem({command:t,category:e})}))}return v},description:"Adds image viewer and provide its tracker.",id:"@jupyterlab/imageviewer-extension:plugin",provides:r.IImageTracker,requires:[l.ITranslator],optional:[n.ICommandPalette,a.ILayoutRestorer],autoStart:!0}}}]);
|
notebook/static/62.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[62],{40062:(e,o,n)=>{n.r(o),n.d(o,{default:()=>c});var t,l=n(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[62],{40062:(e,o,n)=>{n.r(o),n.d(o,{default:()=>c});var t,l=n(49880),a=n(6312),d=n(547),i=n(11523),s=n(52018);!function(e){e.displayNumbering="toc:display-numbering",e.displayH1Numbering="toc:display-h1-numbering",e.displayOutputNumbering="toc:display-outputs-numbering",e.showPanel="toc:show-panel",e.toggleCollapse="toc:toggle-collapse"}(t||(t={}));const r={id:"@jupyterlab/toc-extension:registry",description:"Provides the table of contents registry.",autoStart:!0,provides:d.ITableOfContentsRegistry,activate:()=>new d.TableOfContentsRegistry},u={id:"@jupyterlab/toc-extension:tracker",description:"Adds the table of content widget and provides its tracker.",autoStart:!0,provides:d.ITableOfContentsTracker,requires:[d.ITableOfContentsRegistry],optional:[i.ITranslator,l.ILayoutRestorer,l.ILabShell,a.ISettingRegistry],activate:async function(e,o,n,l,a,u){const c=(null!=n?n:i.nullTranslator).load("jupyterlab");let m={...d.TableOfContents.defaultConfig};const g=new d.TableOfContentsPanel(null!=n?n:void 0);function b(e){return e.headings.some((e=>{var o;return!(null!==(o=e.collapsed)&&void 0!==o&&o)}))}g.title.icon=s.tocIcon,g.title.caption=c.__("Table of Contents"),g.id="table-of-contents",g.node.setAttribute("role","region"),g.node.setAttribute("aria-label",c.__("Table of Contents section")),e.commands.addCommand(t.displayH1Numbering,{label:c.__("Show first-level heading number"),execute:()=>{g.model&&g.model.setConfiguration({numberingH1:!g.model.configuration.numberingH1})},isEnabled:()=>{var e,o;return null!==(o=null===(e=g.model)||void 0===e?void 0:e.supportedOptions.includes("numberingH1"))&&void 0!==o&&o},isToggled:()=>{var e,o;return null!==(o=null===(e=g.model)||void 0===e?void 0:e.configuration.numberingH1)&&void 0!==o&&o}}),e.commands.addCommand(t.displayNumbering,{label:c.__("Show heading number in the document"),icon:e=>e.toolbar?s.numberingIcon:void 0,execute:()=>{g.model&&(g.model.setConfiguration({numberHeaders:!g.model.configuration.numberHeaders}),e.commands.notifyCommandChanged(t.displayNumbering))},isEnabled:()=>{var e,o;return null!==(o=null===(e=g.model)||void 0===e?void 0:e.supportedOptions.includes("numberHeaders"))&&void 0!==o&&o},isToggled:()=>{var e,o;return null!==(o=null===(e=g.model)||void 0===e?void 0:e.configuration.numberHeaders)&&void 0!==o&&o}}),e.commands.addCommand(t.displayOutputNumbering,{label:c.__("Show output headings"),execute:()=>{g.model&&g.model.setConfiguration({includeOutput:!g.model.configuration.includeOutput})},isEnabled:()=>{var e,o;return null!==(o=null===(e=g.model)||void 0===e?void 0:e.supportedOptions.includes("includeOutput"))&&void 0!==o&&o},isToggled:()=>{var e,o;return null!==(o=null===(e=g.model)||void 0===e?void 0:e.configuration.includeOutput)&&void 0!==o&&o}}),e.commands.addCommand(t.showPanel,{label:c.__("Table of Contents"),execute:()=>{e.shell.activateById(g.id)}}),e.commands.addCommand(t.toggleCollapse,{label:()=>g.model&&!b(g.model)?c.__("Expand All Headings"):c.__("Collapse All Headings"),icon:e=>e.toolbar?g.model&&!b(g.model)?s.expandAllIcon:s.collapseAllIcon:void 0,execute:()=>{g.model&&(b(g.model)?g.model.toggleCollapse({collapsed:!0}):g.model.toggleCollapse({collapsed:!1}))},isEnabled:()=>null!==g.model});const p=new d.TableOfContentsTracker;let C;if(l&&l.add(g,"@jupyterlab/toc:plugin"),u)try{C=await u.load(r.id);const o=o=>{const n=o.composite;for(const e of[...Object.keys(m)]){const o=n[e];void 0!==o&&(m[e]=o)}if(a)for(const e of a.widgets("main")){const o=p.get(e);o&&o.setConfiguration(m)}else if(e.shell.currentWidget){const o=p.get(e.shell.currentWidget);o&&o.setConfiguration(m)}};C&&(C.changed.connect(o),o(C))}catch(e){console.error(`Failed to load settings for the Table of Contents extension.\n\n${e}`)}const f=new s.CommandToolbarButton({commands:e.commands,id:t.displayNumbering,args:{toolbar:!0},label:""});f.addClass("jp-toc-numberingButton"),g.toolbar.addItem("display-numbering",f),g.toolbar.addItem("spacer",s.Toolbar.createSpacerItem()),g.toolbar.addItem("collapse-all",new s.CommandToolbarButton({commands:e.commands,id:t.toggleCollapse,args:{toolbar:!0},label:""}));const v=new s.MenuSvg({commands:e.commands});v.addItem({command:t.displayH1Numbering}),v.addItem({command:t.displayOutputNumbering});const h=new s.ToolbarButton({tooltip:c.__("More actions…"),icon:s.ellipsesIcon,actualOnClick:!0,onClick:()=>{const e=h.node.getBoundingClientRect();v.open(e.x,e.bottom)}});return g.toolbar.addItem("submenu",h),e.shell.add(g,"left",{rank:400,type:"Table of Contents"}),a&&a.currentChanged.connect(y),e.restored.then((()=>{y()})),p;function y(){var n;let l=e.shell.currentWidget;if(!l)return;let a=p.get(l);a||(a=null!==(n=o.getModel(l,m))&&void 0!==n?n:null,a&&p.add(l,a),l.disposed.connect((()=>{null==a||a.dispose()}))),g.model&&(g.model.headingsChanged.disconnect(T),g.model.collapseChanged.disconnect(T)),g.model=a,g.model&&(g.model.headingsChanged.connect(T),g.model.collapseChanged.connect(T)),e.commands.notifyCommandChanged(t.displayNumbering),e.commands.notifyCommandChanged(t.toggleCollapse)}function T(){e.commands.notifyCommandChanged(t.toggleCollapse)}}},c=[r,u]}}]);
|
notebook/static/6256.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6256],{86256:(e,n,o)=>{o.r(n),o.d(n,{default:()=>S});var t=o(17260),r=o(98244),l=o(69319),s=o(7267),a=o(57978),c=o(96795),i=o(78353),d=o(59012),u=o(8627),p=o(80864),m=o(42539),C=o(70397),g=o(33625),v=o(20998),h=o(2549),f=o(14421);const b={id:"@jupyterlab/console-extension:foreign",description:"Add foreign handler of IOPub messages to the console.",requires:[a.IConsoleTracker,p.ISettingRegistry,m.ITranslator],optional:[r.ICommandPalette],activate:function(e,n,o,t,r){const l=t.load("jupyterlab"),{shell:s}=e;n.widgetAdded.connect(((e,n)=>{const t=n.console,r=new a.ForeignHandler({sessionContext:t.sessionContext,parent:t});k.foreignHandlerProperty.set(t,r),o.get("@jupyterlab/console-extension:tracker","showAllKernelActivity").then((({composite:e})=>{const n=e;r.enabled=n})),t.disposed.connect((()=>{r.dispose()}))}));const{commands:c}=e,i=l.__("Console"),d="console:toggle-show-all-kernel-activity";c.addCommand(d,{label:e=>l.__("Show All Kernel Activity"),execute:e=>{const o=function(e){const o=n.currentWidget;return!1!==e.activate&&o&&s.activateById(o.id),o}(e);if(!o)return;const t=k.foreignHandlerProperty.get(o.console);t&&(t.enabled=!t.enabled)},isToggled:()=>{var e;return null!==n.currentWidget&&!!(null===(e=k.foreignHandlerProperty.get(n.currentWidget.console))||void 0===e?void 0:e.enabled)},isEnabled:()=>null!==n.currentWidget&&n.currentWidget===s.currentWidget}),r&&r.addItem({command:d,category:i,args:{isPalette:!0}})},autoStart:!0},y=b;var k,_;!function(e){e.foreignHandlerProperty=new f.AttachedProperty({name:"foreignHandler",create:()=>{}})}(k||(k={})),function(e){e.autoClosingBrackets="console:toggle-autoclosing-brackets",e.create="console:create",e.clear="console:clear",e.runUnforced="console:run-unforced",e.runForced="console:run-forced",e.linebreak="console:linebreak",e.interrupt="console:interrupt-kernel",e.restart="console:restart-kernel",e.closeAndShutdown="console:close-and-shutdown",e.open="console:open",e.inject="console:inject",e.changeKernel="console:change-kernel",e.getKernel="console:get-kernel",e.enterToExecute="console:enter-to-execute",e.shiftEnterToExecute="console:shift-enter-to-execute",e.interactionMode="console:interaction-mode",e.replaceSelection="console:replace-selection",e.shutdown="console:shutdown",e.invokeCompleter="completer:invoke-console",e.selectCompleter="completer:select-console"}(_||(_={}));const x={id:"@jupyterlab/console-extension:tracker",description:"Provides the console widget tracker.",provides:a.IConsoleTracker,requires:[a.ConsolePanel.IContentFactory,l.IEditorServices,u.IRenderMimeRegistry,p.ISettingRegistry],optional:[t.ILayoutRestorer,c.IDefaultFileBrowser,d.IMainMenu,r.ICommandPalette,i.ILauncher,t.ILabStatus,r.ISessionContextDialogs,C.IFormRendererRegistry,m.ITranslator],activate:async function(e,n,o,t,l,s,c,i,d,u,p,f,b,y){const k=null!=y?y:m.nullTranslator,x=k.load("jupyterlab"),w=e.serviceManager,{commands:I,shell:E}=e,S=x.__("Console"),P=null!=f?f:new r.SessionContextDialogs({translator:k}),M=new r.WidgetTracker({namespace:"console"});async function j(e){var r,s;await w.ready;const c=new a.ConsolePanel({manager:w,contentFactory:n,mimeTypeService:o.mimeTypeService,rendermime:t,sessionDialogs:P,translator:k,setBusy:null!==(r=p&&(()=>p.setBusy()))&&void 0!==r?r:void 0,...e}),i=(await l.get("@jupyterlab/console-extension:tracker","interactionMode")).composite;return c.console.node.dataset.jpInteractionMode=i,await M.add(c),c.sessionContext.propertyChanged.connect((()=>{M.save(c)})),E.add(c,"main",{ref:e.ref,mode:e.insertMode,activate:!1!==e.activate,type:null!==(s=e.type)&&void 0!==s?s:"Console"}),c}s&&s.restore(M,{command:_.create,args:e=>{const{path:n,name:o,kernelPreference:t}=e.console.sessionContext;return{path:n,name:o,kernelPreference:{...t}}},name:e=>{var n;return null!==(n=e.console.sessionContext.path)&&void 0!==n?n:v.UUID.uuid4()},when:w.ready}),u&&w.ready.then((()=>{let e=null;const n=()=>{e&&(e.dispose(),e=null);const n=w.kernelspecs.specs;if(n){e=new h.DisposableSet;for(const o in n.kernelspecs){const t=o===n.default?0:1/0,r=n.kernelspecs[o],l=r.resources["logo-svg"]||r.resources["logo-64x64"];e.add(u.add({command:_.create,args:{isLauncher:!0,kernelPreference:{name:o}},category:x.__("Console"),rank:t,kernelIconUrl:l,metadata:{kernel:v.JSONExt.deepCopy(r.metadata||{})}}))}}};n(),w.kernelspecs.specsChanged.connect(n)}));const T="@jupyterlab/console-extension:tracker";let A,K={};async function B(e){A=(await l.get(T,"interactionMode")).composite,K=(await l.get(T,"promptCellConfig")).composite;const n=e=>{var n,o;e.console.node.dataset.jpInteractionMode=A,e.console.editorConfig=K,null===(o=null===(n=e.console.promptCell)||void 0===n?void 0:n.editor)||void 0===o||o.setOptions(K)};e?n(e):M.forEach(n)}if(l.pluginChanged.connect(((e,n)=>{n===T&&B()})),await B(),b){const e=b.getRenderer("@jupyterlab/codemirror-extension:plugin.defaultConfig");e&&b.addRenderer("@jupyterlab/console-extension:tracker.promptCellConfig",e)}function R(){return null!==M.currentWidget&&M.currentWidget===E.currentWidget}M.widgetAdded.connect(((e,n)=>{B(n)})),I.addCommand(_.autoClosingBrackets,{execute:async e=>{var n;K.autoClosingBrackets=!!(null!==(n=e.force)&&void 0!==n?n:!K.autoClosingBrackets),await l.set(T,"promptCellConfig",K)},label:x.__("Auto Close Brackets for Code Console Prompt"),isToggled:()=>K.autoClosingBrackets});let U=_.open;function W(e){const n=M.currentWidget;return!1!==e.activate&&n&&E.activateById(n.id),null!=n?n:null}I.addCommand(U,{label:x.__("Open a console for the provided `path`."),execute:e=>{const n=e.path,o=M.find((e=>{var o;return(null===(o=e.console.sessionContext.session)||void 0===o?void 0:o.path)===n}));return o?(!1!==e.activate&&E.activateById(o.id),o):w.ready.then((()=>(0,g.find)(w.sessions.running(),(e=>e.path===n))?j(e):Promise.reject(`No running kernel session for path: ${n}`)))}}),U=_.create,I.addCommand(U,{label:e=>{var n,o,t,r;if(e.isPalette)return x.__("New Console");if(e.isLauncher&&e.kernelPreference){const l=e.kernelPreference;return null!==(r=null===(t=null===(o=null===(n=w.kernelspecs)||void 0===n?void 0:n.specs)||void 0===o?void 0:o.kernelspecs[l.name||""])||void 0===t?void 0:t.display_name)&&void 0!==r?r:""}return x.__("Console")},icon:e=>e.isPalette?void 0:C.consoleIcon,execute:e=>{var n;return j({basePath:null!==(n=e.basePath||e.cwd||(null==c?void 0:c.model.path))&&void 0!==n?n:"",...e})}}),I.addCommand(_.clear,{label:x.__("Clear Console Cells"),execute:e=>{const n=W(e);n&&n.console.clear()},isEnabled:R}),I.addCommand(_.runUnforced,{label:x.__("Run Cell (unforced)"),execute:e=>{const n=W(e);if(n)return n.console.execute()},isEnabled:R}),I.addCommand(_.runForced,{label:x.__("Run Cell (forced)"),execute:e=>{const n=W(e);if(n)return n.console.execute(!0)},isEnabled:R}),I.addCommand(_.linebreak,{label:x.__("Insert Line Break"),execute:e=>{const n=W(e);n&&n.console.insertLinebreak()},isEnabled:R}),I.addCommand(_.replaceSelection,{label:x.__("Replace Selection in Console"),execute:e=>{const n=W(e);if(!n)return;const o=e.text||"";n.console.replaceSelection(o)},isEnabled:R}),I.addCommand(_.interrupt,{label:x.__("Interrupt Kernel"),execute:e=>{var n;const o=W(e);if(!o)return;const t=null===(n=o.console.sessionContext.session)||void 0===n?void 0:n.kernel;return t?t.interrupt():void 0},isEnabled:R}),I.addCommand(_.restart,{label:x.__("Restart Kernel…"),execute:e=>{const n=W(e);if(n)return P.restart(n.console.sessionContext)},isEnabled:R}),I.addCommand(_.shutdown,{label:x.__("Shut Down"),execute:e=>{const n=W(e);if(n)return n.console.sessionContext.shutdown()}}),I.addCommand(_.closeAndShutdown,{label:x.__("Close and Shut Down…"),execute:e=>{const n=W(e);if(n)return(0,r.showDialog)({title:x.__("Shut down the console?"),body:x.__('Are you sure you want to close "%1"?',n.title.label),buttons:[r.Dialog.cancelButton({ariaLabel:x.__("Cancel console Shut Down")}),r.Dialog.warnButton({ariaLabel:x.__("Confirm console Shut Down")})]}).then((e=>!!e.button.accept&&I.execute(_.shutdown,{activate:!1}).then((()=>(n.dispose(),!0)))))},isEnabled:R}),I.addCommand(_.inject,{label:x.__("Inject some code in a console."),execute:e=>{const n=e.path;M.find((o=>{var t;return(null===(t=o.console.sessionContext.session)||void 0===t?void 0:t.path)===n&&(!1!==e.activate&&E.activateById(o.id),o.console.inject(e.code,e.metadata),!0)}))},isEnabled:R}),I.addCommand(_.changeKernel,{label:x.__("Change Kernel…"),execute:e=>{const n=W(e);if(n)return P.selectKernel(n.console.sessionContext)},isEnabled:R}),I.addCommand(_.getKernel,{label:x.__("Get Kernel"),execute:e=>{var n;const o=W({activate:!1,...e});if(o)return null===(n=o.sessionContext.session)||void 0===n?void 0:n.kernel},isEnabled:R}),d&&[_.create,_.linebreak,_.clear,_.runUnforced,_.runForced,_.restart,_.interrupt,_.changeKernel,_.closeAndShutdown].forEach((e=>{d.addItem({command:e,category:S,args:{isPalette:!0}})})),i&&(i.fileMenu.closeAndCleaners.add({id:_.closeAndShutdown,isEnabled:R}),i.kernelMenu.kernelUsers.changeKernel.add({id:_.changeKernel,isEnabled:R}),i.kernelMenu.kernelUsers.clearWidget.add({id:_.clear,isEnabled:R}),i.kernelMenu.kernelUsers.interruptKernel.add({id:_.interrupt,isEnabled:R}),i.kernelMenu.kernelUsers.restartKernel.add({id:_.restart,isEnabled:R}),i.kernelMenu.kernelUsers.shutdownKernel.add({id:_.shutdown,isEnabled:R}),i.runMenu.codeRunners.run.add({id:_.runForced,isEnabled:R}),i.editMenu.clearers.clearCurrent.add({id:_.clear,isEnabled:R}),i.helpMenu.getKernel.add({id:_.getKernel,isEnabled:R}));const D={notebook:x.__("Execute with Shift+Enter"),terminal:x.__("Execute with Enter")};return I.addCommand(_.interactionMode,{label:e=>{var n;return null!==(n=D[e.interactionMode])&&void 0!==n?n:"Set the console interaction mode."},execute:async e=>{try{await l.set(T,"interactionMode",e.interactionMode)}catch(e){console.error(`Failed to set ${T}:keyMap - ${e.message}`)}},isToggled:e=>e.interactionMode===A}),M},autoStart:!0},w={id:"@jupyterlab/console-extension:factory",description:"Provides the console widget content factory.",provides:a.ConsolePanel.IContentFactory,requires:[l.IEditorServices],autoStart:!0,activate:(e,n)=>{const o=n.factoryService.newInlineEditor;return new a.ConsolePanel.ContentFactory({editorFactory:o})}},I={id:"@jupyterlab/console-extension:kernel-status",description:"Adds the console to the kernel status indicator model.",autoStart:!0,requires:[a.IConsoleTracker,r.IKernelStatusModel],activate:(e,n,o)=>{o.addSessionProvider((e=>e&&n.has(e)?e.sessionContext:null))}},E={id:"@jupyterlab/console-extension:cursor-position",description:"Adds the console to the code editor cursor position model.",autoStart:!0,requires:[a.IConsoleTracker,l.IPositionModel],activate:(e,n,o)=>{let t=null;o.addEditorProvider((async e=>{let r=null;if(e!==t){if(null==t||t.console.promptCellCreated.disconnect(o.update),t=null,e&&n.has(e)){e.console.promptCellCreated.connect(o.update);const n=e.console.promptCell;r=null,n&&(await n.ready,r=n.editor),t=e}}else if(e){const n=e.console.promptCell;r=null,n&&(await n.ready,r=n.editor)}return r}))}},S=[w,x,y,I,E,{id:"@jupyterlab/console-extension:completer",description:"Adds completion to the console.",autoStart:!0,requires:[a.IConsoleTracker],optional:[s.ICompletionProviderManager,m.ITranslator,r.ISanitizer],activate:function(e,n,o,t,l){if(!o)return;const s=(null!=t?t:m.nullTranslator).load("jupyterlab"),a=null!=l?l:new r.Sanitizer;e.commands.addCommand(_.invokeCompleter,{label:s.__("Display the completion helper."),execute:()=>{const e=n.currentWidget&&n.currentWidget.id;if(e)return o.invoke(e)}}),e.commands.addCommand(_.selectCompleter,{label:s.__("Select the completion suggestion."),execute:()=>{const e=n.currentWidget&&n.currentWidget.id;if(e)return o.select(e)}}),e.commands.addKeyBinding({command:_.selectCompleter,keys:["Enter"],selector:".jp-ConsolePanel .jp-mod-completer-active"});const c=async(e,n)=>{var t,r;const l={editor:null!==(r=null===(t=n.console.promptCell)||void 0===t?void 0:t.editor)&&void 0!==r?r:null,session:n.console.sessionContext.session,widget:n};await o.updateCompleter(l),n.console.promptCellCreated.connect(((e,t)=>{const r={editor:t.editor,session:e.sessionContext.session,widget:n,sanitzer:a};o.updateCompleter(r).catch(console.error)})),n.console.sessionContext.sessionChanged.connect((()=>{var e,t;const r={editor:null!==(t=null===(e=n.console.promptCell)||void 0===e?void 0:e.editor)&&void 0!==t?t:null,session:n.console.sessionContext.session,widget:n,sanitizer:a};o.updateCompleter(r).catch(console.error)}))};n.widgetAdded.connect(c),o.activeProvidersChanged.connect((()=>{n.forEach((e=>{c(0,e).catch((e=>console.error(e)))}))}))}}]}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6256],{86256:(e,n,o)=>{o.r(n),o.d(n,{default:()=>S});var t=o(49880),r=o(57797),l=o(2749),s=o(65538),a=o(1879),i=o(97655),d=o(87098),c=o(34127),u=o(56761),p=o(6312),m=o(11523),C=o(52018),v=o(33625),g=o(20998),h=o(2549),b=o(14421);const f={id:"@jupyterlab/console-extension:foreign",description:"Add foreign handler of IOPub messages to the console.",requires:[a.IConsoleTracker,p.ISettingRegistry,m.ITranslator],optional:[r.ICommandPalette],activate:function(e,n,o,t,r){const l=t.load("jupyterlab"),{shell:s}=e;n.widgetAdded.connect(((e,n)=>{const t=n.console,r=new a.ForeignHandler({sessionContext:t.sessionContext,parent:t});k.foreignHandlerProperty.set(t,r),o.get("@jupyterlab/console-extension:tracker","showAllKernelActivity").then((({composite:e})=>{const n=e;r.enabled=n})),t.disposed.connect((()=>{r.dispose()}))}));const{commands:i}=e,d=l.__("Console"),c="console:toggle-show-all-kernel-activity";i.addCommand(c,{label:e=>l.__("Show All Kernel Activity"),execute:e=>{const o=function(e){const o=n.currentWidget;return!1!==e.activate&&o&&s.activateById(o.id),o}(e);if(!o)return;const t=k.foreignHandlerProperty.get(o.console);t&&(t.enabled=!t.enabled)},isToggled:()=>{var e;return null!==n.currentWidget&&!!(null===(e=k.foreignHandlerProperty.get(n.currentWidget.console))||void 0===e?void 0:e.enabled)},isEnabled:()=>null!==n.currentWidget&&n.currentWidget===s.currentWidget}),r&&r.addItem({command:c,category:d,args:{isPalette:!0}})},autoStart:!0},y=f;var k,_;!function(e){e.foreignHandlerProperty=new b.AttachedProperty({name:"foreignHandler",create:()=>{}})}(k||(k={})),function(e){e.autoClosingBrackets="console:toggle-autoclosing-brackets",e.create="console:create",e.clear="console:clear",e.runUnforced="console:run-unforced",e.runForced="console:run-forced",e.linebreak="console:linebreak",e.interrupt="console:interrupt-kernel",e.restart="console:restart-kernel",e.closeAndShutdown="console:close-and-shutdown",e.open="console:open",e.inject="console:inject",e.changeKernel="console:change-kernel",e.getKernel="console:get-kernel",e.enterToExecute="console:enter-to-execute",e.shiftEnterToExecute="console:shift-enter-to-execute",e.interactionMode="console:interaction-mode",e.redo="console:redo",e.replaceSelection="console:replace-selection",e.shutdown="console:shutdown",e.undo="console:undo",e.invokeCompleter="completer:invoke-console",e.selectCompleter="completer:select-console"}(_||(_={}));const x={id:"@jupyterlab/console-extension:tracker",description:"Provides the console widget tracker.",provides:a.IConsoleTracker,requires:[a.ConsolePanel.IContentFactory,l.IEditorServices,u.IRenderMimeRegistry,p.ISettingRegistry],optional:[t.ILayoutRestorer,i.IDefaultFileBrowser,c.IMainMenu,r.ICommandPalette,d.ILauncher,t.ILabStatus,r.ISessionContextDialogs,C.IFormRendererRegistry,m.ITranslator],activate:async function(e,n,o,t,l,s,i,d,c,u,p,b,f,y){const k=null!=y?y:m.nullTranslator,x=k.load("jupyterlab"),w=e.serviceManager,{commands:I,shell:E}=e,S=x.__("Console"),P=null!=b?b:new r.SessionContextDialogs({translator:k}),M=new r.WidgetTracker({namespace:"console"});async function j(e){var r,s;await w.ready;const i=new a.ConsolePanel({manager:w,contentFactory:n,mimeTypeService:o.mimeTypeService,rendermime:t,sessionDialogs:P,translator:k,setBusy:null!==(r=p&&(()=>p.setBusy()))&&void 0!==r?r:void 0,...e}),d=(await l.get("@jupyterlab/console-extension:tracker","interactionMode")).composite;return i.console.node.dataset.jpInteractionMode=d,await M.add(i),i.sessionContext.propertyChanged.connect((()=>{M.save(i)})),E.add(i,"main",{ref:e.ref,mode:e.insertMode,activate:!1!==e.activate,type:null!==(s=e.type)&&void 0!==s?s:"Console"}),i}s&&s.restore(M,{command:_.create,args:e=>{const{path:n,name:o,kernelPreference:t}=e.console.sessionContext;return{path:n,name:o,kernelPreference:{...t}}},name:e=>{var n;return null!==(n=e.console.sessionContext.path)&&void 0!==n?n:g.UUID.uuid4()},when:w.ready}),u&&w.ready.then((()=>{let e=null;const n=()=>{e&&(e.dispose(),e=null);const n=w.kernelspecs.specs;if(n){e=new h.DisposableSet;for(const o in n.kernelspecs){const t=o===n.default?0:1/0,r=n.kernelspecs[o],l=r.resources["logo-svg"]||r.resources["logo-64x64"];e.add(u.add({command:_.create,args:{isLauncher:!0,kernelPreference:{name:o}},category:x.__("Console"),rank:t,kernelIconUrl:l,metadata:{kernel:g.JSONExt.deepCopy(r.metadata||{})}}))}}};n(),w.kernelspecs.specsChanged.connect(n)}));const T="@jupyterlab/console-extension:tracker";let A,K={};async function R(e){A=(await l.get(T,"interactionMode")).composite,K=(await l.get(T,"promptCellConfig")).composite;const n=e=>{var n,o;e.console.node.dataset.jpInteractionMode=A,e.console.editorConfig=K,null===(o=null===(n=e.console.promptCell)||void 0===n?void 0:n.editor)||void 0===o||o.setOptions(K)};e?n(e):M.forEach(n)}if(l.pluginChanged.connect(((e,n)=>{n===T&&R()})),await R(),f){const e=f.getRenderer("@jupyterlab/codemirror-extension:plugin.defaultConfig");e&&f.addRenderer("@jupyterlab/console-extension:tracker.promptCellConfig",e)}function B(){return null!==M.currentWidget&&M.currentWidget===E.currentWidget}M.widgetAdded.connect(((e,n)=>{R(n)})),I.addCommand(_.autoClosingBrackets,{execute:async e=>{var n;K.autoClosingBrackets=!!(null!==(n=e.force)&&void 0!==n?n:!K.autoClosingBrackets),await l.set(T,"promptCellConfig",K)},label:x.__("Auto Close Brackets for Code Console Prompt"),isToggled:()=>K.autoClosingBrackets});let U=_.open;function W(e){const n=M.currentWidget;return!1!==e.activate&&n&&E.activateById(n.id),null!=n?n:null}I.addCommand(U,{label:x.__("Open a console for the provided `path`."),execute:e=>{const n=e.path,o=M.find((e=>{var o;return(null===(o=e.console.sessionContext.session)||void 0===o?void 0:o.path)===n}));return o?(!1!==e.activate&&E.activateById(o.id),o):w.ready.then((()=>(0,v.find)(w.sessions.running(),(e=>e.path===n))?j(e):Promise.reject(`No running kernel session for path: ${n}`)))}}),U=_.create,I.addCommand(U,{label:e=>{var n,o,t,r;if(e.isPalette)return x.__("New Console");if(e.isLauncher&&e.kernelPreference){const l=e.kernelPreference;return null!==(r=null===(t=null===(o=null===(n=w.kernelspecs)||void 0===n?void 0:n.specs)||void 0===o?void 0:o.kernelspecs[l.name||""])||void 0===t?void 0:t.display_name)&&void 0!==r?r:""}return x.__("Console")},icon:e=>e.isPalette?void 0:C.consoleIcon,execute:e=>{var n;return j({basePath:null!==(n=e.basePath||e.cwd||(null==i?void 0:i.model.path))&&void 0!==n?n:"",...e})}}),I.addCommand(_.undo,{execute:e=>{var n;const o=W(e);if(!o)return;const t=null===(n=o.console.promptCell)||void 0===n?void 0:n.editor;t&&t.undo()},isEnabled:e=>{var n,o,t;if(!B())return!1;const r=null===(t=null===(o=null===(n=W(e))||void 0===n?void 0:n.console)||void 0===o?void 0:o.promptCell)||void 0===t?void 0:t.editor;return!!r&&r.model.sharedModel.canUndo()},icon:C.undoIcon.bindprops({stylesheet:"menuItem"}),label:x.__("Undo")}),I.addCommand(_.redo,{execute:e=>{var n;const o=W(e);if(!o)return;const t=null===(n=o.console.promptCell)||void 0===n?void 0:n.editor;t&&t.redo()},isEnabled:e=>{var n,o,t;if(!B())return!1;const r=null===(t=null===(o=null===(n=W(e))||void 0===n?void 0:n.console)||void 0===o?void 0:o.promptCell)||void 0===t?void 0:t.editor;return!!r&&r.model.sharedModel.canRedo()},icon:C.redoIcon.bindprops({stylesheet:"menuItem"}),label:x.__("Redo")}),I.addCommand(_.clear,{label:x.__("Clear Console Cells"),execute:e=>{const n=W(e);n&&n.console.clear()},isEnabled:B}),I.addCommand(_.runUnforced,{label:x.__("Run Cell (unforced)"),execute:e=>{const n=W(e);if(n)return n.console.execute()},isEnabled:B}),I.addCommand(_.runForced,{label:x.__("Run Cell (forced)"),execute:e=>{const n=W(e);if(n)return n.console.execute(!0)},isEnabled:B}),I.addCommand(_.linebreak,{label:x.__("Insert Line Break"),execute:e=>{const n=W(e);n&&n.console.insertLinebreak()},isEnabled:B}),I.addCommand(_.replaceSelection,{label:x.__("Replace Selection in Console"),execute:e=>{const n=W(e);if(!n)return;const o=e.text||"";n.console.replaceSelection(o)},isEnabled:B}),I.addCommand(_.interrupt,{label:x.__("Interrupt Kernel"),execute:e=>{var n;const o=W(e);if(!o)return;const t=null===(n=o.console.sessionContext.session)||void 0===n?void 0:n.kernel;return t?t.interrupt():void 0},isEnabled:B}),I.addCommand(_.restart,{label:x.__("Restart Kernel…"),execute:e=>{const n=W(e);if(n)return P.restart(n.console.sessionContext)},isEnabled:B}),I.addCommand(_.shutdown,{label:x.__("Shut Down"),execute:e=>{const n=W(e);if(n)return n.console.sessionContext.shutdown()}}),I.addCommand(_.closeAndShutdown,{label:x.__("Close and Shut Down…"),execute:e=>{const n=W(e);if(n)return(0,r.showDialog)({title:x.__("Shut down the console?"),body:x.__('Are you sure you want to close "%1"?',n.title.label),buttons:[r.Dialog.cancelButton({ariaLabel:x.__("Cancel console Shut Down")}),r.Dialog.warnButton({ariaLabel:x.__("Confirm console Shut Down")})]}).then((e=>!!e.button.accept&&I.execute(_.shutdown,{activate:!1}).then((()=>(n.dispose(),!0)))))},isEnabled:B}),I.addCommand(_.inject,{label:x.__("Inject some code in a console."),execute:e=>{const n=e.path;M.find((o=>{var t;return(null===(t=o.console.sessionContext.session)||void 0===t?void 0:t.path)===n&&(!1!==e.activate&&E.activateById(o.id),o.console.inject(e.code,e.metadata),!0)}))},isEnabled:B}),I.addCommand(_.changeKernel,{label:x.__("Change Kernel…"),execute:e=>{const n=W(e);if(n)return P.selectKernel(n.console.sessionContext)},isEnabled:B}),I.addCommand(_.getKernel,{label:x.__("Get Kernel"),execute:e=>{var n;const o=W({activate:!1,...e});if(o)return null===(n=o.sessionContext.session)||void 0===n?void 0:n.kernel},isEnabled:B}),c&&[_.create,_.linebreak,_.clear,_.runUnforced,_.runForced,_.restart,_.interrupt,_.changeKernel,_.closeAndShutdown].forEach((e=>{c.addItem({command:e,category:S,args:{isPalette:!0}})})),d&&(d.fileMenu.closeAndCleaners.add({id:_.closeAndShutdown,isEnabled:B}),d.kernelMenu.kernelUsers.changeKernel.add({id:_.changeKernel,isEnabled:B}),d.kernelMenu.kernelUsers.clearWidget.add({id:_.clear,isEnabled:B}),d.kernelMenu.kernelUsers.interruptKernel.add({id:_.interrupt,isEnabled:B}),d.kernelMenu.kernelUsers.restartKernel.add({id:_.restart,isEnabled:B}),d.kernelMenu.kernelUsers.shutdownKernel.add({id:_.shutdown,isEnabled:B}),d.runMenu.codeRunners.run.add({id:_.runForced,isEnabled:B}),d.editMenu.clearers.clearCurrent.add({id:_.clear,isEnabled:B}),d.editMenu.undoers.redo.add({id:_.redo,isEnabled:B}),d.editMenu.undoers.undo.add({id:_.undo,isEnabled:B}),d.helpMenu.getKernel.add({id:_.getKernel,isEnabled:B}));const D={notebook:x.__("Execute with Shift+Enter"),terminal:x.__("Execute with Enter")};return I.addCommand(_.interactionMode,{label:e=>{var n;return null!==(n=D[e.interactionMode])&&void 0!==n?n:"Set the console interaction mode."},execute:async e=>{try{await l.set(T,"interactionMode",e.interactionMode)}catch(e){console.error(`Failed to set ${T}:keyMap - ${e.message}`)}},isToggled:e=>e.interactionMode===A}),M},autoStart:!0},w={id:"@jupyterlab/console-extension:factory",description:"Provides the console widget content factory.",provides:a.ConsolePanel.IContentFactory,requires:[l.IEditorServices],autoStart:!0,activate:(e,n)=>{const o=n.factoryService.newInlineEditor;return new a.ConsolePanel.ContentFactory({editorFactory:o})}},I={id:"@jupyterlab/console-extension:kernel-status",description:"Adds the console to the kernel status indicator model.",autoStart:!0,requires:[a.IConsoleTracker,r.IKernelStatusModel],activate:(e,n,o)=>{o.addSessionProvider((e=>e&&n.has(e)?e.sessionContext:null))}},E={id:"@jupyterlab/console-extension:cursor-position",description:"Adds the console to the code editor cursor position model.",autoStart:!0,requires:[a.IConsoleTracker,l.IPositionModel],activate:(e,n,o)=>{let t=null;o.addEditorProvider((async e=>{let r=null;if(e!==t){if(null==t||t.console.promptCellCreated.disconnect(o.update),t=null,e&&n.has(e)){e.console.promptCellCreated.connect(o.update);const n=e.console.promptCell;r=null,n&&(await n.ready,r=n.editor),t=e}}else if(e){const n=e.console.promptCell;r=null,n&&(await n.ready,r=n.editor)}return r}))}},S=[w,x,y,I,E,{id:"@jupyterlab/console-extension:completer",description:"Adds completion to the console.",autoStart:!0,requires:[a.IConsoleTracker],optional:[s.ICompletionProviderManager,m.ITranslator,r.ISanitizer],activate:function(e,n,o,t,l){if(!o)return;const s=(null!=t?t:m.nullTranslator).load("jupyterlab"),a=null!=l?l:new r.Sanitizer;e.commands.addCommand(_.invokeCompleter,{label:s.__("Display the completion helper."),execute:()=>{const e=n.currentWidget&&n.currentWidget.id;if(e)return o.invoke(e)}}),e.commands.addCommand(_.selectCompleter,{label:s.__("Select the completion suggestion."),execute:()=>{const e=n.currentWidget&&n.currentWidget.id;if(e)return o.select(e)}}),e.commands.addKeyBinding({command:_.selectCompleter,keys:["Enter"],selector:".jp-ConsolePanel .jp-mod-completer-active"});const i=async(e,n)=>{var t,r;const l={editor:null!==(r=null===(t=n.console.promptCell)||void 0===t?void 0:t.editor)&&void 0!==r?r:null,session:n.console.sessionContext.session,widget:n};await o.updateCompleter(l),n.console.promptCellCreated.connect(((e,t)=>{const r={editor:t.editor,session:e.sessionContext.session,widget:n,sanitzer:a};o.updateCompleter(r).catch(console.error)})),n.console.sessionContext.sessionChanged.connect((()=>{var e,t;const r={editor:null!==(t=null===(e=n.console.promptCell)||void 0===e?void 0:e.editor)&&void 0!==t?t:null,session:n.console.sessionContext.session,widget:n,sanitizer:a};o.updateCompleter(r).catch(console.error)}))};n.widgetAdded.connect(i),o.activeProvidersChanged.connect((()=>{n.forEach((e=>{i(0,e).catch((e=>console.error(e)))}))}))}}]}}]);
|
notebook/static/6281.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6281],{81779:(e,t,n)=>{n.d(t,{c:()=>l});var r=n(52307),i=n(47853);const a=function(e){return(0,i.Z)(e,4)};var d=n(12930);function l(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:o(e),edges:s(e)};return r.Z(e.graph())||(t.value=a(e.graph())),t}function o(e){return d.Z(e.nodes(),(function(t){var n=e.node(t),i=e.parent(t),a={v:t};return r.Z(n)||(a.value=n),r.Z(i)||(a.parent=i),a}))}function s(e){return d.Z(e.edges(),(function(t){var n=e.edge(t),i={v:t.v,w:t.w};return r.Z(t.name)||(i.name=t.name),r.Z(n)||(i.value=n),i}))}n(7303)},86281:(e,t,n)=>{n.d(t,{r:()=>N});var r=n(7259),i=n(81779),a=n(98443),d=n(24028),l=n(67406),o=n(14780),s=n(23617);let c={},h={},g={};const f=(e,t)=>(d.l.trace("In isDecendant",t," ",e," = ",h[t].includes(e)),!!h[t].includes(e)),u=(e,t,n,r)=>{d.l.warn("Copying children of ",e,"root",r,"data",t.node(e),r);const i=t.children(e)||[];e!==r&&i.push(e),d.l.warn("Copying (nodes) clusterId",e,"nodes",i),i.forEach((i=>{if(t.children(i).length>0)u(i,t,n,r);else{const a=t.node(i);d.l.info("cp ",i," to ",r," with parent ",e),n.setNode(i,a),r!==t.parent(i)&&(d.l.warn("Setting parent",i,t.parent(i)),n.setParent(i,t.parent(i))),e!==r&&i!==e?(d.l.debug("Setting parent",i,e),n.setParent(i,e)):(d.l.info("In copy ",e,"root",r,"data",t.node(e),r),d.l.debug("Not Setting parent for node=",i,"cluster!==rootId",e!==r,"node!==clusterId",i!==e));const l=t.edges(i);d.l.debug("Copying Edges",l),l.forEach((i=>{d.l.info("Edge",i);const a=t.edge(i.v,i.w,i.name);d.l.info("Edge data",a,r);try{((e,t)=>(d.l.info("Decendants of ",t," is ",h[t]),d.l.info("Edge is ",e),e.v!==t&&e.w!==t&&(h[t]?h[t].includes(e.v)||f(e.v,t)||f(e.w,t)||h[t].includes(e.w):(d.l.debug("Tilt, ",t,",not in decendants"),!1))))(i,r)?(d.l.info("Copying as ",i.v,i.w,a,i.name),n.setEdge(i.v,i.w,a,i.name),d.l.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):d.l.info("Skipping copy of edge ",i.v,"--\x3e",i.w," rootId: ",r," clusterId:",e)}catch(e){d.l.error(e)}}))}d.l.debug("Removing node",i),t.removeNode(i)}))},w=(e,t)=>{const n=t.children(e);let r=[...n];for(const i of n)g[i]=e,r=[...r,...w(i,t)];return r},p=(e,t)=>{d.l.trace("Searching",e);const n=t.children(e);if(d.l.trace("Searching children of id ",e,n),n.length<1)return d.l.trace("This is a valid node",e),e;for(const r of n){const n=p(r,t);if(n)return d.l.trace("Found replacement for",e," => ",n),n}},v=e=>c[e]&&c[e].externalConnections&&c[e]?c[e].id:e,y=(e,t)=>{if(d.l.warn("extractor - ",t,i.c(e),e.children("D")),t>10)return void d.l.error("Bailing out");let n=e.nodes(),r=!1;for(const t of n){const n=e.children(t);r=r||n.length>0}if(r){d.l.debug("Nodes = ",n,t);for(const r of n)if(d.l.debug("Extracting node",r,c,c[r]&&!c[r].externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",t),c[r])if(!c[r].externalConnections&&e.children(r)&&e.children(r).length>0){d.l.warn("Cluster without external connections, without a parent and with children",r,t);let n="TB"===e.graph().rankdir?"LR":"TB";c[r]&&c[r].clusterData&&c[r].clusterData.dir&&(n=c[r].clusterData.dir,d.l.warn("Fixing dir",c[r].clusterData.dir,n));const a=new l.k({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));d.l.warn("Old graph before copy",i.c(e)),u(r,e,a,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:c[r].clusterData,labelText:c[r].labelText,graph:a}),d.l.warn("New graph after copy node: (",r,")",i.c(a)),d.l.debug("Old graph after copy",i.c(e))}else d.l.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!c[r].externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),t),d.l.debug(c);else d.l.debug("Not a cluster",r,t);n=e.nodes(),d.l.warn("New list of nodes",n);for(const r of n){const n=e.node(r);d.l.warn(" Now next level",r,n),n.clusterNode&&y(n.graph,t+1)}}else d.l.debug("Done, no node has children",e.nodes())},m=(e,t)=>{if(0===t.length)return[];let n=Object.assign(t);return t.forEach((t=>{const r=e.children(t),i=m(e,r);n=[...n,...i]})),n},x={rect:(e,t)=>{d.l.info("Creating subgraph rect for ",t.id,t);const n=e.insert("g").attr("class","cluster"+(t.class?" "+t.class:"")).attr("id",t.id),r=n.insert("rect",":first-child"),i=(0,d.m)((0,d.c)().flowchart.htmlLabels),l=n.insert("g").attr("class","cluster-label"),c="markdown"===t.labelType?(0,o.a)(l,t.labelText,{style:t.labelStyle,useHtmlLabels:i}):l.node().appendChild((0,a.c)(t.labelText,t.labelStyle,void 0,!0));let h=c.getBBox();if((0,d.m)((0,d.c)().flowchart.htmlLabels)){const e=c.children[0],t=(0,s.Ys)(c);h=e.getBoundingClientRect(),t.attr("width",h.width),t.attr("height",h.height)}const g=0*t.padding,f=g/2,u=t.width<=h.width+g?h.width+g:t.width;t.width<=h.width+g?t.diff=(h.width-t.width)/2-t.padding/2:t.diff=-t.padding/2,d.l.trace("Data ",t,JSON.stringify(t)),r.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-u/2).attr("y",t.y-t.height/2-f).attr("width",u).attr("height",t.height+g),i?l.attr("transform","translate("+(t.x-h.width/2)+", "+(t.y-t.height/2)+")"):l.attr("transform","translate("+t.x+", "+(t.y-t.height/2)+")");const w=r.node().getBBox();return t.width=w.width,t.height=w.height,t.intersect=function(e){return(0,a.i)(t,e)},n},roundedWithTitle:(e,t)=>{const n=e.insert("g").attr("class",t.classes).attr("id",t.id),r=n.insert("rect",":first-child"),i=n.insert("g").attr("class","cluster-label"),l=n.append("rect"),o=i.node().appendChild((0,a.c)(t.labelText,t.labelStyle,void 0,!0));let c=o.getBBox();if((0,d.m)((0,d.c)().flowchart.htmlLabels)){const e=o.children[0],t=(0,s.Ys)(o);c=e.getBoundingClientRect(),t.attr("width",c.width),t.attr("height",c.height)}c=o.getBBox();const h=0*t.padding,g=h/2,f=t.width<=c.width+t.padding?c.width+t.padding:t.width;t.width<=c.width+t.padding?t.diff=(c.width+0*t.padding-t.width)/2:t.diff=-t.padding/2,r.attr("class","outer").attr("x",t.x-f/2-g).attr("y",t.y-t.height/2-g).attr("width",f+h).attr("height",t.height+h),l.attr("class","inner").attr("x",t.x-f/2-g).attr("y",t.y-t.height/2-g+c.height-1).attr("width",f+h).attr("height",t.height+h-c.height-3),i.attr("transform","translate("+(t.x-c.width/2)+", "+(t.y-t.height/2-t.padding/3+((0,d.m)((0,d.c)().flowchart.htmlLabels)?5:3))+")");const u=r.node().getBBox();return t.height=u.height,t.intersect=function(e){return(0,a.i)(t,e)},n},noteGroup:(e,t)=>{const n=e.insert("g").attr("class","note-cluster").attr("id",t.id),r=n.insert("rect",":first-child"),i=0*t.padding,d=i/2;r.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-d).attr("y",t.y-t.height/2-d).attr("width",t.width+i).attr("height",t.height+i).attr("fill","none");const l=r.node().getBBox();return t.width=l.width,t.height=l.height,t.intersect=function(e){return(0,a.i)(t,e)},n},divider:(e,t)=>{const n=e.insert("g").attr("class",t.classes).attr("id",t.id),r=n.insert("rect",":first-child"),i=0*t.padding,d=i/2;r.attr("class","divider").attr("x",t.x-t.width/2-d).attr("y",t.y-t.height/2).attr("width",t.width+i).attr("height",t.height+i);const l=r.node().getBBox();return t.width=l.width,t.height=l.height,t.diff=-t.padding/2,t.intersect=function(e){return(0,a.i)(t,e)},n}};let b={};const E=async(e,t,n,l,o)=>{d.l.info("Graph in recursive render: XXX",i.c(t),o);const s=t.graph().rankdir;d.l.trace("Dir in recursive render - dir:",s);const h=e.insert("g").attr("class","root");t.nodes()?d.l.info("Recursive render XXX",t.nodes()):d.l.info("No nodes found for",t),t.edges().length>0&&d.l.trace("Recursive edges",t.edge(t.edges()[0]));const g=h.insert("g").attr("class","clusters"),f=h.insert("g").attr("class","edgePaths"),u=h.insert("g").attr("class","edgeLabels"),w=h.insert("g").attr("class","nodes");await Promise.all(t.nodes().map((async function(e){const r=t.node(e);if(void 0!==o){const n=JSON.parse(JSON.stringify(o.clusterData));d.l.info("Setting data for cluster XXX (",e,") ",n,o),t.setNode(o.id,n),t.parent(e)||(d.l.trace("Setting parent",e,o.id),t.setParent(e,o.id,n))}if(d.l.info("(Insert) Node XXX"+e+": "+JSON.stringify(t.node(e))),r&&r.clusterNode){d.l.info("Cluster identified",e,r.width,t.node(e));const i=await E(w,r.graph,n,l,t.node(e)),o=i.elem;(0,a.u)(r,o),r.diff=i.diff||0,d.l.info("Node bounds (abc123)",e,r,r.width,r.x,r.y),(0,a.s)(o,r),d.l.warn("Recursive render complete ",o,r)}else t.children(e).length>0?(d.l.info("Cluster - the non recursive path XXX",e,r.id,r,t),d.l.info(p(r.id,t)),c[r.id]={id:p(r.id,t),node:r}):(d.l.info("Node - the non recursive path",e,r.id,r),await(0,a.e)(w,t.node(e),s))}))),t.edges().forEach((function(e){const n=t.edge(e.v,e.w,e.name);d.l.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),d.l.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(t.edge(e))),d.l.info("Fix",c,"ids:",e.v,e.w,"Translateing: ",c[e.v],c[e.w]),(0,a.f)(u,n)})),t.edges().forEach((function(e){d.l.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e))})),d.l.info("#############################################"),d.l.info("### Layout ###"),d.l.info("#############################################"),d.l.info(t),(0,r.bK)(t),d.l.info("Graph after layout:",i.c(t));let v=0;return(e=>m(e,e.children()))(t).forEach((function(e){const n=t.node(e);d.l.info("Position "+e+": "+JSON.stringify(t.node(e))),d.l.info("Position "+e+": ("+n.x,","+n.y,") width: ",n.width," height: ",n.height),n&&n.clusterNode?(0,a.p)(n):t.children(e).length>0?(((e,t)=>{d.l.trace("Inserting cluster");const n=t.shape||"rect";b[t.id]=x[n](e,t)})(g,n),c[n.id].node=n):(0,a.p)(n)})),t.edges().forEach((function(e){const r=t.edge(e);d.l.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(r),r);const i=(0,a.g)(f,e,r,c,n,t,l);(0,a.h)(r,i)})),t.nodes().forEach((function(e){const n=t.node(e);d.l.info(e,n.type,n.diff),"group"===n.type&&(v=n.diff)})),{elem:h,diff:v}},N=async(e,t,n,r,l)=>{(0,a.a)(e,n,r,l),(0,a.b)(),(0,a.d)(),b={},h={},g={},c={},d.l.warn("Graph at first:",JSON.stringify(i.c(t))),((e,t)=>{e?(d.l.debug("Opting in, graph "),e.nodes().forEach((function(t){e.children(t).length>0&&(d.l.warn("Cluster identified",t," Replacement id in edges: ",p(t,e)),h[t]=w(t,e),c[t]={id:p(t,e),clusterData:e.node(t)})})),e.nodes().forEach((function(t){const n=e.children(t),r=e.edges();n.length>0?(d.l.debug("Cluster identified",t,h),r.forEach((e=>{e.v!==t&&e.w!==t&&f(e.v,t)^f(e.w,t)&&(d.l.warn("Edge: ",e," leaves cluster ",t),d.l.warn("Decendants of XXX ",t,": ",h[t]),c[t].externalConnections=!0)}))):d.l.debug("Not a cluster ",t,h)})),e.edges().forEach((function(t){const n=e.edge(t);d.l.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),d.l.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e.edge(t)));let r=t.v,i=t.w;if(d.l.warn("Fix XXX",c,"ids:",t.v,t.w,"Translating: ",c[t.v]," --- ",c[t.w]),c[t.v]&&c[t.w]&&c[t.v]===c[t.w]){d.l.warn("Fixing and trixing link to self - removing XXX",t.v,t.w,t.name),d.l.warn("Fixing and trixing - removing XXX",t.v,t.w,t.name),r=v(t.v),i=v(t.w),e.removeEdge(t.v,t.w,t.name);const a=t.w+"---"+t.v;e.setNode(a,{domId:a,id:a,labelStyle:"",labelText:n.label,padding:0,shape:"labelRect",style:""});const l=structuredClone(n),o=structuredClone(n);l.label="",l.arrowTypeEnd="none",o.label="",l.fromCluster=t.v,o.toCluster=t.v,e.setEdge(r,a,l,t.name+"-cyclic-special"),e.setEdge(a,i,o,t.name+"-cyclic-special")}else(c[t.v]||c[t.w])&&(d.l.warn("Fixing and trixing - removing XXX",t.v,t.w,t.name),r=v(t.v),i=v(t.w),e.removeEdge(t.v,t.w,t.name),r!==t.v&&(n.fromCluster=t.v),i!==t.w&&(n.toCluster=t.w),d.l.warn("Fix Replacing with XXX",r,i,t.name),e.setEdge(r,i,n,t.name))})),d.l.warn("Adjusted Graph",i.c(e)),y(e,0),d.l.trace(c)):d.l.debug("Opting out, no graph ")})(t),d.l.warn("Graph after:",JSON.stringify(i.c(t))),await E(e,t,r,l)}}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6281],{58038:(e,t,n)=>{n.d(t,{c:()=>l});var r=n(52307),i=n(47853);const a=function(e){return(0,i.Z)(e,4)};var d=n(12930);function l(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:o(e),edges:s(e)};return r.Z(e.graph())||(t.value=a(e.graph())),t}function o(e){return d.Z(e.nodes(),(function(t){var n=e.node(t),i=e.parent(t),a={v:t};return r.Z(n)||(a.value=n),r.Z(i)||(a.parent=i),a}))}function s(e){return d.Z(e.edges(),(function(t){var n=e.edge(t),i={v:t.v,w:t.w};return r.Z(t.name)||(i.name=t.name),r.Z(n)||(i.value=n),i}))}n(7303)},86281:(e,t,n)=>{n.d(t,{r:()=>N});var r=n(7259),i=n(58038),a=n(98443),d=n(24028),l=n(67406),o=n(14780),s=n(23617);let c={},h={},g={};const f=(e,t)=>(d.l.trace("In isDecendant",t," ",e," = ",h[t].includes(e)),!!h[t].includes(e)),u=(e,t,n,r)=>{d.l.warn("Copying children of ",e,"root",r,"data",t.node(e),r);const i=t.children(e)||[];e!==r&&i.push(e),d.l.warn("Copying (nodes) clusterId",e,"nodes",i),i.forEach((i=>{if(t.children(i).length>0)u(i,t,n,r);else{const a=t.node(i);d.l.info("cp ",i," to ",r," with parent ",e),n.setNode(i,a),r!==t.parent(i)&&(d.l.warn("Setting parent",i,t.parent(i)),n.setParent(i,t.parent(i))),e!==r&&i!==e?(d.l.debug("Setting parent",i,e),n.setParent(i,e)):(d.l.info("In copy ",e,"root",r,"data",t.node(e),r),d.l.debug("Not Setting parent for node=",i,"cluster!==rootId",e!==r,"node!==clusterId",i!==e));const l=t.edges(i);d.l.debug("Copying Edges",l),l.forEach((i=>{d.l.info("Edge",i);const a=t.edge(i.v,i.w,i.name);d.l.info("Edge data",a,r);try{((e,t)=>(d.l.info("Decendants of ",t," is ",h[t]),d.l.info("Edge is ",e),e.v!==t&&e.w!==t&&(h[t]?h[t].includes(e.v)||f(e.v,t)||f(e.w,t)||h[t].includes(e.w):(d.l.debug("Tilt, ",t,",not in decendants"),!1))))(i,r)?(d.l.info("Copying as ",i.v,i.w,a,i.name),n.setEdge(i.v,i.w,a,i.name),d.l.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):d.l.info("Skipping copy of edge ",i.v,"--\x3e",i.w," rootId: ",r," clusterId:",e)}catch(e){d.l.error(e)}}))}d.l.debug("Removing node",i),t.removeNode(i)}))},w=(e,t)=>{const n=t.children(e);let r=[...n];for(const i of n)g[i]=e,r=[...r,...w(i,t)];return r},p=(e,t)=>{d.l.trace("Searching",e);const n=t.children(e);if(d.l.trace("Searching children of id ",e,n),n.length<1)return d.l.trace("This is a valid node",e),e;for(const r of n){const n=p(r,t);if(n)return d.l.trace("Found replacement for",e," => ",n),n}},v=e=>c[e]&&c[e].externalConnections&&c[e]?c[e].id:e,y=(e,t)=>{if(d.l.warn("extractor - ",t,i.c(e),e.children("D")),t>10)return void d.l.error("Bailing out");let n=e.nodes(),r=!1;for(const t of n){const n=e.children(t);r=r||n.length>0}if(r){d.l.debug("Nodes = ",n,t);for(const r of n)if(d.l.debug("Extracting node",r,c,c[r]&&!c[r].externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",t),c[r])if(!c[r].externalConnections&&e.children(r)&&e.children(r).length>0){d.l.warn("Cluster without external connections, without a parent and with children",r,t);let n="TB"===e.graph().rankdir?"LR":"TB";c[r]&&c[r].clusterData&&c[r].clusterData.dir&&(n=c[r].clusterData.dir,d.l.warn("Fixing dir",c[r].clusterData.dir,n));const a=new l.k({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));d.l.warn("Old graph before copy",i.c(e)),u(r,e,a,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:c[r].clusterData,labelText:c[r].labelText,graph:a}),d.l.warn("New graph after copy node: (",r,")",i.c(a)),d.l.debug("Old graph after copy",i.c(e))}else d.l.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!c[r].externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),t),d.l.debug(c);else d.l.debug("Not a cluster",r,t);n=e.nodes(),d.l.warn("New list of nodes",n);for(const r of n){const n=e.node(r);d.l.warn(" Now next level",r,n),n.clusterNode&&y(n.graph,t+1)}}else d.l.debug("Done, no node has children",e.nodes())},m=(e,t)=>{if(0===t.length)return[];let n=Object.assign(t);return t.forEach((t=>{const r=e.children(t),i=m(e,r);n=[...n,...i]})),n},x={rect:(e,t)=>{d.l.info("Creating subgraph rect for ",t.id,t);const n=e.insert("g").attr("class","cluster"+(t.class?" "+t.class:"")).attr("id",t.id),r=n.insert("rect",":first-child"),i=(0,d.m)((0,d.c)().flowchart.htmlLabels),l=n.insert("g").attr("class","cluster-label"),c="markdown"===t.labelType?(0,o.a)(l,t.labelText,{style:t.labelStyle,useHtmlLabels:i}):l.node().appendChild((0,a.c)(t.labelText,t.labelStyle,void 0,!0));let h=c.getBBox();if((0,d.m)((0,d.c)().flowchart.htmlLabels)){const e=c.children[0],t=(0,s.Ys)(c);h=e.getBoundingClientRect(),t.attr("width",h.width),t.attr("height",h.height)}const g=0*t.padding,f=g/2,u=t.width<=h.width+g?h.width+g:t.width;t.width<=h.width+g?t.diff=(h.width-t.width)/2-t.padding/2:t.diff=-t.padding/2,d.l.trace("Data ",t,JSON.stringify(t)),r.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-u/2).attr("y",t.y-t.height/2-f).attr("width",u).attr("height",t.height+g),i?l.attr("transform","translate("+(t.x-h.width/2)+", "+(t.y-t.height/2)+")"):l.attr("transform","translate("+t.x+", "+(t.y-t.height/2)+")");const w=r.node().getBBox();return t.width=w.width,t.height=w.height,t.intersect=function(e){return(0,a.i)(t,e)},n},roundedWithTitle:(e,t)=>{const n=e.insert("g").attr("class",t.classes).attr("id",t.id),r=n.insert("rect",":first-child"),i=n.insert("g").attr("class","cluster-label"),l=n.append("rect"),o=i.node().appendChild((0,a.c)(t.labelText,t.labelStyle,void 0,!0));let c=o.getBBox();if((0,d.m)((0,d.c)().flowchart.htmlLabels)){const e=o.children[0],t=(0,s.Ys)(o);c=e.getBoundingClientRect(),t.attr("width",c.width),t.attr("height",c.height)}c=o.getBBox();const h=0*t.padding,g=h/2,f=t.width<=c.width+t.padding?c.width+t.padding:t.width;t.width<=c.width+t.padding?t.diff=(c.width+0*t.padding-t.width)/2:t.diff=-t.padding/2,r.attr("class","outer").attr("x",t.x-f/2-g).attr("y",t.y-t.height/2-g).attr("width",f+h).attr("height",t.height+h),l.attr("class","inner").attr("x",t.x-f/2-g).attr("y",t.y-t.height/2-g+c.height-1).attr("width",f+h).attr("height",t.height+h-c.height-3),i.attr("transform","translate("+(t.x-c.width/2)+", "+(t.y-t.height/2-t.padding/3+((0,d.m)((0,d.c)().flowchart.htmlLabels)?5:3))+")");const u=r.node().getBBox();return t.height=u.height,t.intersect=function(e){return(0,a.i)(t,e)},n},noteGroup:(e,t)=>{const n=e.insert("g").attr("class","note-cluster").attr("id",t.id),r=n.insert("rect",":first-child"),i=0*t.padding,d=i/2;r.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-d).attr("y",t.y-t.height/2-d).attr("width",t.width+i).attr("height",t.height+i).attr("fill","none");const l=r.node().getBBox();return t.width=l.width,t.height=l.height,t.intersect=function(e){return(0,a.i)(t,e)},n},divider:(e,t)=>{const n=e.insert("g").attr("class",t.classes).attr("id",t.id),r=n.insert("rect",":first-child"),i=0*t.padding,d=i/2;r.attr("class","divider").attr("x",t.x-t.width/2-d).attr("y",t.y-t.height/2).attr("width",t.width+i).attr("height",t.height+i);const l=r.node().getBBox();return t.width=l.width,t.height=l.height,t.diff=-t.padding/2,t.intersect=function(e){return(0,a.i)(t,e)},n}};let b={};const E=async(e,t,n,l,o)=>{d.l.info("Graph in recursive render: XXX",i.c(t),o);const s=t.graph().rankdir;d.l.trace("Dir in recursive render - dir:",s);const h=e.insert("g").attr("class","root");t.nodes()?d.l.info("Recursive render XXX",t.nodes()):d.l.info("No nodes found for",t),t.edges().length>0&&d.l.trace("Recursive edges",t.edge(t.edges()[0]));const g=h.insert("g").attr("class","clusters"),f=h.insert("g").attr("class","edgePaths"),u=h.insert("g").attr("class","edgeLabels"),w=h.insert("g").attr("class","nodes");await Promise.all(t.nodes().map((async function(e){const r=t.node(e);if(void 0!==o){const n=JSON.parse(JSON.stringify(o.clusterData));d.l.info("Setting data for cluster XXX (",e,") ",n,o),t.setNode(o.id,n),t.parent(e)||(d.l.trace("Setting parent",e,o.id),t.setParent(e,o.id,n))}if(d.l.info("(Insert) Node XXX"+e+": "+JSON.stringify(t.node(e))),r&&r.clusterNode){d.l.info("Cluster identified",e,r.width,t.node(e));const i=await E(w,r.graph,n,l,t.node(e)),o=i.elem;(0,a.u)(r,o),r.diff=i.diff||0,d.l.info("Node bounds (abc123)",e,r,r.width,r.x,r.y),(0,a.s)(o,r),d.l.warn("Recursive render complete ",o,r)}else t.children(e).length>0?(d.l.info("Cluster - the non recursive path XXX",e,r.id,r,t),d.l.info(p(r.id,t)),c[r.id]={id:p(r.id,t),node:r}):(d.l.info("Node - the non recursive path",e,r.id,r),await(0,a.e)(w,t.node(e),s))}))),t.edges().forEach((function(e){const n=t.edge(e.v,e.w,e.name);d.l.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),d.l.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(t.edge(e))),d.l.info("Fix",c,"ids:",e.v,e.w,"Translateing: ",c[e.v],c[e.w]),(0,a.f)(u,n)})),t.edges().forEach((function(e){d.l.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e))})),d.l.info("#############################################"),d.l.info("### Layout ###"),d.l.info("#############################################"),d.l.info(t),(0,r.bK)(t),d.l.info("Graph after layout:",i.c(t));let v=0;return(e=>m(e,e.children()))(t).forEach((function(e){const n=t.node(e);d.l.info("Position "+e+": "+JSON.stringify(t.node(e))),d.l.info("Position "+e+": ("+n.x,","+n.y,") width: ",n.width," height: ",n.height),n&&n.clusterNode?(0,a.p)(n):t.children(e).length>0?(((e,t)=>{d.l.trace("Inserting cluster");const n=t.shape||"rect";b[t.id]=x[n](e,t)})(g,n),c[n.id].node=n):(0,a.p)(n)})),t.edges().forEach((function(e){const r=t.edge(e);d.l.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(r),r);const i=(0,a.g)(f,e,r,c,n,t,l);(0,a.h)(r,i)})),t.nodes().forEach((function(e){const n=t.node(e);d.l.info(e,n.type,n.diff),"group"===n.type&&(v=n.diff)})),{elem:h,diff:v}},N=async(e,t,n,r,l)=>{(0,a.a)(e,n,r,l),(0,a.b)(),(0,a.d)(),b={},h={},g={},c={},d.l.warn("Graph at first:",JSON.stringify(i.c(t))),((e,t)=>{e?(d.l.debug("Opting in, graph "),e.nodes().forEach((function(t){e.children(t).length>0&&(d.l.warn("Cluster identified",t," Replacement id in edges: ",p(t,e)),h[t]=w(t,e),c[t]={id:p(t,e),clusterData:e.node(t)})})),e.nodes().forEach((function(t){const n=e.children(t),r=e.edges();n.length>0?(d.l.debug("Cluster identified",t,h),r.forEach((e=>{e.v!==t&&e.w!==t&&f(e.v,t)^f(e.w,t)&&(d.l.warn("Edge: ",e," leaves cluster ",t),d.l.warn("Decendants of XXX ",t,": ",h[t]),c[t].externalConnections=!0)}))):d.l.debug("Not a cluster ",t,h)})),e.edges().forEach((function(t){const n=e.edge(t);d.l.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),d.l.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e.edge(t)));let r=t.v,i=t.w;if(d.l.warn("Fix XXX",c,"ids:",t.v,t.w,"Translating: ",c[t.v]," --- ",c[t.w]),c[t.v]&&c[t.w]&&c[t.v]===c[t.w]){d.l.warn("Fixing and trixing link to self - removing XXX",t.v,t.w,t.name),d.l.warn("Fixing and trixing - removing XXX",t.v,t.w,t.name),r=v(t.v),i=v(t.w),e.removeEdge(t.v,t.w,t.name);const a=t.w+"---"+t.v;e.setNode(a,{domId:a,id:a,labelStyle:"",labelText:n.label,padding:0,shape:"labelRect",style:""});const l=structuredClone(n),o=structuredClone(n);l.label="",l.arrowTypeEnd="none",o.label="",l.fromCluster=t.v,o.toCluster=t.v,e.setEdge(r,a,l,t.name+"-cyclic-special"),e.setEdge(a,i,o,t.name+"-cyclic-special")}else(c[t.v]||c[t.w])&&(d.l.warn("Fixing and trixing - removing XXX",t.v,t.w,t.name),r=v(t.v),i=v(t.w),e.removeEdge(t.v,t.w,t.name),r!==t.v&&(n.fromCluster=t.v),i!==t.w&&(n.toCluster=t.w),d.l.warn("Fix Replacing with XXX",r,i,t.name),e.setEdge(r,i,n,t.name))})),d.l.warn("Adjusted Graph",i.c(e)),y(e,0),d.l.trace(c)):d.l.debug("Opting out, no graph ")})(t),d.l.warn("Graph after:",JSON.stringify(i.c(t))),await E(e,t,r,l)}}}]);
|
notebook/static/6345.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6345,4645],{94645:(e,t,o)=>{o.r(t),o.d(t,{default:()=>p});var n=o(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6345,4645],{94645:(e,t,o)=>{o.r(t),o.d(t,{default:()=>p});var n=o(49880),s=o(1879),a=o(74787),r=o(21024),c=o(33625);const i={id:"@jupyter-notebook/console-extension:opener",requires:[n.IRouter],autoStart:!0,description:"A plugin to open consoles in a new tab",activate:(e,t)=>{const{commands:o}=e,n=new RegExp("/consoles/(.*)"),s="router:console";o.addCommand(s,{execute:e=>{const t=e.path.match(n);if(!t)return;const[,s]=t;if(!s)return;const a=decodeURIComponent(s);o.execute("console:create",{path:a})}}),t.register({command:s,pattern:n})}},d={id:"@jupyter-notebook/console-extension:redirect",requires:[s.IConsoleTracker],optional:[r.INotebookPathOpener],autoStart:!0,description:"Open consoles in a new tab",activate:(e,t,o)=>{const n=a.PageConfig.getBaseUrl(),s=null!=o?o:r.defaultNotebookPathOpener;t.widgetAdded.connect((async(t,o)=>{const{sessionContext:r}=o;await r.ready,(0,c.find)(e.shell.widgets("main"),(e=>e.id===o.id))||(s.open({prefix:a.URLExt.join(n,"consoles"),path:r.path,target:"_blank"}),o.dispose())}))}},p=[i,d]}}]);
|
notebook/static/6417.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6417],{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}},66417:(e,t,n)=>{n.d(t,{diagram:()=>s});var r=n(31261),l=(n(67406),n(23617));n(24028),n(36004),n(65479),n(21845),n(7259),n(51723),n(74193),n(12451),n(36735),n(87768),l.c_6;var o=n(3675);n(27693),n(7608),n(86599),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")}}},3675:(e,t,n)=>{n.d(t,{a:()=>h,f:()=>u});var r=n(67406),l=n(23617),o=n(24028),a=n(86281),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`}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6417],{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}},66417:(e,t,n)=>{n.d(t,{diagram:()=>s});var r=n(31261),l=(n(67406),n(23617));n(24028),n(36004),n(65479),n(21845),n(7259),n(51723),n(74193),n(12451),n(36735),n(87768),l.c_6;var o=n(3675);n(27693),n(7608),n(31699),n(58038);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")}}},3675:(e,t,n)=>{n.d(t,{a:()=>h,f:()=>u});var r=n(67406),l=n(23617),o=n(24028),a=n(86281),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`}}]);
|
notebook/static/6604.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6604,2088],{6604:(e,o,t)=>{t.r(o),t.d(o,{default:()=>b});var n,i=t(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6604,2088],{6604:(e,o,t)=>{t.r(o),t.d(o,{default:()=>b});var n,i=t(1879),r=t(74787),l=t(69759),s=t(69072),a=t(56761),d=t(1476),c=t(11523),u=t(33625),p=t(31516);!function(e){e.dismiss="tooltip:dismiss",e.launchConsole="tooltip:launch-console",e.launchNotebook="tooltip:launch-notebook",e.launchFile="tooltip:launch-file"}(n||(n={}));const m={id:"@jupyterlab/tooltip-extension:manager",description:"Provides the tooltip manager.",autoStart:!0,optional:[c.ITranslator],provides:d.ITooltipManager,activate:(e,o)=>{const t=(null!=o?o:c.nullTranslator).load("jupyterlab");let i=null;return e.commands.addCommand(n.dismiss,{label:t.__("Dismiss the tooltip"),execute:()=>{i&&(i.dispose(),i=null)}}),{invoke(e){const{anchor:o,editor:t,kernel:n,rendermime:r}=e;return i&&(i.dispose(),i=null),T.fetch({detail:0,editor:t,kernel:n}).then((e=>{i=new d.Tooltip({anchor:o,bundle:e,editor:t,rendermime:r}),p.Widget.attach(i,document.body)})).catch((()=>{}))}}}},h={id:"@jupyterlab/tooltip-extension:consoles",description:"Adds the tooltip capability to consoles.",autoStart:!0,optional:[c.ITranslator],requires:[d.ITooltipManager,i.IConsoleTracker],activate:(e,o,t,i)=>{const r=(null!=i?i:c.nullTranslator).load("jupyterlab");e.commands.addCommand(n.launchConsole,{label:r.__("Open the tooltip"),execute:()=>{var e,n;const i=t.currentWidget;if(!i)return;const r=i.console,l=null===(e=r.promptCell)||void 0===e?void 0:e.editor,s=null===(n=r.sessionContext.session)||void 0===n?void 0:n.kernel,a=r.rendermime;return l&&s&&a?o.invoke({anchor:r,editor:l,kernel:s,rendermime:a}):void 0}})}},v={id:"@jupyterlab/tooltip-extension:notebooks",description:"Adds the tooltip capability to notebooks.",autoStart:!0,optional:[c.ITranslator],requires:[d.ITooltipManager,s.INotebookTracker],activate:(e,o,t,i)=>{const r=(null!=i?i:c.nullTranslator).load("jupyterlab");e.commands.addCommand(n.launchNotebook,{label:r.__("Open the tooltip"),execute:()=>{var e,n;const i=t.currentWidget;if(!i)return;const r=i.content,l=null===(e=r.activeCell)||void 0===e?void 0:e.editor,s=null===(n=i.sessionContext.session)||void 0===n?void 0:n.kernel,a=r.rendermime;return l&&s&&a?o.invoke({anchor:r,editor:l,kernel:s,rendermime:a}):void 0}})}},k={id:"@jupyterlab/tooltip-extension:files",description:"Adds the tooltip capability to file editors.",autoStart:!0,optional:[c.ITranslator],requires:[d.ITooltipManager,l.IEditorTracker,a.IRenderMimeRegistry],activate:(e,o,t,i,r)=>{const l=(null!=r?r:c.nullTranslator).load("jupyterlab"),s={},a=e.serviceManager.sessions,d=(e,o)=>{t.forEach((e=>{const t=(0,u.find)(o,(o=>e.context.path===o.path));if(t){const o=s[e.id];if(o&&o.id===t.id)return;o&&(delete s[e.id],o.dispose());const n=a.connectTo({model:t});s[e.id]=n}else{const o=s[e.id];o&&(o.dispose(),delete s[e.id])}}))};d(0,a.running()),a.runningChanged.connect(d),t.widgetAdded.connect(((e,o)=>{o.disposed.connect((e=>{const o=s[e.id];o&&(o.dispose(),delete s[e.id])}))})),e.commands.addCommand(n.launchFile,{label:l.__("Open the tooltip"),execute:async()=>{const e=t.currentWidget,n=e&&s[e.id]&&s[e.id].kernel;if(!n)return;const r=e.content,l=null==r?void 0:r.editor;return l&&n&&i?o.invoke({anchor:r,editor:l,kernel:n,rendermime:i}):void 0}})}},b=[m,h,v,k];var T;!function(e){let o=0;e.fetch=function(e){const{detail:t,editor:n,kernel:i}=e,l=n.model.sharedModel.getSource(),s=n.getCursorPosition(),a=r.Text.jsIndexToCharIndex(n.getOffsetAt(s),l);if(!l||!i)return Promise.reject(void 0);const d={code:l,cursor_pos:a,detail_level:t||0},c=++o;return i.requestInspect(d).then((e=>{const t=e.content;return c!==o?Promise.reject(void 0):"ok"===t.status&&t.found?Promise.resolve(t.data):Promise.reject(void 0)}))}}(T||(T={}))}}]);
|