notebook 7.3.0b0__py3-none-any.whl → 7.3.0b1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of notebook might be problematic. Click here for more details.
- notebook/_version.py +1 -1
- notebook/static/1088.bundle.js +1 -1
- notebook/static/113.bundle.js +1 -1
- notebook/static/1198.bundle.js +1 -1
- notebook/static/{3463.bundle.js → 1261.bundle.js} +1 -1
- notebook/static/131.bundle.js +1 -1
- notebook/static/1326.bundle.js +1 -1
- notebook/static/134.bundle.js +1 -1
- notebook/static/1408.bundle.js +1 -1
- notebook/static/1496.bundle.js +1 -1
- notebook/static/1647.bundle.js +1 -1
- notebook/static/1650.bundle.js +1 -1
- notebook/static/1684.bundle.js +1 -1
- notebook/static/1809.bundle.js +1 -1
- notebook/static/1827.bundle.js +1 -1
- notebook/static/1833.bundle.js +1 -1
- notebook/static/1958.bundle.js +1 -1
- notebook/static/1962.bundle.js +1 -1
- notebook/static/2007.bundle.js +1 -1
- notebook/static/2065.bundle.js +1 -1
- notebook/static/2088.bundle.js +1 -1
- notebook/static/2089.bundle.js +1 -1
- notebook/static/2122.bundle.js +1 -1
- notebook/static/2167.bundle.js +1 -1
- notebook/static/2184.bundle.js +1 -1
- notebook/static/2311.bundle.js +1 -1
- notebook/static/2401.bundle.js +1 -1
- notebook/static/2479.bundle.js +1 -1
- notebook/static/2489.bundle.js +1 -1
- notebook/static/2607.bundle.js +1 -1
- notebook/static/2615.bundle.js +1 -1
- notebook/static/2636.bundle.js +1 -1
- notebook/static/2924.bundle.js +1 -1
- notebook/static/2944.bundle.js +1 -1
- notebook/static/3129.bundle.js +1 -1
- notebook/static/3146.bundle.js +1 -1
- notebook/static/3187.bundle.js +1 -1
- notebook/static/3213.bundle.js +1 -1
- notebook/static/3340.bundle.js +1 -1
- notebook/static/3360.bundle.js +1 -1
- notebook/static/3466.bundle.js +1 -1
- notebook/static/3512.bundle.js +1 -1
- notebook/static/3676.bundle.js +1 -1
- notebook/static/3680.bundle.js +1 -1
- notebook/static/374.bundle.js +1 -1
- notebook/static/3768.bundle.js +1 -1
- notebook/static/377.bundle.js +1 -1
- notebook/static/3863.bundle.js +1 -1
- notebook/static/3881.bundle.js +1 -1
- notebook/static/4042.bundle.js +1 -1
- notebook/static/4212.bundle.js +1 -1
- notebook/static/4242.bundle.js +1 -1
- notebook/static/4382.bundle.js +1 -1
- notebook/static/4499.bundle.js +1 -1
- notebook/static/4630.bundle.js +1 -1
- notebook/static/4645.bundle.js +1 -1
- notebook/static/4811.bundle.js +1 -1
- notebook/static/4837.bundle.js +1 -1
- notebook/static/5099.bundle.js +1 -1
- notebook/static/5135.bundle.js +1 -1
- notebook/static/5254.bundle.js +1 -1
- notebook/static/5263.bundle.js +1 -1
- notebook/static/5313.bundle.js +1 -1
- notebook/static/5325.bundle.js +1 -1
- notebook/static/5346.bundle.js +1 -1
- notebook/static/5426.bundle.js +1 -1
- notebook/static/545.bundle.js +1 -1
- notebook/static/5573.bundle.js +1 -1
- notebook/static/5601.bundle.js +1 -1
- notebook/static/5649.bundle.js +2 -2
- notebook/static/5733.bundle.js +1 -1
- notebook/static/5912.bundle.js +1 -1
- notebook/static/5952.bundle.js +1 -0
- notebook/static/6017.bundle.js +1 -1
- notebook/static/6139.bundle.js +1 -1
- notebook/static/62.bundle.js +1 -1
- notebook/static/6345.bundle.js +1 -1
- notebook/static/6604.bundle.js +1 -1
- notebook/static/6621.bundle.js +1 -1
- notebook/static/6627.bundle.js +1 -1
- notebook/static/6748.bundle.js +1 -1
- notebook/static/6815.bundle.js +1 -1
- notebook/static/6853.bundle.js +1 -1
- notebook/static/6893.bundle.js +1 -1
- notebook/static/690.bundle.js +1 -1
- notebook/static/6962.bundle.js +1 -1
- notebook/static/6999.bundle.js +1 -1
- notebook/static/7226.bundle.js +1 -1
- notebook/static/7252.bundle.js +1 -1
- notebook/static/7302.bundle.js +1 -1
- notebook/static/7386.bundle.js +1 -1
- notebook/static/7391.bundle.js +1 -1
- notebook/static/7543.bundle.js +1 -1
- notebook/static/755.bundle.js +1 -1
- notebook/static/7603.bundle.js +1 -1
- notebook/static/7639.bundle.js +1 -1
- notebook/static/7655.bundle.js +1 -1
- notebook/static/7684.bundle.js +1 -1
- notebook/static/7811.bundle.js +1 -1
- notebook/static/7812.bundle.js +1 -1
- notebook/static/7819.bundle.js +1 -1
- notebook/static/7854.bundle.js +1 -1
- notebook/static/7900.bundle.js +1 -1
- notebook/static/7906.bundle.js +1 -1
- notebook/static/8471.bundle.js +1 -1
- notebook/static/8579.bundle.js +1 -1
- notebook/static/8633.bundle.js +1 -1
- notebook/static/8771.bundle.js +1 -1
- notebook/static/8781.bundle.js +1 -1
- notebook/static/8875.bundle.js +1 -1
- notebook/static/8907.bundle.js +1 -1
- notebook/static/8928.bundle.js +1 -1
- notebook/static/893.bundle.js +1 -1
- notebook/static/901.bundle.js +1 -1
- notebook/static/9068.bundle.js +1 -1
- notebook/static/9136.bundle.js +1 -1
- notebook/static/9151.bundle.js +1 -1
- notebook/static/9161.bundle.js +1 -1
- notebook/static/9268.bundle.js +1 -1
- notebook/static/9335.bundle.js +1 -1
- notebook/static/9341.bundle.js +1 -1
- notebook/static/9357.bundle.js +1 -0
- notebook/static/9380.bundle.js +1 -1
- notebook/static/9605.bundle.js +1 -1
- notebook/static/9638.bundle.js +1 -1
- notebook/static/9680.bundle.js +1 -1
- notebook/static/9685.bundle.js +1 -1
- notebook/static/9752.bundle.js +1 -1
- notebook/static/9821.bundle.js +1 -1
- notebook/static/9852.bundle.js +1 -1
- notebook/static/bundle.js +1 -1
- notebook/static/third-party-licenses.json +101 -101
- {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/package.json.orig +14 -14
- {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/documentsearch-extension/package.json.orig +4 -4
- {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/package.json.orig +6 -6
- notebook-7.3.0b1.data/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/full-width-notebook.json +27 -0
- {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/package.json.orig +9 -9
- {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/package.json.orig +15 -15
- {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/widget.json +6 -0
- {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/package.json +11 -11
- {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/package.json.orig +10 -10
- notebook-7.3.0b1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/466.16ad54314911066edf9c.js +1 -0
- notebook-7.3.0b0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.67f8b11d2af855286118.js → notebook-7.3.0b1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.963a302c93b1c86218b2.js +1 -1
- notebook-7.3.0b1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.2635b6a9fd871a610e32.js +1 -0
- notebook-7.3.0b0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.fd0956ebf15f666a19f8.js → notebook-7.3.0b1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.c690bcb5ab5c38794e5d.js +1 -1
- {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/third-party-licenses.json +2 -2
- {notebook-7.3.0b0.dist-info → notebook-7.3.0b1.dist-info}/METADATA +2 -2
- {notebook-7.3.0b0.dist-info → notebook-7.3.0b1.dist-info}/RECORD +170 -169
- notebook/static/5921.bundle.js +0 -1
- notebook/static/911.bundle.js +0 -1
- notebook-7.3.0b0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/907.767373e59d0c0e33ef12.js +0 -1
- notebook-7.3.0b0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.50419fa0a72e54064396.js +0 -1
- {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/etc/jupyter/jupyter_server_config.d/notebook.json +0 -0
- {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/applications/jupyter-notebook.desktop +0 -0
- {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/icons/hicolor/scalable/apps/notebook.svg +0 -0
- {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/menus.json +0 -0
- {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/pages.json +0 -0
- {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/shell.json +0 -0
- {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/title.json +0 -0
- {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/top.json +0 -0
- {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/zen.json +0 -0
- {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/open.json +0 -0
- {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/checkpoints.json +0 -0
- {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/edit-notebook-metadata.json +0 -0
- {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/kernel-logo.json +0 -0
- {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/scroll-output.json +0 -0
- {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/file-actions.json +0 -0
- {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/interface-switcher.json +0 -0
- {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/launch-tree.json +0 -0
- {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/93.eae3497dd223d842d198.js +0 -0
- {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/style.js +0 -0
- {notebook-7.3.0b0.dist-info → notebook-7.3.0b1.dist-info}/WHEEL +0 -0
- {notebook-7.3.0b0.dist-info → notebook-7.3.0b1.dist-info}/entry_points.txt +0 -0
- {notebook-7.3.0b0.dist-info → notebook-7.3.0b1.dist-info}/licenses/LICENSE +0 -0
notebook/static/5313.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5313,8060],{65313:(e,t,i)=>{i.r(t),i.d(t,{CSVDelimiter:()=>n.p,CSVDocumentWidget:()=>o.kw,CSVViewer:()=>o.A9,CSVViewerFactory:()=>o.LT,DSVModel:()=>r.DSVModel,GridSearchService:()=>o.JZ,TSVViewerFactory:()=>o._d,TextRenderConfig:()=>o.B0,parseDSV:()=>s.G,parseDSVNoQuotes:()=>s.z});var r=i(18032),s=i(48234),n=i(40930),o=i(21058)},40930:(e,t,i)=>{i.d(t,{p:()=>a});var r,s=i(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5313,8060],{65313:(e,t,i)=>{i.r(t),i.d(t,{CSVDelimiter:()=>n.p,CSVDocumentWidget:()=>o.kw,CSVViewer:()=>o.A9,CSVViewerFactory:()=>o.LT,DSVModel:()=>r.DSVModel,GridSearchService:()=>o.JZ,TSVViewerFactory:()=>o._d,TextRenderConfig:()=>o.B0,parseDSV:()=>s.G,parseDSVNoQuotes:()=>s.z});var r=i(18032),s=i(48234),n=i(40930),o=i(21058)},40930:(e,t,i)=>{i.d(t,{p:()=>a});var r,s=i(66649),n=i(7258),o=i(2260);class a extends o.Widget{constructor(e){super({node:r.createNode(e.widget.delimiter,e.translator)}),this._widget=e.widget,this.addClass("jp-CSVDelimiter")}get selectNode(){return this.node.getElementsByTagName("select")[0]}handleEvent(e){"change"===e.type&&(this._widget.delimiter=this.selectNode.value)}onAfterAttach(e){this.selectNode.addEventListener("change",this)}onBeforeDetach(e){this.selectNode.removeEventListener("change",this)}}!function(e){e.createNode=function(e,t){const i=null==(t=t||s.nullTranslator)?void 0:t.load("jupyterlab"),r=[[",",","],[";",";"],["\t",i.__("tab")],["|",i.__("pipe")],["#",i.__("hash")]],o=document.createElement("div"),a=document.createElement("span"),d=document.createElement("select");a.textContent=i.__("Delimiter: "),a.className="jp-CSVDelimiter-label";for(const[t,i]of r){const r=document.createElement("option");r.value=t,r.textContent=i,t===e&&(r.selected=!0),d.appendChild(r)}o.appendChild(a);const l=n.Styling.wrapSelect(d);return l.classList.add("jp-CSVDelimiter-dropdown"),o.appendChild(l),o}}(r||(r={}))},21058:(e,t,i)=>{i.d(t,{A9:()=>u,B0:()=>h,JZ:()=>c,LT:()=>g,_d:()=>m,kw:()=>_});var r,s=i(77075),n=i(21428),o=i(21961),a=i(2159),d=i(2260),l=i(40930);class h{}class c{constructor(e){this._looping=!0,this._changed=new a.Signal(this),this._grid=e,this._query=null,this._row=0,this._column=-1}get changed(){return this._changed}cellBackgroundColorRendererFunc(e){return({value:t,row:i,column:r})=>this._query&&t.match(this._query)?this._row===i&&this._column===r?e.currentMatchBackgroundColor:e.matchBackgroundColor:""}clear(){this._query=null,this._row=0,this._column=-1,this._changed.emit(void 0)}find(e,t=!1){const i=this._grid.dataModel,r=i.rowCount("body"),s=i.columnCount("body");this._query!==e&&(this._row=0,this._column=-1),this._query=e;const n=this._grid.scrollY/this._grid.defaultSizes.rowHeight,o=(this._grid.scrollY+this._grid.pageHeight)/this._grid.defaultSizes.rowHeight,a=this._grid.scrollX/this._grid.defaultSizes.columnHeaderHeight,d=(this._grid.scrollX+this._grid.pageWidth)/this._grid.defaultSizes.columnHeaderHeight,l=(e,t)=>e>=n&&e<=o&&t>=a&&t<=d,h=t?-1:1;this._column+=h;for(let n=this._row;t?n>=0:n<r;n+=h){for(let r=this._column;t?r>=0:r<s;r+=h)if(i.data("body",n,r).match(e))return this._changed.emit(void 0),l(n,r)||this._grid.scrollToRow(n),this._row=n,this._column=r,!0;this._column=t?s-1:0}if(this._looping){this._looping=!1,this._row=t?0:r-1,this._wrapRows(t);try{return this.find(e,t)}finally{this._looping=!0}}return!1}_wrapRows(e=!1){const t=this._grid.dataModel,i=t.rowCount("body"),r=t.columnCount("body");e&&this._row<=0?(this._row=i-1,this._column=r):!e&&this._row>=i-1&&(this._row=0,this._column=-1)}get query(){return this._query}}class u extends d.Widget{constructor(e){super(),this._monitor=null,this._delimiter=",",this._revealed=new o.PromiseDelegate,this._baseRenderer=null,this._context=e.context,this.layout=new d.PanelLayout,this.addClass("jp-CSVViewer"),this._ready=this.initialize()}get ready(){return this._ready}async initialize(){const e=this.layout;if(this.isDisposed||!e)return;const{BasicKeyHandler:t,BasicMouseHandler:i,DataGrid:n}=await r.ensureDataGrid();this._defaultStyle=n.defaultStyle,this._grid=new n({defaultSizes:{rowHeight:24,columnWidth:144,rowHeaderWidth:64,columnHeaderHeight:36}}),this._grid.addClass("jp-CSVViewer-grid"),this._grid.headerVisibility="all",this._grid.keyHandler=new t,this._grid.mouseHandler=new i,this._grid.copyConfig={separator:"\t",format:n.copyFormatGeneric,headers:"all",warningThreshold:1e6},e.addWidget(this._grid),this._searchService=new c(this._grid),this._searchService.changed.connect(this._updateRenderer,this),await this._context.ready,await this._updateGrid(),this._revealed.resolve(void 0),this._monitor=new s.ActivityMonitor({signal:this._context.model.contentChanged,timeout:1e3}),this._monitor.activityStopped.connect(this._updateGrid,this)}get context(){return this._context}get revealed(){return this._revealed.promise}get delimiter(){return this._delimiter}set delimiter(e){e!==this._delimiter&&(this._delimiter=e,this._updateGrid())}get style(){return this._grid.style}set style(e){this._grid.style={...this._defaultStyle,...e}}set rendererConfig(e){this._baseRenderer=e,this._updateRenderer()}get searchService(){return this._searchService}dispose(){this._monitor&&this._monitor.dispose(),super.dispose()}goToLine(e){this._grid.scrollToRow(e)}onActivateRequest(e){this.node.tabIndex=-1,this.node.focus()}async _updateGrid(){const{BasicSelectionModel:e}=await r.ensureDataGrid(),{DSVModel:t}=await r.ensureDSVModel(),i=this._context.model.toString(),s=this._delimiter,n=this._grid.dataModel,o=this._grid.dataModel=new t({data:i,delimiter:s});this._grid.selectionModel=new e({dataModel:o}),n&&n.dispose()}async _updateRenderer(){if(null===this._baseRenderer)return;const{TextRenderer:e}=await r.ensureDataGrid(),t=this._baseRenderer,i=new e({textColor:t.textColor,horizontalAlignment:t.horizontalAlignment,backgroundColor:this._searchService.cellBackgroundColorRendererFunc(t)});this._grid.cellRenderers.update({body:i,"column-header":i,"corner-header":i,"row-header":i})}}class _ extends n.DocumentWidget{constructor(e){let{content:t,context:i,delimiter:s,reveal:n,...o}=e;t=t||r.createContent(i),n=Promise.all([n,t.revealed]),super({content:t,context:i,reveal:n,...o}),s&&(t.delimiter=s)}setFragment(e){const t=e.split("=");if("#row"!==t[0])return;let i=t[1].split(";")[0];i=i.split("-")[0],this.context.ready.then((()=>{this.content.goToLine(Number(i))}))}}class g extends n.ABCWidgetFactory{createNewWidget(e){const t=this.translator;return new _({context:e,translator:t})}defaultToolbarFactory(e){return[{name:"delimiter",widget:new l.p({widget:e.content,translator:this.translator})}]}}class m extends g{createNewWidget(e){return new _({context:e,delimiter:"\t",translator:this.translator})}}!function(e){let t=null,r=null;e.ensureDataGrid=async function(){return null==t&&(t=new o.PromiseDelegate,t.resolve(await i.e(9772).then(i.t.bind(i,39772,23)))),t.promise},e.ensureDSVModel=async function(){return null==r&&(r=new o.PromiseDelegate,r.resolve(await Promise.all([i.e(8032),i.e(9772)]).then(i.bind(i,18032)))),r.promise},e.createContent=function(e){return new u({context:e})}}(r||(r={}))}}]);
|
notebook/static/5325.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5325,377],{35325:(t,e,n)=>{n.r(e),n.d(e,{HTMLViewer:()=>h,HTMLViewerFactory:()=>m,IHTMLViewerTracker:()=>r,ToolbarItems:()=>o});const r=new(n(21961).Token)("@jupyterlab/htmlviewer:IHTMLViewerTracker","A widget tracker for rendered HTML documents.\n Use this if you want to be able to iterate over and interact with HTML documents\n viewed by the application.");var o,a,s=n(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5325,377],{35325:(t,e,n)=>{n.r(e),n.d(e,{HTMLViewer:()=>h,HTMLViewerFactory:()=>m,IHTMLViewerTracker:()=>r,ToolbarItems:()=>o});const r=new(n(21961).Token)("@jupyterlab/htmlviewer:IHTMLViewerTracker","A widget tracker for rendered HTML documents.\n Use this if you want to be able to iterate over and interact with HTML documents\n viewed by the application.");var o,a,s=n(77075),i=n(21428),l=n(66649),u=n(7258),c=n(2159),d=n(78156);class h extends i.DocumentWidget{constructor(t){super({...t,content:new u.IFrame({sandbox:["allow-same-origin"],loading:"lazy"})}),this._renderPending=!1,this._parser=new DOMParser,this._monitor=null,this._objectUrl="",this._trustedChanged=new c.Signal(this),this.translator=t.translator||l.nullTranslator,this.content.addClass("jp-HTMLViewer"),this.context.ready.then((()=>{this.update(),this._monitor=new s.ActivityMonitor({signal:this.context.model.contentChanged,timeout:1e3}),this._monitor.activityStopped.connect(this.update,this)}))}get trusted(){return-1!==this.content.sandbox.indexOf("allow-scripts")}set trusted(t){this.trusted!==t&&(this.content.sandbox=t?a.trusted:a.untrusted,this.update(),this._trustedChanged.emit(t))}get trustedChanged(){return this._trustedChanged}dispose(){if(this._objectUrl)try{URL.revokeObjectURL(this._objectUrl)}catch(t){}super.dispose()}onUpdateRequest(){this._renderPending||(this._renderPending=!0,this._renderModel().then((()=>this._renderPending=!1)))}async _renderModel(){let t=this.context.model.toString();t=await this._setupDocument(t);const e=new Blob([t],{type:"text/html"}),n=this._objectUrl;if(this._objectUrl=URL.createObjectURL(e),this.content.url=this._objectUrl,n)try{URL.revokeObjectURL(n)}catch(t){}}async _setupDocument(t){const e=this._parser.parseFromString(t,"text/html");let n=e.querySelector("base");n||(n=e.createElement("base"),e.head.insertBefore(n,e.head.firstChild));const r=this.context.path,o=await this.context.urlResolver.getDownloadUrl(r);if(n.href=o,n.target="_self",!this.trusted){const t=this.translator.load("jupyterlab").__("Action disabled as the file is not trusted.");e.body.insertAdjacentHTML("beforeend",`<style>\na[target="_blank"],\narea[target="_blank"],\nform[target="_blank"],\nbutton[formtarget="_blank"],\ninput[formtarget="_blank"][type="image"],\ninput[formtarget="_blank"][type="submit"] {\n cursor: not-allowed !important;\n}\na[target="_blank"]:hover::after,\narea[target="_blank"]:hover::after,\nform[target="_blank"]:hover::after,\nbutton[formtarget="_blank"]:hover::after,\ninput[formtarget="_blank"][type="image"]:hover::after,\ninput[formtarget="_blank"][type="submit"]:hover::after {\n content: "${{warning:t}.warning}";\n box-sizing: border-box;\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n z-index: 1000;\n border: 2px solid #e65100;\n background-color: #ffb74d;\n color: black;\n font-family: system-ui, -apple-system, blinkmacsystemfont, 'Segoe UI', helvetica, arial, sans-serif;\n text-align: center;\n}\n</style>`)}return e.documentElement.innerHTML}}class m extends i.ABCWidgetFactory{createNewWidget(t){return new h({context:t})}defaultToolbarFactory(t){return[{name:"refresh",widget:o.createRefreshButton(t,this.translator)},{name:"trust",widget:o.createTrustButton(t,this.translator)}]}}!function(t){t.createRefreshButton=function(t,e){const n=(null!=e?e:l.nullTranslator).load("jupyterlab");return new u.ToolbarButton({icon:u.refreshIcon,onClick:async()=>{t.context.model.dirty||(await t.context.revert(),t.update())},tooltip:n.__("Rerender HTML Document")})},t.createTrustButton=function(t,e){return u.ReactWidget.create(d.createElement(a.TrustButtonComponent,{htmlDocument:t,translator:e}))}}(o||(o={})),function(t){t.untrusted=[],t.trusted=["allow-scripts","allow-popups"],t.TrustButtonComponent=function(t){const e=(t.translator||l.nullTranslator).load("jupyterlab");return d.createElement(u.UseSignal,{signal:t.htmlDocument.trustedChanged,initialSender:t.htmlDocument},(()=>d.createElement(u.ToolbarButtonComponent,{className:"",onClick:()=>t.htmlDocument.trusted=!t.htmlDocument.trusted,tooltip:e.__("Whether the HTML file is trusted.\nTrusting the file allows opening pop-ups and running scripts\nwhich may result in security risks.\nOnly enable for files you trust."),label:t.htmlDocument.trusted?e.__("Distrust HTML"):e.__("Trust HTML")})))}}(a||(a={}))}}]);
|
notebook/static/5346.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5346],{15346:(e,t,a)=>{a.r(t),a.d(t,{default:()=>m});var n=a(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5346],{15346:(e,t,a)=>{a.r(t),a.d(t,{default:()=>m});var n=a(70750),l=a(78156),s=a.n(l),d=a(7258),i=a(14931),r=a(66649);const o="jp-CellTags-Tag",c="jp-CellTags-Unapplied",g="jp-CellTags-Holder",p="jp-CellTags-Add",u="jp-CellTags-Empty";class h{constructor(e,t){this._tracker=e,this._translator=t||r.nullTranslator,this._trans=this._translator.load("jupyterlab"),this._editing=!1}addTag(e,t){const a=e.formData;t&&!a.includes(t)&&(a.push(t),e.formContext.updateMetadata({[e.name]:a},!0))}pullTags(){var e,t;const a=null===(e=this._tracker)||void 0===e?void 0:e.currentWidget,n=null===(t=null==a?void 0:a.model)||void 0===t?void 0:t.cells;if(void 0===n)return[];const l=(0,i.reduce)(n,((e,t)=>{var a;return[...e,...null!==(a=t.getMetadata("tags"))&&void 0!==a?a:[]]}),[]);return[...new Set(l)].filter((e=>""!==e))}_emptyAddTag(e){e.value="",e.style.width="",e.classList.add(u)}_onAddTagKeyDown(e,t){const a=t.target;t.ctrlKey||("Enter"===t.key?this.addTag(e,a.value):"Escape"===t.key&&this._emptyAddTag(a))}_onAddTagFocus(e){this._editing||e.target.blur()}_onAddTagBlur(e){this._editing&&(this._editing=!1,this._emptyAddTag(e))}_onChange(e){if(e.target.value){e.target.classList.remove(u);const t=document.createElement("span");t.className=p,t.textContent=e.target.value,document.body.appendChild(t),e.target.style.setProperty("width",`calc(${t.getBoundingClientRect().width}px + var(--jp-add-tag-extra-width))`),document.body.removeChild(t)}else this._emptyAddTag(e.target)}_onAddTagClick(e,t){const a=t.target.closest("div"),n=null==a?void 0:a.childNodes[0];this._editing?t.target!==n&&this.addTag(e,n.value):(this._editing=!0,n.value="",n.focus()),t.preventDefault()}_onTagClick(e,t){const a=e.formData;a.includes(t)?a.splice(a.indexOf(t),1):a.push(t),e.formContext.updateMetadata({[e.name]:a},!0)}render(e){const t=this.pullTags();return s().createElement("div",{className:"jp-CellTags"},s().createElement("div",{className:"jp-FormGroup-fieldLabel jp-FormGroup-contentItem"},"Cell Tags"),t&&t.map(((t,a)=>s().createElement("div",{key:a,className:`${o} ${e.formData.includes(t)?"jp-CellTags-Applied":c}`,onClick:()=>this._onTagClick(e,t)},s().createElement("div",{className:g},s().createElement("span",null,t),e.formData.includes(t)&&s().createElement(d.LabIcon.resolveReact,{icon:d.checkIcon,tag:"span",elementPosition:"center",height:"18px",width:"18px",marginLeft:"5px",marginRight:"-3px"}))))),s().createElement("div",{className:`${o} ${c}`},s().createElement("div",{className:g,onMouseDown:t=>this._onAddTagClick(e,t)},s().createElement("input",{className:`${p} ${u}`,type:"text",placeholder:this._trans.__("Add Tag"),onKeyDown:t=>this._onAddTagKeyDown(e,t),onFocus:e=>this._onAddTagFocus(e),onBlur:e=>this._onAddTagBlur(e.target),onChange:e=>{this._onChange(e)}}),s().createElement(d.LabIcon.resolveReact,{icon:d.addIcon,tag:"span",height:"18px",width:"18px",marginLeft:"5px",marginRight:"-3px"}))))}}const m=[{id:"@jupyterlab/celltags-extension:plugin",description:"Adds the cell tags editor.",autoStart:!0,requires:[n.INotebookTracker],optional:[d.IFormRendererRegistry],activate:(e,t,a)=>{if(a){const e={fieldRenderer:e=>new h(t).render(e)};a.addRenderer("@jupyterlab/celltags-extension:plugin.renderer",e)}}}]}}]);
|
notebook/static/5426.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5426],{45426:(e,t,a)=>{a.r(t),a.d(t,{default:()=>s});var i=a(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5426],{45426:(e,t,a)=>{a.r(t),a.d(t,{default:()=>s});var i=a(20911),r=a(66649);const s={id:"@jupyterlab/theme-light-extension:plugin",description:"Adds a light theme.",requires:[i.IThemeManager,r.ITranslator],activate:(e,t,a)=>{const i=a.load("jupyterlab");t.register({name:"JupyterLab Light",displayName:i.__("JupyterLab Light"),isLight:!0,themeScrollbars:!1,load:()=>t.loadCSS("@jupyterlab/theme-light-extension/index.css"),unload:()=>Promise.resolve(void 0)})},autoStart:!0}}}]);
|
notebook/static/545.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[545],{60545:(e,n,t)=>{t.r(n),t.d(n,{CommandIDs:()=>C,default:()=>y});var a,o=t(73852),l=t(53876),r=t(20754),s=t(70607),d=t(5348),i=t(3012),c=t(93050),u=t(76878),m=t(14931),p=t(21961),h=t(2260),_=t(7073),g=t(58427);!function(e){e.openRecent="recentmenu:open-recent",e.reopenLast="recentmenu:reopen-last",e.clearRecents="docmanager:clear-recents"}(a||(a={}));class b extends h.Menu{constructor(e){super(e),this._manager=e.manager,this._showDirectories=e.showDirectories,this.updateItems(),this._manager.changed.connect(this.updateItems,this)}async _validateRecentlyOpened(){Promise.all(this._manager.recentlyOpened.map((e=>this._manager.validate(e))))}onBeforeAttach(e){const n=new p.PromiseDelegate;setTimeout((()=>{n.reject("Recents validation timed out.")}),550),Promise.race([n.promise,this._validateRecentlyOpened()]).then((()=>{this.update()})).catch((()=>{})),super.onBeforeAttach(e)}updateItems(){this.clearItems(),this.addItem({command:a.reopenLast}),this.addItem({type:"separator"});let e=!0,n=!1;this._manager.recentlyOpened.sort(((e,n)=>e.contentType===n.contentType?0:"directory"!==e.contentType?1:-1)).forEach((t=>{if("directory"===t.contentType){if(!this._showDirectories)return;n=!0}else e&&n&&(e=!1,this.addItem({type:"separator"}));this.addItem({command:a.openRecent,args:{recent:t}})})),this.addItem({type:"separator"}),this.addItem({command:a.clearRecents})}}const v={id:"@jupyterlab/mainmenu-extension:recents",description:"Adds sub-menu for opening recent documents to the File section of the main menu.",autoStart:!0,requires:[_.IRecentsManager,s.IMainMenu],optional:[g.IFileBrowserCommands,c.ITranslator],activate:(e,n,t,o,s)=>{const{commands:d}=e,i=(null!=s?s:c.nullTranslator).load("jupyterlab"),u=null!==o,m=async e=>{const t=await n.validate(e);return t||await(0,l.showErrorMessage)(i.__("Could Not Open Recent"),i.__("%1 is no longer valid and will be removed from the list",e.path)),t};d.addCommand(a.openRecent,{execute:async e=>{const n=e.recent,t=""===n.path?"/":n.path;await m(n)&&(o&&"directory"===n.contentType?await d.execute(o.openPath,{path:t}):await d.execute("docmanager:open",{path:t,factory:n.factory}))},label:e=>{const n=e.recent;return n?r.PathExt.joinWithLeadingSlash(n.root,n.path):i.__("Open a Recent Document (given by `recent` argument)")},isEnabled:e=>n.recentlyOpened.includes(e.recent)}),e.commands.addCommand(a.reopenLast,{execute:async()=>{const e=n.recentlyClosed[0];e&&await m(e)&&(await d.execute("docmanager:open",{path:e.path,factory:e.factory}),n.removeRecent(e,"closed"))},label:()=>{const e=n.recentlyClosed[0];return e?i.__("Reopen %1",e.path):i.__("Reopen Closed Document")},isEnabled:()=>0!==n.recentlyClosed.length,caption:i.__("Reopen recently closed file or notebook.")});const p=new b({commands:d,manager:n,showDirectories:u});p.title.label=i.__("Open Recent"),t.fileMenu.addItem({type:"submenu",submenu:p,rank:1})}},w="@jupyterlab/mainmenu-extension:plugin";var C;!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"}(C||(C={}));const y=[{id:w,description:"Adds and provides the application main menu.",requires:[o.IRouter,c.ITranslator],optional:[l.ICommandPalette,o.ILabShell,i.ISettingRegistry],provides:s.IMainMenu,activate:async(e,n,t,a,i,c)=>{const{commands:p}=e,_=t.load("jupyterlab"),g=new s.MainMenu(p);g.id="jp-MainMenu",g.addClass("jp-scrollbar-tiny"),c&&(await f.loadSettingsMenu(c,(e=>{g.addMenu(e,!1,{rank:e.rank})}),(e=>s.MainMenu.generateMenu(p,e,_)),t),g.update());const b=r.PageConfig.getOption("quitButton").toLowerCase();g.fileMenu.quitEntry="true"===b,function(e,n,t){const{commands:a,shell:l}=e;(0,o.addSemanticCommand)({id:C.undo,commands:a,shell:l,semanticCommands:n.undoers.undo,default:{label:t.__("Undo")},trans:t}),(0,o.addSemanticCommand)({id:C.redo,commands:a,shell:l,semanticCommands:n.undoers.redo,default:{label:t.__("Redo")},trans:t}),(0,o.addSemanticCommand)({id:C.clearCurrent,commands:a,shell:l,semanticCommands:n.clearers.clearCurrent,default:{label:t.__("Clear")},trans:t}),(0,o.addSemanticCommand)({id:C.clearAll,commands:a,shell:l,semanticCommands:n.clearers.clearAll,default:{label:t.__("Clear All")},trans:t}),(0,o.addSemanticCommand)({id:C.goToLine,commands:a,shell:l,semanticCommands:n.goToLiners,default:{label:t.__("Go to Line…")},trans:t})}(e,g.editMenu,_),function(e,n,t,a){const{commands:s,shell:i}=e;(0,o.addSemanticCommand)({id:C.closeAndCleanup,commands:s,shell:i,semanticCommands:n.closeAndCleaners,default:{execute:"application:close",label:a.__("Close and Shut Down"),isEnabled:!0},overrides:{isEnabled:()=>!!e.shell.currentWidget&&!!e.shell.currentWidget.title.closable},trans:a}),(0,o.addSemanticCommand)({id:C.createConsole,commands:s,shell:i,semanticCommands:n.consoleCreators,default:{label:a.__("New Console for Activity")},trans:a}),s.addCommand(C.shutdown,{label:a.__("Shut Down"),caption:a.__("Shut down %1",e.name),isVisible:()=>n.quitEntry,isEnabled:()=>n.quitEntry,execute:()=>(0,l.showDialog)({title:a.__("Shutdown confirmation"),body:a.__("Please confirm you want to shut down %1.",e.name),buttons:[l.Dialog.cancelButton(),l.Dialog.warnButton({label:a.__("Shut Down")})]}).then((async n=>{if(n.button.accept){const n=d.ServerConnection.makeSettings(),t=r.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((n=>{if(!n.ok)throw new d.ServerConnection.ResponseError(n);{const n=document.createElement("div"),t=document.createElement("p");t.textContent=a.__("You have shut down the Jupyter server. You can now close this tab.");const o=document.createElement("p");o.textContent=a.__("To use %1 again, you will need to relaunch it.",e.name),n.appendChild(t),n.appendChild(o),(0,l.showDialog)({title:a.__("Server stopped"),body:new h.Widget({node:n}),buttons:[]}),window.close()}})).catch((e=>{throw new d.ServerConnection.NetworkError(e)}))}}))}),s.addCommand(C.logout,{label:a.__("Log Out"),caption:a.__("Log out of %1",e.name),isVisible:()=>n.quitEntry,isEnabled:()=>n.quitEntry,execute:()=>{t.navigate("/logout",{hard:!0})}})}(e,g.fileMenu,n,_),function(e,n,t){const{commands:a,shell:r}=e;(0,o.addSemanticCommand)({id:C.interruptKernel,commands:a,shell:r,semanticCommands:n.kernelUsers.interruptKernel,default:{label:t.__("Interrupt Kernel"),caption:t.__("Interrupt the kernel")},overrides:{icon:e=>e.toolbar?u.stopIcon:void 0},trans:t}),(0,o.addSemanticCommand)({id:C.reconnectToKernel,commands:a,shell:r,semanticCommands:n.kernelUsers.reconnectToKernel,default:{label:t.__("Reconnect to Kernel")},trans:t}),(0,o.addSemanticCommand)({id:C.restartKernel,commands:a,shell:r,semanticCommands:n.kernelUsers.restartKernel,default:{label:t.__("Restart Kernel…"),caption:t.__("Restart the kernel")},overrides:{icon:e=>e.toolbar?u.refreshIcon:void 0},trans:t}),(0,o.addSemanticCommand)({id:C.restartKernelAndClear,commands:a,shell:r,semanticCommands:[n.kernelUsers.restartKernel,n.kernelUsers.clearWidget],default:{label:t.__("Restart Kernel and Clear…")},trans:t}),(0,o.addSemanticCommand)({id:C.changeKernel,commands:a,shell:r,semanticCommands:n.kernelUsers.changeKernel,default:{label:t.__("Change Kernel…")},trans:t}),(0,o.addSemanticCommand)({id:C.shutdownKernel,commands:a,shell:r,semanticCommands:n.kernelUsers.shutdownKernel,default:{label:t.__("Shut Down Kernel"),caption:t.__("Shut down kernel")},trans:t}),a.addCommand(C.shutdownAllKernels,{label:t.__("Shut Down All Kernels…"),isEnabled:()=>!e.serviceManager.sessions.running().next().done,execute:()=>(0,l.showDialog)({title:t.__("Shut Down All?"),body:t._n("Are you sure you want to permanently shut down the running kernel?","Are you sure you want to permanently shut down the %1 running kernels?",e.serviceManager.kernels.runningCount),buttons:[l.Dialog.cancelButton(),l.Dialog.warnButton({label:t.__("Shut Down All")})]}).then((n=>{if(n.button.accept)return e.serviceManager.sessions.shutdownAll()}))})}(e,g.kernelMenu,_),function(e,n,t){const{commands:a,shell:l}=e;(0,o.addSemanticCommand)({id:C.run,commands:a,shell:l,semanticCommands:n.codeRunners.run,default:{label:t.__("Run Selected"),caption:t.__("Run Selected")},overrides:{icon:e=>e.toolbar?u.runIcon:void 0},trans:t}),(0,o.addSemanticCommand)({id:C.runAll,commands:a,shell:l,semanticCommands:n.codeRunners.runAll,default:{label:t.__("Run All"),caption:t.__("Run All")},trans:t}),(0,o.addSemanticCommand)({id:C.restartAndRunAll,commands:a,shell:l,semanticCommands:[n.codeRunners.restart,n.codeRunners.runAll],default:{label:t.__("Restart Kernel and Run All"),caption:t.__("Restart Kernel and Run All")},overrides:{icon:e=>e.toolbar?u.fastForwardIcon:void 0},trans:t})}(e,g.runMenu,_),function(e,n,t){const{commands:a,shell:l}=e;(0,o.addSemanticCommand)({id:C.lineNumbering,commands:a,shell:l,semanticCommands:n.editorViewers.toggleLineNumbers,default:{label:t.__("Show Line Numbers")},trans:t}),(0,o.addSemanticCommand)({id:C.matchBrackets,commands:a,shell:l,semanticCommands:n.editorViewers.toggleMatchBrackets,default:{label:t.__("Match Brackets")},trans:t}),(0,o.addSemanticCommand)({id:C.wordWrap,commands:a,shell:l,semanticCommands:n.editorViewers.toggleWordWrap,default:{label:t.__("Wrap Words")},trans:t})}(e,g.viewMenu,_),function(e,n,t){const{commands:a,shell:l}=e;(0,o.addSemanticCommand)({id:C.getKernel,commands:a,shell:l,semanticCommands:n.getKernel,default:{label:t.__("Get Kernel"),isVisible:!1},trans:t})}(e,g.helpMenu,_),i&&function(e,n,t,a){const o=e.commands,l=[];let r;o.addCommand(C.activateById,{label:n=>{if(void 0===n.id)return a.__("Activate a widget by its `id`.");const t=n.id||"",o=(0,m.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 s="";o.addCommand(C.activatePreviouslyUsedTab,{label:a.__("Activate Previously Used Tab"),isEnabled:()=>!!s,execute:()=>o.execute(C.activateById,{id:s})}),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===s&&(t=!0),l.push({command:C.activateById,args:{id:n.id}});r=n.addGroup(l,1),s=t?s:""};a(),t.layoutModified.connect((()=>{a()})),t.currentChanged.connect(((e,n)=>{const t=n.oldValue;t&&(s=t.id)}))}))}(e,g.tabsMenu,i,_);const v=e=>{g.activeMenu=e,g.openActiveMenu()};return p.addCommand(C.openEdit,{label:_.__("Open Edit Menu"),execute:()=>v(g.editMenu)}),p.addCommand(C.openFile,{label:_.__("Open File Menu"),execute:()=>v(g.fileMenu)}),p.addCommand(C.openKernel,{label:_.__("Open Kernel Menu"),execute:()=>v(g.kernelMenu)}),p.addCommand(C.openRun,{label:_.__("Open Run Menu"),execute:()=>v(g.runMenu)}),p.addCommand(C.openView,{label:_.__("Open View Menu"),execute:()=>v(g.viewMenu)}),p.addCommand(C.openSettings,{label:_.__("Open Settings Menu"),execute:()=>v(g.settingsMenu)}),p.addCommand(C.openTabs,{label:_.__("Open Tabs Menu"),execute:()=>v(g.tabsMenu)}),p.addCommand(C.openHelp,{label:_.__("Open Help Menu"),execute:()=>v(g.helpMenu)}),p.addCommand(C.openFirst,{label:_.__("Open First Menu"),execute:()=>{g.activeIndex=0,g.openActiveMenu()}}),a&&(a.addItem({command:C.shutdown,category:_.__("Main Area")}),a.addItem({command:C.logout,category:_.__("Main Area")}),a.addItem({command:C.shutdownAllKernels,category:_.__("Kernel Operations")}),a.addItem({command:C.activatePreviouslyUsedTab,category:_.__("Main Area")})),e.shell.add(g,"menu",{rank:100}),g}},v];var f;!function(e){async function n(e){(await(0,l.showDialog)({title:e.__("Information"),body:e.__("Menu customization has changed. You will need to reload JupyterLab to see the changes."),buttons:[l.Dialog.cancelButton(),l.Dialog.okButton({label:e.__("Reload")})]})).button.accept&&location.reload()}e.loadSettingsMenu=async function(e,t,a,o){var r;const s=o.load("jupyterlab");let d=null,c={};function u(n){var t,a;c={};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 c[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(w,{compose:e=>{var n,t,a,o;d||(d=p.JSONExt.deepCopy(e.schema),u(d));const l=null!==(a=null===(t=null===(n=d.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:[]},s={...e.data.composite,menus:i.SettingRegistry.reconcileMenus(l,r.menus)};return e.data={composite:s,user:r},e},fetch:e=>(d||(d=p.JSONExt.deepCopy(e.schema),u(d)),{data:e.data,id:e.id,raw:e.raw,schema:d,version:e.version})});const m=await e.load(w),h=null!==(r=p.JSONExt.deepCopy(m.composite.menus))&&void 0!==r?r:[],_=new Array;l.MenuFactory.createMenus(h.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=>{_.push(e),t(e)})),m.changed.connect((()=>{var e;const t=null!==(e=m.composite.menus)&&void 0!==e?e:[];p.JSONExt.deepEqual(h,t)||n(s)})),e.pluginChanged.connect((async(o,r)=>{var d,u,m;if(r!==w){const o=null!==(d=c[r])&&void 0!==d?d:[],g=null!==(m=null===(u=e.plugins[r].schema["jupyter.lab.menus"])||void 0===u?void 0:u.main)&&void 0!==m?m:[];if(!p.JSONExt.deepEqual(o,g))if(c[r])await n(s);else{c[r]=p.JSONExt.deepCopy(g);const e=i.SettingRegistry.reconcileMenus(g,h,!1,!1).filter((e=>!e.disabled)).map((e=>{var n;return{...e,items:i.SettingRegistry.filterDisabledItems(null!==(n=e.items)&&void 0!==n?n:[])}}));l.MenuFactory.updateMenus(_,e,a).forEach((e=>{t(e)}))}}}))}}(f||(f={}))}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[545],{60545:(e,n,t)=>{t.r(n),t.d(n,{CommandIDs:()=>C,default:()=>y});var a,o=t(84241),l=t(20911),r=t(77075),s=t(68567),d=t(68086),i=t(68878),c=t(66649),u=t(7258),m=t(14931),p=t(21961),h=t(2260),_=t(20780),g=t(90537);!function(e){e.openRecent="recentmenu:open-recent",e.reopenLast="recentmenu:reopen-last",e.clearRecents="docmanager:clear-recents"}(a||(a={}));class b extends h.Menu{constructor(e){super(e),this._manager=e.manager,this._showDirectories=e.showDirectories,this.updateItems(),this._manager.changed.connect(this.updateItems,this)}async _validateRecentlyOpened(){Promise.all(this._manager.recentlyOpened.map((e=>this._manager.validate(e))))}onBeforeAttach(e){const n=new p.PromiseDelegate;setTimeout((()=>{n.reject("Recents validation timed out.")}),550),Promise.race([n.promise,this._validateRecentlyOpened()]).then((()=>{this.update()})).catch((()=>{})),super.onBeforeAttach(e)}updateItems(){this.clearItems(),this.addItem({command:a.reopenLast}),this.addItem({type:"separator"});let e=!0,n=!1;this._manager.recentlyOpened.sort(((e,n)=>e.contentType===n.contentType?0:"directory"!==e.contentType?1:-1)).forEach((t=>{if("directory"===t.contentType){if(!this._showDirectories)return;n=!0}else e&&n&&(e=!1,this.addItem({type:"separator"}));this.addItem({command:a.openRecent,args:{recent:t}})})),this.addItem({type:"separator"}),this.addItem({command:a.clearRecents})}}const v={id:"@jupyterlab/mainmenu-extension:recents",description:"Adds sub-menu for opening recent documents to the File section of the main menu.",autoStart:!0,requires:[_.IRecentsManager,s.IMainMenu],optional:[g.IFileBrowserCommands,c.ITranslator],activate:(e,n,t,o,s)=>{const{commands:d}=e,i=(null!=s?s:c.nullTranslator).load("jupyterlab"),u=null!==o,m=async e=>{const t=await n.validate(e);return t||await(0,l.showErrorMessage)(i.__("Could Not Open Recent"),i.__("%1 is no longer valid and will be removed from the list",e.path)),t};d.addCommand(a.openRecent,{execute:async e=>{const n=e.recent,t=""===n.path?"/":n.path;await m(n)&&(o&&"directory"===n.contentType?await d.execute(o.openPath,{path:t}):await d.execute("docmanager:open",{path:t,factory:n.factory}))},label:e=>{const n=e.recent;return n?r.PathExt.joinWithLeadingSlash(n.root,n.path):i.__("Open a Recent Document (given by `recent` argument)")},isEnabled:e=>n.recentlyOpened.includes(e.recent)}),e.commands.addCommand(a.reopenLast,{execute:async()=>{const e=n.recentlyClosed[0];e&&await m(e)&&(await d.execute("docmanager:open",{path:e.path,factory:e.factory}),n.removeRecent(e,"closed"))},label:()=>{const e=n.recentlyClosed[0];return e?i.__("Reopen %1",e.path):i.__("Reopen Closed Document")},isEnabled:()=>0!==n.recentlyClosed.length,caption:i.__("Reopen recently closed file or notebook.")});const p=new b({commands:d,manager:n,showDirectories:u});p.title.label=i.__("Open Recent"),t.fileMenu.addItem({type:"submenu",submenu:p,rank:1})}},w="@jupyterlab/mainmenu-extension:plugin";var C;!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"}(C||(C={}));const y=[{id:w,description:"Adds and provides the application main menu.",requires:[o.IRouter,c.ITranslator],optional:[l.ICommandPalette,o.ILabShell,i.ISettingRegistry],provides:s.IMainMenu,activate:async(e,n,t,a,i,c)=>{const{commands:p}=e,_=t.load("jupyterlab"),g=new s.MainMenu(p);g.id="jp-MainMenu",g.addClass("jp-scrollbar-tiny"),c&&(await f.loadSettingsMenu(c,(e=>{g.addMenu(e,!1,{rank:e.rank})}),(e=>s.MainMenu.generateMenu(p,e,_)),t),g.update());const b=r.PageConfig.getOption("quitButton").toLowerCase();g.fileMenu.quitEntry="true"===b,function(e,n,t){const{commands:a,shell:l}=e;(0,o.addSemanticCommand)({id:C.undo,commands:a,shell:l,semanticCommands:n.undoers.undo,default:{label:t.__("Undo")},trans:t}),(0,o.addSemanticCommand)({id:C.redo,commands:a,shell:l,semanticCommands:n.undoers.redo,default:{label:t.__("Redo")},trans:t}),(0,o.addSemanticCommand)({id:C.clearCurrent,commands:a,shell:l,semanticCommands:n.clearers.clearCurrent,default:{label:t.__("Clear")},trans:t}),(0,o.addSemanticCommand)({id:C.clearAll,commands:a,shell:l,semanticCommands:n.clearers.clearAll,default:{label:t.__("Clear All")},trans:t}),(0,o.addSemanticCommand)({id:C.goToLine,commands:a,shell:l,semanticCommands:n.goToLiners,default:{label:t.__("Go to Line…")},trans:t})}(e,g.editMenu,_),function(e,n,t,a){const{commands:s,shell:i}=e;(0,o.addSemanticCommand)({id:C.closeAndCleanup,commands:s,shell:i,semanticCommands:n.closeAndCleaners,default:{execute:"application:close",label:a.__("Close and Shut Down"),isEnabled:!0},overrides:{isEnabled:()=>!!e.shell.currentWidget&&!!e.shell.currentWidget.title.closable},trans:a}),(0,o.addSemanticCommand)({id:C.createConsole,commands:s,shell:i,semanticCommands:n.consoleCreators,default:{label:a.__("New Console for Activity")},trans:a}),s.addCommand(C.shutdown,{label:a.__("Shut Down"),caption:a.__("Shut down %1",e.name),isVisible:()=>n.quitEntry,isEnabled:()=>n.quitEntry,execute:()=>(0,l.showDialog)({title:a.__("Shutdown confirmation"),body:a.__("Please confirm you want to shut down %1.",e.name),buttons:[l.Dialog.cancelButton(),l.Dialog.warnButton({label:a.__("Shut Down")})]}).then((async n=>{if(n.button.accept){const n=d.ServerConnection.makeSettings(),t=r.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((n=>{if(!n.ok)throw new d.ServerConnection.ResponseError(n);{const n=document.createElement("div"),t=document.createElement("p");t.textContent=a.__("You have shut down the Jupyter server. You can now close this tab.");const o=document.createElement("p");o.textContent=a.__("To use %1 again, you will need to relaunch it.",e.name),n.appendChild(t),n.appendChild(o),(0,l.showDialog)({title:a.__("Server stopped"),body:new h.Widget({node:n}),buttons:[]}),window.close()}})).catch((e=>{throw new d.ServerConnection.NetworkError(e)}))}}))}),s.addCommand(C.logout,{label:a.__("Log Out"),caption:a.__("Log out of %1",e.name),isVisible:()=>n.quitEntry,isEnabled:()=>n.quitEntry,execute:()=>{t.navigate("/logout",{hard:!0})}})}(e,g.fileMenu,n,_),function(e,n,t){const{commands:a,shell:r}=e;(0,o.addSemanticCommand)({id:C.interruptKernel,commands:a,shell:r,semanticCommands:n.kernelUsers.interruptKernel,default:{label:t.__("Interrupt Kernel"),caption:t.__("Interrupt the kernel")},overrides:{icon:e=>e.toolbar?u.stopIcon:void 0},trans:t}),(0,o.addSemanticCommand)({id:C.reconnectToKernel,commands:a,shell:r,semanticCommands:n.kernelUsers.reconnectToKernel,default:{label:t.__("Reconnect to Kernel")},trans:t}),(0,o.addSemanticCommand)({id:C.restartKernel,commands:a,shell:r,semanticCommands:n.kernelUsers.restartKernel,default:{label:t.__("Restart Kernel…"),caption:t.__("Restart the kernel")},overrides:{icon:e=>e.toolbar?u.refreshIcon:void 0},trans:t}),(0,o.addSemanticCommand)({id:C.restartKernelAndClear,commands:a,shell:r,semanticCommands:[n.kernelUsers.restartKernel,n.kernelUsers.clearWidget],default:{label:t.__("Restart Kernel and Clear…")},trans:t}),(0,o.addSemanticCommand)({id:C.changeKernel,commands:a,shell:r,semanticCommands:n.kernelUsers.changeKernel,default:{label:t.__("Change Kernel…")},trans:t}),(0,o.addSemanticCommand)({id:C.shutdownKernel,commands:a,shell:r,semanticCommands:n.kernelUsers.shutdownKernel,default:{label:t.__("Shut Down Kernel"),caption:t.__("Shut down kernel")},trans:t}),a.addCommand(C.shutdownAllKernels,{label:t.__("Shut Down All Kernels…"),isEnabled:()=>!e.serviceManager.sessions.running().next().done,execute:()=>(0,l.showDialog)({title:t.__("Shut Down All?"),body:t._n("Are you sure you want to permanently shut down the running kernel?","Are you sure you want to permanently shut down the %1 running kernels?",e.serviceManager.kernels.runningCount),buttons:[l.Dialog.cancelButton(),l.Dialog.warnButton({label:t.__("Shut Down All")})]}).then((n=>{if(n.button.accept)return e.serviceManager.sessions.shutdownAll()}))})}(e,g.kernelMenu,_),function(e,n,t){const{commands:a,shell:l}=e;(0,o.addSemanticCommand)({id:C.run,commands:a,shell:l,semanticCommands:n.codeRunners.run,default:{label:t.__("Run Selected"),caption:t.__("Run Selected")},overrides:{icon:e=>e.toolbar?u.runIcon:void 0},trans:t}),(0,o.addSemanticCommand)({id:C.runAll,commands:a,shell:l,semanticCommands:n.codeRunners.runAll,default:{label:t.__("Run All"),caption:t.__("Run All")},trans:t}),(0,o.addSemanticCommand)({id:C.restartAndRunAll,commands:a,shell:l,semanticCommands:[n.codeRunners.restart,n.codeRunners.runAll],default:{label:t.__("Restart Kernel and Run All"),caption:t.__("Restart Kernel and Run All")},overrides:{icon:e=>e.toolbar?u.fastForwardIcon:void 0},trans:t})}(e,g.runMenu,_),function(e,n,t){const{commands:a,shell:l}=e;(0,o.addSemanticCommand)({id:C.lineNumbering,commands:a,shell:l,semanticCommands:n.editorViewers.toggleLineNumbers,default:{label:t.__("Show Line Numbers")},trans:t}),(0,o.addSemanticCommand)({id:C.matchBrackets,commands:a,shell:l,semanticCommands:n.editorViewers.toggleMatchBrackets,default:{label:t.__("Match Brackets")},trans:t}),(0,o.addSemanticCommand)({id:C.wordWrap,commands:a,shell:l,semanticCommands:n.editorViewers.toggleWordWrap,default:{label:t.__("Wrap Words")},trans:t})}(e,g.viewMenu,_),function(e,n,t){const{commands:a,shell:l}=e;(0,o.addSemanticCommand)({id:C.getKernel,commands:a,shell:l,semanticCommands:n.getKernel,default:{label:t.__("Get Kernel"),isVisible:!1},trans:t})}(e,g.helpMenu,_),i&&function(e,n,t,a){const o=e.commands,l=[];let r;o.addCommand(C.activateById,{label:n=>{if(void 0===n.id)return a.__("Activate a widget by its `id`.");const t=n.id||"",o=(0,m.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 s="";o.addCommand(C.activatePreviouslyUsedTab,{label:a.__("Activate Previously Used Tab"),isEnabled:()=>!!s,execute:()=>o.execute(C.activateById,{id:s})}),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===s&&(t=!0),l.push({command:C.activateById,args:{id:n.id}});r=n.addGroup(l,1),s=t?s:""};a(),t.layoutModified.connect((()=>{a()})),t.currentChanged.connect(((e,n)=>{const t=n.oldValue;t&&(s=t.id)}))}))}(e,g.tabsMenu,i,_);const v=e=>{g.activeMenu=e,g.openActiveMenu()};return p.addCommand(C.openEdit,{label:_.__("Open Edit Menu"),execute:()=>v(g.editMenu)}),p.addCommand(C.openFile,{label:_.__("Open File Menu"),execute:()=>v(g.fileMenu)}),p.addCommand(C.openKernel,{label:_.__("Open Kernel Menu"),execute:()=>v(g.kernelMenu)}),p.addCommand(C.openRun,{label:_.__("Open Run Menu"),execute:()=>v(g.runMenu)}),p.addCommand(C.openView,{label:_.__("Open View Menu"),execute:()=>v(g.viewMenu)}),p.addCommand(C.openSettings,{label:_.__("Open Settings Menu"),execute:()=>v(g.settingsMenu)}),p.addCommand(C.openTabs,{label:_.__("Open Tabs Menu"),execute:()=>v(g.tabsMenu)}),p.addCommand(C.openHelp,{label:_.__("Open Help Menu"),execute:()=>v(g.helpMenu)}),p.addCommand(C.openFirst,{label:_.__("Open First Menu"),execute:()=>{g.activeIndex=0,g.openActiveMenu()}}),a&&(a.addItem({command:C.shutdown,category:_.__("Main Area")}),a.addItem({command:C.logout,category:_.__("Main Area")}),a.addItem({command:C.shutdownAllKernels,category:_.__("Kernel Operations")}),a.addItem({command:C.activatePreviouslyUsedTab,category:_.__("Main Area")})),e.shell.add(g,"menu",{rank:100}),g}},v];var f;!function(e){async function n(e){(await(0,l.showDialog)({title:e.__("Information"),body:e.__("Menu customization has changed. You will need to reload JupyterLab to see the changes."),buttons:[l.Dialog.cancelButton(),l.Dialog.okButton({label:e.__("Reload")})]})).button.accept&&location.reload()}e.loadSettingsMenu=async function(e,t,a,o){var r;const s=o.load("jupyterlab");let d=null,c={};function u(n){var t,a;c={};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 c[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(w,{compose:e=>{var n,t,a,o;d||(d=p.JSONExt.deepCopy(e.schema),u(d));const l=null!==(a=null===(t=null===(n=d.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:[]},s={...e.data.composite,menus:i.SettingRegistry.reconcileMenus(l,r.menus)};return e.data={composite:s,user:r},e},fetch:e=>(d||(d=p.JSONExt.deepCopy(e.schema),u(d)),{data:e.data,id:e.id,raw:e.raw,schema:d,version:e.version})});const m=await e.load(w),h=null!==(r=p.JSONExt.deepCopy(m.composite.menus))&&void 0!==r?r:[],_=new Array;l.MenuFactory.createMenus(h.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=>{_.push(e),t(e)})),m.changed.connect((()=>{var e;const t=null!==(e=m.composite.menus)&&void 0!==e?e:[];p.JSONExt.deepEqual(h,t)||n(s)})),e.pluginChanged.connect((async(o,r)=>{var d,u,m;if(r!==w){const o=null!==(d=c[r])&&void 0!==d?d:[],g=null!==(m=null===(u=e.plugins[r].schema["jupyter.lab.menus"])||void 0===u?void 0:u.main)&&void 0!==m?m:[];if(!p.JSONExt.deepEqual(o,g))if(c[r])await n(s);else{c[r]=p.JSONExt.deepCopy(g);const e=i.SettingRegistry.reconcileMenus(g,h,!1,!1).filter((e=>!e.disabled)).map((e=>{var n;return{...e,items:i.SettingRegistry.filterDisabledItems(null!==(n=e.items)&&void 0!==n?n:[])}}));l.MenuFactory.updateMenus(_,e,a).forEach((e=>{t(e)}))}}}))}}(f||(f={}))}}]);
|
notebook/static/5573.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5573],{5573:(e,o,t)=>{t.r(o),t.d(o,{default:()=>P});var n=t(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5573],{5573:(e,o,t)=>{t.r(o),t.d(o,{default:()=>P});var n=t(20911),a=t(77075),s=t(20780),l=t(68567),r=t(70750),i=t(68878),c=t(66649),d=t(20763),u=t(32406),k=t(2260),b=t(78156),g=t.n(b);const p=e=>{const o=e.model;if(!o)return!1;const t=Array.from(o.cells);let n=0,a=0;for(const e of t)"code"===e.type&&(n++,e.trusted&&a++);return a===n},h=({notebook:e,translator:o})=>{const t=o.load("notebook"),[n,a]=(0,b.useState)(p(e)),s=()=>{const o=p(e);a(o)};return(0,b.useEffect)((()=>(e.modelContentChanged.connect(s),e.activeCellChanged.connect(s),s(),()=>{e.modelContentChanged.disconnect(s),e.activeCellChanged.disconnect(s)}))),g().createElement("button",{className:"jp-NotebookTrustedStatus",style:n?{cursor:"help"}:{cursor:"pointer"},onClick:()=>!n&&(async()=>{await r.NotebookActions.trust(e,o),s()})(),title:n?t.__("JavaScript enabled for notebook display"):t.__("JavaScript disabled for notebook display")},n?t.__("Trusted"):t.__("Not Trusted"))};var m;!function(e){e.create=({notebook:e,translator:o})=>n.ReactWidget.create(g().createElement(h,{notebook:e,translator:o}))}(m||(m={}));const C="jp-NotebookKernelStatus-error",f="jp-NotebookKernelStatus-warn",y="jp-NotebookKernelStatus-info",v="jp-NotebookKernelStatus-fade";var N;!function(e){e.openEditNotebookMetadata="notebook:edit-metadata",e.toggleFullWidth="notebook:toggle-full-width"}(N||(N={}));const w={id:"@jupyter-notebook/notebook-extension:checkpoints",description:"A plugin for the checkpoint indicator.",autoStart:!0,requires:[s.IDocumentManager,c.ITranslator],optional:[d.INotebookShell,n.IToolbarWidgetRegistry],activate:(e,o,t,s,l)=>{const{shell:r}=e,i=t.load("notebook"),c=document.createElement("div");l&&l.addFactory("TopBar","checkpoint",(e=>{const o=new k.Widget({node:c});return o.id=n.DOMUtils.createDomID(),o.addClass("jp-NotebookCheckpoint"),o}));const d=async()=>{const e=r.currentWidget;if(!e)return;const t=o.contextForWidget(e);null==t||t.fileChanged.disconnect(d),null==t||t.fileChanged.connect(d);const n=await(null==t?void 0:t.listCheckpoints());if(!n)return;const s=n[n.length-1];c.textContent=i.__("Last Checkpoint: %1",a.Time.formatHuman(new Date(s.last_modified)))};s&&s.currentChanged.connect(d),new u.Poll({auto:!0,factory:()=>d(),frequency:{interval:2e3,backoff:!1},standby:"when-hidden"})}},T={id:"@jupyter-notebook/notebook-extension:close-tab",description:'Add a command to close the browser tab when clicking on "Close and Shut Down".',autoStart:!0,requires:[l.IMainMenu],optional:[c.ITranslator],activate:(e,o,t)=>{const{commands:n}=e,a=(t=null!=t?t:c.nullTranslator).load("notebook"),s="notebook:close-and-halt";n.addCommand(s,{label:a.__("Close and Shut Down Notebook"),execute:async()=>{await n.execute("notebook:shutdown-kernel",{activate:!1}),window.close()}}),o.fileMenu.closeAndCleaners.add({id:s,rank:0})}},S={id:"@jupyter-notebook/notebook-extension:open-tree-tab",description:'Add a command to open a browser tab on the tree view when clicking "Open...".',autoStart:!0,optional:[c.ITranslator],activate:(e,o)=>{const{commands:t}=e,n=(o=null!=o?o:c.nullTranslator).load("notebook");t.addCommand("notebook:open-tree-tab",{label:n.__("Open…"),execute:async()=>{const e=a.URLExt.join(a.PageConfig.getBaseUrl(),"tree");window.open(e)}})}},x={id:"@jupyter-notebook/notebook-extension:full-width-notebook",description:"A plugin to set the notebook to full width.",autoStart:!0,requires:[r.INotebookTracker],optional:[n.ICommandPalette,i.ISettingRegistry,c.ITranslator],activate:(e,o,t,n,a)=>{const s=(null!=a?a:c.nullTranslator).load("notebook");let l=!1;const r=()=>{const e=o.currentWidget;l=!l,e&&e.toggleClass("jp-mod-fullwidth",l)};let i;if(n){const o=n.load(x.id),t=e=>{e.get("fullWidthNotebook").composite!==l&&r()};Promise.all([o,e.restored]).then((([e])=>{i=e,t(e),e.changed.connect((e=>{t(e)}))})).catch((e=>{console.error(e.message)}))}e.commands.addCommand(N.toggleFullWidth,{label:s.__("Enable Full Width Notebook"),execute:()=>{r(),i&&i.set("fullWidthNotebook",l)},isEnabled:()=>null!==o.currentWidget,isToggled:()=>l}),t&&t.addItem({command:N.toggleFullWidth,category:"Notebook Operations"})}},_={id:"@jupyter-notebook/notebook-extension:kernel-logo",description:"The kernel logo plugin.",autoStart:!0,requires:[d.INotebookShell],optional:[n.IToolbarWidgetRegistry],activate:(e,o,t)=>{const{serviceManager:n}=e,a=document.createElement("div"),s=document.createElement("img"),l=async()=>{var e,t,i,c,d;const u=o.currentWidget;if(!(u instanceof r.NotebookPanel))return;a.hasChildNodes()||a.appendChild(s),await u.sessionContext.ready,u.sessionContext.kernelChanged.disconnect(l),u.sessionContext.kernelChanged.connect(l);const k=null!==(i=null===(t=null===(e=u.sessionContext.session)||void 0===e?void 0:e.kernel)||void 0===t?void 0:t.name)&&void 0!==i?i:"",b=null===(d=null===(c=n.kernelspecs)||void 0===c?void 0:c.specs)||void 0===d?void 0:d.kernelspecs[k];if(!b)return void a.childNodes[0].remove();const g=b.resources["logo-64x64"];g?(s.src=g,s.title=b.display_name):a.childNodes[0].remove()};t&&t.addFactory("TopBar","kernelLogo",(e=>{const o=new k.Widget({node:a});return o.addClass("jp-NotebookKernelLogo"),o})),e.started.then((()=>{o.currentChanged.connect(l)}))}},I={id:"@jupyter-notebook/notebook-extension:kernel-status",description:"A plugin to display the kernel status.",autoStart:!0,requires:[d.INotebookShell,c.ITranslator],activate:(e,o,t)=>{const n=t.load("notebook"),s=new k.Widget;s.addClass("jp-NotebookKernelStatus"),e.shell.add(s,"menu",{rank:10010});const l=e=>{const o=e.kernelDisplayStatus;let t=`Kernel ${a.Text.titleCase(o)}`;switch(s.removeClass(C),s.removeClass(f),s.removeClass(y),s.removeClass(v),o){case"busy":case"idle":t="",s.addClass(v);break;case"dead":case"terminating":s.addClass(C);break;case"unknown":s.addClass(f);break;default:s.addClass(y),s.addClass(v)}s.node.textContent=n.__(t)};o.currentChanged.connect((async()=>{const e=o.currentWidget;e instanceof r.NotebookPanel&&e.sessionContext.statusChanged.connect(l)}))}},E={id:"@jupyter-notebook/notebook-extension:scroll-output",description:"A plugin to enable scrolling for outputs by default.",autoStart:!0,requires:[r.INotebookTracker],optional:[i.ISettingRegistry],activate:async(e,o,t)=>{let n=!0;const a=e=>{if(!n)return;const{outputArea:o}=e;if(void 0!==e.model.getMetadata("scrolled"))return;const{node:t}=o,a=t.scrollHeight>1.3*(parseFloat(t.style.fontSize.replace("px",""))||14)*100;e.toggleClass("jp-mod-outputsScrolled",a)},s={},l=e=>{if("code"===e.model.type){const o=e,t=o.model.id;a(o),s[t]&&o.outputArea.model.changed.disconnect(s[t]),s[t]=()=>a(o),o.outputArea.model.changed.connect(s[t])}};if(o.widgetAdded.connect(((e,o)=>{var t;o.sessionContext.ready.then((()=>{o.content.widgets.forEach(l)})),null===(t=o.model)||void 0===t||t.cells.changed.connect(((e,t)=>{o.content.widgets.forEach(l)}))})),t){const o=t.load(E.id),a=e=>{n=e.get("autoScrollOutputs").composite};Promise.all([o,e.restored]).then((([e])=>{a(e),e.changed.connect((e=>{a(e)}))})).catch((e=>{console.error(e.message)}))}}},j={id:"@jupyter-notebook/notebook-extension:notebook-tools",description:"A plugin to add the NotebookTools to the side panel.",autoStart:!0,requires:[d.INotebookShell],optional:[r.INotebookTools],activate:(e,o,t)=>{o.currentChanged.connect((async()=>{o.currentWidget instanceof r.NotebookPanel&&t&&o.add(t,"right",{type:"Property Inspector"})}))}},W={id:"@jupyter-notebook/notebook-extension:tab-icon",description:"A plugin to update the tab icon based on the kernel status.",autoStart:!0,requires:[r.INotebookTracker],activate:(e,o)=>{const t=a.PageConfig.getBaseUrl(),n=a.URLExt.join(t,"static/favicons/favicon-notebook.ico"),s=a.URLExt.join(t,"static/favicons/favicon-busy-1.ico");o.currentChanged.connect((async()=>{const e=o.currentWidget,t=null==e?void 0:e.sessionContext;t&&t.statusChanged.connect((()=>{(e=>{const o=document.querySelector("link[rel*='icon']");switch(e){case"busy":o.href=s;break;case"idle":o.href=n}})(t.kernelDisplayStatus)}))}))}},A={id:"@jupyter-notebook/notebook-extension:trusted",description:"A plugin that adds a Trusted indicator to the menu area.",autoStart:!0,requires:[d.INotebookShell,c.ITranslator],activate:(e,o,t)=>{o.currentChanged.connect((async()=>{const e=o.currentWidget;if(!(e instanceof r.NotebookPanel))return;const n=e.content;await e.context.ready;const a=m.create({notebook:n,translator:t});o.add(a,"menu",{rank:11e3})}))}},P=[w,T,S,{id:"@jupyter-notebook/notebook-extension:edit-notebook-metadata",description:'Add a command to open right sidebar for Editing Notebook Metadata when clicking on "Edit Notebook Metadata" under Edit menu',autoStart:!0,optional:[n.ICommandPalette,c.ITranslator,r.INotebookTools],activate:(e,o,t,n)=>{const{commands:a,shell:s}=e,l=(t=null!=t?t:c.nullTranslator).load("notebook");a.addCommand(N.openEditNotebookMetadata,{label:l.__("Edit Notebook Metadata"),execute:async()=>{const e="application:toggle-panel",o={side:"right",title:"Show Notebook Tools",id:"notebook-tools"};a.isToggled(e,o)||await a.execute(e,o).then((e=>{n&&(null==n?void 0:n.layout).widgets.forEach((e=>{e.widget.title.label===l.__("Advanced Tools")&&e.collapsed&&e.toggle()}))}))},isVisible:()=>null!==s.currentWidget&&s.currentWidget instanceof r.NotebookPanel}),o&&o.addItem({command:N.openEditNotebookMetadata,category:"Notebook Operations"})}},x,_,I,j,E,W,A]}}]);
|
notebook/static/5601.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5601,1684],{95601:(e,t,n)=>{n.r(t),n.d(t,{default:()=>l});var a=n(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5601,1684],{95601:(e,t,n)=>{n.r(t),n.d(t,{default:()=>l});var a=n(84241),o=n(77075),i=n(50027),r=n(20763),s=n(14931);const c={id:"@jupyter-notebook/terminal-extension:opener",description:"A plugin to open terminals in a new tab.",requires:[a.IRouter,i.ITerminalTracker],autoStart:!0,activate:(e,t,n)=>{const{commands:a}=e,o=new RegExp("/terminals/(.*)"),i="router:terminal";a.addCommand(i,{execute:e=>{const t=e.path.match(o);if(!t)return;const[,i]=t;i&&(n.widgetAdded.connect(((e,t)=>{t.content.setOption("closeOnExit",!1)})),a.execute("terminal:open",{name:i}))}}),t.register({command:i,pattern:o})}},d={id:"@jupyter-notebook/terminal-extension:redirect",description:"Open terminals in a new tab.",requires:[i.ITerminalTracker],optional:[r.INotebookPathOpener],autoStart:!0,activate:(e,t,n)=>{const a=o.PageConfig.getBaseUrl(),i=null!=n?n:r.defaultNotebookPathOpener;t.widgetAdded.connect(((t,n)=>{if((0,s.find)(e.shell.widgets("main"),(e=>e.id===n.id)))return;const r=n.content.session.name;i.open({prefix:o.URLExt.join(a,"terminals"),path:r,target:"_blank"}),n.dispose()}))}},l=[c,d]}}]);
|