notebook 7.1.3__py3-none-any.whl → 7.2.0a0__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.

Files changed (208) hide show
  1. notebook/_version.py +1 -1
  2. notebook/static/1053.bundle.js +1 -1
  3. notebook/static/1198.bundle.js +1 -1
  4. notebook/static/131.bundle.js +1 -1
  5. notebook/static/134.bundle.js +1 -1
  6. notebook/static/1408.bundle.js +1 -1
  7. notebook/static/1496.bundle.js +1 -1
  8. notebook/static/1584.bundle.js +1 -1
  9. notebook/static/1647.bundle.js +1 -1
  10. notebook/static/1650.bundle.js +1 -1
  11. notebook/static/1684.bundle.js +1 -1
  12. notebook/static/1809.bundle.js +1 -1
  13. notebook/static/1827.bundle.js +1 -1
  14. notebook/static/1828.bundle.js +1 -0
  15. notebook/static/1833.bundle.js +1 -1
  16. notebook/static/1846.bundle.js +1 -1
  17. notebook/static/1950.bundle.js +1 -1
  18. notebook/static/1958.bundle.js +1 -1
  19. notebook/static/2007.bundle.js +1 -1
  20. notebook/static/2065.bundle.js +1 -1
  21. notebook/static/2067.bundle.js +1 -1
  22. notebook/static/2088.bundle.js +1 -1
  23. notebook/static/2089.bundle.js +1 -1
  24. notebook/static/2122.bundle.js +1 -1
  25. notebook/static/2167.bundle.js +1 -1
  26. notebook/static/2184.bundle.js +1 -1
  27. notebook/static/2311.bundle.js +1 -1
  28. notebook/static/2323.bundle.js +1 -1
  29. notebook/static/2401.bundle.js +1 -1
  30. notebook/static/2479.bundle.js +1 -1
  31. notebook/static/2489.bundle.js +1 -1
  32. notebook/static/2512.bundle.js +1 -1
  33. notebook/static/2552.bundle.js +1 -1
  34. notebook/static/2557.bundle.js +743 -0
  35. notebook/static/2577.bundle.js +1 -1
  36. notebook/static/2607.bundle.js +1 -1
  37. notebook/static/2615.bundle.js +1 -1
  38. notebook/static/2924.bundle.js +1 -1
  39. notebook/static/2944.bundle.js +1 -1
  40. notebook/static/2955.bundle.js +1 -1
  41. notebook/static/3129.bundle.js +1 -1
  42. notebook/static/3146.bundle.js +1 -1
  43. notebook/static/3154.bundle.js +1 -1
  44. notebook/static/3187.bundle.js +1 -1
  45. notebook/static/3213.bundle.js +1 -1
  46. notebook/static/3301.bundle.js +1 -1
  47. notebook/static/3340.bundle.js +1 -1
  48. notebook/static/3360.bundle.js +1 -1
  49. notebook/static/3466.bundle.js +1 -1
  50. notebook/static/3512.bundle.js +1 -1
  51. notebook/static/3654.bundle.js +1 -1
  52. notebook/static/3676.bundle.js +1 -1
  53. notebook/static/3680.bundle.js +1 -1
  54. notebook/static/3768.bundle.js +1 -1
  55. notebook/static/377.bundle.js +1 -1
  56. notebook/static/3797.bundle.js +1 -1
  57. notebook/static/3863.bundle.js +1 -1
  58. notebook/static/3881.bundle.js +1 -1
  59. notebook/static/4042.bundle.js +1 -1
  60. notebook/static/4058.bundle.js +1 -1
  61. notebook/static/4212.bundle.js +1 -1
  62. notebook/static/4382.bundle.js +1 -1
  63. notebook/static/4588.bundle.js +1 -1
  64. notebook/static/4645.bundle.js +1 -1
  65. notebook/static/4670.bundle.js +1 -1
  66. notebook/static/4810.bundle.js +1 -1
  67. notebook/static/4811.bundle.js +1 -1
  68. notebook/static/4837.bundle.js +1 -1
  69. notebook/static/5099.bundle.js +1 -1
  70. notebook/static/5135.bundle.js +1 -1
  71. notebook/static/5166.bundle.js +1 -0
  72. notebook/static/5261.bundle.js +1 -1
  73. notebook/static/5263.bundle.js +1 -1
  74. notebook/static/5313.bundle.js +1 -1
  75. notebook/static/5325.bundle.js +1 -1
  76. notebook/static/5346.bundle.js +1 -1
  77. notebook/static/5426.bundle.js +1 -1
  78. notebook/static/545.bundle.js +1 -0
  79. notebook/static/5573.bundle.js +1 -1
  80. notebook/static/5601.bundle.js +1 -1
  81. notebook/static/5649.bundle.js +3 -3
  82. notebook/static/5733.bundle.js +1 -1
  83. notebook/static/5828.bundle.js +1 -1
  84. notebook/static/5850.bundle.js +1 -1
  85. notebook/static/5912.bundle.js +1 -1
  86. notebook/static/5921.bundle.js +1 -1
  87. notebook/static/6017.bundle.js +1 -1
  88. notebook/static/6061.bundle.js +1 -1
  89. notebook/static/6139.bundle.js +1 -1
  90. notebook/static/62.bundle.js +1 -1
  91. notebook/static/6256.bundle.js +1 -1
  92. notebook/static/6271.bundle.js +1 -1
  93. notebook/static/6281.bundle.js +1 -1
  94. notebook/static/6345.bundle.js +1 -1
  95. notebook/static/6417.bundle.js +1 -1
  96. notebook/static/6604.bundle.js +1 -1
  97. notebook/static/6621.bundle.js +1 -1
  98. notebook/static/6627.bundle.js +1 -1
  99. notebook/static/6731.bundle.js +1 -1
  100. notebook/static/6815.bundle.js +1 -1
  101. notebook/static/6853.bundle.js +1 -0
  102. notebook/static/6893.bundle.js +1 -1
  103. notebook/static/690.bundle.js +1 -1
  104. notebook/static/6962.bundle.js +1 -1
  105. notebook/static/6972.bundle.js +1 -1
  106. notebook/static/6999.bundle.js +1 -1
  107. notebook/static/7153.bundle.js +1 -1
  108. notebook/static/7226.bundle.js +1 -1
  109. notebook/static/7252.bundle.js +1 -1
  110. notebook/static/7302.bundle.js +1 -1
  111. notebook/static/7386.bundle.js +1 -1
  112. notebook/static/7391.bundle.js +1 -1
  113. notebook/static/7394.bundle.js +1 -1
  114. notebook/static/7450.bundle.js +1 -1
  115. notebook/static/7543.bundle.js +1 -0
  116. notebook/static/7603.bundle.js +1 -1
  117. notebook/static/7639.bundle.js +1 -1
  118. notebook/static/7674.bundle.js +1 -1
  119. notebook/static/7684.bundle.js +1 -1
  120. notebook/static/7812.bundle.js +1 -1
  121. notebook/static/7819.bundle.js +1 -1
  122. notebook/static/7854.bundle.js +1 -0
  123. notebook/static/7866.bundle.js +1 -1
  124. notebook/static/7900.bundle.js +1 -1
  125. notebook/static/7906.bundle.js +1 -1
  126. notebook/static/7995.bundle.js +1 -1
  127. notebook/static/7997.bundle.js +1 -1
  128. notebook/static/8010.bundle.js +1 -1
  129. notebook/static/8471.bundle.js +1 -0
  130. notebook/static/8579.bundle.js +1 -1
  131. notebook/static/8633.bundle.js +1 -1
  132. notebook/static/8771.bundle.js +1 -1
  133. notebook/static/8781.bundle.js +1 -1
  134. notebook/static/8845.bundle.js +1 -1
  135. notebook/static/8875.bundle.js +1 -1
  136. notebook/static/8907.bundle.js +1 -1
  137. notebook/static/8928.bundle.js +1 -1
  138. notebook/static/8929.bundle.js +1 -1
  139. notebook/static/893.bundle.js +1 -1
  140. notebook/static/901.bundle.js +1 -1
  141. notebook/static/9068.bundle.js +1 -1
  142. notebook/static/911.bundle.js +1 -1
  143. notebook/static/9151.bundle.js +1 -1
  144. notebook/static/9161.bundle.js +1 -1
  145. notebook/static/9239.bundle.js +1 -1
  146. notebook/static/9268.bundle.js +1 -1
  147. notebook/static/9335.bundle.js +1 -1
  148. notebook/static/9341.bundle.js +1 -1
  149. notebook/static/9380.bundle.js +1 -1
  150. notebook/static/9605.bundle.js +1 -1
  151. notebook/static/9638.bundle.js +1 -1
  152. notebook/static/9680.bundle.js +1 -1
  153. notebook/static/9685.bundle.js +1 -1
  154. notebook/static/9752.bundle.js +1 -1
  155. notebook/static/9799.bundle.js +1 -1
  156. notebook/static/9821.bundle.js +1 -1
  157. notebook/static/9852.bundle.js +1 -1
  158. notebook/static/bundle.js +1 -1
  159. notebook/static/third-party-licenses.json +134 -128
  160. {notebook-7.1.3.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/package.json.orig +15 -15
  161. {notebook-7.1.3.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/documentsearch-extension/package.json.orig +5 -5
  162. {notebook-7.1.3.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/package.json.orig +6 -6
  163. {notebook-7.1.3.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/package.json.orig +10 -10
  164. {notebook-7.1.3.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/package.json.orig +17 -17
  165. {notebook-7.1.3.data → notebook-7.2.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/package.json +12 -12
  166. {notebook-7.1.3.data → notebook-7.2.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/package.json.orig +11 -11
  167. notebook-7.2.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.7788635067bbb0f78314.js +1 -0
  168. notebook-7.1.3.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.a1f037cc55c9ffb2e994.js → notebook-7.2.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.1e2ca839fc49c8dc7f13.js +1 -1
  169. notebook-7.2.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/993.b8375a7b921d370031f6.js +1 -0
  170. notebook-7.2.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.e5cd5d0bbfa59d2e79c6.js +1 -0
  171. {notebook-7.1.3.data → notebook-7.2.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/third-party-licenses.json +2 -2
  172. {notebook-7.1.3.dist-info → notebook-7.2.0a0.dist-info}/METADATA +2 -2
  173. {notebook-7.1.3.dist-info → notebook-7.2.0a0.dist-info}/RECORD +197 -197
  174. {notebook-7.1.3.dist-info → notebook-7.2.0a0.dist-info}/WHEEL +1 -1
  175. notebook/static/1337.bundle.js +0 -1
  176. notebook/static/1664.bundle.js +0 -743
  177. notebook/static/1682.bundle.js +0 -1
  178. notebook/static/1835.bundle.js +0 -1
  179. notebook/static/4558.bundle.js +0 -1
  180. notebook/static/5088.bundle.js +0 -1
  181. notebook/static/514.bundle.js +0 -1
  182. notebook/static/853.bundle.js +0 -1
  183. notebook-7.1.3.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/419.e980232a56ae53a39be0.js +0 -1
  184. notebook-7.1.3.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.1a379d1d7dc566a197da.js +0 -1
  185. notebook-7.1.3.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.a1a4e0e795dca61023d3.js +0 -1
  186. /notebook/static/{1664.bundle.js.LICENSE.txt → 2557.bundle.js.LICENSE.txt} +0 -0
  187. {notebook-7.1.3.data → notebook-7.2.0a0.data}/data/etc/jupyter/jupyter_server_config.d/notebook.json +0 -0
  188. {notebook-7.1.3.data → notebook-7.2.0a0.data}/data/share/applications/jupyter-notebook.desktop +0 -0
  189. {notebook-7.1.3.data → notebook-7.2.0a0.data}/data/share/icons/hicolor/scalable/apps/notebook.svg +0 -0
  190. {notebook-7.1.3.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/menus.json +0 -0
  191. {notebook-7.1.3.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/pages.json +0 -0
  192. {notebook-7.1.3.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/shell.json +0 -0
  193. {notebook-7.1.3.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/title.json +0 -0
  194. {notebook-7.1.3.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/top.json +0 -0
  195. {notebook-7.1.3.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/zen.json +0 -0
  196. {notebook-7.1.3.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/open.json +0 -0
  197. {notebook-7.1.3.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/checkpoints.json +0 -0
  198. {notebook-7.1.3.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/edit-notebook-metadata.json +0 -0
  199. {notebook-7.1.3.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/kernel-logo.json +0 -0
  200. {notebook-7.1.3.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/scroll-output.json +0 -0
  201. {notebook-7.1.3.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/file-actions.json +0 -0
  202. {notebook-7.1.3.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/widget.json +0 -0
  203. {notebook-7.1.3.data → notebook-7.2.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/interface-switcher.json +0 -0
  204. {notebook-7.1.3.data → notebook-7.2.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/launch-tree.json +0 -0
  205. {notebook-7.1.3.data → notebook-7.2.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/93.eae3497dd223d842d198.js +0 -0
  206. {notebook-7.1.3.data → notebook-7.2.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/style.js +0 -0
  207. {notebook-7.1.3.dist-info → notebook-7.2.0a0.dist-info}/entry_points.txt +0 -0
  208. {notebook-7.1.3.dist-info → notebook-7.2.0a0.dist-info}/licenses/LICENSE +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[1682,5135],{21682:(n,e,t)=>{t.r(e),t.d(e,{CommandIDs:()=>h,default:()=>p});var s=t(3053),o=t(13589),i=t(71677),l=t(68239),a=t(38639),r=t(97934),d=t(81997);const c="jp-mod-kernel";var u;!function(n){n.RunningKernel=class{constructor(n){this.className=c,this.commands=n.commands,this.kernel=n.kernel,this.context=this.kernel.id,this.kernels=n.kernels,this.sessions=n.sessions,this.spec=n.spec||null,this.trans=n.trans}get children(){var n;const e=[],t=h.kernelOpenSession,{commands:s}=this;for(const o of this.sessions.running())if(this.kernel.id===(null===(n=o.kernel)||void 0===n?void 0:n.id)){const{name:n,path:i,type:a}=o;e.push({className:c,context:this.kernel.id,open:()=>{s.execute(t,{name:n,path:i,type:a})},icon:()=>"console"===a?l.consoleIcon:"notebook"===a?l.notebookIcon:l.jupyterIcon,label:()=>n,labelTitle:()=>i})}return e}shutdown(){return this.kernels.shutdown(this.kernel.id)}icon(){const{spec:n}=this;return n&&n.resources?n.resources["logo-svg"]||n.resources["logo-64x64"]||n.resources["logo-32x32"]:l.jupyterIcon}label(){const{kernel:n,spec:e}=this;return(null==e?void 0:e.display_name)||n.name}labelTitle(){var n;const{trans:e}=this,{id:t}=this.kernel,s=[`${this.label()}: ${t}`];for(const t of this.sessions.running())if(this.kernel.id===(null===(n=t.kernel)||void 0===n?void 0:n.id)){const{path:n,type:o}=t;s.push(e.__("%1\nPath: %2",o,n))}return s.join("\n\n")}},n.runningChanged=new d.Signal({})}(u||(u={}));var h,g=t(35312);class m{constructor(n){this._tabsChanged=new d.Signal(this),this._widgets=[],this._labShell=n,this._labShell.layoutModified.connect(this._emitTabsChanged,this)}get tabsChanged(){return this._tabsChanged}addWidget(n){n.title.changed.connect(this._emitTabsChanged,this),this._widgets.push(n)}_emitTabsChanged(){this._widgets.forEach((n=>{n.title.changed.disconnect(this._emitTabsChanged,this)})),this._widgets=[],this._tabsChanged.emit(void 0)}}!function(n){n.kernelNewConsole="running:kernel-new-console",n.kernelNewNotebook="running:kernel-new-notebook",n.kernelOpenSession="running:kernel-open-session",n.kernelShutDown="running:kernel-shut-down",n.showPanel="running:show-panel"}(h||(h={}));const p={activate:function(n,e,t,s){const i=e.load("jupyterlab"),d=new o.RunningSessionManagers,p=new o.RunningSessions(d,e);return p.id="jp-running-sessions",p.title.caption=i.__("Running Terminals and Kernels"),p.title.icon=l.runningIcon,p.node.setAttribute("role","region"),p.node.setAttribute("aria-label",i.__("Running Sessions section")),t&&t.add(p,"running-sessions"),s&&function(n,e,t){const s=new m(t),o=e.load("jupyterlab");n.add({name:o.__("Open Tabs"),running:()=>Array.from(t.widgets("main")).map((n=>(s.addWidget(n),new i(n)))),shutdownAll:()=>{for(const n of t.widgets("main"))n.close()},refreshRunning:()=>{},runningChanged:s.tabsChanged,shutdownLabel:o.__("Close"),shutdownAllLabel:o.__("Close All"),shutdownAllConfirmationText:o.__("Are you sure you want to close all open tabs?")});class i{constructor(n){this._widget=n}open(){t.activateById(this._widget.id)}shutdown(){this._widget.close()}icon(){const n=this._widget.title.icon;return n instanceof l.LabIcon?n:l.fileIcon}label(){return this._widget.title.label}labelTitle(){let n;return n=this._widget instanceof g.DocumentWidget?this._widget.context.path:this._widget.title.label,n}}}(d,e,s),async function(n,e,t){const{commands:s,contextMenu:o,serviceManager:i}=t,{kernels:d,kernelspecs:g,sessions:m}=i,{runningChanged:p,RunningKernel:w}=u,_=new r.Throttler((()=>p.emit(void 0)),100),b=e.load("jupyterlab");d.runningChanged.connect((()=>{_.invoke()})),m.runningChanged.connect((()=>{_.invoke()})),await Promise.all([d.ready,g.ready,m.ready]),n.add({name:b.__("Kernels"),running:()=>Array.from(d.running()).map((n=>{var e;return new w({commands:s,kernel:n,kernels:d,sessions:m,spec:null===(e=g.specs)||void 0===e?void 0:e.kernelspecs[n.name],trans:b})})),shutdownAll:()=>d.shutdownAll(),refreshRunning:()=>Promise.all([d.refreshRunning(),m.refreshRunning()]),runningChanged:p,shutdownLabel:b.__("Shut Down Kernel"),shutdownAllLabel:b.__("Shut Down All"),shutdownAllConfirmationText:b.__("Are you sure you want to permanently shut down all running kernels?")});const k=n=>n.classList.contains(c);s.addCommand(h.kernelNewConsole,{icon:l.consoleIcon,label:b.__("New Console for Kernel"),execute:n=>{var e;const o=t.contextMenuHitTest(k),i=null!==(e=n.id)&&void 0!==e?e:null==o?void 0:o.dataset.context;if(i)return s.execute("console:create",{kernelPreference:{id:i}})}}),s.addCommand(h.kernelNewNotebook,{icon:l.notebookIcon,label:b.__("New Notebook for Kernel"),execute:n=>{var e;const o=t.contextMenuHitTest(k),i=null!==(e=n.id)&&void 0!==e?e:null==o?void 0:o.dataset.context;if(i)return s.execute("notebook:create-new",{kernelId:i})}}),s.addCommand(h.kernelOpenSession,{icon:n=>"console"===n.type?l.consoleIcon:"notebook"===n.type?l.notebookIcon:void 0,isEnabled:({path:n,type:e})=>!!e||void 0!==n,label:({name:n,path:e})=>n||a.PathExt.basename(e||b.__("Unknown Session")),execute:({path:n,type:e})=>{if(!e||void 0===n)return;const t="console"===e?"console:open":"docmanager:open";return s.execute(t,{path:n})}}),s.addCommand(h.kernelShutDown,{icon:l.closeIcon,label:b.__("Shut Down Kernel"),execute:n=>{var e;const s=t.contextMenuHitTest(k),o=null!==(e=n.id)&&void 0!==e?e:null==s?void 0:s.dataset.context;if(o)return d.shutdown(o)}});const v=[];o.opened.connect((async()=>{var n,e,s;const i=null!==(e=null===(n=o.menu.items.find((n=>{var e;return"submenu"===n.type&&"jp-contextmenu-connected-sessions"===(null===(e=n.submenu)||void 0===e?void 0:e.id)})))||void 0===n?void 0:n.submenu)&&void 0!==e?e:null;if(!i)return;v.forEach((n=>n.dispose())),v.length=0,i.clearItems();const l=t.contextMenuHitTest(k),a=null==l?void 0:l.dataset.context;if(!a)return;const r=h.kernelOpenSession;for(const n of m.running())if(a===(null===(s=n.kernel)||void 0===s?void 0:s.id)){const{name:e,path:t,type:s}=n;v.push(i.addItem({command:r,args:{name:e,path:t,type:s}}))}}))}(d,e,n),n.shell.add(p,"left",{rank:200,type:"Sessions and Tabs"}),n.commands.addCommand(h.showPanel,{label:i.__("Sessions and Tabs"),execute:()=>{n.shell.activateById(p.id)}}),d},id:"@jupyterlab/running-extension:plugin",description:"Provides the running session managers.",provides:o.IRunningSessionManagers,requires:[i.ITranslator],optional:[s.ILayoutRestorer,s.ILabShell],autoStart:!0}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[1835],{11835:(e,t,n)=>{n.r(t),n.d(t,{ToolbarItems:()=>F,default:()=>W,downloadPlugin:()=>D,openBrowserTabPlugin:()=>k,pathStatusPlugin:()=>x,savingStatusPlugin:()=>C});var o,a=n(3053),r=n(12982),i=n(38639),l=n(90157),d=n(36768),s=n(34276),c=n(71677),u=n(68239),m=n(33625),g=n(20998),p=n(81997),h=n(31516),v=n(78156);!function(e){e.clone="docmanager:clone",e.deleteFile="docmanager:delete-file",e.newUntitled="docmanager:new-untitled",e.open="docmanager:open",e.openBrowserTab="docmanager:open-browser-tab",e.reload="docmanager:reload",e.rename="docmanager:rename",e.del="docmanager:delete",e.duplicate="docmanager:duplicate",e.restoreCheckpoint="docmanager:restore-checkpoint",e.save="docmanager:save",e.saveAll="docmanager:save-all",e.saveAs="docmanager:save-as",e.download="docmanager:download",e.toggleAutosave="docmanager:toggle-autosave",e.showInFileBrowser="docmanager:show-in-file-browser"}(o||(o={}));const f="@jupyterlab/docmanager-extension:plugin",w={id:"@jupyterlab/docmanager-extension:opener",description:"Provides the widget opener.",autoStart:!0,provides:l.IDocumentWidgetOpener,activate:e=>{const{shell:t}=e;return new class{constructor(){this._opened=new p.Signal(this)}open(e,n){e.id||(e.id="document-manager-"+ ++S.id),e.title.dataset={type:"document-title",...e.title.dataset},e.isAttached||t.add(e,"main",n||{}),t.activateById(e.id),this._opened.emit(e)}get opened(){return this._opened}}}},_={id:"@jupyterlab/docmanager-extension:contexts",description:"Adds the handling of opened documents dirty state.",autoStart:!0,requires:[l.IDocumentManager,l.IDocumentWidgetOpener],optional:[a.ILabStatus],activate:(e,t,n,o)=>{const a=new WeakSet;n.opened.connect(((e,n)=>{const r=t.contextForWidget(n);r&&!a.has(r)&&(o&&function(e,t){let n=null;const o=(t,o)=>{"dirty"===o.name&&(!0===o.newValue?n||(n=e.setDirty()):n&&(n.dispose(),n=null))};t.ready.then((()=>{t.model.stateChanged.connect(o),t.model.dirty&&(n=e.setDirty())})),t.disposed.connect((()=>{n&&n.dispose()}))}(o,r),a.add(r))}))}},b={id:"@jupyterlab/docmanager-extension:manager",description:"Provides the document manager.",provides:l.IDocumentManager,requires:[l.IDocumentWidgetOpener],optional:[c.ITranslator,a.ILabStatus,r.ISessionContextDialogs,a.JupyterLab.IInfo],activate:(e,t,n,o,a,i)=>{var d;const{serviceManager:s,docRegistry:u}=e,m=null!=n?n:c.nullTranslator,g=null!=a?a:new r.SessionContextDialogs({translator:m}),p=e.restored.then((()=>{}));return new l.DocumentManager({registry:u,manager:s,opener:t,when:p,setBusy:null!==(d=o&&(()=>o.setBusy()))&&void 0!==d?d:void 0,sessionDialogs:g,translator:null!=m?m:c.nullTranslator,isConnectedCallback:()=>!i||i.isConnected})}},y={id:f,description:"Adds commands and settings to the document manager.",autoStart:!0,requires:[l.IDocumentManager,l.IDocumentWidgetOpener,d.ISettingRegistry],optional:[c.ITranslator,r.ICommandPalette,a.ILabShell],activate:(e,t,n,a,d,s,p)=>{const h=(d=null!=d?d:c.nullTranslator).load("jupyterlab"),v=e.docRegistry;!function(e,t,n,a,d,s,c){const g=d.load("jupyterlab"),{commands:p,shell:h}=e,v=g.__("File Operations"),w=()=>{const{currentWidget:e}=h;return!(!e||!t.contextForWidget(e))},_=()=>{var e;const{currentWidget:n}=h;if(!n)return!1;const o=t.contextForWidget(n);return!!(null===(e=null==o?void 0:o.contentsModel)||void 0===e?void 0:e.writable)},b=e=>r.Notification.warning(g.__('%1 is permissioned as read-only. Use "save as..." instead.',e),{autoClose:5e3});s&&function(e,t,n,a,i){const d=i.load("jupyterlab"),{commands:s}=e,c=()=>{var o;const a=/[Pp]ath:\s?(.*)\n?/,r=e.contextMenuHitTest((e=>{var t;return!!(null===(t=e.title)||void 0===t?void 0:t.match(a))})),i=null==r?void 0:r.title.match(a);return null!==(o=i&&t.findWidget(i[1],null))&&void 0!==o?o:n.currentWidget},u=()=>{const{currentWidget:e}=n;return!(!e||!t.contextForWidget(e))};s.addCommand(o.clone,{label:()=>d.__("New View for %1",T(c(),t)),isEnabled:u,execute:e=>{const n=c(),o=e.options||{mode:"split-right"};if(!n)return;const r=t.cloneWidget(n);r&&a.open(r,o)}}),s.addCommand(o.rename,{label:()=>{let e=T(c(),t);return e&&(e=" "+e),d.__("Rename%1…",e)},isEnabled:u,execute:()=>{if(u()){const e=t.contextForWidget(c());return(0,l.renameDialog)(t,e)}}}),s.addCommand(o.duplicate,{label:()=>d.__("Duplicate %1",T(c(),t)),isEnabled:u,execute:()=>{if(u()){const e=t.contextForWidget(c());if(!e)return;return t.duplicate(e.path)}}}),s.addCommand(o.del,{label:()=>d.__("Delete %1",T(c(),t)),isEnabled:u,execute:async()=>{if(u()){const n=t.contextForWidget(c());if(!n)return;(await(0,r.showDialog)({title:d.__("Delete"),body:d.__("Are you sure you want to delete %1",n.path),buttons:[r.Dialog.cancelButton(),r.Dialog.warnButton({label:d.__("Delete")})]})).button.accept&&await e.commands.execute("docmanager:delete-file",{path:n.path})}}}),s.addCommand(o.showInFileBrowser,{label:()=>d.__("Show in File Browser"),isEnabled:u,execute:async()=>{const e=c(),n=e&&t.contextForWidget(e);n&&(await s.execute("filebrowser:activate",{path:n.path}),await s.execute("filebrowser:go-to-path",{path:n.path}))}})}(e,t,s,n,d),p.addCommand(o.deleteFile,{label:()=>`Delete ${T(h.currentWidget,t)}`,execute:e=>{const n=void 0===e.path?"":e.path;if(!n){const e=o.deleteFile;throw new Error(`A non-empty path is required for ${e}.`)}return t.deleteFile(n)}}),p.addCommand(o.newUntitled,{execute:e=>{const n=e.error||g.__("Error"),o=void 0===e.path?"":e.path,a={type:e.type,path:o};return"file"===e.type&&(a.ext=e.ext||".txt"),t.services.contents.newUntitled(a).catch((e=>(0,r.showErrorMessage)(n,e)))},label:e=>e.label||`New ${e.type}`}),p.addCommand(o.open,{execute:e=>{const n=void 0===e.path?"":e.path,o=e.factory||void 0,a=null==e?void 0:e.kernel,r=e.options||void 0;return t.services.contents.get(n,{content:!1}).then((()=>t.openOrReveal(n,o,a,r)))},iconClass:e=>e.icon||"",label:e=>{var t;return null!==(t=e.label||e.factory)&&void 0!==t?t:g.__("Open the provided `path`.")},mnemonic:e=>e.mnemonic||-1}),p.addCommand(o.reload,{label:()=>g.__("Reload %1 from Disk",T(h.currentWidget,t)),caption:g.__("Reload contents from disk"),isEnabled:w,execute:()=>{if(!w())return;const e=t.contextForWidget(h.currentWidget),n=T(h.currentWidget,t);return e?e.model.dirty?(0,r.showDialog)({title:g.__("Reload %1 from Disk",n),body:g.__("Are you sure you want to reload the %1 from the disk?",n),buttons:[r.Dialog.cancelButton(),r.Dialog.warnButton({label:g.__("Reload")})]}).then((t=>{if(t.button.accept&&!e.isDisposed)return e.revert()})):e.isDisposed?void 0:e.revert():(0,r.showDialog)({title:g.__("Cannot Reload"),body:g.__("No context found for current widget!"),buttons:[r.Dialog.okButton()]})}}),p.addCommand(o.restoreCheckpoint,{label:()=>g.__("Revert %1 to Checkpoint…",T(h.currentWidget,t)),caption:g.__("Revert contents to previous checkpoint"),isEnabled:w,execute:()=>{if(!w())return;const e=t.contextForWidget(h.currentWidget);return e?e.listCheckpoints().then((async n=>{const o=T(h.currentWidget,t);if(n.length<1)return void await(0,r.showErrorMessage)(g.__("No checkpoints"),g.__("No checkpoints are available for this %1.",o));const a=1===n.length?n[0]:await S.getTargetCheckpoint(n.reverse(),g);return a?(0,r.showDialog)({title:g.__("Revert %1 to checkpoint",o),body:new I(a,g,o),buttons:[r.Dialog.cancelButton(),r.Dialog.warnButton({label:g.__("Revert"),ariaLabel:g.__("Revert to Checkpoint")})]}).then((t=>{if(!e.isDisposed)return t.button.accept?e.model.readOnly?e.revert():e.restoreCheckpoint(a.id).then((()=>e.revert())):void 0})):void 0})):(0,r.showDialog)({title:g.__("Cannot Revert"),body:g.__("No context found for current widget!"),buttons:[r.Dialog.okButton()]})}});const y=new WeakSet;p.addCommand(o.save,{label:()=>g.__("Save %1",T(h.currentWidget,t)),caption:()=>{if(h.currentWidget){const e=t.contextForWidget(h.currentWidget);if(null==e?void 0:e.model.collaborative)return g.__("In collaborative mode, the document is saved automatically after every change");if(!_())return g.__('document is permissioned readonly; "save" is disabled, use "save as..." instead')}return g.__("Save and create checkpoint")},icon:e=>e.toolbar?u.saveIcon:void 0,isEnabled:e=>e._luminoEvent&&"keybinding"===e._luminoEvent.type||_(),execute:async e=>{var n,o,l,d,s;const c=h.currentWidget,u=t.contextForWidget(c);if(w()){if(!u)return(0,r.showDialog)({title:g.__("Cannot Save"),body:g.__("No context found for current widget!"),buttons:[r.Dialog.okButton()]});{if(y.has(u))return;if(!(null===(n=u.contentsModel)||void 0===n?void 0:n.writable)&&!u.model.collaborative){let t=null===(o=e._luminoEvent)||void 0===o?void 0:o.type;return e._luminoEvent&&"keybinding"===t?void b(u.path):(0,r.showDialog)({title:g.__("Cannot Save"),body:g.__("Document is read-only"),buttons:[r.Dialog.okButton()]})}y.add(u);const m=i.PathExt.basename(null!==(d=null===(l=u.contentsModel)||void 0===l?void 0:l.path)&&void 0!==d?d:"");let p=m;if(t.renameUntitledFileOnSave&&!0===c.isUntitled){const e=await r.InputDialog.getText({title:g.__("Rename file"),okLabel:g.__("Rename"),placeholder:g.__("File name"),text:m,selectionRange:m.length-i.PathExt.extname(m).length,checkbox:{label:g.__("Do not ask me again."),caption:g.__("If checked, you will not be asked to rename future untitled files when saving them.")}});if(e.button.accept&&(p=null!==(s=e.value)&&void 0!==s?s:m,c.isUntitled=!1,"boolean"==typeof e.isChecked)){const t=(await a.get(f,"renameUntitledFileOnSave")).composite;e.isChecked===t&&a.set(f,"renameUntitledFileOnSave",!e.isChecked).catch((e=>{console.error(`Fail to set 'renameUntitledFileOnSave:\n${e}`)}))}}try{if(await u.save(),!(null==c?void 0:c.isDisposed))return u.createCheckpoint()}catch(e){if("ModalCancelError"===e.name)return;throw e}finally{y.delete(u),p!==m&&await u.rename(p)}}}}}),p.addCommand(o.saveAll,{label:()=>g.__("Save All"),caption:g.__("Save all open documents"),isEnabled:()=>(0,m.some)(h.widgets("main"),(e=>{var n,o,a;return null!==(a=null===(o=null===(n=t.contextForWidget(e))||void 0===n?void 0:n.contentsModel)||void 0===o?void 0:o.writable)&&void 0!==a&&a})),execute:()=>{var e;const n=[],o=new Set;for(const a of h.widgets("main")){const r=t.contextForWidget(a);r&&!o.has(r.path)&&((null===(e=r.contentsModel)||void 0===e?void 0:e.writable)?(o.add(r.path),n.push(r.save())):b(r.path))}return Promise.all(n)}}),p.addCommand(o.saveAs,{label:()=>g.__("Save %1 As…",T(h.currentWidget,t)),caption:g.__("Save with new path"),isEnabled:w,execute:()=>{if(w()){const e=t.contextForWidget(h.currentWidget);if(!e)return(0,r.showDialog)({title:g.__("Cannot Save"),body:g.__("No context found for current widget!"),buttons:[r.Dialog.okButton()]});const n=(n,a)=>{"save"===a.type&&a.newValue&&a.newValue.path!==e.path&&(t.closeFile(e.path),p.execute(o.open,{path:a.newValue.path}))};t.services.contents.fileChanged.connect(n),e.saveAs().finally((()=>t.services.contents.fileChanged.disconnect(n)))}}}),p.addCommand(o.toggleAutosave,{label:g.__("Autosave Documents"),isToggled:()=>t.autosave,execute:()=>{const e=!t.autosave,n="autosave";return a.set(f,n,e).catch((e=>{console.error(`Failed to set ${f}:${n} - ${e.message}`)}))}}),c&&[o.reload,o.restoreCheckpoint,o.save,o.saveAs,o.toggleAutosave,o.duplicate].forEach((e=>{c.addItem({command:e,category:v})}))}(e,t,n,a,d,p,s);const w=n=>{const a=n.get("autosave").composite;t.autosave=!0!==a&&!1!==a||a,e.commands.notifyCommandChanged(o.toggleAutosave);const r=n.get("confirmClosingDocument").composite;t.confirmClosingDocument=null==r||r;const i=n.get("autosaveInterval").composite;t.autosaveInterval=i||120;const l=n.get("lastModifiedCheckMargin").composite;t.lastModifiedCheckMargin=l||500;const d=n.get("renameUntitledFileOnSave").composite;t.renameUntitledFileOnSave=null==d||d;const s=n.get("defaultViewers").composite,c={};Object.keys(s).forEach((e=>{v.getFileType(e)?(v.getWidgetFactory(s[e])||console.warn(`Document viewer ${s[e]} not found`),c[e]=s[e]):console.warn(`File Type ${e} not found`)}));for(const e of v.fileTypes())try{v.setDefaultWidgetFactory(e.name,c[e.name])}catch(t){console.warn(`Failed to set default viewer ${c[e.name]} for file type ${e.name}`)}};Promise.all([a.load(f),e.restored]).then((([e])=>{e.changed.connect(w),w(e),t.stateChanged.connect(((t,n)=>{["autosave","autosaveInterval","confirmClosingDocument","lastModifiedCheckMargin","renameUntitledFileOnSave"].includes(n.name)&&e.get(n.name).composite!==n.newValue&&e.set(n.name,n.newValue).catch((e=>{console.error(`Failed to set the setting '${n.name}':\n${e}`)}))}))})).catch((e=>{console.error(e.message)})),a.transform(f,{fetch:e=>{const t=Array.from(v.fileTypes()).map((e=>e.name)).join(" \n"),n=Array.from(v.widgetFactories()).map((e=>e.name)).join(" \n"),o=h.__('Overrides for the default viewers for file types.\nSpecify a mapping from file type name to document viewer name, for example:\n\ndefaultViewers: {\n markdown: "Markdown Preview"\n}\n\nIf you specify non-existent file types or viewers, or if a viewer cannot\nopen a given file type, the override will not function.\n\nAvailable viewers:\n%1\n\nAvailable file types:\n%2',n,t),a=g.JSONExt.deepCopy(e.schema);return a.properties.defaultViewers.description=o,{...e,schema:a}}}),v.changed.connect((()=>a.load(f,!0)))}},C={id:"@jupyterlab/docmanager-extension:saving-status",description:"Adds a saving status indicator.",autoStart:!0,requires:[l.IDocumentManager,a.ILabShell],optional:[c.ITranslator,s.IStatusBar],activate:(e,t,n,o,a)=>{if(!a)return;const r=new l.SavingStatus({docManager:t,translator:null!=o?o:c.nullTranslator});r.model.widget=n.currentWidget,n.currentChanged.connect((()=>{r.model.widget=n.currentWidget})),a.registerStatusItem(C.id,{item:r,align:"middle",isActive:()=>null!==r.model&&null!==r.model.status,activeStateChanged:r.model.stateChanged})}},x={id:"@jupyterlab/docmanager-extension:path-status",description:"Adds a file path indicator in the status bar.",autoStart:!0,requires:[l.IDocumentManager,a.ILabShell],optional:[s.IStatusBar],activate:(e,t,n,o)=>{if(!o)return;const a=new l.PathStatus({docManager:t});a.model.widget=n.currentWidget,n.currentChanged.connect((()=>{a.model.widget=n.currentWidget})),o.registerStatusItem(x.id,{item:a,align:"right",rank:0})}},D={id:"@jupyterlab/docmanager-extension:download",description:"Adds command to download files.",autoStart:!0,requires:[l.IDocumentManager],optional:[c.ITranslator,r.ICommandPalette],activate:(e,t,n,a)=>{const i=(null!=n?n:c.nullTranslator).load("jupyterlab"),{commands:l,shell:d}=e,s=()=>{const{currentWidget:e}=d;return!(!e||!t.contextForWidget(e))};l.addCommand(o.download,{label:i.__("Download"),caption:i.__("Download the file to your computer"),isEnabled:s,execute:()=>{if(s()){const e=t.contextForWidget(d.currentWidget);return e?e.download():(0,r.showDialog)({title:i.__("Cannot Download"),body:i.__("No context found for current widget!"),buttons:[r.Dialog.okButton()]})}}});const u=i.__("File Operations");a&&a.addItem({command:o.download,category:u})}},k={id:"@jupyterlab/docmanager-extension:open-browser-tab",description:"Adds command to open a browser tab.",autoStart:!0,requires:[l.IDocumentManager],optional:[c.ITranslator],activate:(e,t,n)=>{const a=(null!=n?n:c.nullTranslator).load("jupyterlab"),{commands:r}=e;r.addCommand(o.openBrowserTab,{execute:e=>{const n=void 0===e.path?"":e.path;if(n)return t.services.contents.getDownloadUrl(n).then((e=>{const t=window.open();if(!t)throw new Error("Failed to open new browser tab.");t.opener=null,t.location.href=e}))},iconClass:e=>e.icon||"",label:()=>a.__("Open in New Browser Tab")})}},W=[b,y,_,x,C,D,k,w];var F,S;!function(e){e.createSaveButton=function(e,t){return(0,r.addCommandToolbarButtonClass)(r.ReactWidget.create(v.createElement(r.UseSignal,{signal:t},(()=>v.createElement(r.CommandToolbarButtonComponent,{commands:e,id:o.save,label:"",args:{toolbar:!0}})))))}}(F||(F={}));class I extends h.Widget{constructor(e,t,n="notebook"){super({node:S.createRevertConfirmNode(e,n,t)})}}function T(e,t){if(!e)return"File";const n=t.contextForWidget(e);if(!n)return"";const o=t.registry.getFileTypesForPath(n.path);return o.length&&o[0].displayName?o[0].displayName:"File"}!function(e){e.id=0,e.createRevertConfirmNode=function(e,t,n){const o=document.createElement("div"),a=document.createElement("p"),r=document.createTextNode(n.__("Are you sure you want to revert the %1 to checkpoint? ",t)),l=document.createElement("strong");l.textContent=n.__("This cannot be undone."),a.appendChild(r),a.appendChild(l);const d=document.createElement("p"),s=document.createTextNode(n.__("The checkpoint was last updated at: ")),c=document.createElement("p"),u=new Date(e.last_modified);return c.style.textAlign="center",c.textContent=i.Time.format(u)+" ("+i.Time.formatHuman(u)+")",d.appendChild(s),d.appendChild(c),o.appendChild(a),o.appendChild(d),o},e.getTargetCheckpoint=async function(e,t){const n=e.map(((e,t)=>`${t}. ${i.Time.format(e.last_modified)} (${i.Time.formatHuman(e.last_modified)})`)),o=(await r.InputDialog.getItem({items:n,title:t.__("Choose a checkpoint")})).value;if(!o)return;const a=o.split(".",1)[0];return e[parseInt(a,10)]}}(S||(S={}))}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[4558],{94558:(t,e,s)=>{s.r(e),s.d(e,{DocumentManager:()=>x,DocumentWidgetManager:()=>P,IDocumentManager:()=>A,IDocumentWidgetOpener:()=>O,PathStatus:()=>W,SaveHandler:()=>f,SavingStatus:()=>E,isValidFileName:()=>d,renameDialog:()=>l,renameFile:()=>h,shouldOverwrite:()=>c});var i,n=s(12982),a=s(38639),o=s(71677),r=s(31516);function l(t,e,s){const i=(s=s||o.nullTranslator).load("jupyterlab"),a=e.localPath.split("/").pop()||e.localPath;return(0,n.showDialog)({title:i.__("Rename File"),body:new g(a),focusNodeSelector:"input",buttons:[n.Dialog.cancelButton(),n.Dialog.okButton({label:i.__("Rename"),ariaLabel:i.__("Rename File")})]}).then((t=>t.value?d(t.value)?e.rename(t.value):((0,n.showErrorMessage)(i.__("Rename Error"),Error(i.__('"%1" is not a valid name for a file. Names must have nonzero length, and cannot include "/", "\\", or ":"',t.value))),null):null))}function h(t,e,s){return t.rename(e,s).catch((i=>{if(409!==i.response.status)throw i;return c(s).then((i=>i?t.overwrite(e,s):Promise.reject("File not renamed")))}))}function c(t,e){const s=(e=e||o.nullTranslator).load("jupyterlab"),i={title:s.__("Overwrite file?"),body:s.__('"%1" already exists, overwrite?',t),buttons:[n.Dialog.cancelButton(),n.Dialog.warnButton({label:s.__("Overwrite"),ariaLabel:s.__("Overwrite Existing File")})]};return(0,n.showDialog)(i).then((t=>Promise.resolve(t.button.accept)))}function d(t){return t.length>0&&!/[\/\\:]/.test(t)}class g extends r.Widget{constructor(t){super({node:i.createRenameNode(t)}),this.addClass("jp-FileDialog");const e=a.PathExt.extname(t),s=this.inputNode.value=a.PathExt.basename(t);this.inputNode.setSelectionRange(0,s.length-e.length)}get inputNode(){return this.node.getElementsByTagName("input")[0]}getValue(){return this.inputNode.value}}!function(t){t.createRenameNode=function(t,e){const s=(e=e||o.nullTranslator).load("jupyterlab"),i=document.createElement("div"),n=document.createElement("label");n.textContent=s.__("File Path");const a=document.createElement("span");a.textContent=t;const r=document.createElement("label");r.textContent=s.__("New Name"),r.className="jp-new-name-title";const l=document.createElement("input");return i.appendChild(n),i.appendChild(a),i.appendChild(r),i.appendChild(l),i}}(i||(i={}));var u=s(35312),_=s(33625),m=s(20998),p=s(14421),v=s(81997);class f{constructor(t){this._autosaveTimer=-1,this._minInterval=-1,this._interval=-1,this._isActive=!1,this._inDialog=!1,this._isDisposed=!1,this._multiplier=10,this._context=t.context,this._isConnectedCallback=t.isConnectedCallback||(()=>!0);const e=t.saveInterval||120;this._minInterval=1e3*e,this._interval=this._minInterval,this._context.fileChanged.connect(this._setTimer,this),this._context.disposed.connect(this.dispose,this)}get saveInterval(){return this._interval/1e3}set saveInterval(t){this._minInterval=this._interval=1e3*t,this._isActive&&this._setTimer()}get isActive(){return this._isActive}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,clearTimeout(this._autosaveTimer),v.Signal.clearData(this))}start(){this._isActive=!0,this._setTimer()}stop(){this._isActive=!1,clearTimeout(this._autosaveTimer)}_setTimer(){clearTimeout(this._autosaveTimer),this._isActive&&(this._autosaveTimer=window.setTimeout((()=>{this._isConnectedCallback()&&this._save()}),this._interval))}_save(){const t=this._context;if(this._setTimer(),!t)return;if(!t.contentsModel||!t.contentsModel.writable||!t.model.dirty||this._inDialog)return;const e=(new Date).getTime();t.save().then((()=>{if(this.isDisposed)return;const t=(new Date).getTime()-e;this._interval=Math.max(this._multiplier*t,this._minInterval),this._setTimer()})).catch((t=>{const{name:e}=t;"ModalCancelError"!==e&&"ModalDuplicateError"!==e&&console.error("Error in Auto-Save",t.message)}))}}var w,C,y=s(2549),D=s(49503);class P{constructor(t){this._activateRequested=new v.Signal(this),this._confirmClosingTab=!1,this._isDisposed=!1,this._stateChanged=new v.Signal(this),this._registry=t.registry,this.translator=t.translator||o.nullTranslator}get activateRequested(){return this._activateRequested}get confirmClosingDocument(){return this._confirmClosingTab}set confirmClosingDocument(t){if(this._confirmClosingTab!==t){const e=this._confirmClosingTab;this._confirmClosingTab=t,this._stateChanged.emit({name:"confirmClosingDocument",oldValue:e,newValue:t})}}get stateChanged(){return this._stateChanged}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,v.Signal.disconnectReceiver(this))}createWidget(t,e){const s=t.createNew(e);return this._initializeWidget(s,t,e),s}_initializeWidget(t,e,s){w.factoryProperty.set(t,e);const i=new y.DisposableSet;for(const n of this._registry.widgetExtensions(e.name)){const e=n.createNew(t,s);e&&i.add(e)}w.disposablesProperty.set(t,i),t.disposed.connect(this._onWidgetDisposed,this),this.adoptWidget(s,t),s.fileChanged.connect(this._onFileChanged,this),s.pathChanged.connect(this._onPathChanged,this),s.ready.then((()=>{this.setCaption(t)}))}adoptWidget(t,e){w.widgetsProperty.get(t).push(e),D.MessageLoop.installMessageHook(e,this),e.addClass("jp-Document"),e.title.closable=!0,e.disposed.connect(this._widgetDisposed,this),w.contextProperty.set(e,t)}findWidget(t,e){const s=w.widgetsProperty.get(t);if(s)return(0,_.find)(s,(t=>{const s=w.factoryProperty.get(t);return!!s&&s.name===e}))}contextForWidget(t){return w.contextProperty.get(t)}cloneWidget(t){const e=w.contextProperty.get(t);if(!e)return;const s=w.factoryProperty.get(t);if(!s)return;const i=s.createNew(e,t);return this._initializeWidget(i,s,e),i}closeWidgets(t){const e=w.widgetsProperty.get(t);return Promise.all(e.map((t=>this.onClose(t)))).then((()=>{}))}deleteWidgets(t){const e=w.widgetsProperty.get(t);return Promise.all(e.map((t=>this.onDelete(t)))).then((()=>{}))}messageHook(t,e){switch(e.type){case"close-request":return this.onClose(t),!1;case"activate-request":{const e=this.contextForWidget(t);e&&this._activateRequested.emit(e.path);break}}return!0}async setCaption(t){const e=this.translator.load("jupyterlab"),s=w.contextProperty.get(t);if(!s)return;const i=s.contentsModel;if(i)return s.listCheckpoints().then((n=>{if(t.isDisposed)return;const o=n[n.length-1],r=o?a.Time.format(o.last_modified):"None";let l=e.__("Name: %1\nPath: %2\n",i.name,i.path);s.model.readOnly?l+=e.__("Read-only"):l+=e.__("Last Saved: %1\n",a.Time.format(i.last_modified))+e.__("Last Checkpoint: %1",r),t.title.caption=l}));t.title.caption=""}async onClose(t){var e;const[s,i]=await this._maybeClose(t,this.translator);if(t.isDisposed)return!0;if(s){if(!i){const s=w.contextProperty.get(t);if(!s)return!0;(null===(e=s.contentsModel)||void 0===e?void 0:e.writable)?await s.save():await s.saveAs()}if(t.isDisposed)return!0;t.dispose()}return s}onDelete(t){return t.dispose(),Promise.resolve(void 0)}async _maybeClose(t,e){var s,i;const a=(e=e||o.nullTranslator).load("jupyterlab"),r=w.contextProperty.get(t);if(!r)return Promise.resolve([!0,!0]);let l=w.widgetsProperty.get(r);if(!l)return Promise.resolve([!0,!0]);l=l.filter((t=>{const e=w.factoryProperty.get(t);return!!e&&!1===e.readOnly}));const h=t.title.label,c=w.factoryProperty.get(t),d=r.model.dirty&&l.length<=1&&!(null===(s=null==c?void 0:c.readOnly)||void 0===s||s);if(this.confirmClosingDocument){const t=[n.Dialog.cancelButton(),n.Dialog.okButton({label:d?a.__("Close and save"):a.__("Close"),ariaLabel:d?a.__("Close and save Document"):a.__("Close Document")})];d&&t.splice(1,0,n.Dialog.warnButton({label:a.__("Close without saving"),ariaLabel:a.__("Close Document without saving")}));const e=await(0,n.showDialog)({title:a.__("Confirmation"),body:a.__('Please confirm you want to close "%1".',h),checkbox:d?null:{label:a.__("Do not ask me again."),caption:a.__("If checked, no confirmation to close a document will be asked in the future.")},buttons:t});return e.isChecked&&(this.confirmClosingDocument=!1),Promise.resolve([e.button.accept,!d||"warn"===e.button.displayType])}{if(!d)return Promise.resolve([!0,!0]);const t=(null===(i=r.contentsModel)||void 0===i?void 0:i.writable)?a.__("Save"):a.__("Save as"),e=await(0,n.showDialog)({title:a.__("Save your work"),body:a.__('Save changes in "%1" before closing?',h),buttons:[n.Dialog.cancelButton(),n.Dialog.warnButton({label:a.__("Discard"),ariaLabel:a.__("Discard changes to file")}),n.Dialog.okButton({label:t})]});return[e.button.accept,"warn"===e.button.displayType]}}_widgetDisposed(t){const e=w.contextProperty.get(t);if(!e)return;const s=w.widgetsProperty.get(e);s&&(_.ArrayExt.removeFirstOf(s,t),s.length||e.dispose())}_onWidgetDisposed(t){w.disposablesProperty.get(t).dispose()}_onFileChanged(t){const e=w.widgetsProperty.get(t);for(const t of e)this.setCaption(t)}_onPathChanged(t){const e=w.widgetsProperty.get(t);for(const t of e)this.setCaption(t)}}!function(t){t.contextProperty=new p.AttachedProperty({name:"context",create:()=>{}}),t.factoryProperty=new p.AttachedProperty({name:"factory",create:()=>{}}),t.widgetsProperty=new p.AttachedProperty({name:"widgets",create:()=>[]}),t.disposablesProperty=new p.AttachedProperty({name:"disposables",create:()=>new y.DisposableSet})}(w||(w={}));class x{constructor(t){var e;this._activateRequested=new v.Signal(this),this._contexts=[],this._isDisposed=!1,this._autosave=!0,this._autosaveInterval=120,this._lastModifiedCheckMargin=500,this._renameUntitledFileOnSave=!0,this._stateChanged=new v.Signal(this),this.translator=t.translator||o.nullTranslator,this.registry=t.registry,this.services=t.manager,this._dialogs=null!==(e=t.sessionDialogs)&&void 0!==e?e:new n.SessionContextDialogs({translator:t.translator}),this._isConnectedCallback=t.isConnectedCallback||(()=>!0),this._opener=t.opener,this._when=t.when||t.manager.ready;const s=new P({registry:this.registry,translator:this.translator});s.activateRequested.connect(this._onActivateRequested,this),s.stateChanged.connect(this._onWidgetStateChanged,this),this._widgetManager=s,this._setBusy=t.setBusy}get activateRequested(){return this._activateRequested}get autosave(){return this._autosave}set autosave(t){if(this._autosave!==t){const e=this._autosave;this._autosave=t,this._contexts.forEach((e=>{const s=C.saveHandlerProperty.get(e);s&&(!0!==t||s.isActive?!1===t&&s.isActive&&s.stop():s.start())})),this._stateChanged.emit({name:"autosave",oldValue:e,newValue:t})}}get autosaveInterval(){return this._autosaveInterval}set autosaveInterval(t){if(this._autosaveInterval!==t){const e=this._autosaveInterval;this._autosaveInterval=t,this._contexts.forEach((e=>{const s=C.saveHandlerProperty.get(e);s&&(s.saveInterval=t||120)})),this._stateChanged.emit({name:"autosaveInterval",oldValue:e,newValue:t})}}get confirmClosingDocument(){return this._widgetManager.confirmClosingDocument}set confirmClosingDocument(t){if(this._widgetManager.confirmClosingDocument!==t){const e=this._widgetManager.confirmClosingDocument;this._widgetManager.confirmClosingDocument=t,this._stateChanged.emit({name:"confirmClosingDocument",oldValue:e,newValue:t})}}get lastModifiedCheckMargin(){return this._lastModifiedCheckMargin}set lastModifiedCheckMargin(t){if(this._lastModifiedCheckMargin!==t){const e=this._lastModifiedCheckMargin;this._lastModifiedCheckMargin=t,this._contexts.forEach((e=>{e.lastModifiedCheckMargin=t})),this._stateChanged.emit({name:"lastModifiedCheckMargin",oldValue:e,newValue:t})}}get renameUntitledFileOnSave(){return this._renameUntitledFileOnSave}set renameUntitledFileOnSave(t){if(this._renameUntitledFileOnSave!==t){const e=this._renameUntitledFileOnSave;this._renameUntitledFileOnSave=t,this._stateChanged.emit({name:"renameUntitledFileOnSave",oldValue:e,newValue:t})}}get stateChanged(){return this._stateChanged}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,v.Signal.clearData(this),this._contexts.forEach((t=>this._widgetManager.closeWidgets(t))),this._widgetManager.dispose(),this._contexts.length=0)}cloneWidget(t){return this._widgetManager.cloneWidget(t)}closeAll(){return Promise.all(this._contexts.map((t=>this._widgetManager.closeWidgets(t)))).then((()=>{}))}closeFile(t){const e=this._contextsForPath(t).map((t=>this._widgetManager.closeWidgets(t)));return Promise.all(e).then((t=>{}))}contextForWidget(t){return this._widgetManager.contextForWidget(t)}copy(t,e){return this.services.contents.copy(t,e)}createNew(t,e="default",s){return this._createOrOpenDocument("create",t,e,s)}deleteFile(t){return this.services.sessions.stopIfNeeded(t).then((()=>this.services.contents.delete(t))).then((()=>(this._contextsForPath(t).forEach((t=>this._widgetManager.deleteWidgets(t))),Promise.resolve(void 0))))}duplicate(t){const e=a.PathExt.dirname(t);return this.services.contents.copy(t,e)}findWidget(t,e="default"){const s=a.PathExt.normalize(t);let i=[e];if("default"===e){const t=this.registry.defaultWidgetFactory(s);if(!t)return;i=[t.name]}else null===e&&(i=this.registry.preferredWidgetFactories(s).map((t=>t.name)));for(const t of this._contextsForPath(s))for(const e of i)if(null!==e){const s=this._widgetManager.findWidget(t,e);if(s)return s}}newUntitled(t){return"file"===t.type&&(t.ext=t.ext||".txt"),this.services.contents.newUntitled(t)}open(t,e="default",s,i){return this._createOrOpenDocument("open",t,e,s,i)}openOrReveal(t,e="default",s,i){const n=this.findWidget(t,e);return n?(this._opener.open(n,{type:e,...i}),n):this.open(t,e,s,null!=i?i:{})}overwrite(t,e){const s=`${e}.${m.UUID.uuid4()}`,i=()=>this.rename(s,e);return this.rename(t,s).then((()=>this.deleteFile(e))).then(i,i)}rename(t,e){return this.services.contents.rename(t,e)}_findContext(t,e){const s=this.services.contents.normalize(t);return(0,_.find)(this._contexts,(t=>t.path===s&&t.factoryName===e))}_contextsForPath(t){const e=this.services.contents.normalize(t);return this._contexts.filter((t=>t.path===e))}_createContext(t,e,s){const i=new u.Context({opener:(t,e)=>{this._widgetManager.adoptWidget(i,t),this._opener.open(t,e)},manager:this.services,factory:e,path:t,kernelPreference:s,setBusy:this._setBusy,sessionDialogs:this._dialogs,lastModifiedCheckMargin:this._lastModifiedCheckMargin,translator:this.translator}),n=new f({context:i,isConnectedCallback:this._isConnectedCallback,saveInterval:this.autosaveInterval});return C.saveHandlerProperty.set(i,n),i.ready.then((()=>{this.autosave&&n.start()})),i.disposed.connect(this._onContextDisposed,this),this._contexts.push(i),i}_onContextDisposed(t){_.ArrayExt.removeFirstOf(this._contexts,t)}_widgetFactoryFor(t,e){const{registry:s}=this;if("default"===e){const i=s.defaultWidgetFactory(t);if(!i)return;e=i.name}return s.getWidgetFactory(e)}_createOrOpenDocument(t,e,s="default",i,n){const a=this._widgetFactoryFor(e,s);if(!a)return;const o=a.modelName||"text",r=this.registry.getModelFactory(o);if(!r)return;const l=this.registry.getKernelPreference(e,a.name,i);let h,c=Promise.resolve(void 0);if("open"===t)h=this._findContext(e,r.name)||null,h||(h=this._createContext(e,r,l),c=this._when.then((()=>h.initialize(!1))));else{if("create"!==t)throw new Error(`Invalid argument 'which': ${t}`);h=this._createContext(e,r,l),c=this._when.then((()=>h.initialize(!0)))}const d=this._widgetManager.createWidget(a,h);return this._opener.open(d,{type:a.name,...n}),c.catch((t=>{console.error(`Failed to initialize the context with '${r.name}' for ${e}`,t),d.close()})),d}_onActivateRequested(t,e){this._activateRequested.emit(e)}_onWidgetStateChanged(t,e){"confirmClosingDocument"===e.name&&this._stateChanged.emit(e)}}!function(t){t.saveHandlerProperty=new p.AttachedProperty({name:"saveHandler",create:()=>{}})}(C||(C={}));var b=s(34276),M=s(68239),S=s(78156),T=s.n(S);function F(t){return T().createElement(b.TextItem,{source:t.name,title:t.fullPath})}class W extends M.VDomRenderer{constructor(t){super(new W.Model(t.docManager)),this.node.title=this.model.path}render(){return T().createElement(F,{fullPath:this.model.path,name:this.model.name})}}function k(t){return T().createElement(b.TextItem,{source:t.fileStatus})}!function(t){class e extends M.VDomModel{constructor(t){super(),this._onTitleChange=t=>{const e=this._getAllState();this._name=t.label,this._triggerChange(e,this._getAllState())},this._onPathChange=(t,e)=>{const s=this._getAllState();this._path=e,this._name=a.PathExt.basename(e),this._triggerChange(s,this._getAllState())},this._path="",this._name="",this._widget=null,this._docManager=t}get path(){return this._path}get name(){return this._name}get widget(){return this._widget}set widget(t){const e=this._widget;if(null!==e){const t=this._docManager.contextForWidget(e);t?t.pathChanged.disconnect(this._onPathChange):e.title.changed.disconnect(this._onTitleChange)}const s=this._getAllState();if(this._widget=t,null===this._widget)this._path="",this._name="";else{const t=this._docManager.contextForWidget(this._widget);t?(this._path=t.path,this._name=a.PathExt.basename(t.path),t.pathChanged.connect(this._onPathChange)):(this._path="",this._name=this._widget.title.label,this._widget.title.changed.connect(this._onTitleChange))}this._triggerChange(s,this._getAllState())}_getAllState(){return[this._path,this._name]}_triggerChange(t,e){t[0]===e[0]&&t[1]===e[1]||this.stateChanged.emit(void 0)}}t.Model=e}(W||(W={}));class E extends M.VDomRenderer{constructor(t){super(new E.Model(t.docManager));const e=(t.translator||o.nullTranslator).load("jupyterlab");this._statusMap={completed:e.__("Saving completed"),started:e.__("Saving started"),failed:e.__("Saving failed")}}render(){return null===this.model||null===this.model.status?null:T().createElement(k,{fileStatus:this._statusMap[this.model.status]})}}!function(t){class e extends M.VDomModel{constructor(t){super(),this._onStatusChange=(t,e)=>{this._status=e,"completed"===this._status?(setTimeout((()=>{this._status=null,this.stateChanged.emit(void 0)}),2e3),this.stateChanged.emit(void 0)):this.stateChanged.emit(void 0)},this._status=null,this._widget=null,this._status=null,this.widget=null,this._docManager=t}get status(){return this._status}get widget(){return this._widget}set widget(t){var e,s;const i=this._widget;if(null!==i){const t=this._docManager.contextForWidget(i);t?t.saveState.disconnect(this._onStatusChange):(null===(e=this._widget.content)||void 0===e?void 0:e.saveStateChanged)&&this._widget.content.saveStateChanged.disconnect(this._onStatusChange)}if(this._widget=t,null===this._widget)this._status=null;else{const t=this._docManager.contextForWidget(this._widget);t?t.saveState.connect(this._onStatusChange):(null===(s=this._widget.content)||void 0===s?void 0:s.saveStateChanged)&&this._widget.content.saveStateChanged.connect(this._onStatusChange)}}}t.Model=e}(E||(E={}));const A=new m.Token("@jupyterlab/docmanager:IDocumentManager","A service for the manager for all\n documents used by the application. Use this if you want to open and close documents,\n create and delete files, and otherwise interact with the file system."),O=new m.Token("@jupyterlab/docmanager:IDocumentWidgetOpener","A service to open a widget.")}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5088],{45088:(e,n,t)=>{t.r(n),t.d(n,{CommandIDs:()=>b,default:()=>g});var a=t(3053),o=t(12982),l=t(38639),r=t(97104),d=t(16954),i=t(36768),u=t(71677),s=t(68239),c=t(33625),m=t(20998),p=t(31516);const _="@jupyterlab/mainmenu-extension:plugin";var b;!function(e){e.openEdit="editmenu:open",e.undo="editmenu:undo",e.redo="editmenu:redo",e.clearCurrent="editmenu:clear-current",e.clearAll="editmenu:clear-all",e.find="editmenu:find",e.goToLine="editmenu:go-to-line",e.openFile="filemenu:open",e.closeAndCleanup="filemenu:close-and-cleanup",e.createConsole="filemenu:create-console",e.shutdown="filemenu:shutdown",e.logout="filemenu:logout",e.openKernel="kernelmenu:open",e.interruptKernel="kernelmenu:interrupt",e.reconnectToKernel="kernelmenu:reconnect-to-kernel",e.restartKernel="kernelmenu:restart",e.restartKernelAndClear="kernelmenu:restart-and-clear",e.changeKernel="kernelmenu:change",e.shutdownKernel="kernelmenu:shutdown",e.shutdownAllKernels="kernelmenu:shutdownAll",e.openView="viewmenu:open",e.wordWrap="viewmenu:word-wrap",e.lineNumbering="viewmenu:line-numbering",e.matchBrackets="viewmenu:match-brackets",e.openRun="runmenu:open",e.run="runmenu:run",e.runAll="runmenu:run-all",e.restartAndRunAll="runmenu:restart-and-run-all",e.runAbove="runmenu:run-above",e.runBelow="runmenu:run-below",e.openTabs="tabsmenu:open",e.activateById="tabsmenu:activate-by-id",e.activatePreviouslyUsedTab="tabsmenu:activate-previously-used-tab",e.openSettings="settingsmenu:open",e.openHelp="helpmenu:open",e.getKernel="helpmenu:get-kernel",e.openFirst="mainmenu:open-first"}(b||(b={}));const g={id:_,description:"Adds and provides the application main menu.",requires:[a.IRouter,u.ITranslator],optional:[o.ICommandPalette,a.ILabShell,i.ISettingRegistry],provides:r.IMainMenu,activate:async(e,n,t,i,u,m)=>{const{commands:_}=e,g=t.load("jupyterlab"),C=new r.MainMenu(_);C.id="jp-MainMenu",C.addClass("jp-scrollbar-tiny"),m&&(await h.loadSettingsMenu(m,(e=>{C.addMenu(e,!1,{rank:e.rank})}),(e=>r.MainMenu.generateMenu(_,e,g)),t),C.update());const v=l.PageConfig.getOption("quitButton").toLowerCase();C.fileMenu.quitEntry="true"===v,function(e,n,t){const o=e.commands;o.addCommand(b.undo,(0,a.createSemanticCommand)(e,n.undoers.undo,{label:t.__("Undo")},t)),o.addCommand(b.redo,(0,a.createSemanticCommand)(e,n.undoers.redo,{label:t.__("Redo")},t)),o.addCommand(b.clearCurrent,(0,a.createSemanticCommand)(e,n.clearers.clearCurrent,{label:t.__("Clear")},t)),o.addCommand(b.clearAll,(0,a.createSemanticCommand)(e,n.clearers.clearAll,{label:t.__("Clear All")},t)),o.addCommand(b.goToLine,(0,a.createSemanticCommand)(e,n.goToLiners,{label:t.__("Go to Line…")},t))}(e,C.editMenu,g),function(e,n,t,r){const i=e.commands;i.addCommand(b.closeAndCleanup,{...(0,a.createSemanticCommand)(e,n.closeAndCleaners,{execute:"application:close",label:r.__("Close and Shut Down"),isEnabled:!0},r),isEnabled:()=>!!e.shell.currentWidget&&!!e.shell.currentWidget.title.closable}),i.addCommand(b.createConsole,(0,a.createSemanticCommand)(e,n.consoleCreators,{label:r.__("New Console for Activity")},r)),i.addCommand(b.shutdown,{label:r.__("Shut Down"),caption:r.__("Shut down JupyterLab"),isVisible:()=>n.quitEntry,isEnabled:()=>n.quitEntry,execute:()=>(0,o.showDialog)({title:r.__("Shutdown confirmation"),body:r.__("Please confirm you want to shut down JupyterLab."),buttons:[o.Dialog.cancelButton(),o.Dialog.warnButton({label:r.__("Shut Down")})]}).then((async n=>{if(n.button.accept){const n=d.ServerConnection.makeSettings(),t=l.URLExt.join(n.baseUrl,"api/shutdown");try{await Promise.all([e.serviceManager.sessions.shutdownAll(),e.serviceManager.terminals.shutdownAll()])}catch(e){console.log(`Failed to shutdown sessions and terminals: ${e}`)}return d.ServerConnection.makeRequest(t,{method:"POST"},n).then((e=>{if(!e.ok)throw new d.ServerConnection.ResponseError(e);{const e=document.createElement("div"),n=document.createElement("p");n.textContent=r.__("You have shut down the Jupyter server. You can now close this tab.");const t=document.createElement("p");t.textContent=r.__("To use JupyterLab again, you will need to relaunch it."),e.appendChild(n),e.appendChild(t),(0,o.showDialog)({title:r.__("Server stopped"),body:new p.Widget({node:e}),buttons:[]}),window.close()}})).catch((e=>{throw new d.ServerConnection.NetworkError(e)}))}}))}),i.addCommand(b.logout,{label:r.__("Log Out"),caption:r.__("Log out of JupyterLab"),isVisible:()=>n.quitEntry,isEnabled:()=>n.quitEntry,execute:()=>{t.navigate("/logout",{hard:!0})}})}(e,C.fileMenu,n,g),function(e,n,t){const l=e.commands;l.addCommand(b.interruptKernel,{...(0,a.createSemanticCommand)(e,n.kernelUsers.interruptKernel,{label:t.__("Interrupt Kernel"),caption:t.__("Interrupt the kernel")},t),icon:e=>e.toolbar?s.stopIcon:void 0}),l.addCommand(b.reconnectToKernel,(0,a.createSemanticCommand)(e,n.kernelUsers.reconnectToKernel,{label:t.__("Reconnect to Kernel")},t)),l.addCommand(b.restartKernel,{...(0,a.createSemanticCommand)(e,n.kernelUsers.restartKernel,{label:t.__("Restart Kernel…"),caption:t.__("Restart the kernel")},t),icon:e=>e.toolbar?s.refreshIcon:void 0}),l.addCommand(b.restartKernelAndClear,(0,a.createSemanticCommand)(e,[n.kernelUsers.restartKernel,n.kernelUsers.clearWidget],{label:t.__("Restart Kernel and Clear…")},t)),l.addCommand(b.changeKernel,(0,a.createSemanticCommand)(e,n.kernelUsers.changeKernel,{label:t.__("Change Kernel…")},t)),l.addCommand(b.shutdownKernel,(0,a.createSemanticCommand)(e,n.kernelUsers.shutdownKernel,{label:t.__("Shut Down Kernel"),caption:t.__("Shut down kernel")},t)),l.addCommand(b.shutdownAllKernels,{label:t.__("Shut Down All Kernels…"),isEnabled:()=>!e.serviceManager.sessions.running().next().done,execute:()=>(0,o.showDialog)({title:t.__("Shut Down All?"),body:t.__("Shut down all kernels?"),buttons:[o.Dialog.cancelButton({label:t.__("Dismiss")}),o.Dialog.warnButton({label:t.__("Shut Down All")})]}).then((n=>{if(n.button.accept)return e.serviceManager.sessions.shutdownAll()}))})}(e,C.kernelMenu,g),function(e,n,t){const o=e.commands;o.addCommand(b.run,{...(0,a.createSemanticCommand)(e,n.codeRunners.run,{label:t.__("Run Selected"),caption:t.__("Run Selected")},t),icon:e=>e.toolbar?s.runIcon:void 0}),o.addCommand(b.runAll,(0,a.createSemanticCommand)(e,n.codeRunners.runAll,{label:t.__("Run All"),caption:t.__("Run All")},t)),o.addCommand(b.restartAndRunAll,{...(0,a.createSemanticCommand)(e,[n.codeRunners.restart,n.codeRunners.runAll],{label:t.__("Restart Kernel and Run All"),caption:t.__("Restart Kernel and Run All")},t),icon:e=>e.toolbar?s.fastForwardIcon:void 0})}(e,C.runMenu,g),function(e,n,t){const o=e.commands;o.addCommand(b.lineNumbering,(0,a.createSemanticCommand)(e,n.editorViewers.toggleLineNumbers,{label:t.__("Show Line Numbers")},t)),o.addCommand(b.matchBrackets,(0,a.createSemanticCommand)(e,n.editorViewers.toggleMatchBrackets,{label:t.__("Match Brackets")},t)),o.addCommand(b.wordWrap,(0,a.createSemanticCommand)(e,n.editorViewers.toggleWordWrap,{label:t.__("Wrap Words")},t))}(e,C.viewMenu,g),function(e,n,t){e.commands.addCommand(b.getKernel,(0,a.createSemanticCommand)(e,n.getKernel,{label:t.__("Get Kernel"),isVisible:!1},t))}(e,C.helpMenu,g),u&&function(e,n,t,a){const o=e.commands,l=[];let r;o.addCommand(b.activateById,{label:n=>{if(void 0===n.id)return a.__("Activate a widget by its `id`.");const t=n.id||"",o=(0,c.find)(e.shell.widgets("main"),(e=>e.id===t));return o&&o.title.label||""},isToggled:n=>{const t=n.id||"";return!!e.shell.currentWidget&&e.shell.currentWidget.id===t},execute:n=>e.shell.activateById(n.id||"")});let d="";o.addCommand(b.activatePreviouslyUsedTab,{label:a.__("Activate Previously Used Tab"),isEnabled:()=>!!d,execute:()=>o.execute(b.activateById,{id:d})}),t&&e.restored.then((()=>{const a=()=>{r&&!r.isDisposed&&r.dispose(),l.length=0;let t=!1;for(const n of e.shell.widgets("main"))n.id===d&&(t=!0),l.push({command:b.activateById,args:{id:n.id}});r=n.addGroup(l,1),d=t?d:""};a(),t.layoutModified.connect((()=>{a()})),t.currentChanged.connect(((e,n)=>{const t=n.oldValue;t&&(d=t.id)}))}))}(e,C.tabsMenu,u,g);const w=e=>{C.activeMenu=e,C.openActiveMenu()};return _.addCommand(b.openEdit,{label:g.__("Open Edit Menu"),execute:()=>w(C.editMenu)}),_.addCommand(b.openFile,{label:g.__("Open File Menu"),execute:()=>w(C.fileMenu)}),_.addCommand(b.openKernel,{label:g.__("Open Kernel Menu"),execute:()=>w(C.kernelMenu)}),_.addCommand(b.openRun,{label:g.__("Open Run Menu"),execute:()=>w(C.runMenu)}),_.addCommand(b.openView,{label:g.__("Open View Menu"),execute:()=>w(C.viewMenu)}),_.addCommand(b.openSettings,{label:g.__("Open Settings Menu"),execute:()=>w(C.settingsMenu)}),_.addCommand(b.openTabs,{label:g.__("Open Tabs Menu"),execute:()=>w(C.tabsMenu)}),_.addCommand(b.openHelp,{label:g.__("Open Help Menu"),execute:()=>w(C.helpMenu)}),_.addCommand(b.openFirst,{label:g.__("Open First Menu"),execute:()=>{C.activeIndex=0,C.openActiveMenu()}}),i&&(i.addItem({command:b.shutdown,category:g.__("Main Area")}),i.addItem({command:b.logout,category:g.__("Main Area")}),i.addItem({command:b.shutdownAllKernels,category:g.__("Kernel Operations")}),i.addItem({command:b.activatePreviouslyUsedTab,category:g.__("Main Area")})),e.shell.add(C,"menu",{rank:100}),C}};var h;!function(e){async function n(e){(await(0,o.showDialog)({title:e.__("Information"),body:e.__("Menu customization has changed. You will need to reload JupyterLab to see the changes."),buttons:[o.Dialog.cancelButton(),o.Dialog.okButton({label:e.__("Reload")})]})).button.accept&&location.reload()}e.loadSettingsMenu=async function(e,t,a,l){var r;const d=l.load("jupyterlab");let u=null,s={};function c(n){var t,a;s={};const o=Object.keys(e.plugins).map((n=>{var t,a;const o=null!==(a=null===(t=e.plugins[n].schema["jupyter.lab.menus"])||void 0===t?void 0:t.main)&&void 0!==a?a:[];return s[n]=o,o})).concat([null!==(a=null===(t=n["jupyter.lab.menus"])||void 0===t?void 0:t.main)&&void 0!==a?a:[]]).reduceRight(((e,n)=>i.SettingRegistry.reconcileMenus(e,n,!0)),n.properties.menus.default);n.properties.menus.default=i.SettingRegistry.reconcileMenus(o,n.properties.menus.default,!0).sort(((e,n)=>{var t,a;return(null!==(t=e.rank)&&void 0!==t?t:1/0)-(null!==(a=n.rank)&&void 0!==a?a:1/0)}))}e.transform(_,{compose:e=>{var n,t,a,o;u||(u=m.JSONExt.deepCopy(e.schema),c(u));const l=null!==(a=null===(t=null===(n=u.properties)||void 0===n?void 0:n.menus)||void 0===t?void 0:t.default)&&void 0!==a?a:[],r={...e.data.user,menus:null!==(o=e.data.user.menus)&&void 0!==o?o:[]},d={...e.data.composite,menus:i.SettingRegistry.reconcileMenus(l,r.menus)};return e.data={composite:d,user:r},e},fetch:e=>(u||(u=m.JSONExt.deepCopy(e.schema),c(u)),{data:e.data,id:e.id,raw:e.raw,schema:u,version:e.version})});const p=await e.load(_),b=null!==(r=m.JSONExt.deepCopy(p.composite.menus))&&void 0!==r?r:[],g=new Array;o.MenuFactory.createMenus(b.filter((e=>!e.disabled)).map((e=>{var n;return{...e,items:i.SettingRegistry.filterDisabledItems(null!==(n=e.items)&&void 0!==n?n:[])}})),a).forEach((e=>{g.push(e),t(e)})),p.changed.connect((()=>{var e;const t=null!==(e=p.composite.menus)&&void 0!==e?e:[];m.JSONExt.deepEqual(b,t)||n(d)})),e.pluginChanged.connect((async(l,r)=>{var u,c,p;if(r!==_){const l=null!==(u=s[r])&&void 0!==u?u:[],_=null!==(p=null===(c=e.plugins[r].schema["jupyter.lab.menus"])||void 0===c?void 0:c.main)&&void 0!==p?p:[];if(!m.JSONExt.deepEqual(l,_))if(s[r])await n(d);else{s[r]=m.JSONExt.deepCopy(_);const e=i.SettingRegistry.reconcileMenus(_,b,!1,!1).filter((e=>!e.disabled)).map((e=>{var n;return{...e,items:i.SettingRegistry.filterDisabledItems(null!==(n=e.items)&&void 0!==n?n:[])}}));o.MenuFactory.updateMenus(g,e,a).forEach((e=>{t(e)}))}}}))}}(h||(h={}))}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[514],{45135:(e,t,i)=>{i.r(t),i.d(t,{INotebookPathOpener:()=>C,INotebookShell:()=>y,NotebookApp:()=>H,NotebookShell:()=>k,PanelHandler:()=>f,Private:()=>v,SidePanelHandler:()=>w,SidePanelPalette:()=>W,defaultNotebookPathOpener:()=>b});var s,n=i(3053),r=i(35312),a=i(75677),o=i(20389),d=i(38639),l=i(97934),h=i(71677),p=i(33625),g=i(20998),u=i(81997),c=i(31516),_=i(68239),m=i(49503);class f{constructor(){this._panelChildHook=(e,t)=>{if("child-removed"===t.type){const e=t.child;p.ArrayExt.removeFirstWhere(this._items,(t=>t.widget===e))}return!0},this._items=new Array,this._panel=new c.Panel,m.MessageLoop.installMessageHook(this._panel,this._panelChildHook)}get panel(){return this._panel}addWidget(e,t){e.parent=null;const i={widget:e,rank:t},n=p.ArrayExt.upperBound(this._items,i,s.itemCmp);p.ArrayExt.insert(this._items,n,i),this._panel.insertWidget(n,e)}}class w extends f{constructor(e){super(),this._isHiddenByUser=!1,this._widgetAdded=new u.Signal(this),this._widgetRemoved=new u.Signal(this),this._area=e,this._panel.hide(),this._currentWidget=null,this._lastCurrentWidget=null,this._widgetPanel=new c.StackedPanel,this._widgetPanel.widgetRemoved.connect(this._onWidgetRemoved,this),this._closeButton=document.createElement("button"),_.closeIcon.element({container:this._closeButton,height:"16px",width:"auto"}),this._closeButton.onclick=()=>{this.collapse(),this.hide()},this._closeButton.className="jp-Button jp-SidePanel-collapse",this._closeButton.title="Collapse side panel";const t=new c.Widget({node:this._closeButton});this._panel.addWidget(t),this._panel.addWidget(this._widgetPanel)}get currentWidget(){return this._currentWidget||this._lastCurrentWidget||(this._items.length>0?this._items[0].widget:null)}get area(){return this._area}get isVisible(){return this._panel.isVisible}get panel(){return this._panel}get widgets(){return this._items.map((e=>e.widget))}get widgetAdded(){return this._widgetAdded}get widgetRemoved(){return this._widgetRemoved}get closeButton(){return this._closeButton}expand(e){e?this._currentWidget&&this._currentWidget.id===e?(this.collapse(),this.hide()):(this.collapse(),this.hide(),this.activate(e),this.show()):this.currentWidget&&(this._currentWidget=this.currentWidget,this.activate(this._currentWidget.id),this.show())}activate(e){const t=this._findWidgetByID(e);t&&(this._currentWidget=t,t.show(),t.activate())}has(e){return null!==this._findWidgetByID(e)}collapse(){var e;null===(e=this._currentWidget)||void 0===e||e.hide(),this._currentWidget=null}addWidget(e,t){e.parent=null,e.hide();const i={widget:e,rank:t},s=this._findInsertIndex(i);p.ArrayExt.insert(this._items,s,i),this._widgetPanel.insertWidget(s,e),this._refreshVisibility(),this._widgetAdded.emit(e)}hide(){this._isHiddenByUser=!0,this._refreshVisibility()}show(){this._isHiddenByUser=!1,this._refreshVisibility()}_findInsertIndex(e){return p.ArrayExt.upperBound(this._items,e,s.itemCmp)}_findWidgetIndex(e){return p.ArrayExt.findFirstIndex(this._items,(t=>t.widget===e))}_findWidgetByID(e){const t=(0,p.find)(this._items,(t=>t.widget.id===e));return t?t.widget:null}_refreshVisibility(){this._panel.setHidden(this._isHiddenByUser)}_onWidgetRemoved(e,t){t===this._lastCurrentWidget&&(this._lastCurrentWidget=null),p.ArrayExt.removeAt(this._items,this._findWidgetIndex(t)),this._refreshVisibility(),this._widgetRemoved.emit(t)}}class W{constructor(e){this._items=[],this._commandPalette=e.commandPalette,this._command=e.command}getItem(e,t){const i=this._items;for(let s=0;s<i.length;s++){const n=i[s];if(n.widgetId===e.id&&n.area===t)return n}return null}addItem(e,t){if(this.getItem(e,t))return;const i=this._commandPalette.addItem({command:this._command,category:"View",args:{side:t,title:`Show ${e.title.caption}`,id:e.id}});this._items.push({widgetId:e.id,area:t,disposable:i})}removeItem(e,t){const i=this.getItem(e,t);i&&i.disposable.dispose()}}!function(e){e.itemCmp=function(e,t){return e.rank-t.rank}}(s||(s={}));const y=new g.Token("@jupyter-notebook/application:INotebookShell");class k extends c.Widget{constructor(){super(),this._translator=h.nullTranslator,this._currentChanged=new u.Signal(this),this._mainWidgetLoaded=new g.PromiseDelegate,this.id="main",this._userLayout={},this._topHandler=new f,this._menuHandler=new f,this._leftHandler=new w("left"),this._rightHandler=new w("right"),this._main=new c.Panel;const e=this._topWrapper=new c.Panel,t=this._menuWrapper=new c.Panel;this._topHandler.panel.id="top-panel",this._topHandler.panel.node.setAttribute("role","banner"),this._menuHandler.panel.id="menu-panel",this._menuHandler.panel.node.setAttribute("role","navigation"),this._main.id="main-panel",this._main.node.setAttribute("role","main"),this._spacer_top=new c.Widget,this._spacer_top.id="spacer-widget-top",this._spacer_bottom=new c.Widget,this._spacer_bottom.id="spacer-widget-bottom",e.id="top-panel-wrapper",e.addWidget(this._topHandler.panel),t.id="menu-panel-wrapper",t.addWidget(this._menuHandler.panel);const i=new c.BoxLayout,s=this._leftHandler,n=this._rightHandler;s.panel.id="jp-left-stack",s.panel.node.setAttribute("role","complementary"),n.panel.id="jp-right-stack",n.panel.node.setAttribute("role","complementary"),s.hide(),n.hide();const r=new c.BoxLayout({spacing:0,direction:"top-to-bottom"});c.BoxLayout.setStretch(this._topWrapper,0),c.BoxLayout.setStretch(this._menuWrapper,0),c.BoxLayout.setStretch(this._main,1);const a=new c.Panel({layout:r});a.addWidget(this._topWrapper),a.addWidget(this._menuWrapper),a.addWidget(this._spacer_top),a.addWidget(this._main),a.addWidget(this._spacer_bottom),a.layout=r;const o=new c.SplitPanel;o.id="main-split-panel",o.spacing=1,c.BoxLayout.setStretch(o,1),c.SplitPanel.setStretch(s.panel,0),c.SplitPanel.setStretch(n.panel,0),c.SplitPanel.setStretch(a,1),o.addWidget(s.panel),o.addWidget(a),o.addWidget(n.panel),o.setRelativeSizes([1,2.5,1]),i.spacing=0,i.addWidget(o),this.layout=i;const d=this._skipLinkWidgetHandler=new v.SkipLinkWidgetHandler(this);this.add(d.skipLinkWidget,"top",{rank:0}),this._skipLinkWidgetHandler.show()}get currentChanged(){return this._currentChanged}get currentWidget(){var e;return null!==(e=this._main.widgets[0])&&void 0!==e?e:null}get top(){return this._topWrapper}get menu(){return this._menuWrapper}get leftHandler(){return this._leftHandler}get rightHandler(){return this._rightHandler}get leftCollapsed(){return!(this._leftHandler.isVisible&&this._leftHandler.panel.isVisible)}get rightCollapsed(){return!(this._rightHandler.isVisible&&this._rightHandler.panel.isVisible)}get restored(){return this._mainWidgetLoaded.promise}get translator(){var e;return null!==(e=this._translator)&&void 0!==e?e:h.nullTranslator}set translator(e){if(e!==this._translator){this._translator=e;const t=e.load("notebook");this._leftHandler.closeButton.title=t.__("Collapse %1 side panel",this._leftHandler.area),this._rightHandler.closeButton.title=t.__("Collapse %1 side panel",this._rightHandler.area)}}get userLayout(){return g.JSONExt.deepCopy(this._userLayout)}activateById(e){for(const t of["main","top","left","right","menu"]){const i=(0,p.find)(this.widgets(t),(t=>t.id===e));i&&("left"===t?this.expandLeft(e):"right"===t?this.expandRight(e):i.activate())}}add(e,t,i){var s,n;let r;r=(null==i?void 0:i.type)&&this._userLayout[i.type]?this._userLayout[i.type]:this._userLayout[e.id],t=null!==(s=null==r?void 0:r.area)&&void 0!==s?s:t;const a=null!==(n=null==(i=i||(null==r?void 0:r.options)?{...i,...null==r?void 0:r.options}:void 0)?void 0:i.rank)&&void 0!==n?n:900;switch(t){case"top":return this._topHandler.addWidget(e,a);case"menu":return this._menuHandler.addWidget(e,a);case"main":case void 0:if(this._main.widgets.length>0)return;this._main.addWidget(e),this._main.update(),this._currentChanged.emit(void 0),this._mainWidgetLoaded.resolve();break;case"left":return this._leftHandler.addWidget(e,a);case"right":return this._rightHandler.addWidget(e,a);default:console.warn(`Cannot add widget to area: ${t}`)}}collapseTop(){this._topWrapper.setHidden(!0),this._spacer_top.setHidden(!0)}expandTop(){this._topWrapper.setHidden(!1),this._spacer_top.setHidden(!1)}*widgets(e){switch(null!=e?e:"main"){case"top":return void(yield*this._topHandler.panel.widgets);case"menu":return void(yield*this._menuHandler.panel.widgets);case"main":return void(yield*this._main.widgets);case"left":return void(yield*this._leftHandler.widgets);case"right":return void(yield*this._rightHandler.widgets);default:return void console.error(`This shell has no area called "${e}"`)}}expandLeft(e){this._leftHandler.panel.show(),this._leftHandler.expand(e)}collapseLeft(){this._leftHandler.collapse(),this._leftHandler.panel.hide()}expandRight(e){this._rightHandler.panel.show(),this._rightHandler.expand(e)}collapseRight(){this._rightHandler.collapse(),this._rightHandler.panel.hide()}async restoreLayout(e){this._userLayout=e}}var v,P;!function(e){e.SkipLinkWidgetHandler=class{constructor(e){this._isDisposed=!1;const t=this._skipLinkWidget=new c.Widget,i=document.createElement("a");i.href="#first-cell",i.tabIndex=1,i.text="Skip to Main",i.className="skip-link",i.addEventListener("click",this),t.addClass("jp-skiplink"),t.id="jp-skiplink",t.node.appendChild(i)}handleEvent(e){"click"===e.type&&this._focusMain()}_focusMain(){const e=document.querySelector("#main-panel .jp-InputArea-editor");e.tabIndex=1,e.focus()}get skipLinkWidget(){return this._skipLinkWidget}dispose(){this.isDisposed||(this._isDisposed=!0,this._skipLinkWidget.node.removeEventListener("click",this),this._skipLinkWidget.dispose())}hide(){this._skipLinkWidget.hide()}show(){this._skipLinkWidget.show()}get isDisposed(){return this._isDisposed}}}(v||(v={}));class H extends n.JupyterFrontEnd{constructor(e={shell:new k}){var t,i;if(super({...e,shell:null!==(t=e.shell)&&void 0!==t?t:new k}),this.name="Jupyter Notebook",this.namespace=this.name,this.status=new o.J(this),this.version=null!==(i=d.PageConfig.getOption("appVersion"))&&void 0!==i?i:"unknown",this._info=n.JupyterLab.defaultInfo,this._formatter=new l.Throttler((()=>{P.setFormat(this)}),250),this.docRegistry.addModelFactory(new r.Base64ModelFactory),e.mimeExtensions)for(const t of(0,a.as)(e.mimeExtensions))this.registerPlugin(t);const s=Object.keys(n.JupyterLab.defaultInfo).reduce(((t,i)=>(i in e&&(t[i]=JSON.parse(JSON.stringify(e[i]))),t)),{});this._info={...n.JupyterLab.defaultInfo,...s},this.restored=this.shell.restored,this.restored.then((()=>this._formatter.invoke()))}get info(){return this._info}get paths(){return{urls:{base:d.PageConfig.getOption("baseUrl"),notFound:d.PageConfig.getOption("notFoundUrl"),app:d.PageConfig.getOption("appUrl"),static:d.PageConfig.getOption("staticUrl"),settings:d.PageConfig.getOption("settingsUrl"),themes:d.PageConfig.getOption("themesUrl"),doc:d.PageConfig.getOption("docUrl"),translations:d.PageConfig.getOption("translationsApiUrl"),hubHost:d.PageConfig.getOption("hubHost")||void 0,hubPrefix:d.PageConfig.getOption("hubPrefix")||void 0,hubUser:d.PageConfig.getOption("hubUser")||void 0,hubServerName:d.PageConfig.getOption("hubServerName")||void 0},directories:{appSettings:d.PageConfig.getOption("appSettingsDir"),schemas:d.PageConfig.getOption("schemasDir"),static:d.PageConfig.getOption("staticDir"),templates:d.PageConfig.getOption("templatesDir"),themes:d.PageConfig.getOption("themesDir"),userSettings:d.PageConfig.getOption("userSettingsDir"),serverRoot:d.PageConfig.getOption("serverRoot"),workspaces:d.PageConfig.getOption("workspacesDir")}}}handleEvent(e){super.handleEvent(e),"resize"===e.type&&this._formatter.invoke()}registerPluginModule(e){let t=e.default;Object.prototype.hasOwnProperty.call(e,"__esModule")||(t=e),Array.isArray(t)||(t=[t]),t.forEach((e=>{try{this.registerPlugin(e)}catch(e){console.error(e)}}))}registerPluginModules(e){e.forEach((e=>{this.registerPluginModule(e)}))}}!function(e){e.setFormat=function(e){e.format=window.matchMedia("only screen and (max-width: 760px)").matches?"mobile":"desktop"}}(P||(P={}));const b=new class{open(e){const{prefix:t,path:i,searchParams:s,target:n,features:r}=e,a=new URL(d.URLExt.join(t,null!=i?i:""),window.location.origin);return s&&(a.search=s.toString()),window.open(a,n,r)}},C=new g.Token("@jupyter-notebook/application:INotebookPathOpener")}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[853],{76853:(e,t,i)=>{i.r(t),i.d(t,{ConnectionLost:()=>a,IConnectionLost:()=>E,ILabShell:()=>H,ILabStatus:()=>I,ILayoutRestorer:()=>x.L,IMimeDocumentTracker:()=>m.w2,IRouter:()=>R,ITreePathUpdater:()=>j,JupyterFrontEnd:()=>g,JupyterFrontEndContextMenu:()=>o,JupyterLab:()=>A,LabShell:()=>B,LayoutRestorer:()=>x.c,Router:()=>S,createRendermimePlugin:()=>m.aX,createRendermimePlugins:()=>m.as,createSemanticCommand:()=>O});var n=i(12982),s=i(71677);const a=async function(e,t,i){const a=(i=i||s.nullTranslator).load("jupyterlab"),r=a.__("Server Connection Error"),o=a.__("A connection to the Jupyter server could not be established.\nJupyterLab will continue trying to reconnect.\nCheck your network connection or Jupyter server configuration.\n");return(0,n.showErrorMessage)(r,{message:o})};var r,o,d=i(35312),l=i(16954),h=i(68239),c=i(77328),u=i(20998),p=i(81997);class g extends c.Application{constructor(e){super(e),this._formatChanged=new p.Signal(this),this.contextMenu=new h.ContextMenuSvg({commands:this.commands,renderer:e.contextMenuRenderer,groupByTarget:!1,sortBySelector:!1});const t=new Promise((e=>{requestAnimationFrame((()=>{e()}))}));this.commandLinker=e.commandLinker||new n.CommandLinker({commands:this.commands}),this.docRegistry=e.docRegistry||new d.DocumentRegistry,this.restored=e.restored||this.started.then((()=>t)).catch((()=>t)),this.serviceManager=e.serviceManager||new l.ServiceManager}get format(){return this._format}set format(e){this._format!==e&&(this._format=e,document.body.dataset.format=e,this._formatChanged.emit(e))}get formatChanged(){return this._formatChanged}contextMenuHitTest(e){if(!(this._contextMenuEvent&&this._contextMenuEvent.target instanceof Node))return;let t=this._contextMenuEvent.target;do{if(t instanceof HTMLElement&&e(t))return t;t=t.parentNode}while(t&&t.parentNode&&t!==t.parentNode)}evtContextMenu(e){if(this._contextMenuEvent=e,!e.shiftKey&&!r.suppressContextMenu(e.target)&&this.contextMenu.open(e)){const t=this.contextMenu.menu.items;if(1===t.length&&t[0].command===o.contextMenu)return void this.contextMenu.menu.close();e.preventDefault(),e.stopPropagation()}}}!function(e){e.inDocMode=function(e,t){const i=new RegExp(`^${t.urls.doc}`);return!!e.match(i)},e.IPaths=new u.Token("@jupyterlab/application:IPaths","A service providing information about various\n URLs and server paths for the current application. Use this service if you want to\n assemble URLs to use the JupyterLab REST API."),e.ITreeResolver=new u.Token("@jupyterlab/application:ITreeResolver","A service to resolve the tree path.")}(g||(g={})),function(e){e.suppressContextMenu=function(e){return null!==e.closest("[data-jp-suppress-context-menu]")}}(r||(r={})),function(e){e.contextMenu="__internal:context-menu-info"}(o||(o={}));var _=i(38639),m=i(75677),f=i(33625),v=i(49503),y=i(97934),w=i(31516);const b="jp-SideBar",P="jp-mod-current",k="jp-mod-active",C=900,T="jp-Activity",H=new u.Token("@jupyterlab/application:ILabShell","A service for interacting with the JupyterLab shell. The top-level ``application`` object also has a reference to the shell, but it has a restricted interface in order to be agnostic to different shell implementations on the application. Use this to get more detailed information about currently active widgets and layout state.");class B extends w.Widget{constructor(e){super(),this._dockChildHook=(e,t)=>{switch(t.type){case"child-added":t.child.addClass(T),this._tracker.add(t.child);break;case"child-removed":t.child.removeClass(T),this._tracker.remove(t.child)}return!0},this._activeChanged=new p.Signal(this),this._cachedLayout=null,this._currentChanged=new p.Signal(this),this._currentPath="",this._currentPathChanged=new p.Signal(this),this._modeChanged=new p.Signal(this),this._isRestored=!1,this._layoutModified=new p.Signal(this),this._layoutDebouncer=new y.Debouncer((()=>{this._layoutModified.emit(void 0)}),0),this._restored=new u.PromiseDelegate,this._tracker=new w.FocusTracker,this._topHandlerHiddenByUser=!1,this._idTypeMap=new Map,this._mainOptionsCache=new Map,this._sideOptionsCache=new Map,this._delayedWidget=new Array,this.addClass("jp-LabShell"),this.id="main",!1===(null==e?void 0:e.waitForRestore)&&(this._userLayout={"multiple-document":{},"single-document":{}});const t=this._skipLinkWidget=new L.SkipLinkWidget(this);this._skipLinkWidget.show();const i=new w.Panel;i.addClass("jp-skiplink-wrapper"),i.addWidget(t);const n=this._headerPanel=new w.BoxPanel,a=this._menuHandler=new L.PanelHandler;a.panel.node.setAttribute("role","navigation");const r=this._topHandler=new L.PanelHandler;r.panel.node.setAttribute("role","banner");const o=this._bottomPanel=new w.BoxPanel;o.node.setAttribute("role","contentinfo");const l=new w.BoxPanel,c=this._vsplitPanel=new L.RestorableSplitPanel,g=this._dockPanel=new h.DockPanelSvg({hiddenMode:w.Widget.HiddenMode.Display});v.MessageLoop.installMessageHook(g,this._dockChildHook);const _=this._hsplitPanel=new L.RestorableSplitPanel,m=this._downPanel=new h.TabPanelSvg({tabsMovable:!0}),f=this._leftHandler=new L.SideBarHandler,P=this._rightHandler=new L.SideBarHandler,k=new w.BoxLayout;n.id="jp-header-panel",a.panel.id="jp-menu-panel",r.panel.id="jp-top-panel",o.id="jp-bottom-panel",l.id="jp-main-content-panel",c.id="jp-main-vsplit-panel",g.id="jp-main-dock-panel",_.id="jp-main-split-panel",m.id="jp-down-stack",f.sideBar.addClass(b),f.sideBar.addClass("jp-mod-left"),f.sideBar.node.setAttribute("role","complementary"),f.stackedPanel.id="jp-left-stack",P.sideBar.addClass(b),P.sideBar.addClass("jp-mod-right"),P.sideBar.node.setAttribute("role","complementary"),P.stackedPanel.id="jp-right-stack",g.node.setAttribute("role","main"),l.spacing=0,c.spacing=1,g.spacing=5,_.spacing=1,n.direction="top-to-bottom",c.orientation="vertical",l.direction="left-to-right",_.orientation="horizontal",o.direction="bottom-to-top",w.SplitPanel.setStretch(f.stackedPanel,0),w.SplitPanel.setStretch(m,0),w.SplitPanel.setStretch(g,1),w.SplitPanel.setStretch(P.stackedPanel,0),w.BoxPanel.setStretch(f.sideBar,0),w.BoxPanel.setStretch(_,1),w.BoxPanel.setStretch(P.sideBar,0),w.SplitPanel.setStretch(c,1),_.addWidget(f.stackedPanel),_.addWidget(g),_.addWidget(P.stackedPanel),c.addWidget(_),c.addWidget(m),l.addWidget(f.sideBar),l.addWidget(c),l.addWidget(P.sideBar),k.direction="top-to-bottom",k.spacing=0,c.setRelativeSizes([3,1]),_.setRelativeSizes([1,2.5,1]),w.BoxLayout.setStretch(n,0),w.BoxLayout.setStretch(a.panel,0),w.BoxLayout.setStretch(r.panel,0),w.BoxLayout.setStretch(l,1),w.BoxLayout.setStretch(o,0),k.addWidget(i),k.addWidget(n),k.addWidget(r.panel),k.addWidget(l),k.addWidget(o),this._headerPanel.hide(),this._bottomPanel.hide(),this._downPanel.hide(),this.layout=k,this._tracker.currentChanged.connect(this._onCurrentChanged,this),this._tracker.activeChanged.connect(this._onActiveChanged,this),this._dockPanel.layoutModified.connect(this._onLayoutModified,this),this._vsplitPanel.updated.connect(this._onLayoutModified,this),this._downPanel.currentChanged.connect(this._onLayoutModified,this),this._downPanel.tabBar.tabMoved.connect(this._onTabPanelChanged,this),this._downPanel.stackedPanel.widgetRemoved.connect(this._onTabPanelChanged,this),this._leftHandler.updated.connect(this._onLayoutModified,this),this._rightHandler.updated.connect(this._onLayoutModified,this),this._hsplitPanel.updated.connect(this._onLayoutModified,this);const C=this._titleHandler=new L.TitleHandler(this);this.add(C,"top",{rank:100}),"multiple-document"===this._dockPanel.mode?(this._topHandler.addWidget(this._menuHandler.panel,100),C.hide()):k.insertWidget(3,this._menuHandler.panel),this.translator=s.nullTranslator,this.currentChanged.connect(((e,t)=>{let i=t.newValue,n=t.oldValue;n&&(n.title.changed.disconnect(this._updateTitlePanelTitle,this),n instanceof d.DocumentWidget&&n.context.pathChanged.disconnect(this._updateCurrentPath,this)),i&&(i.title.changed.connect(this._updateTitlePanelTitle,this),this._updateTitlePanelTitle(),i instanceof d.DocumentWidget&&i.context.pathChanged.connect(this._updateCurrentPath,this)),this._updateCurrentPath()}))}get activeChanged(){return this._activeChanged}get activeWidget(){return this._tracker.activeWidget}get addButtonEnabled(){return this._dockPanel.addButtonEnabled}set addButtonEnabled(e){this._dockPanel.addButtonEnabled=e}get addRequested(){return this._dockPanel.addRequested}get currentChanged(){return this._currentChanged}get currentPath(){return this._currentPath}get currentPathChanged(){return this._currentPathChanged}get currentWidget(){return this._tracker.currentWidget}get layoutModified(){return this._layoutModified}get leftCollapsed(){return!this._leftHandler.sideBar.currentTitle}get rightCollapsed(){return!this._rightHandler.sideBar.currentTitle}get presentationMode(){return this.hasClass("jp-mod-presentationMode")}set presentationMode(e){this.toggleClass("jp-mod-presentationMode",e)}get mode(){return this._dockPanel.mode}set mode(e){const t=this._dockPanel;if(e===t.mode)return;const i=this.currentWidget;if("single-document"===e)this._cachedLayout=t.saveLayout(),t.mode=e,this.currentWidget&&t.activateWidget(this.currentWidget),this.layout.insertWidget(3,this._menuHandler.panel),this._titleHandler.show(),this._updateTitlePanelTitle(),this._topHandlerHiddenByUser&&this._topHandler.panel.hide();else{const n=Array.from(t.widgets());t.mode=e,this._cachedLayout&&(L.normalizeAreaConfig(t,this._cachedLayout.main),t.restoreLayout(this._cachedLayout),this._cachedLayout=null),this._layoutRestorer.isDeferred&&this._layoutRestorer.restoreDeferred().then((e=>{if(e){const{currentWidget:t,dock:i}=e;i&&this._dockPanel.restoreLayout(i),t&&this.activateById(t.id)}})).catch((e=>{console.error("Failed to restore the deferred layout."),console.error(e)})),n.forEach((e=>{e.parent||this._addToMainArea(e,{...this._mainOptionsCache.get(e),activate:!1})})),this._mainOptionsCache.clear(),i&&t.activateWidget(i),this.add(this._menuHandler.panel,"top",{rank:100}),this._titleHandler.hide()}this.node.dataset.shellMode=e,this._downPanel.fit(),this._modeChanged.emit(e)}get modeChanged(){return this._modeChanged}get restored(){return this._restored.promise}get translator(){var e;return null!==(e=this._translator)&&void 0!==e?e:s.nullTranslator}set translator(e){if(e!==this._translator){this._translator=e,h.TabBarSvg.translator=e;const t=e.load("jupyterlab");this._menuHandler.panel.node.setAttribute("aria-label",t.__("main menu")),this._leftHandler.sideBar.node.setAttribute("aria-label",t.__("main sidebar")),this._leftHandler.sideBar.contentNode.setAttribute("aria-label",t.__("main sidebar")),this._rightHandler.sideBar.node.setAttribute("aria-label",t.__("alternate sidebar")),this._rightHandler.sideBar.contentNode.setAttribute("aria-label",t.__("alternate sidebar"))}}get userLayout(){return u.JSONExt.deepCopy(this._userLayout)}activateById(e){if(this._leftHandler.has(e))return void this._leftHandler.activate(e);if(this._rightHandler.has(e))return void this._rightHandler.activate(e);const t=this._downPanel.tabBar.titles.findIndex((t=>t.owner.id===e));if(t>=0)return void(this._downPanel.currentIndex=t);const i=this._dockPanel,n=(0,f.find)(i.widgets(),(t=>t.id===e));n&&i.activateWidget(n)}activateArea(e="main"){switch(e){case"main":{const e=this._currentTabBar();if(!e)return;e.currentTitle&&e.currentTitle.owner.activate()}return;case"left":case"right":case"header":case"top":case"menu":case"bottom":console.debug(`Area: ${e} activation not yet implemented`);break;default:throw new Error(`Invalid area: ${e}`)}}activateNextTab(){const e=this._currentTabBar();if(!e)return;const t=e.currentIndex;if(-1!==t){if(t<e.titles.length-1)return e.currentIndex+=1,void(e.currentTitle&&e.currentTitle.owner.activate());if(t===e.titles.length-1){const e=this._adjacentBar("next");e&&(e.currentIndex=0,e.currentTitle&&e.currentTitle.owner.activate())}}}activatePreviousTab(){const e=this._currentTabBar();if(!e)return;const t=e.currentIndex;if(-1!==t){if(t>0)return e.currentIndex-=1,void(e.currentTitle&&e.currentTitle.owner.activate());if(0===t){const e=this._adjacentBar("previous");if(e){const t=e.titles.length;e.currentIndex=t-1,e.currentTitle&&e.currentTitle.owner.activate()}}}}activateNextTabBar(){const e=this._adjacentBar("next");e&&e.currentTitle&&e.currentTitle.owner.activate()}activatePreviousTabBar(){const e=this._adjacentBar("previous");e&&e.currentTitle&&e.currentTitle.owner.activate()}add(e,t="main",i){var n;if(!this._userLayout)return void this._delayedWidget.push({widget:e,area:t,options:i});let s;switch((null==i?void 0:i.type)&&this._userLayout[this.mode][i.type]?(s=this._userLayout[this.mode][i.type],this._idTypeMap.set(e.id,i.type)):s=this._userLayout[this.mode][e.id],(null==i?void 0:i.type)&&(this._idTypeMap.set(e.id,i.type),e.disposed.connect((()=>{this._idTypeMap.delete(e.id)}))),t=null!==(n=null==s?void 0:s.area)&&void 0!==n?n:t,i=i||(null==s?void 0:s.options)?{...i,...null==s?void 0:s.options}:void 0,t||"main"){case"bottom":return this._addToBottomArea(e,i);case"down":return this._addToDownArea(e,i);case"header":return this._addToHeaderArea(e,i);case"left":return this._addToLeftArea(e,i);case"main":return this._addToMainArea(e,i);case"menu":return this._addToMenuArea(e,i);case"right":return this._addToRightArea(e,i);case"top":return this._addToTopArea(e,i);default:throw new Error(`Invalid area: ${t}`)}}move(e,t,i){var n;const s=null!==(n=this._idTypeMap.get(e.id))&&void 0!==n?n:e.id;for(const e of["single-document","multiple-document"].filter((e=>!i||e===i)))this._userLayout[e][s]={...this._userLayout[e][s],area:t};return this.add(e,t),this._userLayout}collapseLeft(){this._leftHandler.collapse(),this._onLayoutModified()}collapseRight(){this._rightHandler.collapse(),this._onLayoutModified()}dispose(){this.isDisposed||(this._layoutDebouncer.dispose(),super.dispose())}expandLeft(){this._leftHandler.expand(),this._onLayoutModified()}expandRight(){this._rightHandler.expand(),this._onLayoutModified()}closeAll(){Array.from(this._dockPanel.widgets()).forEach((e=>e.close())),this._downPanel.stackedPanel.widgets.forEach((e=>e.close()))}isSideTabBarVisible(e){switch(e){case"left":return this._leftHandler.isVisible;case"right":return this._rightHandler.isVisible}}isTopInSimpleModeVisible(){return!this._topHandlerHiddenByUser}isEmpty(e){switch(e){case"bottom":return 0===this._bottomPanel.widgets.length;case"down":return 0===this._downPanel.stackedPanel.widgets.length;case"header":return 0===this._headerPanel.widgets.length;case"left":return 0===this._leftHandler.stackedPanel.widgets.length;case"main":return this._dockPanel.isEmpty;case"menu":return 0===this._menuHandler.panel.widgets.length;case"right":return 0===this._rightHandler.stackedPanel.widgets.length;case"top":return 0===this._topHandler.panel.widgets.length;default:return!0}}async restoreLayout(e,t,i={}){var n,s,a,r;this._userLayout={"single-document":null!==(n=i["single-document"])&&void 0!==n?n:{},"multiple-document":null!==(s=i["multiple-document"])&&void 0!==s?s:{}},this._delayedWidget.forEach((({widget:e,area:t,options:i})=>{this.add(e,t,i)})),this._delayedWidget.length=0,this._layoutRestorer=t;const o=await t.fetch(),{mainArea:d,downArea:l,leftArea:h,rightArea:c,topArea:u,relativeSizes:p}=o;if(d){const{currentWidget:t,dock:i}=d;i&&"multiple-document"===e&&this._dockPanel.restoreLayout(i),e&&(this.mode=e),t&&this.activateById(t.id)}else e&&(this.mode=e);if(void 0!==(null==u?void 0:u.simpleVisibility)&&(this._topHandlerHiddenByUser=!u.simpleVisibility,"single-document"===this.mode&&this._topHandler.panel.setHidden(this._topHandlerHiddenByUser)),l){const{currentWidget:e,widgets:t,size:i}=l,n=null!==(a=null==t?void 0:t.map((e=>e.id)))&&void 0!==a?a:[];this._downPanel.tabBar.titles.filter((e=>!n.includes(e.owner.id))).map((e=>e.owner.close()));const s=this._downPanel.tabBar.titles.map((e=>e.owner.id));for(null==t||t.filter((e=>!s.includes(e.id))).map((e=>this._downPanel.addWidget(e)));!f.ArrayExt.shallowEqual(n,this._downPanel.tabBar.titles.map((e=>e.owner.id)));)this._downPanel.tabBar.titles.forEach(((e,t)=>{const i=n.findIndex((t=>e.owner.id==t));i>=0&&i!=t&&this._downPanel.tabBar.insertTab(i,e)}));if(e){const t=this._downPanel.stackedPanel.widgets.findIndex((t=>t.id===e.id));t&&(this._downPanel.currentIndex=t,null===(r=this._downPanel.currentWidget)||void 0===r||r.activate())}i&&i>0?this._vsplitPanel.setRelativeSizes([1-i,i]):(this._downPanel.stackedPanel.widgets.forEach((e=>e.close())),this._downPanel.hide())}h?this._leftHandler.rehydrate(h):"single-document"===e&&this.collapseLeft(),c?this._rightHandler.rehydrate(c):"single-document"===e&&this.collapseRight(),p&&this._hsplitPanel.setRelativeSizes(p),this._isRestored||(v.MessageLoop.flush(),this._restored.resolve(o))}saveLayout(){return{mainArea:{currentWidget:this._tracker.currentWidget,dock:"single-document"===this.mode&&this._cachedLayout||this._dockPanel.saveLayout()},downArea:{currentWidget:this._downPanel.currentWidget,widgets:Array.from(this._downPanel.stackedPanel.widgets),size:this._vsplitPanel.relativeSizes()[1]},leftArea:this._leftHandler.dehydrate(),rightArea:this._rightHandler.dehydrate(),topArea:{simpleVisibility:!this._topHandlerHiddenByUser},relativeSizes:this._hsplitPanel.relativeSizes()}}toggleTopInSimpleModeVisibility(){"single-document"===this.mode&&(this._topHandler.panel.isVisible?(this._topHandlerHiddenByUser=!0,this._topHandler.panel.hide()):(this._topHandlerHiddenByUser=!1,this._topHandler.panel.show(),this._updateTitlePanelTitle()),this._onLayoutModified())}toggleSideTabBarVisibility(e){"right"===e?this._rightHandler.isVisible?this._rightHandler.hide():this._rightHandler.show():this._leftHandler.isVisible?this._leftHandler.hide():this._leftHandler.show()}updateConfig(e){if(e.hiddenMode)switch(e.hiddenMode){case"display":this._dockPanel.hiddenMode=w.Widget.HiddenMode.Display;break;case"scale":this._dockPanel.hiddenMode=w.Widget.HiddenMode.Scale;break;case"contentVisibility":this._dockPanel.hiddenMode=w.Widget.HiddenMode.ContentVisibility}}widgets(e){switch(null!=e?e:"main"){case"main":return this._dockPanel.widgets();case"left":return(0,f.map)(this._leftHandler.sideBar.titles,(e=>e.owner));case"right":return(0,f.map)(this._rightHandler.sideBar.titles,(e=>e.owner));case"header":return this._headerPanel.children();case"top":return this._topHandler.panel.children();case"menu":return this._menuHandler.panel.children();case"bottom":return this._bottomPanel.children();default:throw new Error(`Invalid area: ${e}`)}}onAfterAttach(e){this.node.dataset.shellMode=this.mode}_updateTitlePanelTitle(){let e=this.currentWidget;const t=this._titleHandler.inputElement;t.value=e?e.title.label:"",t.title=e?e.title.caption:""}_updateCurrentPath(){let e=this.currentWidget,t="";e&&e instanceof d.DocumentWidget&&(t=e.context.path),this._currentPathChanged.emit({newValue:t,oldValue:this._currentPath}),this._currentPath=t}_addToLeftArea(e,t){if(!e.id)return void console.error("Widgets added to app shell must have unique id property.");t=t||this._sideOptionsCache.get(e)||{},this._sideOptionsCache.set(e,t);const i="rank"in t?t.rank:C;this._leftHandler.addWidget(e,i),this._onLayoutModified()}_addToMainArea(e,t){if(!e.id)return void console.error("Widgets added to app shell must have unique id property.");t=t||{};const i=this._dockPanel,n=t.mode||"tab-after";let s=this.currentWidget;t.ref&&(s=(0,f.find)(i.widgets(),(e=>e.id===t.ref))||null);const{title:a}=e;a.dataset={...a.dataset,id:e.id},a.icon instanceof h.LabIcon?a.icon=a.icon.bindprops({stylesheet:"mainAreaTab"}):"string"!=typeof a.icon&&a.icon||(a.iconClass=(0,h.classes)(a.iconClass,"jp-Icon")),i.addWidget(e,{mode:n,ref:s}),"single-document"===i.mode&&this._mainOptionsCache.set(e,t),!1!==t.activate&&i.activateWidget(e)}_addToRightArea(e,t){if(!e.id)return void console.error("Widgets added to app shell must have unique id property.");const i="rank"in(t=t||this._sideOptionsCache.get(e)||{})?t.rank:C;this._sideOptionsCache.set(e,t),this._rightHandler.addWidget(e,i),this._onLayoutModified()}_addToTopArea(e,t){var i;if(!e.id)return void console.error("Widgets added to app shell must have unique id property.");const n=null!==(i=(t=t||{}).rank)&&void 0!==i?i:C;this._topHandler.addWidget(e,n),this._onLayoutModified(),this._topHandler.panel.isHidden&&this._topHandler.panel.show()}_addToMenuArea(e,t){var i;if(!e.id)return void console.error("Widgets added to app shell must have unique id property.");const n=null!==(i=(t=t||{}).rank)&&void 0!==i?i:C;this._menuHandler.addWidget(e,n),this._onLayoutModified(),this._menuHandler.panel.isHidden&&this._menuHandler.panel.show()}_addToHeaderArea(e,t){e.id?(this._headerPanel.addWidget(e),this._onLayoutModified(),this._headerPanel.isHidden&&this._headerPanel.show()):console.error("Widgets added to app shell must have unique id property.")}_addToBottomArea(e,t){e.id?(this._bottomPanel.addWidget(e),this._onLayoutModified(),this._bottomPanel.isHidden&&this._bottomPanel.show()):console.error("Widgets added to app shell must have unique id property.")}_addToDownArea(e,t){if(!e.id)return void console.error("Widgets added to app shell must have unique id property.");t=t||{};const{title:i}=e;i.dataset={...i.dataset,id:e.id},i.icon instanceof h.LabIcon?i.icon=i.icon.bindprops({stylesheet:"mainAreaTab"}):"string"!=typeof i.icon&&i.icon||(i.iconClass=(0,h.classes)(i.iconClass,"jp-Icon")),this._downPanel.addWidget(e),this._onLayoutModified(),this._downPanel.isHidden&&this._downPanel.show()}_adjacentBar(e){const t=this._currentTabBar();if(!t)return null;const i=Array.from(this._dockPanel.tabBars()),n=i.length,s=i.indexOf(t);return"previous"===e?s>0?i[s-1]:0===s?i[n-1]:null:s<n-1?i[s+1]:s===n-1?i[0]:null}_currentTabBar(){const e=this._tracker.currentWidget;if(!e)return null;const t=e.title,i=this._dockPanel.tabBars();return(0,f.find)(i,(e=>e.titles.indexOf(t)>-1))||null}_onActiveChanged(e,t){t.newValue&&(t.newValue.title.className+=` ${k}`),t.oldValue&&(t.oldValue.title.className=t.oldValue.title.className.replace(k,"")),this._activeChanged.emit(t)}_onCurrentChanged(e,t){t.newValue&&(t.newValue.title.className+=` ${P}`),t.oldValue&&(t.oldValue.title.className=t.oldValue.title.className.replace(P,"")),this._currentChanged.emit(t),this._onLayoutModified()}_onTabPanelChanged(){0===this._downPanel.stackedPanel.widgets.length&&this._downPanel.hide(),this._onLayoutModified()}_onLayoutModified(){this._layoutDebouncer.invoke()}}var L;!function(e){e.itemCmp=function(e,t){return e.rank-t.rank},e.normalizeAreaConfig=function e(t,i){i&&("tab-area"!==i.type?i.children.forEach((i=>{e(t,i)})):i.widgets=i.widgets.filter((e=>!e.isDisposed&&e.parent===t)))},e.PanelHandler=class{constructor(){this._panelChildHook=(e,t)=>{switch(t.type){case"child-added":{const e=t.child;if(this._items.find((t=>t.widget===e)))break;const i=this._items[this._items.length-1].rank;this._items.push({widget:e,rank:i})}break;case"child-removed":{const e=t.child;f.ArrayExt.removeFirstWhere(this._items,(t=>t.widget===e))}}return!0},this._items=new Array,this._panel=new w.Panel,v.MessageLoop.installMessageHook(this._panel,this._panelChildHook)}get panel(){return this._panel}addWidget(t,i){t.parent=null;const n={widget:t,rank:i},s=f.ArrayExt.upperBound(this._items,n,e.itemCmp);f.ArrayExt.insert(this._items,s,n),this._panel.insertWidget(s,t)}},e.SideBarHandler=class{constructor(){this._isHiddenByUser=!1,this._items=new Array,this._updated=new p.Signal(this),this._sideBar=new w.TabBar({insertBehavior:"none",removeBehavior:"none",allowDeselect:!0,orientation:"vertical"}),this._stackedPanel=new w.StackedPanel,this._sideBar.hide(),this._stackedPanel.hide(),this._lastCurrent=null,this._sideBar.currentChanged.connect(this._onCurrentChanged,this),this._sideBar.tabActivateRequested.connect(this._onTabActivateRequested,this),this._stackedPanel.widgetRemoved.connect(this._onWidgetRemoved,this)}get isVisible(){return this._sideBar.isVisible}get sideBar(){return this._sideBar}get stackedPanel(){return this._stackedPanel}get updated(){return this._updated}_onHandleMoved(){return this._refreshVisibility()}_onExpansionToggle(e,t){return this._refreshVisibility()}expand(){const e=this._lastCurrent||this._items.length>0&&this._items[0].widget;e&&this.activate(e.id)}activate(e){const t=this._findWidgetByID(e);t&&(this._sideBar.currentTitle=t.title,t.activate())}has(e){return null!==this._findWidgetByID(e)}collapse(){this._sideBar.currentTitle=null}addWidget(e,t){var i,n,s,a;e.parent=null,e.hide();const r={widget:e,rank:t},o=this._findInsertIndex(r);f.ArrayExt.insert(this._items,o,r),this._stackedPanel.insertWidget(o,e);const d=this._sideBar.insertTab(o,e.title);d.dataset={id:e.id},d.icon instanceof h.LabIcon?d.icon=d.icon.bindprops({stylesheet:"sideBar"}):"string"==typeof d.icon&&""!=d.icon?d.iconClass=(0,h.classes)(d.iconClass,"jp-Icon","jp-Icon-20"):d.icon||d.label||(d.icon=h.tabIcon.bindprops({stylesheet:"sideBar"})),null===(n=null===(i=e.content)||void 0===i?void 0:i.expansionToggled)||void 0===n||n.connect(this._onExpansionToggle,this),null===(a=null===(s=e.content)||void 0===s?void 0:s.handleMoved)||void 0===a||a.connect(this._onHandleMoved,this),this._refreshVisibility()}dehydrate(){const e=null===this._sideBar.currentTitle,t=Array.from(this._stackedPanel.widgets),i=t[this._sideBar.currentIndex],n={};return this._stackedPanel.widgets.forEach((e=>{e.id&&e.content instanceof w.SplitPanel&&(n[e.id]={sizes:e.content.relativeSizes(),expansionStates:e.content.widgets.map((e=>e.isVisible))})})),{collapsed:e,currentWidget:i,visible:!this._isHiddenByUser,widgets:t,widgetStates:n}}rehydrate(e){e.currentWidget&&this.activate(e.currentWidget.id),e.collapsed&&this.collapse(),e.visible||this.hide(),e.widgetStates&&this._stackedPanel.widgets.forEach((t=>{var i;if(t.id&&t.content instanceof w.SplitPanel){const n=null!==(i=e.widgetStates[t.id])&&void 0!==i?i:{};t.content.widgets.forEach(((e,i)=>{var s;const a=(null!==(s=n.expansionStates)&&void 0!==s?s:[])[i];"boolean"==typeof a&&t.content instanceof w.AccordionPanel&&(a?t.content.expand(i):t.content.collapse(i))})),n.sizes&&t.content.setRelativeSizes(n.sizes)}}))}hide(){this._isHiddenByUser=!0,this._refreshVisibility()}show(){this._isHiddenByUser=!1,this._refreshVisibility()}_findInsertIndex(t){return f.ArrayExt.upperBound(this._items,t,e.itemCmp)}_findWidgetIndex(e){return f.ArrayExt.findFirstIndex(this._items,(t=>t.widget===e))}_findWidgetByTitle(e){const t=(0,f.find)(this._items,(t=>t.widget.title===e));return t?t.widget:null}_findWidgetByID(e){const t=(0,f.find)(this._items,(t=>t.widget.id===e));return t?t.widget:null}_refreshVisibility(){this._stackedPanel.setHidden(null===this._sideBar.currentTitle),this._sideBar.setHidden(this._isHiddenByUser||0===this._sideBar.titles.length),this._updated.emit()}_onCurrentChanged(e,t){const i=t.previousTitle?this._findWidgetByTitle(t.previousTitle):null,n=t.currentTitle?this._findWidgetByTitle(t.currentTitle):null;i&&i.hide(),n&&n.show(),this._lastCurrent=n||i,this._refreshVisibility()}_onTabActivateRequested(e,t){t.title.owner.activate()}_onWidgetRemoved(e,t){t===this._lastCurrent&&(this._lastCurrent=null),f.ArrayExt.removeAt(this._items,this._findWidgetIndex(t)),this._sideBar.removeTab(t.title),this._refreshVisibility()}};class t extends w.Widget{constructor(e){super(),this.addClass("jp-skiplink"),this.id="jp-skiplink",this._shell=e,this._createSkipLink("Skip to main panel","main")}handleEvent(e){var t,i;"click"===e.type&&e.target instanceof HTMLElement&&this._shell.activateArea(null===(i=null===(t=e.target)||void 0===t?void 0:t.dataset)||void 0===i?void 0:i.targetarea)}onAfterAttach(e){super.onAfterAttach(e),this.node.addEventListener("click",this)}onBeforeDetach(e){this.node.removeEventListener("click",this),super.onBeforeDetach(e)}_createSkipLink(e,t){const i=document.createElement("a");i.href="#",i.tabIndex=0,i.text=e,i.className="skip-link",i.dataset.targetarea=t,this.node.appendChild(i)}}e.SkipLinkWidget=t;class i extends w.Widget{constructor(e){super(),this._selected=!1;const t=document.createElement("input");t.type="text",this.node.appendChild(t),this._shell=e,this.id="jp-title-panel-title"}onAfterAttach(e){super.onAfterAttach(e),this.inputElement.addEventListener("keyup",this),this.inputElement.addEventListener("click",this),this.inputElement.addEventListener("blur",this)}onBeforeDetach(e){super.onBeforeDetach(e),this.inputElement.removeEventListener("keyup",this),this.inputElement.removeEventListener("click",this),this.inputElement.removeEventListener("blur",this)}handleEvent(e){switch(e.type){case"keyup":this._evtKeyUp(e);break;case"click":this._evtClick(e);break;case"blur":this._selected=!1}}async _evtKeyUp(e){if("Enter"==e.key){const e=this._shell.currentWidget;if(null==e)return;const t=e.title.label,i=this.inputElement,n=i.value;i.blur(),n!==t?e.title.label=n:i.value=t}}_evtClick(e){if(0!==e.button||this._selected)return;const t=this.inputElement;e.preventDefault(),e.stopPropagation(),this._selected=!0;const i=t.value.indexOf(".");-1===i?t.select():t.setSelectionRange(0,i)}get inputElement(){return this.node.children[0]}}e.TitleHandler=i;class n extends w.SplitPanel{constructor(e={}){super(e),this.updated=new p.Signal(this)}onUpdateRequest(e){super.onUpdateRequest(e),this.updated.emit()}}e.RestorableSplitPanel=n}(L||(L={}));var M=i(20389);class A extends g{constructor(e={shell:new B}){super({...e,shell:e.shell||new B,serviceManager:e.serviceManager||new l.ServiceManager({standby:()=>!this._info.isConnected||"when-hidden"})}),this.name=_.PageConfig.getOption("appName")||"JupyterLab",this.namespace=_.PageConfig.getOption("appNamespace")||this.name,this.registerPluginErrors=[],this.status=new M.J(this),this.version=_.PageConfig.getOption("appVersion")||"unknown",this._info=A.defaultInfo,this._allPluginsActivated=new u.PromiseDelegate;const t=Object.keys(A.defaultInfo).reduce(((t,i)=>(i in e&&(t[i]=JSON.parse(JSON.stringify(e[i]))),t)),{});this._info={...A.defaultInfo,...t},this.restored=this.shell.restored.then((async()=>{const e=[],t=this.activateDeferredPlugins().catch((e=>{console.error("Error when activating deferred plugins\n:",e)}));if(e.push(t),this._info.deferred){const t=Promise.all(this._info.deferred.matches.map((e=>this.activatePlugin(e)))).catch((e=>{console.error("Error when activating customized list of deferred plugins:\n",e)}));e.push(t)}Promise.all(e).then((()=>{this._allPluginsActivated.resolve()})).catch((()=>{}))})).catch((()=>{}));const i=A.defaultPaths.urls,n=A.defaultPaths.directories,s=e.paths&&e.paths.urls||{},a=e.paths&&e.paths.directories||{};if(this._paths={urls:Object.keys(i).reduce(((e,t)=>{if(t in s){const i=s[t];e[t]=i}else e[t]=i[t];return e}),{}),directories:Object.keys(A.defaultPaths.directories).reduce(((e,t)=>{if(t in a){const i=a[t];e[t]=i}else e[t]=n[t];return e}),{})},this._info.devMode&&this.shell.addClass("jp-mod-devMode"),this.docRegistry.addModelFactory(new d.Base64ModelFactory),e.mimeExtensions)for(const t of(0,m.as)(e.mimeExtensions))this.registerPlugin(t)}get info(){return this._info}get paths(){return this._paths}get allPluginsActivated(){return this._allPluginsActivated.promise}registerPluginModule(e){let t=e.default;e.hasOwnProperty("__esModule")||(t=e),Array.isArray(t)||(t=[t]),t.forEach((e=>{try{this.registerPlugin(e)}catch(e){this.registerPluginErrors.push(e)}}))}registerPluginModules(e){e.forEach((e=>{this.registerPluginModule(e)}))}}!function(e){e.IInfo=new u.Token("@jupyterlab/application:IInfo","A service providing metadata about the current application, including disabled extensions and whether dev mode is enabled."),e.defaultInfo={devMode:"true"===_.PageConfig.getOption("devMode").toLowerCase(),deferred:{patterns:[],matches:[]},disabled:{patterns:[],matches:[]},mimeExtensions:[],availablePlugins:[],filesCached:"true"===_.PageConfig.getOption("cacheFiles").toLowerCase(),isConnected:!0},e.defaultPaths={urls:{base:_.PageConfig.getOption("baseUrl"),notFound:_.PageConfig.getOption("notFoundUrl"),app:_.PageConfig.getOption("appUrl"),doc:_.PageConfig.getOption("docUrl"),static:_.PageConfig.getOption("staticUrl"),settings:_.PageConfig.getOption("settingsUrl"),themes:_.PageConfig.getOption("themesUrl"),translations:_.PageConfig.getOption("translationsApiUrl"),hubHost:_.PageConfig.getOption("hubHost")||void 0,hubPrefix:_.PageConfig.getOption("hubPrefix")||void 0,hubUser:_.PageConfig.getOption("hubUser")||void 0,hubServerName:_.PageConfig.getOption("hubServerName")||void 0},directories:{appSettings:_.PageConfig.getOption("appSettingsDir"),schemas:_.PageConfig.getOption("schemasDir"),static:_.PageConfig.getOption("staticDir"),templates:_.PageConfig.getOption("templatesDir"),themes:_.PageConfig.getOption("themesDir"),userSettings:_.PageConfig.getOption("userSettingsDir"),serverRoot:_.PageConfig.getOption("serverRoot"),workspaces:_.PageConfig.getOption("workspacesDir")}}}(A||(A={}));var x=i(67863),W=i(2549);class S{constructor(e){this.stop=new u.Token("@jupyterlab/application:Router#stop"),this._routed=new p.Signal(this),this._rules=new Map,this.base=e.base,this.commands=e.commands}get current(){var e,t;const{base:i}=this,n=_.URLExt.parse(window.location.href),{search:s,hash:a}=n,r=null!==(t=null===(e=n.pathname)||void 0===e?void 0:e.replace(i,"/"))&&void 0!==t?t:"";return{hash:a,path:r,request:r+s+a,search:s}}get routed(){return this._routed}navigate(e,t={}){const{base:i}=this,{history:n}=window,{hard:s}=t,a=document.location.href,r=e&&0===e.indexOf(i)?e:_.URLExt.join(i,e);return r===a?s?this.reload():void 0:(n.pushState({},"",r),s?this.reload():void(t.skipRouting||requestAnimationFrame((()=>{this.route()}))))}register(e){var t;const{command:i,pattern:n}=e,s=null!==(t=e.rank)&&void 0!==t?t:100,a=this._rules;return a.set(n,{command:i,rank:s}),new W.DisposableDelegate((()=>{a.delete(n)}))}reload(){window.location.reload()}route(){const{commands:e,current:t,stop:i}=this,{request:n}=t,s=this._routed,a=this._rules,r=[];a.forEach(((e,t)=>{(null==n?void 0:n.match(t))&&r.push(e)}));const o=r.sort(((e,t)=>t.rank-e.rank)),d=new u.PromiseDelegate,l=async()=>{if(!o.length)return s.emit(t),void d.resolve(void 0);const{command:a}=o.pop();try{const n=this.current.request;await e.execute(a,t)===i&&(o.length=0,console.debug(`Routing ${n} was short-circuited by ${a}`))}catch(e){console.warn(`Routing ${n} to ${a} failed`,e)}l()};return l(),d.promise}}const E=new u.Token("@jupyterlab/application:IConnectionLost",'A service for invoking the dialog shown\n when JupyterLab has lost its connection to the server. Use this if, for some reason,\n you want to bring up the "connection lost" dialog under new circumstances.'),I=new u.Token("@jupyterlab/application:ILabStatus",'A service for interacting with the application busy/dirty\n status. Use this if you want to set the application "busy" favicon, or to set\n the application "dirty" status, which asks the user for confirmation before leaving the application page.'),R=new u.Token("@jupyterlab/application:IRouter","The URL router used by the application. Use this to add custom URL-routing for your extension (e.g., to invoke a command if the user navigates to a sub-path)."),j=new u.Token("@jupyterlab/application:ITreePathUpdater","A service to update the tree path.");function O(e,t,i,n){const{commands:s,shell:a}=e,r=Array.isArray(t)?t:[t];return{label:d("label"),caption:d("caption"),isEnabled:()=>{var e;const t=o("isEnabled");return t.length>0&&!t.some((e=>!1===e))||null!==(e=i.isEnabled)&&void 0!==e&&e},isToggled:()=>{var e;return o("isToggled").some((e=>!0===e))||null!==(e=i.isToggled)&&void 0!==e&&e},isVisible:()=>{var e;const t=o("isVisible");return t.length>0&&!t.some((e=>!1===e))||null===(e=i.isVisible)||void 0===e||e},execute:async()=>{const e=a.currentWidget,t=r.map((t=>null!==e?t.getActiveCommandId(e):null)).filter((e=>null!==e&&s.isEnabled(e)));let n=null;if(t.length>0){for(const e of t)if(n=await s.execute(e),"boolean"==typeof n&&!1===n)break}else i.execute&&(n=await s.execute(i.execute));return n}};function o(e){const t=a.currentWidget;return r.map((e=>null!==t?e.getActiveCommandId(t):null)).filter((e=>null!==e)).map((t=>s[e](t)))}function d(e){return()=>{var t;const s=o(e).map(((t,i)=>"caption"==e&&i>0?t.toLocaleLowerCase():t));switch(s.length){case 0:return null!==(t=i[e])&&void 0!==t?t:"";case 1:return s[0];default:{const e=s.some((e=>/…$/.test(e))),t=s.slice(void 0,-1).map((e=>e.replace(/…$/,""))).join(", "),i=s.slice(-1)[0].replace(/…$/,"")+(e?"…":"");return n.__("%1 and %2",t,i)}}}}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_jupyter_notebook_lab_extension=self.webpackChunk_jupyter_notebook_lab_extension||[]).push([[419],{30:(e,t,i)=>{i.r(t),i.d(t,{INotebookPathOpener:()=>C,INotebookShell:()=>y,NotebookApp:()=>H,NotebookShell:()=>k,PanelHandler:()=>f,Private:()=>v,SidePanelHandler:()=>w,SidePanelPalette:()=>W,defaultNotebookPathOpener:()=>P});var s,n=i(72),r=i(294),a=i(950),o=i(448),d=i(671),l=i(797),h=i(937),p=i(697),g=i(930),u=i(901),c=i(882),_=i(805),m=i(633);class f{constructor(){this._panelChildHook=(e,t)=>{if("child-removed"===t.type){const e=t.child;p.ArrayExt.removeFirstWhere(this._items,(t=>t.widget===e))}return!0},this._items=new Array,this._panel=new c.Panel,m.MessageLoop.installMessageHook(this._panel,this._panelChildHook)}get panel(){return this._panel}addWidget(e,t){e.parent=null;const i={widget:e,rank:t},n=p.ArrayExt.upperBound(this._items,i,s.itemCmp);p.ArrayExt.insert(this._items,n,i),this._panel.insertWidget(n,e)}}class w extends f{constructor(e){super(),this._isHiddenByUser=!1,this._widgetAdded=new u.Signal(this),this._widgetRemoved=new u.Signal(this),this._area=e,this._panel.hide(),this._currentWidget=null,this._lastCurrentWidget=null,this._widgetPanel=new c.StackedPanel,this._widgetPanel.widgetRemoved.connect(this._onWidgetRemoved,this),this._closeButton=document.createElement("button"),_.closeIcon.element({container:this._closeButton,height:"16px",width:"auto"}),this._closeButton.onclick=()=>{this.collapse(),this.hide()},this._closeButton.className="jp-Button jp-SidePanel-collapse",this._closeButton.title="Collapse side panel";const t=new c.Widget({node:this._closeButton});this._panel.addWidget(t),this._panel.addWidget(this._widgetPanel)}get currentWidget(){return this._currentWidget||this._lastCurrentWidget||(this._items.length>0?this._items[0].widget:null)}get area(){return this._area}get isVisible(){return this._panel.isVisible}get panel(){return this._panel}get widgets(){return this._items.map((e=>e.widget))}get widgetAdded(){return this._widgetAdded}get widgetRemoved(){return this._widgetRemoved}get closeButton(){return this._closeButton}expand(e){e?this._currentWidget&&this._currentWidget.id===e?(this.collapse(),this.hide()):(this.collapse(),this.hide(),this.activate(e),this.show()):this.currentWidget&&(this._currentWidget=this.currentWidget,this.activate(this._currentWidget.id),this.show())}activate(e){const t=this._findWidgetByID(e);t&&(this._currentWidget=t,t.show(),t.activate())}has(e){return null!==this._findWidgetByID(e)}collapse(){var e;null===(e=this._currentWidget)||void 0===e||e.hide(),this._currentWidget=null}addWidget(e,t){e.parent=null,e.hide();const i={widget:e,rank:t},s=this._findInsertIndex(i);p.ArrayExt.insert(this._items,s,i),this._widgetPanel.insertWidget(s,e),this._refreshVisibility(),this._widgetAdded.emit(e)}hide(){this._isHiddenByUser=!0,this._refreshVisibility()}show(){this._isHiddenByUser=!1,this._refreshVisibility()}_findInsertIndex(e){return p.ArrayExt.upperBound(this._items,e,s.itemCmp)}_findWidgetIndex(e){return p.ArrayExt.findFirstIndex(this._items,(t=>t.widget===e))}_findWidgetByID(e){const t=(0,p.find)(this._items,(t=>t.widget.id===e));return t?t.widget:null}_refreshVisibility(){this._panel.setHidden(this._isHiddenByUser)}_onWidgetRemoved(e,t){t===this._lastCurrentWidget&&(this._lastCurrentWidget=null),p.ArrayExt.removeAt(this._items,this._findWidgetIndex(t)),this._refreshVisibility(),this._widgetRemoved.emit(t)}}class W{constructor(e){this._items=[],this._commandPalette=e.commandPalette,this._command=e.command}getItem(e,t){const i=this._items;for(let s=0;s<i.length;s++){const n=i[s];if(n.widgetId===e.id&&n.area===t)return n}return null}addItem(e,t){if(this.getItem(e,t))return;const i=this._commandPalette.addItem({command:this._command,category:"View",args:{side:t,title:`Show ${e.title.caption}`,id:e.id}});this._items.push({widgetId:e.id,area:t,disposable:i})}removeItem(e,t){const i=this.getItem(e,t);i&&i.disposable.dispose()}}!function(e){e.itemCmp=function(e,t){return e.rank-t.rank}}(s||(s={}));const y=new g.Token("@jupyter-notebook/application:INotebookShell");class k extends c.Widget{constructor(){super(),this._translator=h.nullTranslator,this._currentChanged=new u.Signal(this),this._mainWidgetLoaded=new g.PromiseDelegate,this.id="main",this._userLayout={},this._topHandler=new f,this._menuHandler=new f,this._leftHandler=new w("left"),this._rightHandler=new w("right"),this._main=new c.Panel;const e=this._topWrapper=new c.Panel,t=this._menuWrapper=new c.Panel;this._topHandler.panel.id="top-panel",this._topHandler.panel.node.setAttribute("role","banner"),this._menuHandler.panel.id="menu-panel",this._menuHandler.panel.node.setAttribute("role","navigation"),this._main.id="main-panel",this._main.node.setAttribute("role","main"),this._spacer_top=new c.Widget,this._spacer_top.id="spacer-widget-top",this._spacer_bottom=new c.Widget,this._spacer_bottom.id="spacer-widget-bottom",e.id="top-panel-wrapper",e.addWidget(this._topHandler.panel),t.id="menu-panel-wrapper",t.addWidget(this._menuHandler.panel);const i=new c.BoxLayout,s=this._leftHandler,n=this._rightHandler;s.panel.id="jp-left-stack",s.panel.node.setAttribute("role","complementary"),n.panel.id="jp-right-stack",n.panel.node.setAttribute("role","complementary"),s.hide(),n.hide();const r=new c.BoxLayout({spacing:0,direction:"top-to-bottom"});c.BoxLayout.setStretch(this._topWrapper,0),c.BoxLayout.setStretch(this._menuWrapper,0),c.BoxLayout.setStretch(this._main,1);const a=new c.Panel({layout:r});a.addWidget(this._topWrapper),a.addWidget(this._menuWrapper),a.addWidget(this._spacer_top),a.addWidget(this._main),a.addWidget(this._spacer_bottom),a.layout=r;const o=new c.SplitPanel;o.id="main-split-panel",o.spacing=1,c.BoxLayout.setStretch(o,1),c.SplitPanel.setStretch(s.panel,0),c.SplitPanel.setStretch(n.panel,0),c.SplitPanel.setStretch(a,1),o.addWidget(s.panel),o.addWidget(a),o.addWidget(n.panel),o.setRelativeSizes([1,2.5,1]),i.spacing=0,i.addWidget(o),this.layout=i;const d=this._skipLinkWidgetHandler=new v.SkipLinkWidgetHandler(this);this.add(d.skipLinkWidget,"top",{rank:0}),this._skipLinkWidgetHandler.show()}get currentChanged(){return this._currentChanged}get currentWidget(){var e;return null!==(e=this._main.widgets[0])&&void 0!==e?e:null}get top(){return this._topWrapper}get menu(){return this._menuWrapper}get leftHandler(){return this._leftHandler}get rightHandler(){return this._rightHandler}get leftCollapsed(){return!(this._leftHandler.isVisible&&this._leftHandler.panel.isVisible)}get rightCollapsed(){return!(this._rightHandler.isVisible&&this._rightHandler.panel.isVisible)}get restored(){return this._mainWidgetLoaded.promise}get translator(){var e;return null!==(e=this._translator)&&void 0!==e?e:h.nullTranslator}set translator(e){if(e!==this._translator){this._translator=e;const t=e.load("notebook");this._leftHandler.closeButton.title=t.__("Collapse %1 side panel",this._leftHandler.area),this._rightHandler.closeButton.title=t.__("Collapse %1 side panel",this._rightHandler.area)}}get userLayout(){return g.JSONExt.deepCopy(this._userLayout)}activateById(e){for(const t of["main","top","left","right","menu"]){const i=(0,p.find)(this.widgets(t),(t=>t.id===e));i&&("left"===t?this.expandLeft(e):"right"===t?this.expandRight(e):i.activate())}}add(e,t,i){var s,n;let r;r=(null==i?void 0:i.type)&&this._userLayout[i.type]?this._userLayout[i.type]:this._userLayout[e.id],t=null!==(s=null==r?void 0:r.area)&&void 0!==s?s:t;const a=null!==(n=null==(i=i||(null==r?void 0:r.options)?{...i,...null==r?void 0:r.options}:void 0)?void 0:i.rank)&&void 0!==n?n:900;switch(t){case"top":return this._topHandler.addWidget(e,a);case"menu":return this._menuHandler.addWidget(e,a);case"main":case void 0:if(this._main.widgets.length>0)return;this._main.addWidget(e),this._main.update(),this._currentChanged.emit(void 0),this._mainWidgetLoaded.resolve();break;case"left":return this._leftHandler.addWidget(e,a);case"right":return this._rightHandler.addWidget(e,a);default:console.warn(`Cannot add widget to area: ${t}`)}}collapseTop(){this._topWrapper.setHidden(!0),this._spacer_top.setHidden(!0)}expandTop(){this._topWrapper.setHidden(!1),this._spacer_top.setHidden(!1)}*widgets(e){switch(null!=e?e:"main"){case"top":return void(yield*this._topHandler.panel.widgets);case"menu":return void(yield*this._menuHandler.panel.widgets);case"main":return void(yield*this._main.widgets);case"left":return void(yield*this._leftHandler.widgets);case"right":return void(yield*this._rightHandler.widgets);default:return void console.error(`This shell has no area called "${e}"`)}}expandLeft(e){this._leftHandler.panel.show(),this._leftHandler.expand(e)}collapseLeft(){this._leftHandler.collapse(),this._leftHandler.panel.hide()}expandRight(e){this._rightHandler.panel.show(),this._rightHandler.expand(e)}collapseRight(){this._rightHandler.collapse(),this._rightHandler.panel.hide()}async restoreLayout(e){this._userLayout=e}}var v,b;!function(e){e.SkipLinkWidgetHandler=class{constructor(e){this._isDisposed=!1;const t=this._skipLinkWidget=new c.Widget,i=document.createElement("a");i.href="#first-cell",i.tabIndex=1,i.text="Skip to Main",i.className="skip-link",i.addEventListener("click",this),t.addClass("jp-skiplink"),t.id="jp-skiplink",t.node.appendChild(i)}handleEvent(e){"click"===e.type&&this._focusMain()}_focusMain(){const e=document.querySelector("#main-panel .jp-InputArea-editor");e.tabIndex=1,e.focus()}get skipLinkWidget(){return this._skipLinkWidget}dispose(){this.isDisposed||(this._isDisposed=!0,this._skipLinkWidget.node.removeEventListener("click",this),this._skipLinkWidget.dispose())}hide(){this._skipLinkWidget.hide()}show(){this._skipLinkWidget.show()}get isDisposed(){return this._isDisposed}}}(v||(v={}));class H extends n.JupyterFrontEnd{constructor(e={shell:new k}){var t,i;if(super({...e,shell:null!==(t=e.shell)&&void 0!==t?t:new k}),this.name="Jupyter Notebook",this.namespace=this.name,this.status=new o.J(this),this.version=null!==(i=d.PageConfig.getOption("appVersion"))&&void 0!==i?i:"unknown",this._info=n.JupyterLab.defaultInfo,this._formatter=new l.Throttler((()=>{b.setFormat(this)}),250),this.docRegistry.addModelFactory(new r.Base64ModelFactory),e.mimeExtensions)for(const t of(0,a.as)(e.mimeExtensions))this.registerPlugin(t);const s=Object.keys(n.JupyterLab.defaultInfo).reduce(((t,i)=>(i in e&&(t[i]=JSON.parse(JSON.stringify(e[i]))),t)),{});this._info={...n.JupyterLab.defaultInfo,...s},this.restored=this.shell.restored,this.restored.then((()=>this._formatter.invoke()))}get info(){return this._info}get paths(){return{urls:{base:d.PageConfig.getOption("baseUrl"),notFound:d.PageConfig.getOption("notFoundUrl"),app:d.PageConfig.getOption("appUrl"),static:d.PageConfig.getOption("staticUrl"),settings:d.PageConfig.getOption("settingsUrl"),themes:d.PageConfig.getOption("themesUrl"),doc:d.PageConfig.getOption("docUrl"),translations:d.PageConfig.getOption("translationsApiUrl"),hubHost:d.PageConfig.getOption("hubHost")||void 0,hubPrefix:d.PageConfig.getOption("hubPrefix")||void 0,hubUser:d.PageConfig.getOption("hubUser")||void 0,hubServerName:d.PageConfig.getOption("hubServerName")||void 0},directories:{appSettings:d.PageConfig.getOption("appSettingsDir"),schemas:d.PageConfig.getOption("schemasDir"),static:d.PageConfig.getOption("staticDir"),templates:d.PageConfig.getOption("templatesDir"),themes:d.PageConfig.getOption("themesDir"),userSettings:d.PageConfig.getOption("userSettingsDir"),serverRoot:d.PageConfig.getOption("serverRoot"),workspaces:d.PageConfig.getOption("workspacesDir")}}}handleEvent(e){super.handleEvent(e),"resize"===e.type&&this._formatter.invoke()}registerPluginModule(e){let t=e.default;Object.prototype.hasOwnProperty.call(e,"__esModule")||(t=e),Array.isArray(t)||(t=[t]),t.forEach((e=>{try{this.registerPlugin(e)}catch(e){console.error(e)}}))}registerPluginModules(e){e.forEach((e=>{this.registerPluginModule(e)}))}}!function(e){e.setFormat=function(e){e.format=window.matchMedia("only screen and (max-width: 760px)").matches?"mobile":"desktop"}}(b||(b={}));const P=new class{open(e){const{prefix:t,path:i,searchParams:s,target:n,features:r}=e,a=new URL(d.URLExt.join(t,null!=i?i:""),window.location.origin);return s&&(a.search=s.toString()),window.open(a,n,r)}},C=new g.Token("@jupyter-notebook/application:INotebookPathOpener")}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_jupyter_notebook_lab_extension=self.webpackChunk_jupyter_notebook_lab_extension||[]).push([[568],{568:(e,o,t)=>{t.r(o),t.d(o,{default:()=>m});var n,a=t(72),r=t(464),c=t(671),l=t(947),i=t(937),s=t(882),b=t(352),d=t(805);!function(e){e.launchNotebookTree="jupyter-notebook:launch-tree",e.openNotebook="jupyter-notebook:open-notebook",e.openLab="jupyter-notebook:open-lab",e.openNbClassic="jupyter-notebook:open-nbclassic"}(n||(n={}));const u={id:"@jupyter-notebook/lab-extension:interface-switcher",description:"A plugin to add custom toolbar items to the notebook page.",autoStart:!0,requires:[i.ITranslator,l.INotebookTracker],optional:[r.ICommandPalette,b.INotebookPathOpener,b.INotebookShell,a.ILabShell,r.IToolbarWidgetRegistry],activate:(e,o,t,a,r,l,i,u)=>{const{commands:m,shell:p}=e,k=c.PageConfig.getBaseUrl(),h=o.load("notebook"),_="true"===c.PageConfig.getOption("nbclassic_enabled"),g=new s.Menu({commands:m}),f=[],N=null!=r?r:b.defaultNotebookPathOpener;l||f.push({command:n.openNotebook,commandLabel:h.__("Notebook"),commandDescription:h.__("Open in %1","Jupyter Notebook"),buttonLabel:"openNotebook",urlPrefix:`${k}tree`}),i||f.push({command:n.openLab,commandLabel:h.__("JupyterLab"),commandDescription:h.__("Open in %1","JupyterLab"),buttonLabel:"openLab",urlPrefix:`${k}doc/tree`}),_&&f.push({command:n.openNbClassic,commandLabel:h.__("NbClassic"),commandDescription:h.__("Open in %1","NbClassic"),buttonLabel:"openNbClassic",urlPrefix:`${k}nbclassic/notebooks`});const y=()=>null!==t.currentWidget&&t.currentWidget===p.currentWidget;let C;if(f.forEach((e=>{const{command:o}=e;(e=>{const{command:o,commandLabel:n,commandDescription:r,urlPrefix:c}=e;m.addCommand(o,{label:e=>(e.noLabel,e.isMenu||e.isPalette?r:n),caption:n,execute:()=>{const e=t.currentWidget;e&&N.open({prefix:c,path:e.context.path})},isEnabled:y}),a&&a.addItem({command:o,category:"Other",args:{isPalette:!0}})})(e),g.addItem({command:o})})),1===f.length)C=e=>{const o=new d.CommandToolbarButton({commands:m,id:f[0].command,label:f[0].commandLabel,icon:d.launchIcon});return o.addClass("jp-nb-interface-switcher-button"),o};else{const e={overflowMenuOptions:{isVisible:!1}},o=new s.MenuBar(e);g.title.label=h.__("Open in..."),g.title.icon=d.caretDownIcon,o.addMenu(g),C=o=>{const t=new s.MenuBar(e);return t.addMenu(g),t.addClass("jp-InterfaceSwitcher"),t}}u&&u.addFactory("Notebook","interfaceSwitcher",C)}},m=[{id:"@jupyter-notebook/lab-extension:launch-tree",description:"A plugin to add a command to open the Jupyter Notebook Tree.",autoStart:!0,requires:[i.ITranslator],optional:[r.ICommandPalette],activate:(e,o,t)=>{const{commands:a}=e,r=o.load("notebook"),l=r.__("Help");a.addCommand(n.launchNotebookTree,{label:r.__("Launch Jupyter Notebook File Browser"),execute:()=>{const e=c.URLExt.join(c.PageConfig.getBaseUrl(),"tree");window.open(e)}}),t&&t.addItem({command:n.launchNotebookTree,category:l})}},u]}}]);
@@ -1 +0,0 @@
1
- var _JUPYTERLAB;(()=>{"use strict";var e,r,t,o,n,a,i,l,u,d,f,s,p,c,h,b,v,m,g,y,j,w,k,S={215:(e,r,t)=>{var o={"./index":()=>Promise.all([t.e(538),t.e(568)]).then((()=>()=>t(568))),"./extension":()=>Promise.all([t.e(538),t.e(568)]).then((()=>()=>t(568))),"./style":()=>t.e(93).then((()=>()=>t(93)))},n=(e,r)=>(t.R=r,r=t.o(o,e)?o[e]():Promise.resolve().then((()=>{throw new Error('Module "'+e+'" does not exist in container.')})),t.R=void 0,r),a=(e,r)=>{if(t.S){var o="default",n=t.S[o];if(n&&n!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[o]=e,t.I(o,r)}};t.d(r,{get:()=>n,init:()=>a})}},P={};function x(e){var r=P[e];if(void 0!==r)return r.exports;var t=P[e]={id:e,exports:{}};return S[e](t,t.exports,x),t.exports}x.m=S,x.c=P,x.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return x.d(r,{a:r}),r},x.d=(e,r)=>{for(var t in r)x.o(r,t)&&!x.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},x.f={},x.e=e=>Promise.all(Object.keys(x.f).reduce(((r,t)=>(x.f[t](e,r),r)),[])),x.u=e=>e+"."+{93:"eae3497dd223d842d198",419:"e980232a56ae53a39be0",538:"554df32a0750872bad92",568:"1a379d1d7dc566a197da",928:"a1f037cc55c9ffb2e994"}[e]+".js?v="+{93:"eae3497dd223d842d198",419:"e980232a56ae53a39be0",538:"554df32a0750872bad92",568:"1a379d1d7dc566a197da",928:"a1f037cc55c9ffb2e994"}[e],x.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),x.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="@jupyter-notebook/lab-extension:",x.l=(t,o,n,a)=>{if(e[t])e[t].push(o);else{var i,l;if(void 0!==n)for(var u=document.getElementsByTagName("script"),d=0;d<u.length;d++){var f=u[d];if(f.getAttribute("src")==t||f.getAttribute("data-webpack")==r+n){i=f;break}}i||(l=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,x.nc&&i.setAttribute("nonce",x.nc),i.setAttribute("data-webpack",r+n),i.src=t),e[t]=[o];var s=(r,o)=>{i.onerror=i.onload=null,clearTimeout(p);var n=e[t];if(delete e[t],i.parentNode&&i.parentNode.removeChild(i),n&&n.forEach((e=>e(o))),r)return r(o)},p=setTimeout(s.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=s.bind(null,i.onerror),i.onload=s.bind(null,i.onload),l&&document.head.appendChild(i)}},x.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{x.S={};var e={},r={};x.I=(t,o)=>{o||(o=[]);var n=r[t];if(n||(n=r[t]={}),!(o.indexOf(n)>=0)){if(o.push(n),e[t])return e[t];x.o(x.S,t)||(x.S[t]={});var a=x.S[t],i="@jupyter-notebook/lab-extension",l=(e,r,t,o)=>{var n=a[e]=a[e]||{},l=n[r];(!l||!l.loaded&&(!o!=!l.eager?o:i>l.from))&&(n[r]={get:t,from:i,eager:!!o})},u=[];return"default"===t&&(l("@jupyter-notebook/application","7.1.3",(()=>Promise.all([x.e(928),x.e(419),x.e(538)]).then((()=>()=>x(30))))),l("@jupyter-notebook/lab-extension","7.1.3",(()=>Promise.all([x.e(538),x.e(568)]).then((()=>()=>x(568)))))),e[t]=u.length?Promise.all(u).then((()=>e[t]=1)):1}}})(),(()=>{var e;x.g.importScripts&&(e=x.g.location+"");var r=x.g.document;if(!e&&r&&(r.currentScript&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var o=t.length-1;o>-1&&!e;)e=t[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),x.p=e})(),t=e=>{var r=e=>e.split(".").map((e=>+e==e?+e:e)),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),o=t[1]?r(t[1]):[];return t[2]&&(o.length++,o.push.apply(o,r(t[2]))),t[3]&&(o.push([]),o.push.apply(o,r(t[3]))),o},o=(e,r)=>{e=t(e),r=t(r);for(var o=0;;){if(o>=e.length)return o<r.length&&"u"!=(typeof r[o])[0];var n=e[o],a=(typeof n)[0];if(o>=r.length)return"u"==a;var i=r[o],l=(typeof i)[0];if(a!=l)return"o"==a&&"n"==l||"s"==l||"u"==a;if("o"!=a&&"u"!=a&&n!=i)return n<i;o++}},n=e=>{var r=e[0],t="";if(1===e.length)return"*";if(r+.5){t+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var o=1,a=1;a<e.length;a++)o--,t+="u"==(typeof(l=e[a]))[0]?"-":(o>0?".":"")+(o=2,l);return t}var i=[];for(a=1;a<e.length;a++){var l=e[a];i.push(0===l?"not("+u()+")":1===l?"("+u()+" || "+u()+")":2===l?i.pop()+" "+i.pop():n(l))}return u();function u(){return i.pop().replace(/^\((.+)\)$/,"$1")}},a=(e,r)=>{if(0 in e){r=t(r);var o=e[0],n=o<0;n&&(o=-o-1);for(var i=0,l=1,u=!0;;l++,i++){var d,f,s=l<e.length?(typeof e[l])[0]:"";if(i>=r.length||"o"==(f=(typeof(d=r[i]))[0]))return!u||("u"==s?l>o&&!n:""==s!=n);if("u"==f){if(!u||"u"!=s)return!1}else if(u)if(s==f)if(l<=o){if(d!=e[l])return!1}else{if(n?d>e[l]:d<e[l])return!1;d!=e[l]&&(u=!1)}else if("s"!=s&&"n"!=s){if(n||l<=o)return!1;u=!1,l--}else{if(l<=o||f<s!=n)return!1;u=!1}else"s"!=s&&"n"!=s&&(u=!1,l--)}}var p=[],c=p.pop.bind(p);for(i=1;i<e.length;i++){var h=e[i];p.push(1==h?c()|c():2==h?c()&c():h?a(h,r):!c())}return!!c()},i=(e,r)=>{var t=x.S[e];if(!t||!x.o(t,r))throw new Error("Shared module "+r+" doesn't exist in shared scope "+e);return t},l=(e,r)=>{var t=e[r];return(r=Object.keys(t).reduce(((e,r)=>!e||o(e,r)?r:e),0))&&t[r]},u=(e,r)=>{var t=e[r];return Object.keys(t).reduce(((e,r)=>!e||!t[e].loaded&&o(e,r)?r:e),0)},d=(e,r,t,o)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+n(o)+")",f=(e,r,t,o)=>{var n=u(e,t);return a(o,n)||c(d(e,t,n,o)),b(e[t][n])},s=(e,r,t)=>{var n=e[r];return(r=Object.keys(n).reduce(((e,r)=>!a(t,r)||e&&!o(e,r)?e:r),0))&&n[r]},p=(e,r,t,o)=>{var a=e[t];return"No satisfying version ("+n(o)+") of shared module "+t+" found in shared scope "+r+".\nAvailable versions: "+Object.keys(a).map((e=>e+" from "+a[e].from)).join(", ")},c=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},h=(e,r,t,o)=>{c(p(e,r,t,o))},b=e=>(e.loaded=1,e.get()),m=(v=e=>function(r,t,o,n){var a=x.I(r);return a&&a.then?a.then(e.bind(e,r,x.S[r],t,o,n)):e(r,x.S[r],t,o,n)})(((e,r,t,o)=>(i(e,t),b(s(r,t,o)||h(r,e,t,o)||l(r,t))))),g=v(((e,r,t,o)=>(i(e,t),f(r,0,t,o)))),y=v(((e,r,t,o,n)=>{var a=r&&x.o(r,t)&&s(r,t,o);return a?b(a):n()})),j={},w={72:()=>g("default","@jupyterlab/application",[1,4,1,6]),464:()=>g("default","@jupyterlab/apputils",[1,4,2,6]),671:()=>g("default","@jupyterlab/coreutils",[1,6,1,6]),805:()=>g("default","@jupyterlab/ui-components",[1,4,1,6]),882:()=>g("default","@lumino/widgets",[1,2,3,1,,"alpha",0]),937:()=>g("default","@jupyterlab/translation",[1,4,1,6]),352:()=>y("default","@jupyter-notebook/application",[1,7,1,3],(()=>Promise.all([x.e(928),x.e(419)]).then((()=>()=>x(30))))),947:()=>g("default","@jupyterlab/notebook",[1,4,1,6]),4:()=>g("default","@lumino/properties",[1,2,0,0]),294:()=>m("default","@jupyterlab/docregistry",[1,4,1,6]),413:()=>g("default","@jupyterlab/rendermime",[1,4,1,6]),633:()=>g("default","@lumino/messaging",[1,2,0,0]),697:()=>g("default","@lumino/algorithm",[1,2,0,0]),717:()=>g("default","@lumino/disposable",[1,2,0,0]),797:()=>g("default","@lumino/polling",[1,2,0,0]),901:()=>g("default","@lumino/signaling",[1,2,0,0]),930:()=>g("default","@lumino/coreutils",[1,2,0,0])},k={419:[4,294,413,633,697,717,797,901,930],538:[72,464,671,805,882,937],568:[352,947]},x.f.consumes=(e,r)=>{x.o(k,e)&&k[e].forEach((e=>{if(x.o(j,e))return r.push(j[e]);var t=r=>{j[e]=0,x.m[e]=t=>{delete x.c[e],t.exports=r()}},o=r=>{delete j[e],x.m[e]=t=>{throw delete x.c[e],r}};try{var n=w[e]();n.then?r.push(j[e]=n.then(t).catch(o)):t(n)}catch(e){o(e)}}))},(()=>{var e={572:0};x.f.j=(r,t)=>{var o=x.o(e,r)?e[r]:void 0;if(0!==o)if(o)t.push(o[2]);else if(538!=r){var n=new Promise(((t,n)=>o=e[r]=[t,n]));t.push(o[2]=n);var a=x.p+x.u(r),i=new Error;x.l(a,(t=>{if(x.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var n=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+n+": "+a+")",i.name="ChunkLoadError",i.type=n,i.request=a,o[1](i)}}),"chunk-"+r,r)}else e[r]=0};var r=(r,t)=>{var o,n,[a,i,l]=t,u=0;if(a.some((r=>0!==e[r]))){for(o in i)x.o(i,o)&&(x.m[o]=i[o]);l&&l(x)}for(r&&r(t);u<a.length;u++)n=a[u],x.o(e,n)&&e[n]&&e[n][0](),e[n]=0},t=self.webpackChunk_jupyter_notebook_lab_extension=self.webpackChunk_jupyter_notebook_lab_extension||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),x.nc=void 0;var E=x(215);(_JUPYTERLAB=void 0===_JUPYTERLAB?{}:_JUPYTERLAB)["@jupyter-notebook/lab-extension"]=E})();