notebook 7.3.0a0__py3-none-any.whl → 7.3.0a1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of notebook might be problematic. Click here for more details.
- notebook/_version.py +1 -1
- notebook/static/113.bundle.js +1 -1
- notebook/static/1198.bundle.js +1 -1
- notebook/static/1226.bundle.js +1 -1
- notebook/static/131.bundle.js +1 -1
- notebook/static/134.bundle.js +1 -1
- notebook/static/1408.bundle.js +1 -1
- notebook/static/1496.bundle.js +1 -1
- notebook/static/1584.bundle.js +1 -1
- notebook/static/1647.bundle.js +1 -1
- notebook/static/1650.bundle.js +1 -1
- notebook/static/1684.bundle.js +1 -1
- notebook/static/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/{2323.bundle.js → 3030.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/4058.bundle.js +1 -1
- notebook/static/4212.bundle.js +1 -1
- notebook/static/4382.bundle.js +1 -1
- notebook/static/4526.bundle.js +1 -1
- notebook/static/4588.bundle.js +1 -1
- notebook/static/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/5261.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/5733.bundle.js +1 -1
- notebook/static/5828.bundle.js +1 -1
- notebook/static/5850.bundle.js +1 -1
- notebook/static/5912.bundle.js +1 -1
- notebook/static/5921.bundle.js +1 -1
- notebook/static/6017.bundle.js +1 -1
- notebook/static/6139.bundle.js +1 -1
- notebook/static/62.bundle.js +1 -1
- notebook/static/6271.bundle.js +1 -1
- notebook/static/6318.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/677.bundle.js +1 -1
- notebook/static/6815.bundle.js +1 -1
- notebook/static/6853.bundle.js +1 -1
- notebook/static/6893.bundle.js +1 -1
- notebook/static/6898.bundle.js +1 -1
- notebook/static/690.bundle.js +1 -1
- notebook/static/6962.bundle.js +1 -1
- notebook/static/6999.bundle.js +1 -1
- notebook/static/7226.bundle.js +1 -1
- notebook/static/7252.bundle.js +1 -1
- notebook/static/7302.bundle.js +1 -1
- notebook/static/7369.bundle.js +1 -1
- notebook/static/7386.bundle.js +1 -1
- notebook/static/7391.bundle.js +1 -1
- notebook/static/7450.bundle.js +1 -1
- notebook/static/7506.bundle.js +2 -2
- 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/{4427.bundle.js → 7674.bundle.js} +1 -1
- notebook/static/7684.bundle.js +1 -1
- notebook/static/7812.bundle.js +1 -1
- notebook/static/7819.bundle.js +1 -1
- notebook/static/7854.bundle.js +1 -1
- notebook/static/7900.bundle.js +1 -1
- notebook/static/7906.bundle.js +1 -1
- notebook/static/7995.bundle.js +1 -1
- notebook/static/8054.bundle.js +1 -1
- notebook/static/8285.bundle.js +1 -1
- notebook/static/8471.bundle.js +1 -1
- notebook/static/8579.bundle.js +1 -1
- notebook/static/8633.bundle.js +1 -1
- notebook/static/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/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 +104 -104
- {notebook-7.3.0a0.data → notebook-7.3.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/package.json.orig +14 -14
- {notebook-7.3.0a0.data → notebook-7.3.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/documentsearch-extension/package.json.orig +4 -4
- {notebook-7.3.0a0.data → notebook-7.3.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/package.json.orig +6 -6
- {notebook-7.3.0a0.data → notebook-7.3.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/package.json.orig +9 -9
- {notebook-7.3.0a0.data → notebook-7.3.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/package.json.orig +15 -15
- {notebook-7.3.0a0.data → notebook-7.3.0a1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/package.json +11 -11
- {notebook-7.3.0a0.data → notebook-7.3.0a1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/package.json.orig +10 -10
- notebook-7.3.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.45e1d3167710e94c3d26.js +1 -0
- notebook-7.3.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/646.57a345a80ce9f0e64830.js → notebook-7.3.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/600.25341cef1598f2727482.js +1 -1
- notebook-7.3.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.b94c92715d631efb4a8f.js +1 -0
- notebook-7.3.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.8ca922abea871b34db72.js +1 -0
- {notebook-7.3.0a0.data → notebook-7.3.0a1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/third-party-licenses.json +2 -2
- {notebook-7.3.0a0.dist-info → notebook-7.3.0a1.dist-info}/METADATA +2 -2
- {notebook-7.3.0a0.dist-info → notebook-7.3.0a1.dist-info}/RECORD +179 -180
- {notebook-7.3.0a0.dist-info → notebook-7.3.0a1.dist-info}/WHEEL +1 -1
- notebook/static/9092.bundle.js +0 -1
- notebook-7.3.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.6d49b092e49dc147dc54.js +0 -1
- notebook-7.3.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.7bcc163b9139ecb2b25b.js +0 -1
- notebook-7.3.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.9381fdb35e72f41d8af1.js +0 -1
- {notebook-7.3.0a0.data → notebook-7.3.0a1.data}/data/etc/jupyter/jupyter_server_config.d/notebook.json +0 -0
- {notebook-7.3.0a0.data → notebook-7.3.0a1.data}/data/share/applications/jupyter-notebook.desktop +0 -0
- {notebook-7.3.0a0.data → notebook-7.3.0a1.data}/data/share/icons/hicolor/scalable/apps/notebook.svg +0 -0
- {notebook-7.3.0a0.data → notebook-7.3.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/menus.json +0 -0
- {notebook-7.3.0a0.data → notebook-7.3.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/pages.json +0 -0
- {notebook-7.3.0a0.data → notebook-7.3.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/shell.json +0 -0
- {notebook-7.3.0a0.data → notebook-7.3.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/title.json +0 -0
- {notebook-7.3.0a0.data → notebook-7.3.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/top.json +0 -0
- {notebook-7.3.0a0.data → notebook-7.3.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/zen.json +0 -0
- {notebook-7.3.0a0.data → notebook-7.3.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/open.json +0 -0
- {notebook-7.3.0a0.data → notebook-7.3.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/checkpoints.json +0 -0
- {notebook-7.3.0a0.data → notebook-7.3.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/edit-notebook-metadata.json +0 -0
- {notebook-7.3.0a0.data → notebook-7.3.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/kernel-logo.json +0 -0
- {notebook-7.3.0a0.data → notebook-7.3.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/scroll-output.json +0 -0
- {notebook-7.3.0a0.data → notebook-7.3.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/file-actions.json +0 -0
- {notebook-7.3.0a0.data → notebook-7.3.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/widget.json +0 -0
- {notebook-7.3.0a0.data → notebook-7.3.0a1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/interface-switcher.json +0 -0
- {notebook-7.3.0a0.data → notebook-7.3.0a1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/launch-tree.json +0 -0
- {notebook-7.3.0a0.data → notebook-7.3.0a1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/93.eae3497dd223d842d198.js +0 -0
- {notebook-7.3.0a0.data → notebook-7.3.0a1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/style.js +0 -0
- {notebook-7.3.0a0.dist-info → notebook-7.3.0a1.dist-info}/entry_points.txt +0 -0
- {notebook-7.3.0a0.dist-info → notebook-7.3.0a1.dist-info}/licenses/LICENSE +0 -0
notebook/static/1584.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[1584,4434],{31584:(t,e,n)=>{n.r(e),n.d(e,{DocInput:()=>b,HighlightStyle:()=>Dt,IndentContext:()=>F,LRLanguage:()=>p,Language:()=>f,LanguageDescription:()=>N,LanguageSupport:()=>I,ParseContext:()=>x,StreamLanguage:()=>ee,StringStream:()=>Qt,TreeIndentContext:()=>_,bidiIsolates:()=>ve,bracketMatching:()=>Ht,bracketMatchingHandle:()=>Gt,codeFolding:()=>bt,continuedIndent:()=>J,defaultHighlightStyle:()=>Mt,defineLanguageFacet:()=>u,delimitedIndent:()=>z,ensureSyntaxTree:()=>m,flatIndent:()=>G,foldAll:()=>dt,foldCode:()=>ut,foldEffect:()=>nt,foldGutter:()=>At,foldInside:()=>Q,foldKeymap:()=>kt,foldNodeProp:()=>Z,foldService:()=>K,foldState:()=>it,foldable:()=>tt,foldedRanges:()=>ot,forceParsing:()=>w,getIndentUnit:()=>L,getIndentation:()=>R,highlightingFor:()=>Lt,indentNodeProp:()=>V,indentOnInput:()=>Y,indentRange:()=>M,indentService:()=>O,indentString:()=>B,indentUnit:()=>E,language:()=>D,languageDataProp:()=>h,matchBrackets:()=>Yt,sublanguageProp:()=>c,syntaxHighlighting:()=>Et,syntaxParserRunning:()=>v,syntaxTree:()=>g,syntaxTreeAvailable:()=>k,toggleFold:()=>mt,unfoldAll:()=>pt,unfoldCode:()=>ct,unfoldEffect:()=>rt});var r,s=n(79352),i=n(89843),o=n(40097),a=n(92209),l=n(4434);const h=new s.NodeProp;function u(t){return i.Facet.define({combine:t?e=>e.concat(t):void 0})}const c=new s.NodeProp;class f{constructor(t,e,n=[],r=""){this.data=t,this.name=r,i.EditorState.prototype.hasOwnProperty("tree")||Object.defineProperty(i.EditorState.prototype,"tree",{get(){return g(this)}}),this.parser=e,this.extension=[D.of(this),i.EditorState.languageData.of(((t,e,n)=>{let r=d(t,e,n),s=r.type.prop(h);if(!s)return[];let i=t.facet(s),o=r.type.prop(c);if(o){let s=r.resolve(e-r.from,n);for(let e of o)if(e.test(s,t)){let n=t.facet(e.facet);return"replace"==e.type?n:n.concat(i)}}return i}))].concat(n)}isActiveAt(t,e,n=-1){return d(t,e,n).type.prop(h)==this.data}findRegions(t){let e=t.facet(D);if((null==e?void 0:e.data)==this.data)return[{from:0,to:t.doc.length}];if(!e||!e.allowsNesting)return[];let n=[],r=(t,e)=>{if(t.prop(h)==this.data)return void n.push({from:e,to:e+t.length});let i=t.prop(s.NodeProp.mounted);if(i){if(i.tree.prop(h)==this.data){if(i.overlay)for(let t of i.overlay)n.push({from:t.from+e,to:t.to+e});else n.push({from:e,to:e+t.length});return}if(i.overlay){let t=n.length;if(r(i.tree,i.overlay[0].from+e),n.length>t)return}}for(let n=0;n<t.children.length;n++){let i=t.children[n];i instanceof s.Tree&&r(i,t.positions[n]+e)}};return r(g(t),0),n}get allowsNesting(){return!0}}function d(t,e,n){let r=t.facet(D),i=g(t).topNode;if(!r||r.allowsNesting)for(let t=i;t;t=t.enter(e,n,s.IterMode.ExcludeBuffers))t.type.isTop&&(i=t);return i}f.setState=i.StateEffect.define();class p extends f{constructor(t,e,n){super(t,e,[],n),this.parser=e}static define(t){let e=u(t.languageData);return new p(e,t.parser.configure({props:[h.add((t=>t.isTop?e:void 0))]}),t.name)}configure(t,e){return new p(this.data,this.parser.configure(t),e||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function g(t){let e=t.field(f.state,!1);return e?e.tree:s.Tree.empty}function m(t,e,n=50){var r;let s=null===(r=t.field(f.state,!1))||void 0===r?void 0:r.context;if(!s)return null;let i=s.viewport;s.updateViewport({from:0,to:e});let o=s.isDone(e)||s.work(n,e)?s.tree:null;return s.updateViewport(i),o}function k(t,e=t.doc.length){var n;return(null===(n=t.field(f.state,!1))||void 0===n?void 0:n.context.isDone(e))||!1}function w(t,e=t.viewport.to,n=100){let r=m(t.state,e,n);return r!=g(t.state)&&t.dispatch({}),!!r}function v(t){var e;return(null===(e=t.plugin(C))||void 0===e?void 0:e.isWorking())||!1}class b{constructor(t){this.doc=t,this.cursorPos=0,this.string="",this.cursor=t.iter()}get length(){return this.doc.length}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,e){let n=this.cursorPos-this.string.length;return t<n||e>=this.cursorPos?this.doc.sliceString(t,e):this.string.slice(t-n,e-n)}}let y=null;class x{constructor(t,e,n=[],r,s,i,o,a){this.parser=t,this.state=e,this.fragments=n,this.tree=r,this.treeLen=s,this.viewport=i,this.skipped=o,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(t,e,n){return new x(t,e,[],s.Tree.empty,0,n,[],null)}startParse(){return this.parser.startParse(new b(this.state.doc),this.fragments)}work(t,e){return null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=s.Tree.empty&&this.isDone(null!=e?e:this.state.doc.length)?(this.takeTree(),!0):this.withContext((()=>{var n;if("number"==typeof t){let e=Date.now()+t;t=()=>Date.now()>e}for(this.parse||(this.parse=this.startParse()),null!=e&&(null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&e<this.state.doc.length&&this.parse.stopAt(e);;){let r=this.parse.advance();if(r){if(this.fragments=this.withoutTempSkipped(s.TreeFragment.addTree(r,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!==(n=this.parse.stoppedAt)&&void 0!==n?n:this.state.doc.length,this.tree=r,this.parse=null,!(this.treeLen<(null!=e?e:this.state.doc.length)))return!0;this.parse=this.startParse()}if(t())return!1}}))}takeTree(){let t,e;this.parse&&(t=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext((()=>{for(;!(e=this.parse.advance()););})),this.treeLen=t,this.tree=e,this.fragments=this.withoutTempSkipped(s.TreeFragment.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let e=y;y=this;try{return t()}finally{y=e}}withoutTempSkipped(t){for(let e;e=this.tempSkipped.pop();)t=S(t,e.from,e.to);return t}changes(t,e){let{fragments:n,tree:r,treeLen:i,viewport:o,skipped:a}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges(((t,n,r,s)=>e.push({fromA:t,toA:n,fromB:r,toB:s}))),n=s.TreeFragment.applyChanges(n,e),r=s.Tree.empty,i=0,o={from:t.mapPos(o.from,-1),to:t.mapPos(o.to,1)},this.skipped.length){a=[];for(let e of this.skipped){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);n<r&&a.push({from:n,to:r})}}}return new x(this.parser,e,n,r,i,o,a,this.scheduleOn)}updateViewport(t){if(this.viewport.from==t.from&&this.viewport.to==t.to)return!1;this.viewport=t;let e=this.skipped.length;for(let e=0;e<this.skipped.length;e++){let{from:n,to:r}=this.skipped[e];n<t.to&&r>t.from&&(this.fragments=S(this.fragments,n,r),this.skipped.splice(e--,1))}return!(this.skipped.length>=e||(this.reset(),0))}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,e){this.skipped.push({from:t,to:e})}static getSkippingParser(t){return new class extends s.Parser{createParse(e,n,r){let i=r[0].from,o=r[r.length-1].to;return{parsedPos:i,advance(){let e=y;if(e){for(let t of r)e.tempSkipped.push(t);t&&(e.scheduleOn=e.scheduleOn?Promise.all([e.scheduleOn,t]):t)}return this.parsedPos=o,new s.Tree(s.NodeType.none,[],[],o-i)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let e=this.fragments;return this.treeLen>=t&&e.length&&0==e[0].from&&e[0].to>=t}static get(){return y}}function S(t,e,n){return s.TreeFragment.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class T{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let e=this.context.changes(t.changes,t.state),n=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,n)||e.takeTree(),new T(e)}static init(t){let e=Math.min(3e3,t.doc.length),n=x.create(t.facet(D).parser,t,{from:0,to:e});return n.work(20,e)||n.takeTree(),new T(n)}}f.state=i.StateField.define({create:T.init,update(t,e){for(let t of e.effects)if(t.is(f.setState))return t.value;return e.startState.facet(D)!=e.state.facet(D)?T.init(e.state):t.apply(e)}});let P=t=>{let e=setTimeout((()=>t()),500);return()=>clearTimeout(e)};"undefined"!=typeof requestIdleCallback&&(P=t=>{let e=-1,n=setTimeout((()=>{e=requestIdleCallback(t,{timeout:400})}),100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const A="undefined"!=typeof navigator&&(null===(r=navigator.scheduling)||void 0===r?void 0:r.isInputPending)?()=>navigator.scheduling.isInputPending():null,C=o.ViewPlugin.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let e=this.view.state.field(f.state).context;(e.updateViewport(t.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),(t.docChanged||t.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}scheduleWork(){if(this.working)return;let{state:t}=this.view,e=t.field(f.state);e.tree==e.context.tree&&e.context.isDone(t.doc.length)||(this.working=P(this.work))}work(t){this.working=null;let e=Date.now();if(this.chunkEnd<e&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=e+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:r}}=this.view,s=n.field(f.state);if(s.tree==s.context.tree&&s.context.isDone(r+1e5))return;let i=Date.now()+Math.min(this.chunkBudget,100,t&&!A?Math.max(25,t.timeRemaining()-5):1e9),o=s.context.treeLen<r&&n.doc.length>r+1e3,a=s.context.work((()=>A&&A()||Date.now()>i),r+(o?0:1e5));this.chunkBudget-=Date.now()-e,(a||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:f.setState.of(new T(s.context))})),this.chunkBudget>0&&(!a||o)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then((()=>this.scheduleWork())).catch((t=>(0,o.logException)(this.view.state,t))).then((()=>this.workScheduled--)),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),D=i.Facet.define({combine:t=>t.length?t[0]:null,enables:t=>[f.state,C,o.EditorView.contentAttributes.compute([t],(e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}}))]});class I{constructor(t,e=[]){this.language=t,this.support=e,this.extension=[t,e]}}class N{constructor(t,e,n,r,s,i=void 0){this.name=t,this.alias=e,this.extensions=n,this.filename=r,this.loadFunc=s,this.support=i,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then((t=>this.support=t),(t=>{throw this.loading=null,t})))}static of(t){let{load:e,support:n}=t;if(!e){if(!n)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");e=()=>Promise.resolve(n)}return new N(t.name,(t.alias||[]).concat(t.name).map((t=>t.toLowerCase())),t.extensions||[],t.filename,e,n)}static matchFilename(t,e){for(let n of t)if(n.filename&&n.filename.test(e))return n;let n=/\.([^.]+)$/.exec(e);if(n)for(let e of t)if(e.extensions.indexOf(n[1])>-1)return e;return null}static matchLanguageName(t,e,n=!0){e=e.toLowerCase();for(let n of t)if(n.alias.some((t=>t==e)))return n;if(n)for(let n of t)for(let t of n.alias){let r=e.indexOf(t);if(r>-1&&(t.length>2||!/\w/.test(e[r-1])&&!/\w/.test(e[r+t.length])))return n}return null}}const O=i.Facet.define(),E=i.Facet.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some((t=>t!=e[0])))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function L(t){let e=t.facet(E);return 9==e.charCodeAt(0)?t.tabSize*e.length:e.length}function B(t,e){let n="",r=t.tabSize,s=t.facet(E)[0];if("\t"==s){for(;e>=r;)n+="\t",e-=r;s=" "}for(let t=0;t<e;t++)n+=s;return n}function R(t,e){t instanceof i.EditorState&&(t=new F(t));for(let n of t.state.facet(O)){let r=n(t,e);if(void 0!==r)return r}let n=g(t.state);return n.length>=e?function(t,e,n){let r=e.resolveStack(n),s=r.node.enterUnfinishedNodesBefore(n);if(s!=r.node){let t=[];for(let e=s;e!=r.node;e=e.parent)t.push(e);for(let e=t.length-1;e>=0;e--)r={node:t[e],next:r}}return U(r,t,n)}(t,n,e):null}function M(t,e,n){let r=Object.create(null),s=new F(t,{overrideIndentation:t=>{var e;return null!==(e=r[t])&&void 0!==e?e:-1}}),i=[];for(let o=e;o<=n;){let e=t.doc.lineAt(o);o=e.to+1;let n=R(s,e.from);if(null==n)continue;/\S/.test(e.text)||(n=0);let a=/^\s*/.exec(e.text)[0],l=B(t,n);a!=l&&(r[e.from]=n,i.push({from:e.from,to:e.from+a.length,insert:l}))}return t.changes(i)}class F{constructor(t,e={}){this.state=t,this.options=e,this.unit=L(t)}lineAt(t,e=1){let n=this.state.doc.lineAt(t),{simulateBreak:r,simulateDoubleBreak:s}=this.options;return null!=r&&r>=n.from&&r<=n.to?s&&r==t?{text:"",from:t}:(e<0?r<t:r<=t)?{text:n.text.slice(r-n.from),from:r}:{text:n.text.slice(0,r-n.from),from:n.from}:n}textAfterPos(t,e=1){if(this.options.simulateDoubleBreak&&t==this.options.simulateBreak)return"";let{text:n,from:r}=this.lineAt(t,e);return n.slice(t-r,Math.min(n.length,t+100-r))}column(t,e=1){let{text:n,from:r}=this.lineAt(t,e),s=this.countColumn(n,t-r),i=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return i>-1&&(s+=i-this.countColumn(n,n.search(/\S|$/))),s}countColumn(t,e=t.length){return(0,i.countColumn)(t,this.state.tabSize,e)}lineIndent(t,e=1){let{text:n,from:r}=this.lineAt(t,e),s=this.options.overrideIndentation;if(s){let t=s(r);if(t>-1)return t}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const V=new s.NodeProp;function U(t,e,n){for(let r=t;r;r=r.next){let t=j(r.node);if(t)return t(_.create(e,n,r))}return 0}function j(t){let e=t.type.prop(V);if(e)return e;let n,r=t.firstChild;if(r&&(n=r.type.prop(s.NodeProp.closedBy))){let e=t.lastChild,r=e&&n.indexOf(e.name)>-1;return t=>H(t,!0,1,void 0,r&&!function(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}(t)?e.from:void 0)}return null==t.parent?W:null}function W(){return 0}class _ extends F{constructor(t,e,n){super(t.state,t.options),this.base=t,this.pos=e,this.context=n}get node(){return this.context.node}static create(t,e,n){return new _(t,e,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(t){let e=this.state.doc.lineAt(t.from);for(;;){let n=t.resolve(e.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if($(n,t))break;e=this.state.doc.lineAt(n.from)}return this.lineIndent(e.from)}continue(){return U(this.context.next,this.base,this.pos)}}function $(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function z({closing:t,align:e=!0,units:n=1}){return r=>H(r,e,n,t)}function H(t,e,n,r,s){let i=t.textAfter,o=i.match(/^\s*/)[0].length,a=r&&i.slice(o,o+r.length)==r||s==t.pos+o,l=e?function(t){let e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;let s=t.options.simulateBreak,i=t.state.doc.lineAt(n.from),o=null==s||s<=i.from?i.to:Math.min(i.to,s);for(let t=n.to;;){let s=e.childAfter(t);if(!s||s==r)return null;if(!s.type.isSkipped)return s.from<o?n:null;t=s.to}}(t):null;return l?a?t.column(l.from):t.column(l.to):t.baseIndent+(a?0:t.unit*n)}const G=t=>t.baseIndent;function J({except:t,units:e=1}={}){return n=>{let r=t&&t.test(n.textAfter);return n.baseIndent+(r?0:e*n.unit)}}const q=200;function Y(){return i.EditorState.transactionFilter.of((t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:r}=t.newSelection.main,s=n.lineAt(r);if(r>s.from+q)return t;let i=n.sliceString(s.from,r);if(!e.some((t=>t.test(i))))return t;let{state:o}=t,a=-1,l=[];for(let{head:t}of o.selection.ranges){let e=o.doc.lineAt(t);if(e.from==a)continue;a=e.from;let n=R(o,e.from);if(null==n)continue;let r=/^\s*/.exec(e.text)[0],s=B(o,n);r!=s&&l.push({from:e.from,to:e.from+r.length,insert:s})}return l.length?[t,{changes:l,sequential:!0}]:t}))}const K=i.Facet.define(),Z=new s.NodeProp;function Q(t){let e=t.firstChild,n=t.lastChild;return e&&e.to<n.from?{from:e.to,to:n.type.isError?t.to:n.from}:null}function X(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function tt(t,e,n){for(let r of t.facet(K)){let s=r(t,e,n);if(s)return s}return function(t,e,n){let r=g(t);if(r.length<n)return null;let s=null;for(let i=r.resolveStack(n,1);i;i=i.next){let o=i.node;if(o.to<=n||o.from>n)continue;if(s&&o.from<e)break;let a=o.type.prop(Z);if(a&&(o.to<r.length-50||r.length==t.doc.length||!X(o))){let r=a(o,t);r&&r.from<=n&&r.from>=e&&r.to>n&&(s=r)}}return s}(t,e,n)}function et(t,e){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return n>=r?void 0:{from:n,to:r}}const nt=i.StateEffect.define({map:et}),rt=i.StateEffect.define({map:et});function st(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some((t=>t.from<=n&&t.to>=n))||e.push(t.lineBlockAt(n));return e}const it=i.StateField.define({create:()=>o.Decoration.none,update(t,e){t=t.map(e.changes);for(let n of e.effects)if(n.is(nt)&&!lt(t,n.value.from,n.value.to)){let{preparePlaceholder:r}=e.state.facet(vt),s=r?o.Decoration.replace({widget:new St(r(e.state,n.value))}):xt;t=t.update({add:[s.range(n.value.from,n.value.to)]})}else n.is(rt)&&(t=t.update({filter:(t,e)=>n.value.from!=t||n.value.to!=e,filterFrom:n.value.from,filterTo:n.value.to}));if(e.selection){let n=!1,{head:r}=e.selection.main;t.between(r,r,((t,e)=>{t<r&&e>r&&(n=!0)})),n&&(t=t.update({filterFrom:r,filterTo:r,filter:(t,e)=>e<=r||t>=r}))}return t},provide:t=>o.EditorView.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,((t,e)=>{n.push(t,e)})),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n<t.length;){let r=t[n++],s=t[n++];if("number"!=typeof r||"number"!=typeof s)throw new RangeError("Invalid JSON for fold state");e.push(xt.range(r,s))}return o.Decoration.set(e,!0)}});function ot(t){return t.field(it,!1)||i.RangeSet.empty}function at(t,e,n){var r;let s=null;return null===(r=t.field(it,!1))||void 0===r||r.between(e,n,((t,e)=>{(!s||s.from>t)&&(s={from:t,to:e})})),s}function lt(t,e,n){let r=!1;return t.between(e,e,((t,s)=>{t==e&&s==n&&(r=!0)})),r}function ht(t,e){return t.field(it,!1)?e:e.concat(i.StateEffect.appendConfig.of(bt()))}const ut=t=>{for(let e of st(t)){let n=tt(t.state,e.from,e.to);if(n)return t.dispatch({effects:ht(t.state,[nt.of(n),ft(t,n)])}),!0}return!1},ct=t=>{if(!t.state.field(it,!1))return!1;let e=[];for(let n of st(t)){let r=at(t.state,n.from,n.to);r&&e.push(rt.of(r),ft(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function ft(t,e,n=!0){let r=t.state.doc.lineAt(e.from).number,s=t.state.doc.lineAt(e.to).number;return o.EditorView.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${s}.`)}const dt=t=>{let{state:e}=t,n=[];for(let r=0;r<e.doc.length;){let s=t.lineBlockAt(r),i=tt(e,s.from,s.to);i&&n.push(nt.of(i)),r=(i?t.lineBlockAt(i.to):s).to+1}return n.length&&t.dispatch({effects:ht(t.state,n)}),!!n.length},pt=t=>{let e=t.state.field(it,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,((t,e)=>{n.push(rt.of({from:t,to:e}))})),t.dispatch({effects:n}),!0};function gt(t,e){for(let n=e;;){let r=tt(t.state,n.from,n.to);if(r&&r.to>e.from)return r;if(!n.from)return null;n=t.lineBlockAt(n.from-1)}}const mt=t=>{let e=[];for(let n of st(t)){let r=at(t.state,n.from,n.to);if(r)e.push(rt.of(r),ft(t,r,!1));else{let r=gt(t,n);r&&e.push(nt.of(r),ft(t,r))}}return e.length>0&&t.dispatch({effects:ht(t.state,e)}),!!e.length},kt=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:ut},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:ct},{key:"Ctrl-Alt-[",run:dt},{key:"Ctrl-Alt-]",run:pt}],wt={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},vt=i.Facet.define({combine:t=>(0,i.combineConfig)(t,wt)});function bt(t){let e=[it,Ct];return t&&e.push(vt.of(t)),e}function yt(t,e){let{state:n}=t,r=n.facet(vt),s=e=>{let n=t.lineBlockAt(t.posAtDOM(e.target)),r=at(t.state,n.from,n.to);r&&t.dispatch({effects:rt.of(r)}),e.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,s,e);let i=document.createElement("span");return i.textContent=r.placeholderText,i.setAttribute("aria-label",n.phrase("folded code")),i.title=n.phrase("unfold"),i.className="cm-foldPlaceholder",i.onclick=s,i}const xt=o.Decoration.replace({widget:new class extends o.WidgetType{toDOM(t){return yt(t,null)}}});class St extends o.WidgetType{constructor(t){super(),this.value=t}eq(t){return this.value==t.value}toDOM(t){return yt(t,this.value)}}const Tt={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Pt extends o.GutterMarker{constructor(t,e){super(),this.config=t,this.open=e}eq(t){return this.config==t.config&&this.open==t.open}toDOM(t){if(this.config.markerDOM)return this.config.markerDOM(this.open);let e=document.createElement("span");return e.textContent=this.open?this.config.openText:this.config.closedText,e.title=t.state.phrase(this.open?"Fold line":"Unfold line"),e}}function At(t={}){let e=Object.assign(Object.assign({},Tt),t),n=new Pt(e,!0),r=new Pt(e,!1),s=o.ViewPlugin.fromClass(class{constructor(t){this.from=t.viewport.from,this.markers=this.buildMarkers(t)}update(t){(t.docChanged||t.viewportChanged||t.startState.facet(D)!=t.state.facet(D)||t.startState.field(it,!1)!=t.state.field(it,!1)||g(t.startState)!=g(t.state)||e.foldingChanged(t))&&(this.markers=this.buildMarkers(t.view))}buildMarkers(t){let e=new i.RangeSetBuilder;for(let s of t.viewportLineBlocks){let i=at(t.state,s.from,s.to)?r:tt(t.state,s.from,s.to)?n:null;i&&e.add(s.from,s.from,i)}return e.finish()}}),{domEventHandlers:a}=e;return[s,(0,o.gutter)({class:"cm-foldGutter",markers(t){var e;return(null===(e=t.plugin(s))||void 0===e?void 0:e.markers)||i.RangeSet.empty},initialSpacer:()=>new Pt(e,!1),domEventHandlers:Object.assign(Object.assign({},a),{click:(t,e,n)=>{if(a.click&&a.click(t,e,n))return!0;let r=at(t.state,e.from,e.to);if(r)return t.dispatch({effects:rt.of(r)}),!0;let s=tt(t.state,e.from,e.to);return!!s&&(t.dispatch({effects:nt.of(s)}),!0)}})}),bt()]}const Ct=o.EditorView.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Dt{constructor(t,e){let n;function r(t){let e=l.V.newName();return(n||(n=Object.create(null)))["."+e]=t,e}this.specs=t;const s="string"==typeof e.all?e.all:e.all?r(e.all):void 0,i=e.scope;this.scope=i instanceof f?t=>t.prop(h)==i.data:i?t=>t==i:void 0,this.style=(0,a.tagHighlighter)(t.map((t=>({tag:t.tag,class:t.class||r(Object.assign({},t,{tag:null}))}))),{all:s}).style,this.module=n?new l.V(n):null,this.themeType=e.themeType}static define(t,e){return new Dt(t,e||{})}}const It=i.Facet.define(),Nt=i.Facet.define({combine:t=>t.length?[t[0]]:null});function Ot(t){let e=t.facet(It);return e.length?e:t.facet(Nt)}function Et(t,e){let n,r=[Rt];return t instanceof Dt&&(t.module&&r.push(o.EditorView.styleModule.of(t.module)),n=t.themeType),(null==e?void 0:e.fallback)?r.push(Nt.of(t)):n?r.push(It.computeN([o.EditorView.darkTheme],(e=>e.facet(o.EditorView.darkTheme)==("dark"==n)?[t]:[]))):r.push(It.of(t)),r}function Lt(t,e,n){let r=Ot(t),s=null;if(r)for(let t of r)if(!t.scope||n&&t.scope(n)){let n=t.style(e);n&&(s=s?s+" "+n:n)}return s}class Bt{constructor(t){this.markCache=Object.create(null),this.tree=g(t.state),this.decorations=this.buildDeco(t,Ot(t.state)),this.decoratedTo=t.viewport.to}update(t){let e=g(t.state),n=Ot(t.state),r=n!=Ot(t.startState),{viewport:s}=t.view,i=t.changes.mapPos(this.decoratedTo,1);e.length<s.to&&!r&&e.type==this.tree.type&&i>=s.to?(this.decorations=this.decorations.map(t.changes),this.decoratedTo=i):(e!=this.tree||t.viewportChanged||r)&&(this.tree=e,this.decorations=this.buildDeco(t.view,n),this.decoratedTo=s.to)}buildDeco(t,e){if(!e||!this.tree.length)return o.Decoration.none;let n=new i.RangeSetBuilder;for(let{from:r,to:s}of t.visibleRanges)(0,a.highlightTree)(this.tree,e,((t,e,r)=>{n.add(t,e,this.markCache[r]||(this.markCache[r]=o.Decoration.mark({class:r})))}),r,s);return n.finish()}}const Rt=i.Prec.high(o.ViewPlugin.fromClass(Bt,{decorations:t=>t.decorations})),Mt=Dt.define([{tag:a.tags.meta,color:"#404740"},{tag:a.tags.link,textDecoration:"underline"},{tag:a.tags.heading,textDecoration:"underline",fontWeight:"bold"},{tag:a.tags.emphasis,fontStyle:"italic"},{tag:a.tags.strong,fontWeight:"bold"},{tag:a.tags.strikethrough,textDecoration:"line-through"},{tag:a.tags.keyword,color:"#708"},{tag:[a.tags.atom,a.tags.bool,a.tags.url,a.tags.contentSeparator,a.tags.labelName],color:"#219"},{tag:[a.tags.literal,a.tags.inserted],color:"#164"},{tag:[a.tags.string,a.tags.deleted],color:"#a11"},{tag:[a.tags.regexp,a.tags.escape,a.tags.special(a.tags.string)],color:"#e40"},{tag:a.tags.definition(a.tags.variableName),color:"#00f"},{tag:a.tags.local(a.tags.variableName),color:"#30a"},{tag:[a.tags.typeName,a.tags.namespace],color:"#085"},{tag:a.tags.className,color:"#167"},{tag:[a.tags.special(a.tags.variableName),a.tags.macroName],color:"#256"},{tag:a.tags.definition(a.tags.propertyName),color:"#00c"},{tag:a.tags.comment,color:"#940"},{tag:a.tags.invalid,color:"#f00"}]),Ft=o.EditorView.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),Vt=1e4,Ut="()[]{}",jt=i.Facet.define({combine:t=>(0,i.combineConfig)(t,{afterCursor:!0,brackets:Ut,maxScanDistance:Vt,renderMatch:$t})}),Wt=o.Decoration.mark({class:"cm-matchingBracket"}),_t=o.Decoration.mark({class:"cm-nonmatchingBracket"});function $t(t){let e=[],n=t.matched?Wt:_t;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const zt=[i.StateField.define({create:()=>o.Decoration.none,update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],r=e.state.facet(jt);for(let t of e.state.selection.ranges){if(!t.empty)continue;let s=Yt(e.state,t.head,-1,r)||t.head>0&&Yt(e.state,t.head-1,1,r)||r.afterCursor&&(Yt(e.state,t.head,1,r)||t.head<e.state.doc.length&&Yt(e.state,t.head+1,-1,r));s&&(n=n.concat(r.renderMatch(s,e.state)))}return o.Decoration.set(n,!0)},provide:t=>o.EditorView.decorations.from(t)}),Ft];function Ht(t={}){return[jt.of(t),zt]}const Gt=new s.NodeProp;function Jt(t,e,n){let r=t.prop(e<0?s.NodeProp.openedBy:s.NodeProp.closedBy);if(r)return r;if(1==t.name.length){let r=n.indexOf(t.name);if(r>-1&&r%2==(e<0?1:0))return[n[r+e]]}return null}function qt(t){let e=t.type.prop(Gt);return e?e(t.node):t}function Yt(t,e,n,r={}){let s=r.maxScanDistance||Vt,i=r.brackets||Ut,o=g(t),a=o.resolveInner(e,n);for(let t=a;t;t=t.parent){let r=Jt(t.type,n,i);if(r&&t.from<t.to){let s=qt(t);if(s&&(n>0?e>=s.from&&e<s.to:e>s.from&&e<=s.to))return Kt(0,0,n,t,s,r,i)}}return function(t,e,n,r,s,i,o){let a=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),l=o.indexOf(a);if(l<0||l%2==0!=n>0)return null;let h={from:n<0?e-1:e,to:n>0?e+1:e},u=t.doc.iterRange(e,n>0?t.doc.length:0),c=0;for(let t=0;!u.next().done&&t<=i;){let i=u.value;n<0&&(t+=i.length);let a=e+t*n;for(let t=n>0?0:i.length-1,e=n>0?i.length:-1;t!=e;t+=n){let e=o.indexOf(i[t]);if(!(e<0||r.resolveInner(a+t,1).type!=s))if(e%2==0==n>0)c++;else{if(1==c)return{start:h,end:{from:a+t,to:a+t+1},matched:e>>1==l>>1};c--}}n>0&&(t+=i.length)}return u.done?{start:h,matched:!1}:null}(t,e,n,o,a.type,s,i)}function Kt(t,e,n,r,s,i,o){let a=r.parent,l={from:s.from,to:s.to},h=0,u=null==a?void 0:a.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do{if(n<0?u.to<=r.from:u.from>=r.to){if(0==h&&i.indexOf(u.type.name)>-1&&u.from<u.to){let t=qt(u);return{start:l,end:t?{from:t.from,to:t.to}:void 0,matched:!0}}if(Jt(u.type,n,o))h++;else if(Jt(u.type,-n,o)){if(0==h){let t=qt(u);return{start:l,end:t&&t.from<t.to?{from:t.from,to:t.to}:void 0,matched:!1}}h--}}}while(n<0?u.prevSibling():u.nextSibling());return{start:l,matched:!1}}function Zt(t,e,n,r=0,s=0){null==e&&-1==(e=t.search(/[^\s\u00a0]/))&&(e=t.length);let i=s;for(let s=r;s<e;s++)9==t.charCodeAt(s)?i+=n-i%n:i++;return i}class Qt{constructor(t,e,n,r){this.string=t,this.tabSize=e,this.indentUnit=n,this.overrideIndent=r,this.pos=0,this.start=0,this.lastColumnPos=0,this.lastColumnValue=0}eol(){return this.pos>=this.string.length}sol(){return 0==this.pos}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)}eat(t){let e,n=this.string.charAt(this.pos);if(e="string"==typeof t?n==t:n&&(t instanceof RegExp?t.test(n):t(n)),e)return++this.pos,n}eatWhile(t){let e=this.pos;for(;this.eat(t););return this.pos>e}eatSpace(){let t=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t}skipToEnd(){this.pos=this.string.length}skipTo(t){let e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0}backUp(t){this.pos-=t}column(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Zt(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue}indentation(){var t;return null!==(t=this.overrideIndent)&&void 0!==t?t:Zt(this.string,null,this.tabSize)}match(t,e,n){if("string"==typeof t){let r=t=>n?t.toLowerCase():t;return r(this.string.substr(this.pos,t.length))==r(t)?(!1!==e&&(this.pos+=t.length),!0):null}{let n=this.string.slice(this.pos).match(t);return n&&n.index>0?null:(n&&!1!==e&&(this.pos+=n[0].length),n)}}current(){return this.string.slice(this.start,this.pos)}}function Xt(t){if("object"!=typeof t)return t;let e={};for(let n in t){let r=t[n];e[n]=r instanceof Array?r.slice():r}return e}const te=new WeakMap;class ee extends f{constructor(t){let e,n=u(t.languageData),r={name:(i=t).name||"",token:i.token,blankLine:i.blankLine||(()=>{}),startState:i.startState||(()=>!0),copyState:i.copyState||Xt,indent:i.indent||(()=>null),languageData:i.languageData||{},tokenTable:i.tokenTable||oe};var i;super(n,new class extends s.Parser{createParse(t,n,r){return new se(e,t,n,r)}},[O.of(((t,e)=>this.getIndent(t,e)))],t.name),this.topNode=function(t){let e=s.NodeType.define({id:ae.length,name:"Document",props:[h.add((()=>t))],top:!0});return ae.push(e),e}(n),e=this,this.streamParser=r,this.stateAfter=new s.NodeProp({perNode:!0}),this.tokenTable=t.tokenTable?new fe(r.tokenTable):de}static define(t){return new ee(t)}getIndent(t,e){let n,r=g(t.state),s=r.resolve(e);for(;s&&s.type!=this.topNode;)s=s.parent;if(!s)return null;let{overrideIndentation:i}=t.options;i&&(n=te.get(t.state),null!=n&&n<e-1e4&&(n=void 0));let o,a,l=ne(this,r,0,s.from,null!=n?n:e);if(l?(a=l.state,o=l.pos+1):(a=this.streamParser.startState(t.unit),o=0),e-o>1e4)return null;for(;o<e;){let n=t.state.doc.lineAt(o),r=Math.min(e,n.to);if(n.length){let e=i?i(n.from):-1,s=new Qt(n.text,t.state.tabSize,t.unit,e<0?void 0:e);for(;s.pos<r-n.from;)ie(this.streamParser.token,s,a)}else this.streamParser.blankLine(a,t.unit);if(r==e)break;o=n.to+1}let h=t.lineAt(e);return i&&null==n&&te.set(t.state,h.from),this.streamParser.indent(a,/^\s*(.*)/.exec(h.text)[1],t)}get allowsNesting(){return!1}}function ne(t,e,n,r,i){let o=n>=r&&n+e.length<=i&&e.prop(t.stateAfter);if(o)return{state:t.streamParser.copyState(o),pos:n+e.length};for(let o=e.children.length-1;o>=0;o--){let a=e.children[o],l=n+e.positions[o],h=a instanceof s.Tree&&l<i&&ne(t,a,l,r,i);if(h)return h}return null}function re(t,e,n,r,i){if(i&&n<=0&&r>=e.length)return e;i||e.type!=t.topNode||(i=!0);for(let o=e.children.length-1;o>=0;o--){let a,l=e.positions[o],h=e.children[o];if(l<r&&h instanceof s.Tree){if(!(a=re(t,h,n-l,r-l,i)))break;return i?new s.Tree(e.type,e.children.slice(0,o).concat(a),e.positions.slice(0,o+1),l+a.length):a}}return null}class se{constructor(t,e,n,r){this.lang=t,this.input=e,this.fragments=n,this.ranges=r,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=r[r.length-1].to;let i=x.get(),o=r[0].from,{state:a,tree:l}=function(t,e,n,r){for(let r of e){let e,s=r.from+(r.openStart?25:0),i=r.to-(r.openEnd?25:0),o=s<=n&&i>n&&ne(t,r.tree,0-r.offset,n,i);if(o&&(e=re(t,r.tree,n+r.offset,o.pos+r.offset,!1)))return{state:o.state,tree:e}}return{state:t.streamParser.startState(r?L(r):4),tree:s.Tree.empty}}(t,n,o,null==i?void 0:i.state);this.state=a,this.parsedPos=this.chunkStart=o+l.length;for(let t=0;t<l.children.length;t++)this.chunks.push(l.children[t]),this.chunkPos.push(l.positions[t]);i&&this.parsedPos<i.viewport.from-1e5&&(this.state=this.lang.streamParser.startState(L(i.state)),i.skipUntilInView(this.parsedPos,i.viewport.from),this.parsedPos=i.viewport.from),this.moveRangeIndex()}advance(){let t=x.get(),e=null==this.stoppedAt?this.to:Math.min(this.to,this.stoppedAt),n=Math.min(e,this.chunkStart+2048);for(t&&(n=Math.min(n,t.viewport.to));this.parsedPos<n;)this.parseLine(t);return this.chunkStart<this.parsedPos&&this.finishChunk(),this.parsedPos>=e?this.finish():t&&this.parsedPos>=t.viewport.to?(t.skipUntilInView(this.parsedPos,e),this.finish()):null}stopAt(t){this.stoppedAt=t}lineAfter(t){let e=this.input.chunk(t);if(this.input.lineChunks)"\n"==e&&(e="");else{let t=e.indexOf("\n");t>-1&&(e=e.slice(0,t))}return t+e.length<=this.to?e:e.slice(0,this.to-t)}nextLine(){let t=this.parsedPos,e=this.lineAfter(t),n=t+e.length;for(let t=this.rangeIndex;;){let r=this.ranges[t].to;if(r>=n)break;if(e=e.slice(0,r-(n-e.length)),t++,t==this.ranges.length)break;let s=this.ranges[t].from,i=this.lineAfter(s);e+=i,n=s+i.length}return{line:e,end:n}}skipGapsTo(t,e,n){for(;;){let r=this.ranges[this.rangeIndex].to,s=t+e;if(n>0?r>s:r>=s)break;e+=this.ranges[++this.rangeIndex].from-r}return e}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to<this.parsedPos;)this.rangeIndex++}emitToken(t,e,n,r,s){if(this.ranges.length>1){e+=s=this.skipGapsTo(e,s,1);let t=this.chunk.length;n+=s=this.skipGapsTo(n,s,-1),r+=this.chunk.length-t}return this.chunk.push(t,e,n,r),s}parseLine(t){let{line:e,end:n}=this.nextLine(),r=0,{streamParser:s}=this.lang,i=new Qt(e,t?t.state.tabSize:4,t?L(t.state):2);if(i.eol())s.blankLine(this.state,i.indentUnit);else for(;!i.eol();){let t=ie(s.token,i,this.state);if(t&&(r=this.emitToken(this.lang.tokenTable.resolve(t),this.parsedPos+i.start,this.parsedPos+i.pos,4,r)),i.start>1e4)break}this.parsedPos=n,this.moveRangeIndex(),this.parsedPos<this.to&&this.parsedPos++}finishChunk(){let t=s.Tree.build({buffer:this.chunk,start:this.chunkStart,length:this.parsedPos-this.chunkStart,nodeSet:le,topID:0,maxBufferLength:2048,reused:this.chunkReused});t=new s.Tree(t.type,t.children,t.positions,t.length,[[this.lang.stateAfter,this.lang.streamParser.copyState(this.state)]]),this.chunks.push(t),this.chunkPos.push(this.chunkStart-this.ranges[0].from),this.chunk=[],this.chunkReused=void 0,this.chunkStart=this.parsedPos}finish(){return new s.Tree(this.lang.topNode,this.chunks,this.chunkPos,this.parsedPos-this.ranges[0].from).balance()}}function ie(t,e,n){e.start=e.pos;for(let r=0;r<10;r++){let r=t(e,n);if(e.pos>e.start)return r}throw new Error("Stream parser failed to advance stream.")}const oe=Object.create(null),ae=[s.NodeType.none],le=new s.NodeSet(ae),he=[],ue=Object.create(null),ce=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])ce[t]=ge(oe,e);class fe{constructor(t){this.extra=t,this.table=Object.assign(Object.create(null),ce)}resolve(t){return t?this.table[t]||(this.table[t]=ge(this.extra,t)):0}}const de=new fe(oe);function pe(t,e){he.indexOf(t)>-1||(he.push(t),console.warn(e))}function ge(t,e){let n=[];for(let r of e.split(" ")){let e=[];for(let n of r.split(".")){let r=t[n]||a.tags[n];r?"function"==typeof r?e.length?e=e.map(r):pe(n,`Modifier ${n} used at start of tag`):e.length?pe(n,`Tag ${n} used as modifier`):e=Array.isArray(r)?r:[r]:pe(n,`Unknown highlighting tag ${n}`)}for(let t of e)n.push(t)}if(!n.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+n.map((t=>t.id)),o=ue[i];if(o)return o.id;let l=ue[i]=s.NodeType.define({id:ae.length,name:r,props:[(0,a.styleTags)({[r]:n})]});return ae.push(l),l.id}function me(t){return t.length<=4096&&/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/.test(t)}function ke(t){for(let e=t.iter();!e.next().done;)if(me(e.value))return!0;return!1}const we=i.Facet.define({combine:t=>t.some((t=>t))});function ve(t={}){let e=[be];return t.alwaysIsolate&&e.push(we.of(!0)),e}const be=o.ViewPlugin.fromClass(class{constructor(t){this.always=t.state.facet(we)||t.textDirection!=o.Direction.LTR||t.state.facet(o.EditorView.perLineTextDirection),this.hasRTL=!this.always&&ke(t.state.doc),this.tree=g(t.state),this.decorations=this.always||this.hasRTL?ye(t,this.tree,this.always):o.Decoration.none}update(t){let e=t.state.facet(we)||t.view.textDirection!=o.Direction.LTR||t.state.facet(o.EditorView.perLineTextDirection);if(e||this.hasRTL||!function(t){let e=!1;return t.iterChanges(((t,n,r,s,i)=>{!e&&ke(i)&&(e=!0)})),e}(t.changes)||(this.hasRTL=!0),!e&&!this.hasRTL)return;let n=g(t.state);(e!=this.always||n!=this.tree||t.docChanged||t.viewportChanged)&&(this.tree=n,this.always=e,this.decorations=ye(t.view,n,e))}},{provide:t=>{function e(e){var n,r;return null!==(r=null===(n=e.plugin(t))||void 0===n?void 0:n.decorations)&&void 0!==r?r:o.Decoration.none}return[o.EditorView.outerDecorations.of(e),i.Prec.lowest(o.EditorView.bidiIsolatedRanges.of(e))]}});function ye(t,e,n){let r=new i.RangeSetBuilder,o=t.visibleRanges;n||(o=function(t,e){let n=e.iter(),r=0,s=[],i=null;for(let{from:e,to:o}of t)for(e!=r&&(r<e&&n.next(e-r),r=e);;){let t=r,e=r+n.value.length;if(!n.lineBreak&&me(n.value)&&(i&&i.to>t-10?i.to=Math.min(o,e):s.push(i={from:t,to:Math.min(o,e)})),r>=o)break;r=e,n.next()}return s}(o,t.state.doc));for(let{from:t,to:n}of o)e.iterate({enter:t=>{let e=t.type.prop(s.NodeProp.isolate);e&&r.add(t.from,t.to,xe[e])},from:t,to:n});return r.finish()}const xe={rtl:o.Decoration.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"rtl"},bidiIsolate:o.Direction.RTL}),ltr:o.Decoration.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"ltr"},bidiIsolate:o.Direction.LTR}),auto:o.Decoration.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"auto"},bidiIsolate:null})}},4434:(t,e,n)=>{n.d(e,{V:()=>o});const r="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),s="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class o{constructor(t,e){this.rules=[];let{finish:n}=e||{};function r(t){return/^@/.test(t)?[t]:t.split(/,\s*/)}function s(t,e,i,o){let a=[],l=/^@(\w+)\b/.exec(t[0]),h=l&&"keyframes"==l[1];if(l&&null==e)return i.push(t[0]+";");for(let n in e){let o=e[n];if(/&/.test(n))s(n.split(/,\s*/).map((e=>t.map((t=>e.replace(/&/,t))))).reduce(((t,e)=>t.concat(e))),o,i);else if(o&&"object"==typeof o){if(!l)throw new RangeError("The value of a property ("+n+") should be a primitive value.");s(r(n),o,a,h)}else null!=o&&a.push(n.replace(/_.*/,"").replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))+": "+o+";")}(a.length||h)&&i.push((!n||l||o?t:t.map(n)).join(", ")+" {"+a.join(" ")+"}")}for(let e in t)s(r(e),t[e],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let t=i[r]||1;return i[r]=t+1,"ͼ"+t.toString(36)}static mount(t,e,n){let r=t[s],i=n&&n.nonce;r?i&&r.setNonce(i):r=new l(t,i),r.mount(Array.isArray(e)?e:[e])}}let a=new Map;class l{constructor(t,e){let n=t.ownerDocument||t,r=n.defaultView;if(!t.head&&t.adoptedStyleSheets&&r.CSSStyleSheet){let e=a.get(n);if(e)return t.adoptedStyleSheets=[e.sheet,...t.adoptedStyleSheets],t[s]=e;this.sheet=new r.CSSStyleSheet,t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets],a.set(n,this)}else{this.styleTag=n.createElement("style"),e&&this.styleTag.setAttribute("nonce",e);let r=t.head||t;r.insertBefore(this.styleTag,r.firstChild)}this.modules=[],t[s]=this}mount(t){let e=this.sheet,n=0,r=0;for(let s=0;s<t.length;s++){let i=t[s],o=this.modules.indexOf(i);if(o<r&&o>-1&&(this.modules.splice(o,1),r--,o=-1),-1==o){if(this.modules.splice(r++,0,i),e)for(let t=0;t<i.rules.length;t++)e.insertRule(i.rules[t],n++)}else{for(;r<o;)n+=this.modules[r++].rules.length;n+=i.rules.length,r++}}if(!e){let t="";for(let e=0;e<this.modules.length;e++)t+=this.modules[e].getRules()+"\n";this.styleTag.textContent=t}}setNonce(t){this.styleTag&&this.styleTag.getAttribute("nonce")!=t&&this.styleTag.setAttribute("nonce",t)}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[1584,4434],{31584:(t,e,n)=>{n.r(e),n.d(e,{DocInput:()=>b,HighlightStyle:()=>Dt,IndentContext:()=>F,LRLanguage:()=>p,Language:()=>f,LanguageDescription:()=>N,LanguageSupport:()=>I,ParseContext:()=>x,StreamLanguage:()=>ee,StringStream:()=>Qt,TreeIndentContext:()=>_,bidiIsolates:()=>ve,bracketMatching:()=>Ht,bracketMatchingHandle:()=>Gt,codeFolding:()=>bt,continuedIndent:()=>J,defaultHighlightStyle:()=>Mt,defineLanguageFacet:()=>u,delimitedIndent:()=>z,ensureSyntaxTree:()=>m,flatIndent:()=>G,foldAll:()=>dt,foldCode:()=>ut,foldEffect:()=>nt,foldGutter:()=>At,foldInside:()=>Q,foldKeymap:()=>kt,foldNodeProp:()=>Z,foldService:()=>K,foldState:()=>it,foldable:()=>tt,foldedRanges:()=>ot,forceParsing:()=>w,getIndentUnit:()=>L,getIndentation:()=>R,highlightingFor:()=>Lt,indentNodeProp:()=>V,indentOnInput:()=>Y,indentRange:()=>M,indentService:()=>O,indentString:()=>B,indentUnit:()=>E,language:()=>D,languageDataProp:()=>h,matchBrackets:()=>Yt,sublanguageProp:()=>c,syntaxHighlighting:()=>Et,syntaxParserRunning:()=>v,syntaxTree:()=>g,syntaxTreeAvailable:()=>k,toggleFold:()=>mt,unfoldAll:()=>pt,unfoldCode:()=>ct,unfoldEffect:()=>rt});var r,s=n(79352),i=n(89843),o=n(37960),a=n(92209),l=n(4434);const h=new s.NodeProp;function u(t){return i.Facet.define({combine:t?e=>e.concat(t):void 0})}const c=new s.NodeProp;class f{constructor(t,e,n=[],r=""){this.data=t,this.name=r,i.EditorState.prototype.hasOwnProperty("tree")||Object.defineProperty(i.EditorState.prototype,"tree",{get(){return g(this)}}),this.parser=e,this.extension=[D.of(this),i.EditorState.languageData.of(((t,e,n)=>{let r=d(t,e,n),s=r.type.prop(h);if(!s)return[];let i=t.facet(s),o=r.type.prop(c);if(o){let s=r.resolve(e-r.from,n);for(let e of o)if(e.test(s,t)){let n=t.facet(e.facet);return"replace"==e.type?n:n.concat(i)}}return i}))].concat(n)}isActiveAt(t,e,n=-1){return d(t,e,n).type.prop(h)==this.data}findRegions(t){let e=t.facet(D);if((null==e?void 0:e.data)==this.data)return[{from:0,to:t.doc.length}];if(!e||!e.allowsNesting)return[];let n=[],r=(t,e)=>{if(t.prop(h)==this.data)return void n.push({from:e,to:e+t.length});let i=t.prop(s.NodeProp.mounted);if(i){if(i.tree.prop(h)==this.data){if(i.overlay)for(let t of i.overlay)n.push({from:t.from+e,to:t.to+e});else n.push({from:e,to:e+t.length});return}if(i.overlay){let t=n.length;if(r(i.tree,i.overlay[0].from+e),n.length>t)return}}for(let n=0;n<t.children.length;n++){let i=t.children[n];i instanceof s.Tree&&r(i,t.positions[n]+e)}};return r(g(t),0),n}get allowsNesting(){return!0}}function d(t,e,n){let r=t.facet(D),i=g(t).topNode;if(!r||r.allowsNesting)for(let t=i;t;t=t.enter(e,n,s.IterMode.ExcludeBuffers))t.type.isTop&&(i=t);return i}f.setState=i.StateEffect.define();class p extends f{constructor(t,e,n){super(t,e,[],n),this.parser=e}static define(t){let e=u(t.languageData);return new p(e,t.parser.configure({props:[h.add((t=>t.isTop?e:void 0))]}),t.name)}configure(t,e){return new p(this.data,this.parser.configure(t),e||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function g(t){let e=t.field(f.state,!1);return e?e.tree:s.Tree.empty}function m(t,e,n=50){var r;let s=null===(r=t.field(f.state,!1))||void 0===r?void 0:r.context;if(!s)return null;let i=s.viewport;s.updateViewport({from:0,to:e});let o=s.isDone(e)||s.work(n,e)?s.tree:null;return s.updateViewport(i),o}function k(t,e=t.doc.length){var n;return(null===(n=t.field(f.state,!1))||void 0===n?void 0:n.context.isDone(e))||!1}function w(t,e=t.viewport.to,n=100){let r=m(t.state,e,n);return r!=g(t.state)&&t.dispatch({}),!!r}function v(t){var e;return(null===(e=t.plugin(C))||void 0===e?void 0:e.isWorking())||!1}class b{constructor(t){this.doc=t,this.cursorPos=0,this.string="",this.cursor=t.iter()}get length(){return this.doc.length}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,e){let n=this.cursorPos-this.string.length;return t<n||e>=this.cursorPos?this.doc.sliceString(t,e):this.string.slice(t-n,e-n)}}let y=null;class x{constructor(t,e,n=[],r,s,i,o,a){this.parser=t,this.state=e,this.fragments=n,this.tree=r,this.treeLen=s,this.viewport=i,this.skipped=o,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(t,e,n){return new x(t,e,[],s.Tree.empty,0,n,[],null)}startParse(){return this.parser.startParse(new b(this.state.doc),this.fragments)}work(t,e){return null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=s.Tree.empty&&this.isDone(null!=e?e:this.state.doc.length)?(this.takeTree(),!0):this.withContext((()=>{var n;if("number"==typeof t){let e=Date.now()+t;t=()=>Date.now()>e}for(this.parse||(this.parse=this.startParse()),null!=e&&(null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&e<this.state.doc.length&&this.parse.stopAt(e);;){let r=this.parse.advance();if(r){if(this.fragments=this.withoutTempSkipped(s.TreeFragment.addTree(r,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!==(n=this.parse.stoppedAt)&&void 0!==n?n:this.state.doc.length,this.tree=r,this.parse=null,!(this.treeLen<(null!=e?e:this.state.doc.length)))return!0;this.parse=this.startParse()}if(t())return!1}}))}takeTree(){let t,e;this.parse&&(t=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext((()=>{for(;!(e=this.parse.advance()););})),this.treeLen=t,this.tree=e,this.fragments=this.withoutTempSkipped(s.TreeFragment.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let e=y;y=this;try{return t()}finally{y=e}}withoutTempSkipped(t){for(let e;e=this.tempSkipped.pop();)t=S(t,e.from,e.to);return t}changes(t,e){let{fragments:n,tree:r,treeLen:i,viewport:o,skipped:a}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges(((t,n,r,s)=>e.push({fromA:t,toA:n,fromB:r,toB:s}))),n=s.TreeFragment.applyChanges(n,e),r=s.Tree.empty,i=0,o={from:t.mapPos(o.from,-1),to:t.mapPos(o.to,1)},this.skipped.length){a=[];for(let e of this.skipped){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);n<r&&a.push({from:n,to:r})}}}return new x(this.parser,e,n,r,i,o,a,this.scheduleOn)}updateViewport(t){if(this.viewport.from==t.from&&this.viewport.to==t.to)return!1;this.viewport=t;let e=this.skipped.length;for(let e=0;e<this.skipped.length;e++){let{from:n,to:r}=this.skipped[e];n<t.to&&r>t.from&&(this.fragments=S(this.fragments,n,r),this.skipped.splice(e--,1))}return!(this.skipped.length>=e||(this.reset(),0))}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,e){this.skipped.push({from:t,to:e})}static getSkippingParser(t){return new class extends s.Parser{createParse(e,n,r){let i=r[0].from,o=r[r.length-1].to;return{parsedPos:i,advance(){let e=y;if(e){for(let t of r)e.tempSkipped.push(t);t&&(e.scheduleOn=e.scheduleOn?Promise.all([e.scheduleOn,t]):t)}return this.parsedPos=o,new s.Tree(s.NodeType.none,[],[],o-i)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let e=this.fragments;return this.treeLen>=t&&e.length&&0==e[0].from&&e[0].to>=t}static get(){return y}}function S(t,e,n){return s.TreeFragment.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class T{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let e=this.context.changes(t.changes,t.state),n=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,n)||e.takeTree(),new T(e)}static init(t){let e=Math.min(3e3,t.doc.length),n=x.create(t.facet(D).parser,t,{from:0,to:e});return n.work(20,e)||n.takeTree(),new T(n)}}f.state=i.StateField.define({create:T.init,update(t,e){for(let t of e.effects)if(t.is(f.setState))return t.value;return e.startState.facet(D)!=e.state.facet(D)?T.init(e.state):t.apply(e)}});let P=t=>{let e=setTimeout((()=>t()),500);return()=>clearTimeout(e)};"undefined"!=typeof requestIdleCallback&&(P=t=>{let e=-1,n=setTimeout((()=>{e=requestIdleCallback(t,{timeout:400})}),100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const A="undefined"!=typeof navigator&&(null===(r=navigator.scheduling)||void 0===r?void 0:r.isInputPending)?()=>navigator.scheduling.isInputPending():null,C=o.ViewPlugin.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let e=this.view.state.field(f.state).context;(e.updateViewport(t.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),(t.docChanged||t.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}scheduleWork(){if(this.working)return;let{state:t}=this.view,e=t.field(f.state);e.tree==e.context.tree&&e.context.isDone(t.doc.length)||(this.working=P(this.work))}work(t){this.working=null;let e=Date.now();if(this.chunkEnd<e&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=e+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:r}}=this.view,s=n.field(f.state);if(s.tree==s.context.tree&&s.context.isDone(r+1e5))return;let i=Date.now()+Math.min(this.chunkBudget,100,t&&!A?Math.max(25,t.timeRemaining()-5):1e9),o=s.context.treeLen<r&&n.doc.length>r+1e3,a=s.context.work((()=>A&&A()||Date.now()>i),r+(o?0:1e5));this.chunkBudget-=Date.now()-e,(a||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:f.setState.of(new T(s.context))})),this.chunkBudget>0&&(!a||o)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then((()=>this.scheduleWork())).catch((t=>(0,o.logException)(this.view.state,t))).then((()=>this.workScheduled--)),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),D=i.Facet.define({combine:t=>t.length?t[0]:null,enables:t=>[f.state,C,o.EditorView.contentAttributes.compute([t],(e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}}))]});class I{constructor(t,e=[]){this.language=t,this.support=e,this.extension=[t,e]}}class N{constructor(t,e,n,r,s,i=void 0){this.name=t,this.alias=e,this.extensions=n,this.filename=r,this.loadFunc=s,this.support=i,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then((t=>this.support=t),(t=>{throw this.loading=null,t})))}static of(t){let{load:e,support:n}=t;if(!e){if(!n)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");e=()=>Promise.resolve(n)}return new N(t.name,(t.alias||[]).concat(t.name).map((t=>t.toLowerCase())),t.extensions||[],t.filename,e,n)}static matchFilename(t,e){for(let n of t)if(n.filename&&n.filename.test(e))return n;let n=/\.([^.]+)$/.exec(e);if(n)for(let e of t)if(e.extensions.indexOf(n[1])>-1)return e;return null}static matchLanguageName(t,e,n=!0){e=e.toLowerCase();for(let n of t)if(n.alias.some((t=>t==e)))return n;if(n)for(let n of t)for(let t of n.alias){let r=e.indexOf(t);if(r>-1&&(t.length>2||!/\w/.test(e[r-1])&&!/\w/.test(e[r+t.length])))return n}return null}}const O=i.Facet.define(),E=i.Facet.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some((t=>t!=e[0])))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function L(t){let e=t.facet(E);return 9==e.charCodeAt(0)?t.tabSize*e.length:e.length}function B(t,e){let n="",r=t.tabSize,s=t.facet(E)[0];if("\t"==s){for(;e>=r;)n+="\t",e-=r;s=" "}for(let t=0;t<e;t++)n+=s;return n}function R(t,e){t instanceof i.EditorState&&(t=new F(t));for(let n of t.state.facet(O)){let r=n(t,e);if(void 0!==r)return r}let n=g(t.state);return n.length>=e?function(t,e,n){let r=e.resolveStack(n),s=r.node.enterUnfinishedNodesBefore(n);if(s!=r.node){let t=[];for(let e=s;e!=r.node;e=e.parent)t.push(e);for(let e=t.length-1;e>=0;e--)r={node:t[e],next:r}}return U(r,t,n)}(t,n,e):null}function M(t,e,n){let r=Object.create(null),s=new F(t,{overrideIndentation:t=>{var e;return null!==(e=r[t])&&void 0!==e?e:-1}}),i=[];for(let o=e;o<=n;){let e=t.doc.lineAt(o);o=e.to+1;let n=R(s,e.from);if(null==n)continue;/\S/.test(e.text)||(n=0);let a=/^\s*/.exec(e.text)[0],l=B(t,n);a!=l&&(r[e.from]=n,i.push({from:e.from,to:e.from+a.length,insert:l}))}return t.changes(i)}class F{constructor(t,e={}){this.state=t,this.options=e,this.unit=L(t)}lineAt(t,e=1){let n=this.state.doc.lineAt(t),{simulateBreak:r,simulateDoubleBreak:s}=this.options;return null!=r&&r>=n.from&&r<=n.to?s&&r==t?{text:"",from:t}:(e<0?r<t:r<=t)?{text:n.text.slice(r-n.from),from:r}:{text:n.text.slice(0,r-n.from),from:n.from}:n}textAfterPos(t,e=1){if(this.options.simulateDoubleBreak&&t==this.options.simulateBreak)return"";let{text:n,from:r}=this.lineAt(t,e);return n.slice(t-r,Math.min(n.length,t+100-r))}column(t,e=1){let{text:n,from:r}=this.lineAt(t,e),s=this.countColumn(n,t-r),i=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return i>-1&&(s+=i-this.countColumn(n,n.search(/\S|$/))),s}countColumn(t,e=t.length){return(0,i.countColumn)(t,this.state.tabSize,e)}lineIndent(t,e=1){let{text:n,from:r}=this.lineAt(t,e),s=this.options.overrideIndentation;if(s){let t=s(r);if(t>-1)return t}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const V=new s.NodeProp;function U(t,e,n){for(let r=t;r;r=r.next){let t=j(r.node);if(t)return t(_.create(e,n,r))}return 0}function j(t){let e=t.type.prop(V);if(e)return e;let n,r=t.firstChild;if(r&&(n=r.type.prop(s.NodeProp.closedBy))){let e=t.lastChild,r=e&&n.indexOf(e.name)>-1;return t=>H(t,!0,1,void 0,r&&!function(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}(t)?e.from:void 0)}return null==t.parent?W:null}function W(){return 0}class _ extends F{constructor(t,e,n){super(t.state,t.options),this.base=t,this.pos=e,this.context=n}get node(){return this.context.node}static create(t,e,n){return new _(t,e,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(t){let e=this.state.doc.lineAt(t.from);for(;;){let n=t.resolve(e.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if($(n,t))break;e=this.state.doc.lineAt(n.from)}return this.lineIndent(e.from)}continue(){return U(this.context.next,this.base,this.pos)}}function $(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function z({closing:t,align:e=!0,units:n=1}){return r=>H(r,e,n,t)}function H(t,e,n,r,s){let i=t.textAfter,o=i.match(/^\s*/)[0].length,a=r&&i.slice(o,o+r.length)==r||s==t.pos+o,l=e?function(t){let e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;let s=t.options.simulateBreak,i=t.state.doc.lineAt(n.from),o=null==s||s<=i.from?i.to:Math.min(i.to,s);for(let t=n.to;;){let s=e.childAfter(t);if(!s||s==r)return null;if(!s.type.isSkipped)return s.from<o?n:null;t=s.to}}(t):null;return l?a?t.column(l.from):t.column(l.to):t.baseIndent+(a?0:t.unit*n)}const G=t=>t.baseIndent;function J({except:t,units:e=1}={}){return n=>{let r=t&&t.test(n.textAfter);return n.baseIndent+(r?0:e*n.unit)}}const q=200;function Y(){return i.EditorState.transactionFilter.of((t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:r}=t.newSelection.main,s=n.lineAt(r);if(r>s.from+q)return t;let i=n.sliceString(s.from,r);if(!e.some((t=>t.test(i))))return t;let{state:o}=t,a=-1,l=[];for(let{head:t}of o.selection.ranges){let e=o.doc.lineAt(t);if(e.from==a)continue;a=e.from;let n=R(o,e.from);if(null==n)continue;let r=/^\s*/.exec(e.text)[0],s=B(o,n);r!=s&&l.push({from:e.from,to:e.from+r.length,insert:s})}return l.length?[t,{changes:l,sequential:!0}]:t}))}const K=i.Facet.define(),Z=new s.NodeProp;function Q(t){let e=t.firstChild,n=t.lastChild;return e&&e.to<n.from?{from:e.to,to:n.type.isError?t.to:n.from}:null}function X(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function tt(t,e,n){for(let r of t.facet(K)){let s=r(t,e,n);if(s)return s}return function(t,e,n){let r=g(t);if(r.length<n)return null;let s=null;for(let i=r.resolveStack(n,1);i;i=i.next){let o=i.node;if(o.to<=n||o.from>n)continue;if(s&&o.from<e)break;let a=o.type.prop(Z);if(a&&(o.to<r.length-50||r.length==t.doc.length||!X(o))){let r=a(o,t);r&&r.from<=n&&r.from>=e&&r.to>n&&(s=r)}}return s}(t,e,n)}function et(t,e){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return n>=r?void 0:{from:n,to:r}}const nt=i.StateEffect.define({map:et}),rt=i.StateEffect.define({map:et});function st(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some((t=>t.from<=n&&t.to>=n))||e.push(t.lineBlockAt(n));return e}const it=i.StateField.define({create:()=>o.Decoration.none,update(t,e){t=t.map(e.changes);for(let n of e.effects)if(n.is(nt)&&!lt(t,n.value.from,n.value.to)){let{preparePlaceholder:r}=e.state.facet(vt),s=r?o.Decoration.replace({widget:new St(r(e.state,n.value))}):xt;t=t.update({add:[s.range(n.value.from,n.value.to)]})}else n.is(rt)&&(t=t.update({filter:(t,e)=>n.value.from!=t||n.value.to!=e,filterFrom:n.value.from,filterTo:n.value.to}));if(e.selection){let n=!1,{head:r}=e.selection.main;t.between(r,r,((t,e)=>{t<r&&e>r&&(n=!0)})),n&&(t=t.update({filterFrom:r,filterTo:r,filter:(t,e)=>e<=r||t>=r}))}return t},provide:t=>o.EditorView.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,((t,e)=>{n.push(t,e)})),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n<t.length;){let r=t[n++],s=t[n++];if("number"!=typeof r||"number"!=typeof s)throw new RangeError("Invalid JSON for fold state");e.push(xt.range(r,s))}return o.Decoration.set(e,!0)}});function ot(t){return t.field(it,!1)||i.RangeSet.empty}function at(t,e,n){var r;let s=null;return null===(r=t.field(it,!1))||void 0===r||r.between(e,n,((t,e)=>{(!s||s.from>t)&&(s={from:t,to:e})})),s}function lt(t,e,n){let r=!1;return t.between(e,e,((t,s)=>{t==e&&s==n&&(r=!0)})),r}function ht(t,e){return t.field(it,!1)?e:e.concat(i.StateEffect.appendConfig.of(bt()))}const ut=t=>{for(let e of st(t)){let n=tt(t.state,e.from,e.to);if(n)return t.dispatch({effects:ht(t.state,[nt.of(n),ft(t,n)])}),!0}return!1},ct=t=>{if(!t.state.field(it,!1))return!1;let e=[];for(let n of st(t)){let r=at(t.state,n.from,n.to);r&&e.push(rt.of(r),ft(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function ft(t,e,n=!0){let r=t.state.doc.lineAt(e.from).number,s=t.state.doc.lineAt(e.to).number;return o.EditorView.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${s}.`)}const dt=t=>{let{state:e}=t,n=[];for(let r=0;r<e.doc.length;){let s=t.lineBlockAt(r),i=tt(e,s.from,s.to);i&&n.push(nt.of(i)),r=(i?t.lineBlockAt(i.to):s).to+1}return n.length&&t.dispatch({effects:ht(t.state,n)}),!!n.length},pt=t=>{let e=t.state.field(it,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,((t,e)=>{n.push(rt.of({from:t,to:e}))})),t.dispatch({effects:n}),!0};function gt(t,e){for(let n=e;;){let r=tt(t.state,n.from,n.to);if(r&&r.to>e.from)return r;if(!n.from)return null;n=t.lineBlockAt(n.from-1)}}const mt=t=>{let e=[];for(let n of st(t)){let r=at(t.state,n.from,n.to);if(r)e.push(rt.of(r),ft(t,r,!1));else{let r=gt(t,n);r&&e.push(nt.of(r),ft(t,r))}}return e.length>0&&t.dispatch({effects:ht(t.state,e)}),!!e.length},kt=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:ut},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:ct},{key:"Ctrl-Alt-[",run:dt},{key:"Ctrl-Alt-]",run:pt}],wt={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},vt=i.Facet.define({combine:t=>(0,i.combineConfig)(t,wt)});function bt(t){let e=[it,Ct];return t&&e.push(vt.of(t)),e}function yt(t,e){let{state:n}=t,r=n.facet(vt),s=e=>{let n=t.lineBlockAt(t.posAtDOM(e.target)),r=at(t.state,n.from,n.to);r&&t.dispatch({effects:rt.of(r)}),e.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,s,e);let i=document.createElement("span");return i.textContent=r.placeholderText,i.setAttribute("aria-label",n.phrase("folded code")),i.title=n.phrase("unfold"),i.className="cm-foldPlaceholder",i.onclick=s,i}const xt=o.Decoration.replace({widget:new class extends o.WidgetType{toDOM(t){return yt(t,null)}}});class St extends o.WidgetType{constructor(t){super(),this.value=t}eq(t){return this.value==t.value}toDOM(t){return yt(t,this.value)}}const Tt={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Pt extends o.GutterMarker{constructor(t,e){super(),this.config=t,this.open=e}eq(t){return this.config==t.config&&this.open==t.open}toDOM(t){if(this.config.markerDOM)return this.config.markerDOM(this.open);let e=document.createElement("span");return e.textContent=this.open?this.config.openText:this.config.closedText,e.title=t.state.phrase(this.open?"Fold line":"Unfold line"),e}}function At(t={}){let e=Object.assign(Object.assign({},Tt),t),n=new Pt(e,!0),r=new Pt(e,!1),s=o.ViewPlugin.fromClass(class{constructor(t){this.from=t.viewport.from,this.markers=this.buildMarkers(t)}update(t){(t.docChanged||t.viewportChanged||t.startState.facet(D)!=t.state.facet(D)||t.startState.field(it,!1)!=t.state.field(it,!1)||g(t.startState)!=g(t.state)||e.foldingChanged(t))&&(this.markers=this.buildMarkers(t.view))}buildMarkers(t){let e=new i.RangeSetBuilder;for(let s of t.viewportLineBlocks){let i=at(t.state,s.from,s.to)?r:tt(t.state,s.from,s.to)?n:null;i&&e.add(s.from,s.from,i)}return e.finish()}}),{domEventHandlers:a}=e;return[s,(0,o.gutter)({class:"cm-foldGutter",markers(t){var e;return(null===(e=t.plugin(s))||void 0===e?void 0:e.markers)||i.RangeSet.empty},initialSpacer:()=>new Pt(e,!1),domEventHandlers:Object.assign(Object.assign({},a),{click:(t,e,n)=>{if(a.click&&a.click(t,e,n))return!0;let r=at(t.state,e.from,e.to);if(r)return t.dispatch({effects:rt.of(r)}),!0;let s=tt(t.state,e.from,e.to);return!!s&&(t.dispatch({effects:nt.of(s)}),!0)}})}),bt()]}const Ct=o.EditorView.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Dt{constructor(t,e){let n;function r(t){let e=l.V.newName();return(n||(n=Object.create(null)))["."+e]=t,e}this.specs=t;const s="string"==typeof e.all?e.all:e.all?r(e.all):void 0,i=e.scope;this.scope=i instanceof f?t=>t.prop(h)==i.data:i?t=>t==i:void 0,this.style=(0,a.tagHighlighter)(t.map((t=>({tag:t.tag,class:t.class||r(Object.assign({},t,{tag:null}))}))),{all:s}).style,this.module=n?new l.V(n):null,this.themeType=e.themeType}static define(t,e){return new Dt(t,e||{})}}const It=i.Facet.define(),Nt=i.Facet.define({combine:t=>t.length?[t[0]]:null});function Ot(t){let e=t.facet(It);return e.length?e:t.facet(Nt)}function Et(t,e){let n,r=[Rt];return t instanceof Dt&&(t.module&&r.push(o.EditorView.styleModule.of(t.module)),n=t.themeType),(null==e?void 0:e.fallback)?r.push(Nt.of(t)):n?r.push(It.computeN([o.EditorView.darkTheme],(e=>e.facet(o.EditorView.darkTheme)==("dark"==n)?[t]:[]))):r.push(It.of(t)),r}function Lt(t,e,n){let r=Ot(t),s=null;if(r)for(let t of r)if(!t.scope||n&&t.scope(n)){let n=t.style(e);n&&(s=s?s+" "+n:n)}return s}class Bt{constructor(t){this.markCache=Object.create(null),this.tree=g(t.state),this.decorations=this.buildDeco(t,Ot(t.state)),this.decoratedTo=t.viewport.to}update(t){let e=g(t.state),n=Ot(t.state),r=n!=Ot(t.startState),{viewport:s}=t.view,i=t.changes.mapPos(this.decoratedTo,1);e.length<s.to&&!r&&e.type==this.tree.type&&i>=s.to?(this.decorations=this.decorations.map(t.changes),this.decoratedTo=i):(e!=this.tree||t.viewportChanged||r)&&(this.tree=e,this.decorations=this.buildDeco(t.view,n),this.decoratedTo=s.to)}buildDeco(t,e){if(!e||!this.tree.length)return o.Decoration.none;let n=new i.RangeSetBuilder;for(let{from:r,to:s}of t.visibleRanges)(0,a.highlightTree)(this.tree,e,((t,e,r)=>{n.add(t,e,this.markCache[r]||(this.markCache[r]=o.Decoration.mark({class:r})))}),r,s);return n.finish()}}const Rt=i.Prec.high(o.ViewPlugin.fromClass(Bt,{decorations:t=>t.decorations})),Mt=Dt.define([{tag:a.tags.meta,color:"#404740"},{tag:a.tags.link,textDecoration:"underline"},{tag:a.tags.heading,textDecoration:"underline",fontWeight:"bold"},{tag:a.tags.emphasis,fontStyle:"italic"},{tag:a.tags.strong,fontWeight:"bold"},{tag:a.tags.strikethrough,textDecoration:"line-through"},{tag:a.tags.keyword,color:"#708"},{tag:[a.tags.atom,a.tags.bool,a.tags.url,a.tags.contentSeparator,a.tags.labelName],color:"#219"},{tag:[a.tags.literal,a.tags.inserted],color:"#164"},{tag:[a.tags.string,a.tags.deleted],color:"#a11"},{tag:[a.tags.regexp,a.tags.escape,a.tags.special(a.tags.string)],color:"#e40"},{tag:a.tags.definition(a.tags.variableName),color:"#00f"},{tag:a.tags.local(a.tags.variableName),color:"#30a"},{tag:[a.tags.typeName,a.tags.namespace],color:"#085"},{tag:a.tags.className,color:"#167"},{tag:[a.tags.special(a.tags.variableName),a.tags.macroName],color:"#256"},{tag:a.tags.definition(a.tags.propertyName),color:"#00c"},{tag:a.tags.comment,color:"#940"},{tag:a.tags.invalid,color:"#f00"}]),Ft=o.EditorView.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),Vt=1e4,Ut="()[]{}",jt=i.Facet.define({combine:t=>(0,i.combineConfig)(t,{afterCursor:!0,brackets:Ut,maxScanDistance:Vt,renderMatch:$t})}),Wt=o.Decoration.mark({class:"cm-matchingBracket"}),_t=o.Decoration.mark({class:"cm-nonmatchingBracket"});function $t(t){let e=[],n=t.matched?Wt:_t;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const zt=[i.StateField.define({create:()=>o.Decoration.none,update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],r=e.state.facet(jt);for(let t of e.state.selection.ranges){if(!t.empty)continue;let s=Yt(e.state,t.head,-1,r)||t.head>0&&Yt(e.state,t.head-1,1,r)||r.afterCursor&&(Yt(e.state,t.head,1,r)||t.head<e.state.doc.length&&Yt(e.state,t.head+1,-1,r));s&&(n=n.concat(r.renderMatch(s,e.state)))}return o.Decoration.set(n,!0)},provide:t=>o.EditorView.decorations.from(t)}),Ft];function Ht(t={}){return[jt.of(t),zt]}const Gt=new s.NodeProp;function Jt(t,e,n){let r=t.prop(e<0?s.NodeProp.openedBy:s.NodeProp.closedBy);if(r)return r;if(1==t.name.length){let r=n.indexOf(t.name);if(r>-1&&r%2==(e<0?1:0))return[n[r+e]]}return null}function qt(t){let e=t.type.prop(Gt);return e?e(t.node):t}function Yt(t,e,n,r={}){let s=r.maxScanDistance||Vt,i=r.brackets||Ut,o=g(t),a=o.resolveInner(e,n);for(let t=a;t;t=t.parent){let r=Jt(t.type,n,i);if(r&&t.from<t.to){let s=qt(t);if(s&&(n>0?e>=s.from&&e<s.to:e>s.from&&e<=s.to))return Kt(0,0,n,t,s,r,i)}}return function(t,e,n,r,s,i,o){let a=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),l=o.indexOf(a);if(l<0||l%2==0!=n>0)return null;let h={from:n<0?e-1:e,to:n>0?e+1:e},u=t.doc.iterRange(e,n>0?t.doc.length:0),c=0;for(let t=0;!u.next().done&&t<=i;){let i=u.value;n<0&&(t+=i.length);let a=e+t*n;for(let t=n>0?0:i.length-1,e=n>0?i.length:-1;t!=e;t+=n){let e=o.indexOf(i[t]);if(!(e<0||r.resolveInner(a+t,1).type!=s))if(e%2==0==n>0)c++;else{if(1==c)return{start:h,end:{from:a+t,to:a+t+1},matched:e>>1==l>>1};c--}}n>0&&(t+=i.length)}return u.done?{start:h,matched:!1}:null}(t,e,n,o,a.type,s,i)}function Kt(t,e,n,r,s,i,o){let a=r.parent,l={from:s.from,to:s.to},h=0,u=null==a?void 0:a.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do{if(n<0?u.to<=r.from:u.from>=r.to){if(0==h&&i.indexOf(u.type.name)>-1&&u.from<u.to){let t=qt(u);return{start:l,end:t?{from:t.from,to:t.to}:void 0,matched:!0}}if(Jt(u.type,n,o))h++;else if(Jt(u.type,-n,o)){if(0==h){let t=qt(u);return{start:l,end:t&&t.from<t.to?{from:t.from,to:t.to}:void 0,matched:!1}}h--}}}while(n<0?u.prevSibling():u.nextSibling());return{start:l,matched:!1}}function Zt(t,e,n,r=0,s=0){null==e&&-1==(e=t.search(/[^\s\u00a0]/))&&(e=t.length);let i=s;for(let s=r;s<e;s++)9==t.charCodeAt(s)?i+=n-i%n:i++;return i}class Qt{constructor(t,e,n,r){this.string=t,this.tabSize=e,this.indentUnit=n,this.overrideIndent=r,this.pos=0,this.start=0,this.lastColumnPos=0,this.lastColumnValue=0}eol(){return this.pos>=this.string.length}sol(){return 0==this.pos}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)}eat(t){let e,n=this.string.charAt(this.pos);if(e="string"==typeof t?n==t:n&&(t instanceof RegExp?t.test(n):t(n)),e)return++this.pos,n}eatWhile(t){let e=this.pos;for(;this.eat(t););return this.pos>e}eatSpace(){let t=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t}skipToEnd(){this.pos=this.string.length}skipTo(t){let e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0}backUp(t){this.pos-=t}column(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Zt(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue}indentation(){var t;return null!==(t=this.overrideIndent)&&void 0!==t?t:Zt(this.string,null,this.tabSize)}match(t,e,n){if("string"==typeof t){let r=t=>n?t.toLowerCase():t;return r(this.string.substr(this.pos,t.length))==r(t)?(!1!==e&&(this.pos+=t.length),!0):null}{let n=this.string.slice(this.pos).match(t);return n&&n.index>0?null:(n&&!1!==e&&(this.pos+=n[0].length),n)}}current(){return this.string.slice(this.start,this.pos)}}function Xt(t){if("object"!=typeof t)return t;let e={};for(let n in t){let r=t[n];e[n]=r instanceof Array?r.slice():r}return e}const te=new WeakMap;class ee extends f{constructor(t){let e,n=u(t.languageData),r={name:(i=t).name||"",token:i.token,blankLine:i.blankLine||(()=>{}),startState:i.startState||(()=>!0),copyState:i.copyState||Xt,indent:i.indent||(()=>null),languageData:i.languageData||{},tokenTable:i.tokenTable||oe};var i;super(n,new class extends s.Parser{createParse(t,n,r){return new se(e,t,n,r)}},[O.of(((t,e)=>this.getIndent(t,e)))],t.name),this.topNode=function(t){let e=s.NodeType.define({id:ae.length,name:"Document",props:[h.add((()=>t))],top:!0});return ae.push(e),e}(n),e=this,this.streamParser=r,this.stateAfter=new s.NodeProp({perNode:!0}),this.tokenTable=t.tokenTable?new fe(r.tokenTable):de}static define(t){return new ee(t)}getIndent(t,e){let n,r=g(t.state),s=r.resolve(e);for(;s&&s.type!=this.topNode;)s=s.parent;if(!s)return null;let{overrideIndentation:i}=t.options;i&&(n=te.get(t.state),null!=n&&n<e-1e4&&(n=void 0));let o,a,l=ne(this,r,0,s.from,null!=n?n:e);if(l?(a=l.state,o=l.pos+1):(a=this.streamParser.startState(t.unit),o=0),e-o>1e4)return null;for(;o<e;){let n=t.state.doc.lineAt(o),r=Math.min(e,n.to);if(n.length){let e=i?i(n.from):-1,s=new Qt(n.text,t.state.tabSize,t.unit,e<0?void 0:e);for(;s.pos<r-n.from;)ie(this.streamParser.token,s,a)}else this.streamParser.blankLine(a,t.unit);if(r==e)break;o=n.to+1}let h=t.lineAt(e);return i&&null==n&&te.set(t.state,h.from),this.streamParser.indent(a,/^\s*(.*)/.exec(h.text)[1],t)}get allowsNesting(){return!1}}function ne(t,e,n,r,i){let o=n>=r&&n+e.length<=i&&e.prop(t.stateAfter);if(o)return{state:t.streamParser.copyState(o),pos:n+e.length};for(let o=e.children.length-1;o>=0;o--){let a=e.children[o],l=n+e.positions[o],h=a instanceof s.Tree&&l<i&&ne(t,a,l,r,i);if(h)return h}return null}function re(t,e,n,r,i){if(i&&n<=0&&r>=e.length)return e;i||e.type!=t.topNode||(i=!0);for(let o=e.children.length-1;o>=0;o--){let a,l=e.positions[o],h=e.children[o];if(l<r&&h instanceof s.Tree){if(!(a=re(t,h,n-l,r-l,i)))break;return i?new s.Tree(e.type,e.children.slice(0,o).concat(a),e.positions.slice(0,o+1),l+a.length):a}}return null}class se{constructor(t,e,n,r){this.lang=t,this.input=e,this.fragments=n,this.ranges=r,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=r[r.length-1].to;let i=x.get(),o=r[0].from,{state:a,tree:l}=function(t,e,n,r){for(let r of e){let e,s=r.from+(r.openStart?25:0),i=r.to-(r.openEnd?25:0),o=s<=n&&i>n&&ne(t,r.tree,0-r.offset,n,i);if(o&&(e=re(t,r.tree,n+r.offset,o.pos+r.offset,!1)))return{state:o.state,tree:e}}return{state:t.streamParser.startState(r?L(r):4),tree:s.Tree.empty}}(t,n,o,null==i?void 0:i.state);this.state=a,this.parsedPos=this.chunkStart=o+l.length;for(let t=0;t<l.children.length;t++)this.chunks.push(l.children[t]),this.chunkPos.push(l.positions[t]);i&&this.parsedPos<i.viewport.from-1e5&&(this.state=this.lang.streamParser.startState(L(i.state)),i.skipUntilInView(this.parsedPos,i.viewport.from),this.parsedPos=i.viewport.from),this.moveRangeIndex()}advance(){let t=x.get(),e=null==this.stoppedAt?this.to:Math.min(this.to,this.stoppedAt),n=Math.min(e,this.chunkStart+2048);for(t&&(n=Math.min(n,t.viewport.to));this.parsedPos<n;)this.parseLine(t);return this.chunkStart<this.parsedPos&&this.finishChunk(),this.parsedPos>=e?this.finish():t&&this.parsedPos>=t.viewport.to?(t.skipUntilInView(this.parsedPos,e),this.finish()):null}stopAt(t){this.stoppedAt=t}lineAfter(t){let e=this.input.chunk(t);if(this.input.lineChunks)"\n"==e&&(e="");else{let t=e.indexOf("\n");t>-1&&(e=e.slice(0,t))}return t+e.length<=this.to?e:e.slice(0,this.to-t)}nextLine(){let t=this.parsedPos,e=this.lineAfter(t),n=t+e.length;for(let t=this.rangeIndex;;){let r=this.ranges[t].to;if(r>=n)break;if(e=e.slice(0,r-(n-e.length)),t++,t==this.ranges.length)break;let s=this.ranges[t].from,i=this.lineAfter(s);e+=i,n=s+i.length}return{line:e,end:n}}skipGapsTo(t,e,n){for(;;){let r=this.ranges[this.rangeIndex].to,s=t+e;if(n>0?r>s:r>=s)break;e+=this.ranges[++this.rangeIndex].from-r}return e}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to<this.parsedPos;)this.rangeIndex++}emitToken(t,e,n,r,s){if(this.ranges.length>1){e+=s=this.skipGapsTo(e,s,1);let t=this.chunk.length;n+=s=this.skipGapsTo(n,s,-1),r+=this.chunk.length-t}return this.chunk.push(t,e,n,r),s}parseLine(t){let{line:e,end:n}=this.nextLine(),r=0,{streamParser:s}=this.lang,i=new Qt(e,t?t.state.tabSize:4,t?L(t.state):2);if(i.eol())s.blankLine(this.state,i.indentUnit);else for(;!i.eol();){let t=ie(s.token,i,this.state);if(t&&(r=this.emitToken(this.lang.tokenTable.resolve(t),this.parsedPos+i.start,this.parsedPos+i.pos,4,r)),i.start>1e4)break}this.parsedPos=n,this.moveRangeIndex(),this.parsedPos<this.to&&this.parsedPos++}finishChunk(){let t=s.Tree.build({buffer:this.chunk,start:this.chunkStart,length:this.parsedPos-this.chunkStart,nodeSet:le,topID:0,maxBufferLength:2048,reused:this.chunkReused});t=new s.Tree(t.type,t.children,t.positions,t.length,[[this.lang.stateAfter,this.lang.streamParser.copyState(this.state)]]),this.chunks.push(t),this.chunkPos.push(this.chunkStart-this.ranges[0].from),this.chunk=[],this.chunkReused=void 0,this.chunkStart=this.parsedPos}finish(){return new s.Tree(this.lang.topNode,this.chunks,this.chunkPos,this.parsedPos-this.ranges[0].from).balance()}}function ie(t,e,n){e.start=e.pos;for(let r=0;r<10;r++){let r=t(e,n);if(e.pos>e.start)return r}throw new Error("Stream parser failed to advance stream.")}const oe=Object.create(null),ae=[s.NodeType.none],le=new s.NodeSet(ae),he=[],ue=Object.create(null),ce=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])ce[t]=ge(oe,e);class fe{constructor(t){this.extra=t,this.table=Object.assign(Object.create(null),ce)}resolve(t){return t?this.table[t]||(this.table[t]=ge(this.extra,t)):0}}const de=new fe(oe);function pe(t,e){he.indexOf(t)>-1||(he.push(t),console.warn(e))}function ge(t,e){let n=[];for(let r of e.split(" ")){let e=[];for(let n of r.split(".")){let r=t[n]||a.tags[n];r?"function"==typeof r?e.length?e=e.map(r):pe(n,`Modifier ${n} used at start of tag`):e.length?pe(n,`Tag ${n} used as modifier`):e=Array.isArray(r)?r:[r]:pe(n,`Unknown highlighting tag ${n}`)}for(let t of e)n.push(t)}if(!n.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+n.map((t=>t.id)),o=ue[i];if(o)return o.id;let l=ue[i]=s.NodeType.define({id:ae.length,name:r,props:[(0,a.styleTags)({[r]:n})]});return ae.push(l),l.id}function me(t){return t.length<=4096&&/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/.test(t)}function ke(t){for(let e=t.iter();!e.next().done;)if(me(e.value))return!0;return!1}const we=i.Facet.define({combine:t=>t.some((t=>t))});function ve(t={}){let e=[be];return t.alwaysIsolate&&e.push(we.of(!0)),e}const be=o.ViewPlugin.fromClass(class{constructor(t){this.always=t.state.facet(we)||t.textDirection!=o.Direction.LTR||t.state.facet(o.EditorView.perLineTextDirection),this.hasRTL=!this.always&&ke(t.state.doc),this.tree=g(t.state),this.decorations=this.always||this.hasRTL?ye(t,this.tree,this.always):o.Decoration.none}update(t){let e=t.state.facet(we)||t.view.textDirection!=o.Direction.LTR||t.state.facet(o.EditorView.perLineTextDirection);if(e||this.hasRTL||!function(t){let e=!1;return t.iterChanges(((t,n,r,s,i)=>{!e&&ke(i)&&(e=!0)})),e}(t.changes)||(this.hasRTL=!0),!e&&!this.hasRTL)return;let n=g(t.state);(e!=this.always||n!=this.tree||t.docChanged||t.viewportChanged)&&(this.tree=n,this.always=e,this.decorations=ye(t.view,n,e))}},{provide:t=>{function e(e){var n,r;return null!==(r=null===(n=e.plugin(t))||void 0===n?void 0:n.decorations)&&void 0!==r?r:o.Decoration.none}return[o.EditorView.outerDecorations.of(e),i.Prec.lowest(o.EditorView.bidiIsolatedRanges.of(e))]}});function ye(t,e,n){let r=new i.RangeSetBuilder,o=t.visibleRanges;n||(o=function(t,e){let n=e.iter(),r=0,s=[],i=null;for(let{from:e,to:o}of t)for(e!=r&&(r<e&&n.next(e-r),r=e);;){let t=r,e=r+n.value.length;if(!n.lineBreak&&me(n.value)&&(i&&i.to>t-10?i.to=Math.min(o,e):s.push(i={from:t,to:Math.min(o,e)})),r>=o)break;r=e,n.next()}return s}(o,t.state.doc));for(let{from:t,to:n}of o)e.iterate({enter:t=>{let e=t.type.prop(s.NodeProp.isolate);e&&r.add(t.from,t.to,xe[e])},from:t,to:n});return r.finish()}const xe={rtl:o.Decoration.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"rtl"},bidiIsolate:o.Direction.RTL}),ltr:o.Decoration.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"ltr"},bidiIsolate:o.Direction.LTR}),auto:o.Decoration.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"auto"},bidiIsolate:null})}},4434:(t,e,n)=>{n.d(e,{V:()=>o});const r="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),s="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class o{constructor(t,e){this.rules=[];let{finish:n}=e||{};function r(t){return/^@/.test(t)?[t]:t.split(/,\s*/)}function s(t,e,i,o){let a=[],l=/^@(\w+)\b/.exec(t[0]),h=l&&"keyframes"==l[1];if(l&&null==e)return i.push(t[0]+";");for(let n in e){let o=e[n];if(/&/.test(n))s(n.split(/,\s*/).map((e=>t.map((t=>e.replace(/&/,t))))).reduce(((t,e)=>t.concat(e))),o,i);else if(o&&"object"==typeof o){if(!l)throw new RangeError("The value of a property ("+n+") should be a primitive value.");s(r(n),o,a,h)}else null!=o&&a.push(n.replace(/_.*/,"").replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))+": "+o+";")}(a.length||h)&&i.push((!n||l||o?t:t.map(n)).join(", ")+" {"+a.join(" ")+"}")}for(let e in t)s(r(e),t[e],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let t=i[r]||1;return i[r]=t+1,"ͼ"+t.toString(36)}static mount(t,e,n){let r=t[s],i=n&&n.nonce;r?i&&r.setNonce(i):r=new l(t,i),r.mount(Array.isArray(e)?e:[e])}}let a=new Map;class l{constructor(t,e){let n=t.ownerDocument||t,r=n.defaultView;if(!t.head&&t.adoptedStyleSheets&&r.CSSStyleSheet){let e=a.get(n);if(e)return t.adoptedStyleSheets=[e.sheet,...t.adoptedStyleSheets],t[s]=e;this.sheet=new r.CSSStyleSheet,t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets],a.set(n,this)}else{this.styleTag=n.createElement("style"),e&&this.styleTag.setAttribute("nonce",e);let r=t.head||t;r.insertBefore(this.styleTag,r.firstChild)}this.modules=[],t[s]=this}mount(t){let e=this.sheet,n=0,r=0;for(let s=0;s<t.length;s++){let i=t[s],o=this.modules.indexOf(i);if(o<r&&o>-1&&(this.modules.splice(o,1),r--,o=-1),-1==o){if(this.modules.splice(r++,0,i),e)for(let t=0;t<i.rules.length;t++)e.insertRule(i.rules[t],n++)}else{for(;r<o;)n+=this.modules[r++].rules.length;n+=i.rules.length,r++}}if(!e){let t="";for(let e=0;e<this.modules.length;e++)t+=this.modules[e].getRules()+"\n";this.styleTag.textContent=t}}setNonce(t){this.styleTag&&this.styleTag.getAttribute("nonce")!=t&&this.styleTag.setAttribute("nonce",t)}}}}]);
|
notebook/static/1647.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[1647,2167],{51647:(t,e,o)=>{o.r(e),o.d(e,{ITooltipManager:()=>s,Tooltip:()=>a});const s=new(o(20998).Token)("@jupyterlab/tooltip:ITooltipManager","A service for the tooltip manager for the application. Use this to allow your extension to invoke a tooltip.");var i=o(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[1647,2167],{51647:(t,e,o)=>{o.r(e),o.d(e,{ITooltipManager:()=>s,Tooltip:()=>a});const s=new(o(20998).Token)("@jupyterlab/tooltip:ITooltipManager","A service for the tooltip manager for the application. Use this to allow your extension to invoke a tooltip.");var i=o(12668),n=o(50102),r=o(63485);const d="jp-mod-tooltip",h=!0;class a extends r.Widget{constructor(t){super(),this._content=null;const e=this.layout=new r.PanelLayout,o=new n.MimeModel({data:t.bundle});this.anchor=t.anchor,this.addClass("jp-Tooltip"),this.hide(),this._editor=t.editor,this._position=t.position,this._rendermime=t.rendermime;const s=this._rendermime.preferredMimeType(t.bundle,"any");s&&(this._content=this._rendermime.createRenderer(s),this._content.renderModel(o).then((()=>this._setGeometry())).catch((t=>console.error("tooltip rendering failed",t))),this._content.addClass("jp-Tooltip-content"),e.addWidget(this._content))}dispose(){this._content&&(this._content.dispose(),this._content=null),super.dispose()}handleEvent(t){if(this.isHidden||this.isDisposed)return;const{node:e}=this,o=t.target;switch(t.type){case"keydown":if(e.contains(o))return;this.dispose();break;case"mousedown":if(e.contains(o))return void this.activate();this.dispose();break;case"scroll":this._evtScroll(t)}}onActivateRequest(t){this.node.tabIndex=0,this.node.focus()}onAfterAttach(t){document.body.classList.add(d),document.addEventListener("keydown",this,h),document.addEventListener("mousedown",this,h),this.anchor.node.addEventListener("scroll",this,h),this.update()}onBeforeDetach(t){document.body.classList.remove(d),document.removeEventListener("keydown",this,h),document.removeEventListener("mousedown",this,h),this.anchor.node.removeEventListener("scroll",this,h)}onUpdateRequest(t){this.isHidden&&this.show(),this._setGeometry(),super.onUpdateRequest(t)}_evtScroll(t){this.node.contains(t.target)||this.update()}_getTokenPosition(){const t=this._editor,e=t.getCursorPosition(),o=t.getOffsetAt(e),s=t.getLine(e.line);if(!s)return;const i=s.substring(0,o).split(/\W+/),n=i[i.length-1],r=n?o-n.length:o;return t.getPositionAt(r)}_setGeometry(){const t=this._position?this._position:this._getTokenPosition();if(!t)return;const e=this._editor,o=e.getCoordinateForPosition(t);if(!o)return;const s=window.getComputedStyle(this.node),n=parseInt(s.paddingLeft,10)||0,r=e.host.closest(".jp-MainAreaWidget > .lm-Widget")||e.host;i.HoverBox.setGeometry({anchor:o,host:r,maxHeight:250,minHeight:20,node:this.node,offset:{horizontal:-1*n},privilege:"below",outOfViewDisplay:{top:"stick-inside",bottom:"stick-inside"},style:s})}}}}]);
|
notebook/static/1650.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[1650,8875],{71650:(e,t,o)=>{o.r(t),o.d(t,{default:()=>s});var n=o(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[1650,8875],{71650:(e,t,o)=>{o.r(t),o.d(t,{default:()=>s});var n=o(44548),a=o(94624),i=o(97373),d=o(81997);const s=[{id:"@jupyter-notebook/docmanager-extension:opener",autoStart:!0,optional:[i.INotebookPathOpener,i.INotebookShell],provides:a.IDocumentWidgetOpener,description:"Open documents in a new browser tab",activate:(e,t,o)=>{const a=n.PageConfig.getBaseUrl(),s=e.docRegistry,r=null!=t?t:i.defaultNotebookPathOpener;let l=0;return new class{constructor(){this._opened=new d.Signal(this)}async open(t,i){var d,c,u;const p=null!==(d=null==i?void 0:i.type)&&void 0!==d?d:"",h=null==i?void 0:i.ref,v=null===(u=null===(c=null==o?void 0:o.userLayout)||void 0===c?void 0:c[p])||void 0===u?void 0:u.area;if("_noref"!==h&&void 0===v){const e=t.context.path,o=n.PathExt.extname(e);let i,d="edit";return("default"===p&&".ipynb"===o||p.includes("Notebook"))&&(t.context.sessionContext.kernelPreference.name&&await t.context.save(),d="notebooks"),p!==s.defaultWidgetFactory(e).name&&(i=new URLSearchParams({factory:p})),r.open({prefix:n.URLExt.join(a,d),path:e,searchParams:i}),void t.dispose()}t.id||(t.id="document-manager-"+ ++l),t.title.dataset={type:"document-title",...t.title.dataset},t.isAttached||e.shell.add(t,"main",i||{}),e.shell.activateById(t.id),this._opened.emit(t)}get opened(){return this._opened}}}}]}}]);
|
notebook/static/1684.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[1684,5601],{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([[1684,5601],{95601:(e,t,n)=>{n.r(t),n.d(t,{default:()=>l});var a=n(27961),o=n(44548),i=n(75467),r=n(97373),s=n(33625);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]}}]);
|
notebook/static/1809.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[1809],{1809:(t,e,s)=>{s.r(e),s.d(e,{IRunningSessionManagers:()=>C,IRunningSessionSidebar:()=>y,RunningSessionManagers:()=>I,RunningSessions:()=>L,SearchableSessions:()=>D,SearchableSessionsList:()=>B});var n=s(72703),i=s(70858),a=s(95291),o=s(20998),l=s(2549),r=s(18395),d=s(81997),h=s(63485),c=s(78156),u=s.n(c);const g="jp-RunningSessions",p="jp-RunningSessions-sectionList",_="jp-RunningSessions-item",m="jp-RunningSessions-itemLabel",w="jp-RunningSessions-itemDetail",b="jp-RunningSessions-itemShutdown",f="jp-RunningSessions-caret",S="jp-RunningSessions-icon",v="jp-running-sessions",C=new o.Token("@jupyterlab/running:IRunningSessionManagers","A service to add running session managers."),y=new o.Token("@jupyterlab/running:IRunningSessionsSidebar","A token allowing to modify the running sessions sidebar.");class I{constructor(){this._added=new d.Signal(this),this._managers=[]}get added(){return this._added}add(t){return this._managers.push(t),this._added.emit(t),new l.DisposableDelegate((()=>{const e=this._managers.indexOf(t);e>-1&&this._managers.splice(e,1)}))}items(){return this._managers}}function T(t){var e,s;const{runningItem:n}=t,o=[_],l=null===(e=n.detail)||void 0===e?void 0:e.call(n),r=n.icon(),d=n.labelTitle?n.labelTitle():"",h=t.translator||i.nullTranslator,c=h.load("jupyterlab");let g=!1;const p=t.shutdownItemIcon||a.closeIcon,v=null!==(s="function"==typeof t.shutdownLabel?t.shutdownLabel(n):t.shutdownLabel)&&void 0!==s?s:c.__("Shut Down"),C=n.children,[y,I]=u().useState(!1),T=!!(null==C?void 0:C.length),E=T?()=>!g&&I(!y):void 0;return t.collapseToggled.connect(((t,e)=>I(e))),n.className&&o.push(n.className),t.child&&o.push("jp-mod-running-child"),t.child&&!C&&o.push("jp-mod-running-leaf"),u().createElement(u().Fragment,null,u().createElement("li",null,u().createElement("div",{className:o.join(" "),onClick:E,"data-context":n.context||""},T&&(y?u().createElement(a.caretRightIcon.react,{tag:"span",className:f}):u().createElement(a.caretDownIcon.react,{tag:"span",className:f})),r?"string"==typeof r?u().createElement("img",{src:r,className:S}):u().createElement(r.react,{tag:"span",className:S}):void 0,u().createElement("span",{className:m,title:d,onClick:n.open&&(()=>n.open())},n.label()),l&&u().createElement("span",{className:w},l),n.shutdown&&u().createElement(a.ToolbarButtonComponent,{className:b,icon:p,onClick:()=>{var t;g=!0,null===(t=n.shutdown)||void 0===t||t.call(n)},tooltip:v})),T&&!y&&u().createElement(j,{child:!0,runningItems:C,shutdownItemIcon:p,translator:h,collapseToggled:t.collapseToggled})))}function j(t){const e=t.filter,s=e?t.runningItems.map((t=>({item:t,score:e(t)}))).filter((({score:t})=>null!==t)).sort(((t,e)=>t.score.score-e.score.score)).map((({item:t})=>t)):t.runningItems;return u().createElement("ul",{className:p},s.map(((e,s)=>u().createElement(T,{child:t.child,key:s,runningItem:e,shutdownLabel:t.shutdownLabel,shutdownItemIcon:t.shutdownItemIcon,translator:t.translator,collapseToggled:t.collapseToggled}))))}class E extends a.ReactWidget{constructor(t){super(),this._filterFn=t=>({score:0}),this._filterChanged=new d.Signal(this),this.filter=this.filter.bind(this),this._updateFilter=this._updateFilter.bind(this),this._trans=t.load("jupyterlab"),this.addClass("jp-SearchableSessions-filter")}get filterChanged(){return this._filterChanged}render(){return u().createElement(a.FilterBox,{placeholder:this._trans.__("Search"),updateFilter:this._updateFilter,useFuzzyFilter:!1,caseSensitive:!1})}filter(t){var e;const s=[this._getTextContent(t.label())];for(const n of null!==(e=t.children)&&void 0!==e?e:[])s.push(this._getTextContent(n.label()));return this._filterFn(s.join(" "))}_getTextContent(t){return"string"==typeof t?t:"number"==typeof t||"boolean"==typeof t?""+t:Array.isArray(t)?t.map((t=>this._getTextContent(t))).join(" "):t&&(0,c.isValidElement)(t)?t.props.children.map((t=>this._getTextContent(t))).join(" "):""}_updateFilter(t){this._filterFn=t,this._filterChanged.emit()}}class x extends a.ReactWidget{constructor(t){super(),this._options=t,this._update=new d.Signal(this),t.manager.runningChanged.connect(this._emitUpdate,this),t.filterProvider&&t.filterProvider.filterChanged.connect(this._emitUpdate,this)}dispose(){d.Signal.clearData(this),super.dispose()}onBeforeShow(t){super.onBeforeShow(t),this._update.emit()}render(){const t=this._options;let e=!0;return u().createElement(a.UseSignal,{signal:this._update},(()=>{var s;return e?e=!1:t.runningItems=t.manager.running(),u().createElement("div",{className:"jp-RunningSessions-sectionContainer"},u().createElement(j,{runningItems:t.runningItems,shutdownLabel:t.manager.shutdownLabel,shutdownItemIcon:t.manager.shutdownItemIcon,filter:null===(s=t.filterProvider)||void 0===s?void 0:s.filter,translator:t.translator,collapseToggled:t.collapseToggled}))}))}_isAnyHidden(){let t=this.isHidden;if(t)return t;let e=this.parent;for(;null!=e;){if(e.isHidden){t=!0;break}e=e.parent}return t}_emitUpdate(){this._isAnyHidden()||this._update.emit()}}class A extends a.PanelWithToolbar{constructor(t){super(),this._buttons=null,this._listView=!1,this._collapseToggled=new d.Signal(this),this._viewChanged=new d.Signal(this),this._manager=t.manager,this._filterProvider=t.filterProvider;const e=t.translator||i.nullTranslator;this._trans=e.load("jupyterlab"),this.addClass("jp-RunningSessions-section"),this.title.label=t.manager.name,this._manager.runningChanged.connect(this._onListChanged,this),t.filterProvider&&t.filterProvider.filterChanged.connect(this._onListChanged,this),this._updateEmptyClass();let s=t.manager.running();!1!==t.showToolbar&&this._initializeToolbar(s),this.addWidget(new x({runningItems:s,collapseToggled:this._collapseToggled,...t}))}toggleListView(t){const e=void 0!==t?t:!this._listView;this._listView=e,this._buttons&&(this._buttons["switch-view"].pressed=e),this._collapseToggled.emit(!1),this.toggleClass("jp-mod-running-list-view",e),this._updateButtons(),this._viewChanged.emit({mode:e?"list":"tree"})}dispose(){this.isDisposed||(d.Signal.clearData(this),super.dispose())}get _shutdownAllLabel(){return this._manager.shutdownAllLabel||this._trans.__("Shut Down All")}_initializeToolbar(t){const e=t.length>0,s=this._shutdownAllLabel,i=`${s}?`,o=this._manager.shutdownAllConfirmationText||`${s} ${this._manager.name}`,l=new a.ToolbarButton({label:s,className:"jp-RunningSessions-shutdownAll"+(e?"":" jp-mod-disabled"),enabled:e,onClick:(()=>{(0,n.showDialog)({title:i,body:o,buttons:[n.Dialog.cancelButton(),n.Dialog.warnButton({label:s})]}).then((t=>{t.button.accept&&this._manager.shutdownAll()}))}).bind(this)}),r=new a.ToolbarButton({className:"jp-RunningSessions-viewButton",enabled:e,icon:a.tableRowsIcon,pressedIcon:a.treeViewIcon,onClick:()=>this.toggleListView(),tooltip:this._trans.__("Switch to List View"),pressedTooltip:this._trans.__("Switch to Tree View")}),d=new a.ToolbarButton({className:"jp-RunningSessions-collapseButton",enabled:e,icon:a.collapseAllIcon,pressedIcon:a.expandAllIcon,onClick:()=>{const t=!d.pressed;this._collapseToggled.emit(t),d.pressed=t},tooltip:this._trans.__("Collapse All"),pressedTooltip:this._trans.__("Expand All")});this._buttons={"switch-view":r,"collapse-expand":d,"shutdown-all":l},this._updateButtons(),this._manager.runningChanged.connect(this._updateButtons,this);for(const t of["collapse-expand","switch-view","shutdown-all"])this.toolbar.addItem(t,this._buttons[t]);this.toolbar.addClass("jp-RunningSessions-toolbar")}_onListChanged(){this._updateButtons(),this._updateEmptyClass()}_updateEmptyClass(){this._filterProvider&&(0===this._manager.running().filter(this._filterProvider.filter).length?this.node.classList.toggle("jp-mod-empty",!0):this.node.classList.toggle("jp-mod-empty",!1))}get viewChanged(){return this._viewChanged}_updateButtons(){if(!this._buttons)return;let t=this._manager.running();const e=t.length>0,s=0!==t.filter((t=>t.children)).length,n=s&&!this._buttons["switch-view"].pressed;this._buttons["switch-view"].node.style.display=s?"block":"none",this._buttons["collapse-expand"].node.style.display=n?"block":"none",this._buttons["collapse-expand"].enabled=e,this._buttons["switch-view"].enabled=e,this._buttons["shutdown-all"].enabled=e}}class L extends a.SidePanel{constructor(t,e,s){super(),this.managers=t,this._stateDB=null!=s?s:null,this.translator=null!=e?e:i.nullTranslator;const n=this.translator.load("jupyterlab");this.addClass(g),this.toolbar.addItem("refresh",new a.ToolbarButton({tooltip:n.__("Refresh List"),icon:a.refreshIcon,onClick:()=>t.items().forEach((t=>t.refreshRunning()))})),t.items().forEach((e=>this.addSection(t,e))),t.added.connect(this.addSection,this)}dispose(){this.isDisposed||(this.managers.added.disconnect(this.addSection,this),super.dispose())}async addSection(t,e){const s=new A({manager:e,translator:this.translator});this.addWidget(s);const n=(await this._getState()).listViewSections,i=e.name;n&&n.includes(i)&&s.toggleListView(!0),s.viewChanged.connect((async(t,e)=>{await this._updateState(i,e.mode)}))}async _updateState(t,e){var s;let n=null!==(s=(await this._getState()).listViewSections)&&void 0!==s?s:[];"list"!==e||n.includes(t)?n=n.filter((e=>e!==t)):n.push(t);const i={listViewSections:n};this._stateDB&&await this._stateDB.save(v,i)}async _getState(){var t;return this._stateDB&&null!==(t=await this._stateDB.fetch(v))&&void 0!==t?t:{}}}class R extends A{constructor(t){super(t);const e=document.createElement("h3");e.className="jp-SearchableSessions-title";const s=e.appendChild(document.createElement("span"));s.className="jp-SearchableSessions-titleLabel",s.textContent=this.title.label,this.node.insertAdjacentElement("afterbegin",e)}}class k extends h.Widget{constructor(t){super();const e=t.load("jupyterlab");this.addClass("jp-SearchableSessions-emptyIndicator"),this.node.textContent=e.__("No matches")}}class D extends h.Panel{constructor(t,e){super(),this._activeIndex=0,this._translator=null!=e?e:i.nullTranslator,this.addClass(g),this.addClass("jp-SearchableSessions"),this._filterWidget=new E(this._translator),this.addWidget(this._filterWidget),this._list=new B(t,this._filterWidget,e),this.addWidget(this._list),this._filterWidget.filterChanged.connect((()=>{this._activeIndex=0,this._updateActive(0)}),this)}dispose(){this.isDisposed||(d.Signal.clearData(this),super.dispose())}getValue(){const t=[...this.node.querySelectorAll("."+m)];t[Math.min(Math.max(this._activeIndex,0),t.length-1)].click()}handleEvent(t){"keydown"===t.type&&this._evtKeydown(t)}onAfterAttach(t){this._forceFocusInput(),this.node.addEventListener("keydown",this),setTimeout((()=>{this._updateActive(0)}),0)}onAfterDetach(t){this.node.removeEventListener("keydown",this)}_forceFocusInput(){var t;null===(t=this._filterWidget.renderPromise)||void 0===t||t.then((()=>{var t;const e=this._filterWidget.node.querySelector("jp-search"),s=null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.querySelector("input");s?s.focus():console.warn("Input element not found, cannot focus")})).catch(console.warn)}_evtKeydown(t){if("ArrowDown"===t.key||"ArrowUp"===t.key){const e="ArrowDown"===t.key?1:-1;this._updateActive(e)&&t.preventDefault()}}_updateActive(t){const e=[...this.node.querySelectorAll("."+_)].filter((t=>t.checkVisibility()));if(!e.length)return!1;for(const t of e)t.classList.contains("jp-mod-active")&&t.classList.toggle("jp-mod-active",!1);const s=this._activeIndex;let n=null;return n=-1===s?1===t?0:e.length-1:Math.min(Math.max(s+t,0),e.length-1),null!==n&&(e[n].classList.add("jp-mod-active"),r.ElementExt.scrollIntoViewIfNeeded(this._list.node,e[n]),this._activeIndex=n,!0)}}class B extends h.Panel{constructor(t,e,s){super(),this._managers=t,this._translator=null!=s?s:i.nullTranslator,this._filterWidget=e,this.addClass("jp-SearchableSessions-list"),this._emptyIndicator=new k(this._translator),this.addWidget(this._emptyIndicator),t.items().forEach((e=>this.addSection(t,e))),t.added.connect(this.addSection,this)}dispose(){this.isDisposed||(this._managers.added.disconnect(this.addSection,this),super.dispose())}addSection(t,e){const s=new R({manager:e,translator:this._translator,showToolbar:!1,filterProvider:this._filterWidget});s.toggleListView(!0),this.addWidget(s),this.addWidget(this._emptyIndicator)}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[1809],{1809:(t,e,s)=>{s.r(e),s.d(e,{IRunningSessionManagers:()=>C,IRunningSessionSidebar:()=>y,RunningSessionManagers:()=>I,RunningSessions:()=>L,SearchableSessions:()=>D,SearchableSessionsList:()=>B});var n=s(15465),i=s(25291),a=s(12668),o=s(20998),l=s(2549),r=s(18395),d=s(81997),h=s(63485),c=s(78156),u=s.n(c);const g="jp-RunningSessions",p="jp-RunningSessions-sectionList",_="jp-RunningSessions-item",m="jp-RunningSessions-itemLabel",w="jp-RunningSessions-itemDetail",b="jp-RunningSessions-itemShutdown",f="jp-RunningSessions-caret",S="jp-RunningSessions-icon",v="jp-running-sessions",C=new o.Token("@jupyterlab/running:IRunningSessionManagers","A service to add running session managers."),y=new o.Token("@jupyterlab/running:IRunningSessionsSidebar","A token allowing to modify the running sessions sidebar.");class I{constructor(){this._added=new d.Signal(this),this._managers=[]}get added(){return this._added}add(t){return this._managers.push(t),this._added.emit(t),new l.DisposableDelegate((()=>{const e=this._managers.indexOf(t);e>-1&&this._managers.splice(e,1)}))}items(){return this._managers}}function T(t){var e,s;const{runningItem:n}=t,o=[_],l=null===(e=n.detail)||void 0===e?void 0:e.call(n),r=n.icon(),d=n.labelTitle?n.labelTitle():"",h=t.translator||i.nullTranslator,c=h.load("jupyterlab");let g=!1;const p=t.shutdownItemIcon||a.closeIcon,v=null!==(s="function"==typeof t.shutdownLabel?t.shutdownLabel(n):t.shutdownLabel)&&void 0!==s?s:c.__("Shut Down"),C=n.children,[y,I]=u().useState(!1),T=!!(null==C?void 0:C.length),E=T?()=>!g&&I(!y):void 0;return t.collapseToggled.connect(((t,e)=>I(e))),n.className&&o.push(n.className),t.child&&o.push("jp-mod-running-child"),t.child&&!C&&o.push("jp-mod-running-leaf"),u().createElement(u().Fragment,null,u().createElement("li",null,u().createElement("div",{className:o.join(" "),onClick:E,"data-context":n.context||""},T&&(y?u().createElement(a.caretRightIcon.react,{tag:"span",className:f}):u().createElement(a.caretDownIcon.react,{tag:"span",className:f})),r?"string"==typeof r?u().createElement("img",{src:r,className:S}):u().createElement(r.react,{tag:"span",className:S}):void 0,u().createElement("span",{className:m,title:d,onClick:n.open&&(()=>n.open())},n.label()),l&&u().createElement("span",{className:w},l),n.shutdown&&u().createElement(a.ToolbarButtonComponent,{className:b,icon:p,onClick:()=>{var t;g=!0,null===(t=n.shutdown)||void 0===t||t.call(n)},tooltip:v})),T&&!y&&u().createElement(j,{child:!0,runningItems:C,shutdownItemIcon:p,translator:h,collapseToggled:t.collapseToggled})))}function j(t){const e=t.filter,s=e?t.runningItems.map((t=>({item:t,score:e(t)}))).filter((({score:t})=>null!==t)).sort(((t,e)=>t.score.score-e.score.score)).map((({item:t})=>t)):t.runningItems;return u().createElement("ul",{className:p},s.map(((e,s)=>u().createElement(T,{child:t.child,key:s,runningItem:e,shutdownLabel:t.shutdownLabel,shutdownItemIcon:t.shutdownItemIcon,translator:t.translator,collapseToggled:t.collapseToggled}))))}class E extends a.ReactWidget{constructor(t){super(),this._filterFn=t=>({score:0}),this._filterChanged=new d.Signal(this),this.filter=this.filter.bind(this),this._updateFilter=this._updateFilter.bind(this),this._trans=t.load("jupyterlab"),this.addClass("jp-SearchableSessions-filter")}get filterChanged(){return this._filterChanged}render(){return u().createElement(a.FilterBox,{placeholder:this._trans.__("Search"),updateFilter:this._updateFilter,useFuzzyFilter:!1,caseSensitive:!1})}filter(t){var e;const s=[this._getTextContent(t.label())];for(const n of null!==(e=t.children)&&void 0!==e?e:[])s.push(this._getTextContent(n.label()));return this._filterFn(s.join(" "))}_getTextContent(t){return"string"==typeof t?t:"number"==typeof t||"boolean"==typeof t?""+t:Array.isArray(t)?t.map((t=>this._getTextContent(t))).join(" "):t&&(0,c.isValidElement)(t)?t.props.children.map((t=>this._getTextContent(t))).join(" "):""}_updateFilter(t){this._filterFn=t,this._filterChanged.emit()}}class x extends a.ReactWidget{constructor(t){super(),this._options=t,this._update=new d.Signal(this),t.manager.runningChanged.connect(this._emitUpdate,this),t.filterProvider&&t.filterProvider.filterChanged.connect(this._emitUpdate,this)}dispose(){d.Signal.clearData(this),super.dispose()}onBeforeShow(t){super.onBeforeShow(t),this._update.emit()}render(){const t=this._options;let e=!0;return u().createElement(a.UseSignal,{signal:this._update},(()=>{var s;return e?e=!1:t.runningItems=t.manager.running(),u().createElement("div",{className:"jp-RunningSessions-sectionContainer"},u().createElement(j,{runningItems:t.runningItems,shutdownLabel:t.manager.shutdownLabel,shutdownItemIcon:t.manager.shutdownItemIcon,filter:null===(s=t.filterProvider)||void 0===s?void 0:s.filter,translator:t.translator,collapseToggled:t.collapseToggled}))}))}_isAnyHidden(){let t=this.isHidden;if(t)return t;let e=this.parent;for(;null!=e;){if(e.isHidden){t=!0;break}e=e.parent}return t}_emitUpdate(){this._isAnyHidden()||this._update.emit()}}class A extends a.PanelWithToolbar{constructor(t){super(),this._buttons=null,this._listView=!1,this._collapseToggled=new d.Signal(this),this._viewChanged=new d.Signal(this),this._manager=t.manager,this._filterProvider=t.filterProvider;const e=t.translator||i.nullTranslator;this._trans=e.load("jupyterlab"),this.addClass("jp-RunningSessions-section"),this.title.label=t.manager.name,this._manager.runningChanged.connect(this._onListChanged,this),t.filterProvider&&t.filterProvider.filterChanged.connect(this._onListChanged,this),this._updateEmptyClass();let s=t.manager.running();!1!==t.showToolbar&&this._initializeToolbar(s),this.addWidget(new x({runningItems:s,collapseToggled:this._collapseToggled,...t}))}toggleListView(t){const e=void 0!==t?t:!this._listView;this._listView=e,this._buttons&&(this._buttons["switch-view"].pressed=e),this._collapseToggled.emit(!1),this.toggleClass("jp-mod-running-list-view",e),this._updateButtons(),this._viewChanged.emit({mode:e?"list":"tree"})}dispose(){this.isDisposed||(d.Signal.clearData(this),super.dispose())}get _shutdownAllLabel(){return this._manager.shutdownAllLabel||this._trans.__("Shut Down All")}_initializeToolbar(t){const e=t.length>0,s=this._shutdownAllLabel,i=`${s}?`,o=this._manager.shutdownAllConfirmationText||`${s} ${this._manager.name}`,l=new a.ToolbarButton({label:s,className:"jp-RunningSessions-shutdownAll"+(e?"":" jp-mod-disabled"),enabled:e,onClick:(()=>{(0,n.showDialog)({title:i,body:o,buttons:[n.Dialog.cancelButton(),n.Dialog.warnButton({label:s})]}).then((t=>{t.button.accept&&this._manager.shutdownAll()}))}).bind(this)}),r=new a.ToolbarButton({className:"jp-RunningSessions-viewButton",enabled:e,icon:a.tableRowsIcon,pressedIcon:a.treeViewIcon,onClick:()=>this.toggleListView(),tooltip:this._trans.__("Switch to List View"),pressedTooltip:this._trans.__("Switch to Tree View")}),d=new a.ToolbarButton({className:"jp-RunningSessions-collapseButton",enabled:e,icon:a.collapseAllIcon,pressedIcon:a.expandAllIcon,onClick:()=>{const t=!d.pressed;this._collapseToggled.emit(t),d.pressed=t},tooltip:this._trans.__("Collapse All"),pressedTooltip:this._trans.__("Expand All")});this._buttons={"switch-view":r,"collapse-expand":d,"shutdown-all":l},this._updateButtons(),this._manager.runningChanged.connect(this._updateButtons,this);for(const t of["collapse-expand","switch-view","shutdown-all"])this.toolbar.addItem(t,this._buttons[t]);this.toolbar.addClass("jp-RunningSessions-toolbar")}_onListChanged(){this._updateButtons(),this._updateEmptyClass()}_updateEmptyClass(){this._filterProvider&&(0===this._manager.running().filter(this._filterProvider.filter).length?this.node.classList.toggle("jp-mod-empty",!0):this.node.classList.toggle("jp-mod-empty",!1))}get viewChanged(){return this._viewChanged}_updateButtons(){if(!this._buttons)return;let t=this._manager.running();const e=t.length>0,s=0!==t.filter((t=>t.children)).length,n=s&&!this._buttons["switch-view"].pressed;this._buttons["switch-view"].node.style.display=s?"block":"none",this._buttons["collapse-expand"].node.style.display=n?"block":"none",this._buttons["collapse-expand"].enabled=e,this._buttons["switch-view"].enabled=e,this._buttons["shutdown-all"].enabled=e}}class L extends a.SidePanel{constructor(t,e,s){super(),this.managers=t,this._stateDB=null!=s?s:null,this.translator=null!=e?e:i.nullTranslator;const n=this.translator.load("jupyterlab");this.addClass(g),this.toolbar.addItem("refresh",new a.ToolbarButton({tooltip:n.__("Refresh List"),icon:a.refreshIcon,onClick:()=>t.items().forEach((t=>t.refreshRunning()))})),t.items().forEach((e=>this.addSection(t,e))),t.added.connect(this.addSection,this)}dispose(){this.isDisposed||(this.managers.added.disconnect(this.addSection,this),super.dispose())}async addSection(t,e){const s=new A({manager:e,translator:this.translator});this.addWidget(s);const n=(await this._getState()).listViewSections,i=e.name;n&&n.includes(i)&&s.toggleListView(!0),s.viewChanged.connect((async(t,e)=>{await this._updateState(i,e.mode)}))}async _updateState(t,e){var s;let n=null!==(s=(await this._getState()).listViewSections)&&void 0!==s?s:[];"list"!==e||n.includes(t)?n=n.filter((e=>e!==t)):n.push(t);const i={listViewSections:n};this._stateDB&&await this._stateDB.save(v,i)}async _getState(){var t;return this._stateDB&&null!==(t=await this._stateDB.fetch(v))&&void 0!==t?t:{}}}class R extends A{constructor(t){super(t);const e=document.createElement("h3");e.className="jp-SearchableSessions-title";const s=e.appendChild(document.createElement("span"));s.className="jp-SearchableSessions-titleLabel",s.textContent=this.title.label,this.node.insertAdjacentElement("afterbegin",e)}}class k extends h.Widget{constructor(t){super();const e=t.load("jupyterlab");this.addClass("jp-SearchableSessions-emptyIndicator"),this.node.textContent=e.__("No matches")}}class D extends h.Panel{constructor(t,e){super(),this._activeIndex=0,this._translator=null!=e?e:i.nullTranslator,this.addClass(g),this.addClass("jp-SearchableSessions"),this._filterWidget=new E(this._translator),this.addWidget(this._filterWidget),this._list=new B(t,this._filterWidget,e),this.addWidget(this._list),this._filterWidget.filterChanged.connect((()=>{this._activeIndex=0,this._updateActive(0)}),this)}dispose(){this.isDisposed||(d.Signal.clearData(this),super.dispose())}getValue(){const t=[...this.node.querySelectorAll("."+m)];t[Math.min(Math.max(this._activeIndex,0),t.length-1)].click()}handleEvent(t){"keydown"===t.type&&this._evtKeydown(t)}onAfterAttach(t){this._forceFocusInput(),this.node.addEventListener("keydown",this),setTimeout((()=>{this._updateActive(0)}),0)}onAfterDetach(t){this.node.removeEventListener("keydown",this)}_forceFocusInput(){var t;null===(t=this._filterWidget.renderPromise)||void 0===t||t.then((()=>{var t;const e=this._filterWidget.node.querySelector("jp-search"),s=null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.querySelector("input");s?s.focus():console.warn("Input element not found, cannot focus")})).catch(console.warn)}_evtKeydown(t){if("ArrowDown"===t.key||"ArrowUp"===t.key){const e="ArrowDown"===t.key?1:-1;this._updateActive(e)&&t.preventDefault()}}_updateActive(t){const e=[...this.node.querySelectorAll("."+_)].filter((t=>t.checkVisibility()));if(!e.length)return!1;for(const t of e)t.classList.contains("jp-mod-active")&&t.classList.toggle("jp-mod-active",!1);const s=this._activeIndex;let n=null;return n=-1===s?1===t?0:e.length-1:Math.min(Math.max(s+t,0),e.length-1),null!==n&&(e[n].classList.add("jp-mod-active"),r.ElementExt.scrollIntoViewIfNeeded(this._list.node,e[n]),this._activeIndex=n,!0)}}class B extends h.Panel{constructor(t,e,s){super(),this._managers=t,this._translator=null!=s?s:i.nullTranslator,this._filterWidget=e,this.addClass("jp-SearchableSessions-list"),this._emptyIndicator=new k(this._translator),this.addWidget(this._emptyIndicator),t.items().forEach((e=>this.addSection(t,e))),t.added.connect(this.addSection,this)}dispose(){this.isDisposed||(this._managers.added.disconnect(this.addSection,this),super.dispose())}addSection(t,e){const s=new R({manager:e,translator:this._translator,showToolbar:!1,filterProvider:this._filterWidget});s.toggleListView(!0),this.addWidget(s),this.addWidget(this._emptyIndicator)}}}}]);
|
notebook/static/1827.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[1827],{41827:(e,t,n)=>{n.r(t),n.d(t,{default:()=>y});var r=n(94535),i=n(72703),o=n(21058),a=n(40930),s=n(54509),d=n(99246),l=n(89150),c=n(70858);const h="CSVTable",u="TSVTable";var g;!function(e){e.CSVGoToLine="csv:go-to-line",e.TSVGoToLine="tsv:go-to-line"}(g||(g={}));const _={activate:function(e,t,r,s,d,l,c,u){var m;const{commands:y,shell:p}=e;let C;u&&(u.addFactory(h,"delimiter",(e=>new a.p({widget:e.content,translator:t}))),c&&(C=(0,i.createToolbarFactory)(u,c,h,_.id,t)));const T=t.load("jupyterlab"),v=new o.LT({name:h,label:T.__("CSV Viewer"),fileTypes:["csv"],defaultFor:["csv"],readOnly:!0,toolbarFactory:C,translator:t}),f=new i.WidgetTracker({namespace:"csvviewer"});let b=w.LIGHT_STYLE,S=w.LIGHT_TEXT_CONFIG;r&&r.restore(f,{command:"docmanager:open",args:e=>({path:e.context.path,factory:h}),name:e=>e.context.path}),e.docRegistry.addWidgetFactory(v);const L=e.docRegistry.getFileType("csv");let F=!1;v.widgetCreated.connect((async(e,t)=>{if(f.add(t),t.context.pathChanged.connect((()=>{f.save(t)})),L&&(t.title.icon=L.icon,t.title.iconClass=L.iconClass,t.title.iconLabel=L.iconLabel),l&&!F){const{CSVSearchProvider:e}=await n.e(6017).then(n.bind(n,36017));l.add("csv",e),F=!0}await t.content.ready,t.content.style=b,t.content.rendererConfig=S}));s&&s.themeChanged.connect((()=>{const e=!s||!s.theme||s.isLight(s.theme);b=e?w.LIGHT_STYLE:w.DARK_STYLE,S=e?w.LIGHT_TEXT_CONFIG:w.DARK_TEXT_CONFIG,f.forEach((async e=>{await e.content.ready,e.content.style=b,e.content.rendererConfig=S}))}));const G=()=>null!==f.currentWidget&&f.currentWidget===p.currentWidget;y.addCommand(g.CSVGoToLine,{label:T.__("Go to Line"),execute:async()=>{const e=f.currentWidget;if(null===e)return;const t=await i.InputDialog.getNumber({title:T.__("Go to Line"),value:0});t.button.accept&&null!==t.value&&e.content.goToLine(t.value)},isEnabled:G}),d&&d.editMenu.goToLiners.add({id:g.CSVGoToLine,isEnabled:G});const E=()=>{y.notifyCommandChanged(g.CSVGoToLine)};f.currentChanged.connect(E),null===(m=p.currentChanged)||void 0===m||m.connect(E)},id:"@jupyterlab/csvviewer-extension:csv",description:"Adds viewer for CSV file types",requires:[c.ITranslator],optional:[r.ILayoutRestorer,i.IThemeManager,d.IMainMenu,s.ISearchProviderRegistry,l.ISettingRegistry,i.IToolbarWidgetRegistry],autoStart:!0},m={activate:function(e,t,r,s,d,l,c,h){const{commands:_,shell:y}=e;let p;h&&(h.addFactory(u,"delimiter",(e=>new a.p({widget:e.content,translator:t}))),c&&(p=(0,i.createToolbarFactory)(h,c,u,m.id,t)));const C=t.load("jupyterlab"),T=new o._d({name:u,label:C.__("TSV Viewer"),fileTypes:["tsv"],defaultFor:["tsv"],readOnly:!0,toolbarFactory:p,translator:t}),v=new i.WidgetTracker({namespace:"tsvviewer"});let f=w.LIGHT_STYLE,b=w.LIGHT_TEXT_CONFIG;r&&r.restore(v,{command:"docmanager:open",args:e=>({path:e.context.path,factory:u}),name:e=>e.context.path}),e.docRegistry.addWidgetFactory(T);const S=e.docRegistry.getFileType("tsv");let L=!1;T.widgetCreated.connect((async(e,t)=>{if(v.add(t),t.context.pathChanged.connect((()=>{v.save(t)})),S&&(t.title.icon=S.icon,t.title.iconClass=S.iconClass,t.title.iconLabel=S.iconLabel),l&&!L){const{CSVSearchProvider:e}=await n.e(6017).then(n.bind(n,36017));l.add("tsv",e),L=!0}await t.content.ready,t.content.style=f,t.content.rendererConfig=b}));s&&s.themeChanged.connect((()=>{const e=!s||!s.theme||s.isLight(s.theme);f=e?w.LIGHT_STYLE:w.DARK_STYLE,b=e?w.LIGHT_TEXT_CONFIG:w.DARK_TEXT_CONFIG,v.forEach((async e=>{await e.content.ready,e.content.style=f,e.content.rendererConfig=b}))}));const F=()=>null!==v.currentWidget&&v.currentWidget===y.currentWidget;_.addCommand(g.TSVGoToLine,{label:C.__("Go to Line"),execute:async()=>{const e=v.currentWidget;if(null===e)return;const t=await i.InputDialog.getNumber({title:C.__("Go to Line"),value:0});t.button.accept&&null!==t.value&&e.content.goToLine(t.value)},isEnabled:F}),d&&d.editMenu.goToLiners.add({id:g.TSVGoToLine,isEnabled:F}),v.currentChanged.connect((()=>{_.notifyCommandChanged(g.TSVGoToLine)}))},id:"@jupyterlab/csvviewer-extension:tsv",description:"Adds viewer for TSV file types.",requires:[c.ITranslator],optional:[r.ILayoutRestorer,i.IThemeManager,d.IMainMenu,s.ISearchProviderRegistry,l.ISettingRegistry,i.IToolbarWidgetRegistry],autoStart:!0},y=[_,m];var w;!function(e){e.LIGHT_STYLE={voidColor:"#F3F3F3",backgroundColor:"white",headerBackgroundColor:"#EEEEEE",gridLineColor:"rgba(20, 20, 20, 0.15)",headerGridLineColor:"rgba(20, 20, 20, 0.25)",rowBackgroundColor:e=>e%2==0?"#F5F5F5":"white"},e.DARK_STYLE={voidColor:"black",backgroundColor:"#111111",headerBackgroundColor:"#424242",gridLineColor:"rgba(235, 235, 235, 0.15)",headerGridLineColor:"rgba(235, 235, 235, 0.25)",rowBackgroundColor:e=>e%2==0?"#212121":"#111111"},e.LIGHT_TEXT_CONFIG={textColor:"#111111",matchBackgroundColor:"#FFFFE0",currentMatchBackgroundColor:"#FFFF00",horizontalAlignment:"right"},e.DARK_TEXT_CONFIG={textColor:"#F5F5F5",matchBackgroundColor:"#838423",currentMatchBackgroundColor:"#A3807A",horizontalAlignment:"right"}}(w||(w={}))},40930:(e,t,n)=>{n.d(t,{p:()=>s});var r,i=n(70858),o=n(95291),a=n(63485);class s extends a.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 n=null==(t=t||i.nullTranslator)?void 0:t.load("jupyterlab"),r=[[",",","],[";",";"],["\t",n.__("tab")],["|",n.__("pipe")],["#",n.__("hash")]],a=document.createElement("div"),s=document.createElement("span"),d=document.createElement("select");s.textContent=n.__("Delimiter: "),s.className="jp-CSVDelimiter-label";for(const[t,n]of r){const r=document.createElement("option");r.value=t,r.textContent=n,t===e&&(r.selected=!0),d.appendChild(r)}a.appendChild(s);const l=o.Styling.wrapSelect(d);return l.classList.add("jp-CSVDelimiter-dropdown"),a.appendChild(l),a}}(r||(r={}))},21058:(e,t,n)=>{n.d(t,{A9:()=>u,B0:()=>c,JZ:()=>h,LT:()=>_,_d:()=>m,kw:()=>g});var r,i=n(65848),o=n(89945),a=n(20998),s=n(81997),d=n(63485),l=n(40930);class c{}class h{constructor(e){this._looping=!0,this._changed=new s.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:n,column:r})=>this._query&&t.match(this._query)?this._row===n&&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 n=this._grid.dataModel,r=n.rowCount("body"),i=n.columnCount("body");this._query!==e&&(this._row=0,this._column=-1),this._query=e;const o=this._grid.scrollY/this._grid.defaultSizes.rowHeight,a=(this._grid.scrollY+this._grid.pageHeight)/this._grid.defaultSizes.rowHeight,s=this._grid.scrollX/this._grid.defaultSizes.columnHeaderHeight,d=(this._grid.scrollX+this._grid.pageWidth)/this._grid.defaultSizes.columnHeaderHeight,l=(e,t)=>e>=o&&e<=a&&t>=s&&t<=d,c=t?-1:1;this._column+=c;for(let o=this._row;t?o>=0:o<r;o+=c){for(let r=this._column;t?r>=0:r<i;r+=c)if(n.data("body",o,r).match(e))return this._changed.emit(void 0),l(o,r)||this._grid.scrollToRow(o),this._row=o,this._column=r,!0;this._column=t?i-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,n=t.rowCount("body"),r=t.columnCount("body");e&&this._row<=0?(this._row=n-1,this._column=r):!e&&this._row>=n-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 a.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:n,DataGrid:o}=await r.ensureDataGrid();this._defaultStyle=o.defaultStyle,this._grid=new o({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 n,this._grid.copyConfig={separator:"\t",format:o.copyFormatGeneric,headers:"all",warningThreshold:1e6},e.addWidget(this._grid),this._searchService=new h(this._grid),this._searchService.changed.connect(this._updateRenderer,this),await this._context.ready,await this._updateGrid(),this._revealed.resolve(void 0),this._monitor=new i.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(),n=this._context.model.toString(),i=this._delimiter,o=this._grid.dataModel,a=this._grid.dataModel=new t({data:n,delimiter:i});this._grid.selectionModel=new e({dataModel:a}),o&&o.dispose()}async _updateRenderer(){if(null===this._baseRenderer)return;const{TextRenderer:e}=await r.ensureDataGrid(),t=this._baseRenderer,n=new e({textColor:t.textColor,horizontalAlignment:t.horizontalAlignment,backgroundColor:this._searchService.cellBackgroundColorRendererFunc(t)});this._grid.cellRenderers.update({body:n,"column-header":n,"corner-header":n,"row-header":n})}}class g extends o.DocumentWidget{constructor(e){let{content:t,context:n,delimiter:i,reveal:o,...a}=e;t=t||r.createContent(n),o=Promise.all([o,t.revealed]),super({content:t,context:n,reveal:o,...a}),i&&(t.delimiter=i)}setFragment(e){const t=e.split("=");if("#row"!==t[0])return;let n=t[1].split(";")[0];n=n.split("-")[0],this.context.ready.then((()=>{this.content.goToLine(Number(n))}))}}class _ extends o.ABCWidgetFactory{createNewWidget(e){const t=this.translator;return new g({context:e,translator:t})}defaultToolbarFactory(e){return[{name:"delimiter",widget:new l.p({widget:e.content,translator:this.translator})}]}}class m extends _{createNewWidget(e){return new g({context:e,delimiter:"\t",translator:this.translator})}}!function(e){let t=null,r=null;e.ensureDataGrid=async function(){return null==t&&(t=new a.PromiseDelegate,t.resolve(await n.e(9072).then(n.t.bind(n,59072,23)))),t.promise},e.ensureDSVModel=async function(){return null==r&&(r=new a.PromiseDelegate,r.resolve(await Promise.all([n.e(8032),n.e(9072)]).then(n.bind(n,18032)))),r.promise},e.createContent=function(e){return new u({context:e})}}(r||(r={}))}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[1827],{41827:(e,t,n)=>{n.r(t),n.d(t,{default:()=>y});var r=n(27961),i=n(15465),o=n(21058),a=n(40930),s=n(57342),d=n(2646),l=n(87844),c=n(25291);const h="CSVTable",u="TSVTable";var g;!function(e){e.CSVGoToLine="csv:go-to-line",e.TSVGoToLine="tsv:go-to-line"}(g||(g={}));const _={activate:function(e,t,r,s,d,l,c,u){var m;const{commands:y,shell:p}=e;let C;u&&(u.addFactory(h,"delimiter",(e=>new a.p({widget:e.content,translator:t}))),c&&(C=(0,i.createToolbarFactory)(u,c,h,_.id,t)));const T=t.load("jupyterlab"),v=new o.LT({name:h,label:T.__("CSV Viewer"),fileTypes:["csv"],defaultFor:["csv"],readOnly:!0,toolbarFactory:C,translator:t}),f=new i.WidgetTracker({namespace:"csvviewer"});let b=w.LIGHT_STYLE,S=w.LIGHT_TEXT_CONFIG;r&&r.restore(f,{command:"docmanager:open",args:e=>({path:e.context.path,factory:h}),name:e=>e.context.path}),e.docRegistry.addWidgetFactory(v);const L=e.docRegistry.getFileType("csv");let F=!1;v.widgetCreated.connect((async(e,t)=>{if(f.add(t),t.context.pathChanged.connect((()=>{f.save(t)})),L&&(t.title.icon=L.icon,t.title.iconClass=L.iconClass,t.title.iconLabel=L.iconLabel),l&&!F){const{CSVSearchProvider:e}=await n.e(6017).then(n.bind(n,36017));l.add("csv",e),F=!0}await t.content.ready,t.content.style=b,t.content.rendererConfig=S}));s&&s.themeChanged.connect((()=>{const e=!s||!s.theme||s.isLight(s.theme);b=e?w.LIGHT_STYLE:w.DARK_STYLE,S=e?w.LIGHT_TEXT_CONFIG:w.DARK_TEXT_CONFIG,f.forEach((async e=>{await e.content.ready,e.content.style=b,e.content.rendererConfig=S}))}));const G=()=>null!==f.currentWidget&&f.currentWidget===p.currentWidget;y.addCommand(g.CSVGoToLine,{label:T.__("Go to Line"),execute:async()=>{const e=f.currentWidget;if(null===e)return;const t=await i.InputDialog.getNumber({title:T.__("Go to Line"),value:0});t.button.accept&&null!==t.value&&e.content.goToLine(t.value)},isEnabled:G}),d&&d.editMenu.goToLiners.add({id:g.CSVGoToLine,isEnabled:G});const E=()=>{y.notifyCommandChanged(g.CSVGoToLine)};f.currentChanged.connect(E),null===(m=p.currentChanged)||void 0===m||m.connect(E)},id:"@jupyterlab/csvviewer-extension:csv",description:"Adds viewer for CSV file types",requires:[c.ITranslator],optional:[r.ILayoutRestorer,i.IThemeManager,d.IMainMenu,s.ISearchProviderRegistry,l.ISettingRegistry,i.IToolbarWidgetRegistry],autoStart:!0},m={activate:function(e,t,r,s,d,l,c,h){const{commands:_,shell:y}=e;let p;h&&(h.addFactory(u,"delimiter",(e=>new a.p({widget:e.content,translator:t}))),c&&(p=(0,i.createToolbarFactory)(h,c,u,m.id,t)));const C=t.load("jupyterlab"),T=new o._d({name:u,label:C.__("TSV Viewer"),fileTypes:["tsv"],defaultFor:["tsv"],readOnly:!0,toolbarFactory:p,translator:t}),v=new i.WidgetTracker({namespace:"tsvviewer"});let f=w.LIGHT_STYLE,b=w.LIGHT_TEXT_CONFIG;r&&r.restore(v,{command:"docmanager:open",args:e=>({path:e.context.path,factory:u}),name:e=>e.context.path}),e.docRegistry.addWidgetFactory(T);const S=e.docRegistry.getFileType("tsv");let L=!1;T.widgetCreated.connect((async(e,t)=>{if(v.add(t),t.context.pathChanged.connect((()=>{v.save(t)})),S&&(t.title.icon=S.icon,t.title.iconClass=S.iconClass,t.title.iconLabel=S.iconLabel),l&&!L){const{CSVSearchProvider:e}=await n.e(6017).then(n.bind(n,36017));l.add("tsv",e),L=!0}await t.content.ready,t.content.style=f,t.content.rendererConfig=b}));s&&s.themeChanged.connect((()=>{const e=!s||!s.theme||s.isLight(s.theme);f=e?w.LIGHT_STYLE:w.DARK_STYLE,b=e?w.LIGHT_TEXT_CONFIG:w.DARK_TEXT_CONFIG,v.forEach((async e=>{await e.content.ready,e.content.style=f,e.content.rendererConfig=b}))}));const F=()=>null!==v.currentWidget&&v.currentWidget===y.currentWidget;_.addCommand(g.TSVGoToLine,{label:C.__("Go to Line"),execute:async()=>{const e=v.currentWidget;if(null===e)return;const t=await i.InputDialog.getNumber({title:C.__("Go to Line"),value:0});t.button.accept&&null!==t.value&&e.content.goToLine(t.value)},isEnabled:F}),d&&d.editMenu.goToLiners.add({id:g.TSVGoToLine,isEnabled:F}),v.currentChanged.connect((()=>{_.notifyCommandChanged(g.TSVGoToLine)}))},id:"@jupyterlab/csvviewer-extension:tsv",description:"Adds viewer for TSV file types.",requires:[c.ITranslator],optional:[r.ILayoutRestorer,i.IThemeManager,d.IMainMenu,s.ISearchProviderRegistry,l.ISettingRegistry,i.IToolbarWidgetRegistry],autoStart:!0},y=[_,m];var w;!function(e){e.LIGHT_STYLE={voidColor:"#F3F3F3",backgroundColor:"white",headerBackgroundColor:"#EEEEEE",gridLineColor:"rgba(20, 20, 20, 0.15)",headerGridLineColor:"rgba(20, 20, 20, 0.25)",rowBackgroundColor:e=>e%2==0?"#F5F5F5":"white"},e.DARK_STYLE={voidColor:"black",backgroundColor:"#111111",headerBackgroundColor:"#424242",gridLineColor:"rgba(235, 235, 235, 0.15)",headerGridLineColor:"rgba(235, 235, 235, 0.25)",rowBackgroundColor:e=>e%2==0?"#212121":"#111111"},e.LIGHT_TEXT_CONFIG={textColor:"#111111",matchBackgroundColor:"#FFFFE0",currentMatchBackgroundColor:"#FFFF00",horizontalAlignment:"right"},e.DARK_TEXT_CONFIG={textColor:"#F5F5F5",matchBackgroundColor:"#838423",currentMatchBackgroundColor:"#A3807A",horizontalAlignment:"right"}}(w||(w={}))},40930:(e,t,n)=>{n.d(t,{p:()=>s});var r,i=n(25291),o=n(12668),a=n(63485);class s extends a.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 n=null==(t=t||i.nullTranslator)?void 0:t.load("jupyterlab"),r=[[",",","],[";",";"],["\t",n.__("tab")],["|",n.__("pipe")],["#",n.__("hash")]],a=document.createElement("div"),s=document.createElement("span"),d=document.createElement("select");s.textContent=n.__("Delimiter: "),s.className="jp-CSVDelimiter-label";for(const[t,n]of r){const r=document.createElement("option");r.value=t,r.textContent=n,t===e&&(r.selected=!0),d.appendChild(r)}a.appendChild(s);const l=o.Styling.wrapSelect(d);return l.classList.add("jp-CSVDelimiter-dropdown"),a.appendChild(l),a}}(r||(r={}))},21058:(e,t,n)=>{n.d(t,{A9:()=>u,B0:()=>c,JZ:()=>h,LT:()=>_,_d:()=>m,kw:()=>g});var r,i=n(44548),o=n(71120),a=n(20998),s=n(81997),d=n(63485),l=n(40930);class c{}class h{constructor(e){this._looping=!0,this._changed=new s.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:n,column:r})=>this._query&&t.match(this._query)?this._row===n&&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 n=this._grid.dataModel,r=n.rowCount("body"),i=n.columnCount("body");this._query!==e&&(this._row=0,this._column=-1),this._query=e;const o=this._grid.scrollY/this._grid.defaultSizes.rowHeight,a=(this._grid.scrollY+this._grid.pageHeight)/this._grid.defaultSizes.rowHeight,s=this._grid.scrollX/this._grid.defaultSizes.columnHeaderHeight,d=(this._grid.scrollX+this._grid.pageWidth)/this._grid.defaultSizes.columnHeaderHeight,l=(e,t)=>e>=o&&e<=a&&t>=s&&t<=d,c=t?-1:1;this._column+=c;for(let o=this._row;t?o>=0:o<r;o+=c){for(let r=this._column;t?r>=0:r<i;r+=c)if(n.data("body",o,r).match(e))return this._changed.emit(void 0),l(o,r)||this._grid.scrollToRow(o),this._row=o,this._column=r,!0;this._column=t?i-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,n=t.rowCount("body"),r=t.columnCount("body");e&&this._row<=0?(this._row=n-1,this._column=r):!e&&this._row>=n-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 a.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:n,DataGrid:o}=await r.ensureDataGrid();this._defaultStyle=o.defaultStyle,this._grid=new o({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 n,this._grid.copyConfig={separator:"\t",format:o.copyFormatGeneric,headers:"all",warningThreshold:1e6},e.addWidget(this._grid),this._searchService=new h(this._grid),this._searchService.changed.connect(this._updateRenderer,this),await this._context.ready,await this._updateGrid(),this._revealed.resolve(void 0),this._monitor=new i.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(),n=this._context.model.toString(),i=this._delimiter,o=this._grid.dataModel,a=this._grid.dataModel=new t({data:n,delimiter:i});this._grid.selectionModel=new e({dataModel:a}),o&&o.dispose()}async _updateRenderer(){if(null===this._baseRenderer)return;const{TextRenderer:e}=await r.ensureDataGrid(),t=this._baseRenderer,n=new e({textColor:t.textColor,horizontalAlignment:t.horizontalAlignment,backgroundColor:this._searchService.cellBackgroundColorRendererFunc(t)});this._grid.cellRenderers.update({body:n,"column-header":n,"corner-header":n,"row-header":n})}}class g extends o.DocumentWidget{constructor(e){let{content:t,context:n,delimiter:i,reveal:o,...a}=e;t=t||r.createContent(n),o=Promise.all([o,t.revealed]),super({content:t,context:n,reveal:o,...a}),i&&(t.delimiter=i)}setFragment(e){const t=e.split("=");if("#row"!==t[0])return;let n=t[1].split(";")[0];n=n.split("-")[0],this.context.ready.then((()=>{this.content.goToLine(Number(n))}))}}class _ extends o.ABCWidgetFactory{createNewWidget(e){const t=this.translator;return new g({context:e,translator:t})}defaultToolbarFactory(e){return[{name:"delimiter",widget:new l.p({widget:e.content,translator:this.translator})}]}}class m extends _{createNewWidget(e){return new g({context:e,delimiter:"\t",translator:this.translator})}}!function(e){let t=null,r=null;e.ensureDataGrid=async function(){return null==t&&(t=new a.PromiseDelegate,t.resolve(await n.e(9072).then(n.t.bind(n,59072,23)))),t.promise},e.ensureDSVModel=async function(){return null==r&&(r=new a.PromiseDelegate,r.resolve(await Promise.all([n.e(8032),n.e(9072)]).then(n.bind(n,18032)))),r.promise},e.createContent=function(e){return new u({context:e})}}(r||(r={}))}}]);
|
notebook/static/1833.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[1833],{31833:(e,t,i)=>{i.r(t),i.d(t,{EditorSyntaxStatus:()=>T,EditorTableOfContentsFactory:()=>b,FileEditor:()=>u,FileEditorAdapter:()=>r,FileEditorFactory:()=>g,FileEditorSearchProvider:()=>m,FileEditorWidget:()=>p,IEditorTracker:()=>U,LaTeXTableOfContentsFactory:()=>S,LaTeXTableOfContentsModel:()=>A,MarkdownTableOfContentsFactory:()=>k,MarkdownTableOfContentsModel:()=>O,PythonTableOfContentsFactory:()=>I,PythonTableOfContentsModel:()=>D,TabSpaceStatus:()=>w});var n=i(63242),o=i(41030),s=i(20998);class r extends o.WidgetLSPAdapter{constructor(e,t){const{docRegistry:i,...n}=t;super(e,n),this._readyDelegate=new s.PromiseDelegate,this.editor=e.content,this._docRegistry=i,this._virtualEditor=Object.freeze({getEditor:()=>this.editor.editor,ready:()=>Promise.resolve(this.editor.editor),reveal:()=>Promise.resolve(this.editor.editor)}),Promise.all([this.editor.context.ready,this.connectionManager.ready]).then((async()=>{await this.initOnceReady(),this._readyDelegate.resolve(),this._editorAdded.emit({editor:this._virtualEditor})})).catch(console.error)}get ready(){return this._readyDelegate.promise}get documentPath(){return this.widget.context.path}get mimeType(){var e;const t=this.editor.model.mimeType,i=Array.isArray(t)?null!==(e=t[0])&&void 0!==e?e:n.IEditorMimeTypeService.defaultMimeType:t,o=this.editor.context.contentsModel;return i!=n.IEditorMimeTypeService.defaultMimeType?i:o?this._docRegistry.getFileTypeForModel(o).mimeTypes[0]:i}get languageFileExtension(){let e=this.documentPath.split(".");return e[e.length-1]}get ceEditor(){return this.editor.editor}get activeEditor(){return this._virtualEditor}get wrapperElement(){return this.widget.node}get path(){return this.widget.context.path}get editors(){var e,t;return[{ceEditor:this._virtualEditor,type:"code",value:null!==(t=null===(e=this.editor)||void 0===e?void 0:e.model.sharedModel.getSource())&&void 0!==t?t:""}]}dispose(){this.isDisposed||(this._editorRemoved.emit({editor:this._virtualEditor}),this.editor.model.mimeTypeChanged.disconnect(this.reloadConnection),super.dispose())}createVirtualDocument(){return new o.VirtualDocument({language:this.language,foreignCodeExtractors:this.options.foreignCodeExtractorsManager,path:this.documentPath,fileExtension:this.languageFileExtension,standalone:!0,hasLspSupportedFile:!0})}getEditorIndexAt(e){return 0}getEditorIndex(e){return 0}getEditorWrapper(e){return this.wrapperElement}async initOnceReady(){this.initVirtual(),await this.connectDocument(this.virtualDocument,!1),this.editor.model.mimeTypeChanged.connect(this.reloadConnection,this)}}var a=i(72703),d=i(44033),l=i(89945),c=i(95291),h=i(63485);class u extends h.Widget{constructor(e){super(),this._ready=new s.PromiseDelegate,this.addClass("jp-FileEditor");const t=this._context=e.context;this._mimeTypeService=e.mimeTypeService;const i=this._editorWidget=new n.CodeEditorWrapper({factory:e.factory,model:t.model,editorOptions:{config:u.defaultEditorConfig}});this._editorWidget.addClass("jp-FileEditorCodeWrapper"),this._editorWidget.node.dataset.jpCodeRunner="true",this._editorWidget.node.dataset.jpUndoer="true",this.editor=i.editor,this.model=i.model,t.ready.then((()=>{this._onContextReady()})),this._onPathChanged(),t.pathChanged.connect(this._onPathChanged,this),(this.layout=new h.StackedLayout).addWidget(i)}get context(){return this._context}get ready(){return this._ready.promise}handleEvent(e){this.model&&"mousedown"===e.type&&this._ensureFocus()}onAfterAttach(e){super.onAfterAttach(e),this.node.addEventListener("mousedown",this)}onBeforeDetach(e){this.node.removeEventListener("mousedown",this)}onActivateRequest(e){this._ensureFocus()}_ensureFocus(){this.editor.hasFocus()||this.editor.focus()}_onContextReady(){this.isDisposed||(this.editor.clearHistory(),this._ready.resolve(void 0))}_onPathChanged(){const e=this.editor,t=this._context.localPath;e.model.mimeType=this._mimeTypeService.getMimeTypeByFilePath(t)}}!function(e){e.defaultEditorConfig={lineNumbers:!0,scrollPastEnd:!0}}(u||(u={}));class p extends l.DocumentWidget{async setFragment(e){const t=e.split("=");if("#line"!==t[0])return;const i=t[1];let n;return n=i.includes(",")?i.split(",")[0]||"0":i,this.context.ready.then((()=>{const e={line:parseInt(n,10),column:0};this.content.editor.setCursorPosition(e),this.content.editor.revealPosition(e)}))}}class g extends l.ABCWidgetFactory{constructor(e){super(e.factoryOptions),this._services=e.editorServices}createNewWidget(e){const t=this._services.factoryService.newDocumentEditor,i=new u({factory:e=>t(e),context:e,mimeTypeService:this._services.mimeTypeService});return i.title.icon=c.textEditorIcon,new p({content:i,context:e})}}class m extends d.EditorSearchProvider{constructor(e){super(),this.widget=e,this._searchActive=!1}get isReadOnly(){return this.editor.getOption("readOnly")}get replaceOptionsSupport(){return{preserveCase:!0}}get editor(){return this.widget.content.editor}get model(){return this.widget.content.model}async startQuery(e,t){this._searchActive=!0,await super.startQuery(e,t),await this.highlightNext(!0,{from:"selection-start",scroll:!1,select:!1})}async endQuery(){this._searchActive=!1,await super.endQuery()}async onSharedModelChanged(e,t){if(this._searchActive)return super.onSharedModelChanged(e,t)}static createNew(e,t){return new m(e)}static isApplicable(e){return e instanceof a.MainAreaWidget&&e.content instanceof u&&e.content.editor instanceof d.CodeMirrorEditor}getInitialQuery(){const e=this.editor;return e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to)}}var y=i(58515),v=i(70858),_=i(78156),f=i.n(_);function C(e){return f().createElement(y.TextItem,{source:e.language,onClick:e.handleClick})}class T extends c.VDomRenderer{constructor(e){var t;super(new T.Model(e.languages)),this._handleClick=()=>{const e=new h.Menu({commands:this._commands});this._popup&&this._popup.dispose(),this.model.languages.getLanguages().sort(((e,t)=>{var i,n;const o=null!==(i=e.displayName)&&void 0!==i?i:e.name,s=null!==(n=t.displayName)&&void 0!==n?n:t.name;return o.localeCompare(s)})).forEach((t=>{var i;if(0===t.name.toLowerCase().indexOf("brainf"))return;const n={name:t.name,displayName:null!==(i=t.displayName)&&void 0!==i?i:t.name};e.addItem({command:"fileeditor:change-language",args:n})})),this._popup=(0,y.showPopup)({body:e,anchor:this,align:"left"})},this._popup=null,this._commands=e.commands,this.translator=null!==(t=e.translator)&&void 0!==t?t:v.nullTranslator;const i=this.translator.load("jupyterlab");this.addClass("jp-mod-highlighted"),this.title.caption=i.__("Change text editor syntax highlighting")}render(){return this.model?f().createElement(C,{language:this.model.language,handleClick:this._handleClick}):null}}function x(e){const t=(e.translator||v.nullTranslator).load("jupyterlab"),i="number"==typeof e.tabSpace?t.__("Spaces"):t.__("Tab Indent");return f().createElement(y.TextItem,{onClick:e.handleClick,source:"number"==typeof e.tabSpace?`${i}: ${e.tabSpace}`:i,title:t.__("Change the indentation…")})}!function(e){class t extends c.VDomModel{constructor(e){super(),this.languages=e,this._onMIMETypeChange=(e,t)=>{var i;const o=this._language,s=this.languages.findByMIME(t.newValue);this._language=null!==(i=null==s?void 0:s.name)&&void 0!==i?i:n.IEditorMimeTypeService.defaultMimeType,this._triggerChange(o,this._language)},this._language="",this._editor=null}get language(){return this._language}get editor(){return this._editor}set editor(e){var t;const i=this._editor;null!==i&&i.model.mimeTypeChanged.disconnect(this._onMIMETypeChange);const o=this._language;if(this._editor=e,null===this._editor)this._language="";else{const e=this.languages.findByMIME(this._editor.model.mimeType);this._language=null!==(t=null==e?void 0:e.name)&&void 0!==t?t:n.IEditorMimeTypeService.defaultMimeType,this._editor.model.mimeTypeChanged.connect(this._onMIMETypeChange)}this._triggerChange(o,this._language)}_triggerChange(e,t){e!==t&&this.stateChanged.emit(void 0)}}e.Model=t}(T||(T={}));class w extends c.VDomRenderer{constructor(e){super(new w.Model),this._popup=null,this._menu=e.menu,this.translator=e.translator||v.nullTranslator,this.addClass("jp-mod-highlighted")}render(){var e;if(null===(e=this.model)||void 0===e?void 0:e.indentUnit){const e="Tab"===this.model.indentUnit?null:parseInt(this.model.indentUnit,10);return f().createElement(x,{tabSpace:e,handleClick:()=>this._handleClick(),translator:this.translator})}return null}_handleClick(){const e=this._menu;this._popup&&this._popup.dispose(),e.aboutToClose.connect(this._menuClosed,this),this._popup=(0,y.showPopup)({body:e,anchor:this,align:"right"}),e.update()}_menuClosed(){this.removeClass("jp-mod-clicked")}}!function(e){class t extends c.VDomModel{get indentUnit(){return this._indentUnit}set indentUnit(e){e!==this._indentUnit&&(this._indentUnit=e,this.stateChanged.emit())}}e.Model=t}(w||(w={}));var E=i(85996);class b extends E.TableOfContentsFactory{createNew(e,t){const i=super.createNew(e,t),n=(t,i)=>{i&&e.content.editor.setCursorPosition({line:i.line,column:0})};return i.activeHeadingChanged.connect(n),e.disposed.connect((()=>{i.activeHeadingChanged.disconnect(n)})),i}}const M={part:1,chapter:1,section:1,subsection:2,subsubsection:3,paragraph:4,subparagraph:5},P=/^\s*\\(section|subsection|subsubsection){(.+)}/;class A extends E.TableOfContentsModel{get documentType(){return"latex"}get supportedOptions(){return["maximalDepth","numberHeaders"]}getHeadings(){if(!this.isActive)return Promise.resolve(null);const e=this.widget.content.model.sharedModel.getSource().split("\n"),t=new Array;let i=t.length;const n=new Array;for(let o=0;o<e.length;o++){const s=e[o].match(P);if(s){const e=M[s[1]];if(e<=this.configuration.maximalDepth){const r=E.TableOfContentsUtils.getPrefix(e,i,t,{...this.configuration,baseNumbering:1,numberingH1:!0});i=e,n.push({text:s[2],prefix:r,level:e,line:o})}}}return Promise.resolve(n)}}class S extends b{isApplicable(e){var t,i;if(super.isApplicable(e)){let n=null===(i=null===(t=e.content)||void 0===t?void 0:t.model)||void 0===i?void 0:i.mimeType;return n&&("text/x-latex"===n||"text/x-stex"===n)}return!1}_createNew(e,t){return new A(e,t)}}class O extends E.TableOfContentsModel{get documentType(){return"markdown"}getHeadings(){if(!this.isActive)return Promise.resolve(null);const e=this.widget.content.model.sharedModel.getSource(),t=E.TableOfContentsUtils.filterHeadings(E.TableOfContentsUtils.Markdown.getHeadings(e),{...this.configuration,numberHeaders:!1});return Promise.resolve(t)}}class k extends b{isApplicable(e){var t,i;if(super.isApplicable(e)){let n=null===(i=null===(t=e.content)||void 0===t?void 0:t.model)||void 0===i?void 0:i.mimeType;return n&&E.TableOfContentsUtils.Markdown.isMarkdown(n)}return!1}_createNew(e,t){return new O(e,t)}}let F;try{F=new RegExp("^\\s*(class |def |from |import )","d")}catch(e){F=new RegExp("^\\s*(class |def |from |import )")}class D extends E.TableOfContentsModel{get documentType(){return"python"}async getHeadings(){if(!this.isActive)return Promise.resolve(null);const e=this.widget.content.model.sharedModel.getSource().split("\n");let t=new Array,n=!1,o=1,s=-1;for(const r of e){let e;if(s++,F.flags.includes("d"))e=F.exec(r);else{const{default:t}=await i.e(2913).then(i.t.bind(i,32913,23));e=t(F,r)}if(e){const[i]=e.indices[1];1===o&&i>0&&(o=i);const a=["from ","import "].includes(e[1]);if(a&&n)continue;n=a;const d=1+i/o;if(d>this.configuration.maximalDepth)continue;t.push({text:r.slice(i),level:d,line:s})}}return Promise.resolve(t)}}class I extends b{isApplicable(e){var t,i;if(super.isApplicable(e)){let n=null===(i=null===(t=e.content)||void 0===t?void 0:t.model)||void 0===i?void 0:i.mimeType;return n&&("application/x-python-code"===n||"text/x-python"===n)}return!1}_createNew(e,t){return new D(e,t)}}const U=new s.Token("@jupyterlab/fileeditor:IEditorTracker","A widget tracker for file editors.\n Use this if you want to be able to iterate over and interact with file editors\n created by the application.")}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[1833],{31833:(e,t,i)=>{i.r(t),i.d(t,{EditorSyntaxStatus:()=>T,EditorTableOfContentsFactory:()=>b,FileEditor:()=>u,FileEditorAdapter:()=>r,FileEditorFactory:()=>g,FileEditorSearchProvider:()=>m,FileEditorWidget:()=>p,IEditorTracker:()=>U,LaTeXTableOfContentsFactory:()=>S,LaTeXTableOfContentsModel:()=>A,MarkdownTableOfContentsFactory:()=>k,MarkdownTableOfContentsModel:()=>O,PythonTableOfContentsFactory:()=>I,PythonTableOfContentsModel:()=>D,TabSpaceStatus:()=>w});var n=i(52712),o=i(63648),s=i(20998);class r extends o.WidgetLSPAdapter{constructor(e,t){const{docRegistry:i,...n}=t;super(e,n),this._readyDelegate=new s.PromiseDelegate,this.editor=e.content,this._docRegistry=i,this._virtualEditor=Object.freeze({getEditor:()=>this.editor.editor,ready:()=>Promise.resolve(this.editor.editor),reveal:()=>Promise.resolve(this.editor.editor)}),Promise.all([this.editor.context.ready,this.connectionManager.ready]).then((async()=>{await this.initOnceReady(),this._readyDelegate.resolve(),this._editorAdded.emit({editor:this._virtualEditor})})).catch(console.error)}get ready(){return this._readyDelegate.promise}get documentPath(){return this.widget.context.path}get mimeType(){var e;const t=this.editor.model.mimeType,i=Array.isArray(t)?null!==(e=t[0])&&void 0!==e?e:n.IEditorMimeTypeService.defaultMimeType:t,o=this.editor.context.contentsModel;return i!=n.IEditorMimeTypeService.defaultMimeType?i:o?this._docRegistry.getFileTypeForModel(o).mimeTypes[0]:i}get languageFileExtension(){let e=this.documentPath.split(".");return e[e.length-1]}get ceEditor(){return this.editor.editor}get activeEditor(){return this._virtualEditor}get wrapperElement(){return this.widget.node}get path(){return this.widget.context.path}get editors(){var e,t;return[{ceEditor:this._virtualEditor,type:"code",value:null!==(t=null===(e=this.editor)||void 0===e?void 0:e.model.sharedModel.getSource())&&void 0!==t?t:""}]}dispose(){this.isDisposed||(this._editorRemoved.emit({editor:this._virtualEditor}),this.editor.model.mimeTypeChanged.disconnect(this.reloadConnection),super.dispose())}createVirtualDocument(){return new o.VirtualDocument({language:this.language,foreignCodeExtractors:this.options.foreignCodeExtractorsManager,path:this.documentPath,fileExtension:this.languageFileExtension,standalone:!0,hasLspSupportedFile:!0})}getEditorIndexAt(e){return 0}getEditorIndex(e){return 0}getEditorWrapper(e){return this.wrapperElement}async initOnceReady(){this.initVirtual(),await this.connectDocument(this.virtualDocument,!1),this.editor.model.mimeTypeChanged.connect(this.reloadConnection,this)}}var a=i(15465),d=i(81059),l=i(71120),c=i(12668),h=i(63485);class u extends h.Widget{constructor(e){super(),this._ready=new s.PromiseDelegate,this.addClass("jp-FileEditor");const t=this._context=e.context;this._mimeTypeService=e.mimeTypeService;const i=this._editorWidget=new n.CodeEditorWrapper({factory:e.factory,model:t.model,editorOptions:{config:u.defaultEditorConfig}});this._editorWidget.addClass("jp-FileEditorCodeWrapper"),this._editorWidget.node.dataset.jpCodeRunner="true",this._editorWidget.node.dataset.jpUndoer="true",this.editor=i.editor,this.model=i.model,t.ready.then((()=>{this._onContextReady()})),this._onPathChanged(),t.pathChanged.connect(this._onPathChanged,this),(this.layout=new h.StackedLayout).addWidget(i)}get context(){return this._context}get ready(){return this._ready.promise}handleEvent(e){this.model&&"mousedown"===e.type&&this._ensureFocus()}onAfterAttach(e){super.onAfterAttach(e),this.node.addEventListener("mousedown",this)}onBeforeDetach(e){this.node.removeEventListener("mousedown",this)}onActivateRequest(e){this._ensureFocus()}_ensureFocus(){this.editor.hasFocus()||this.editor.focus()}_onContextReady(){this.isDisposed||(this.editor.clearHistory(),this._ready.resolve(void 0))}_onPathChanged(){const e=this.editor,t=this._context.localPath;e.model.mimeType=this._mimeTypeService.getMimeTypeByFilePath(t)}}!function(e){e.defaultEditorConfig={lineNumbers:!0,scrollPastEnd:!0}}(u||(u={}));class p extends l.DocumentWidget{async setFragment(e){const t=e.split("=");if("#line"!==t[0])return;const i=t[1];let n;return n=i.includes(",")?i.split(",")[0]||"0":i,this.context.ready.then((()=>{const e={line:parseInt(n,10),column:0};this.content.editor.setCursorPosition(e),this.content.editor.revealPosition(e)}))}}class g extends l.ABCWidgetFactory{constructor(e){super(e.factoryOptions),this._services=e.editorServices}createNewWidget(e){const t=this._services.factoryService.newDocumentEditor,i=new u({factory:e=>t(e),context:e,mimeTypeService:this._services.mimeTypeService});return i.title.icon=c.textEditorIcon,new p({content:i,context:e})}}class m extends d.EditorSearchProvider{constructor(e){super(),this.widget=e,this._searchActive=!1}get isReadOnly(){return this.editor.getOption("readOnly")}get replaceOptionsSupport(){return{preserveCase:!0}}get editor(){return this.widget.content.editor}get model(){return this.widget.content.model}async startQuery(e,t){this._searchActive=!0,await super.startQuery(e,t),await this.highlightNext(!0,{from:"selection-start",scroll:!1,select:!1})}async endQuery(){this._searchActive=!1,await super.endQuery()}async onSharedModelChanged(e,t){if(this._searchActive)return super.onSharedModelChanged(e,t)}static createNew(e,t){return new m(e)}static isApplicable(e){return e instanceof a.MainAreaWidget&&e.content instanceof u&&e.content.editor instanceof d.CodeMirrorEditor}getInitialQuery(){const e=this.editor;return e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to)}}var y=i(54252),f=i(25291),v=i(78156),_=i.n(v);function C(e){return _().createElement(y.TextItem,{source:e.language,onClick:e.handleClick})}class T extends c.VDomRenderer{constructor(e){var t;super(new T.Model(e.languages)),this._handleClick=()=>{const e=new h.Menu({commands:this._commands});this._popup&&this._popup.dispose(),this.model.languages.getLanguages().sort(((e,t)=>{var i,n;const o=null!==(i=e.displayName)&&void 0!==i?i:e.name,s=null!==(n=t.displayName)&&void 0!==n?n:t.name;return o.localeCompare(s)})).forEach((t=>{var i;if(0===t.name.toLowerCase().indexOf("brainf"))return;const n={name:t.name,displayName:null!==(i=t.displayName)&&void 0!==i?i:t.name};e.addItem({command:"fileeditor:change-language",args:n})})),this._popup=(0,y.showPopup)({body:e,anchor:this,align:"left"})},this._popup=null,this._commands=e.commands,this.translator=null!==(t=e.translator)&&void 0!==t?t:f.nullTranslator;const i=this.translator.load("jupyterlab");this.addClass("jp-mod-highlighted"),this.title.caption=i.__("Change text editor syntax highlighting")}render(){return this.model?_().createElement(C,{language:this.model.language,handleClick:this._handleClick}):null}}function x(e){const t=(e.translator||f.nullTranslator).load("jupyterlab"),i="number"==typeof e.tabSpace?t.__("Spaces"):t.__("Tab Indent");return _().createElement(y.TextItem,{onClick:e.handleClick,source:"number"==typeof e.tabSpace?`${i}: ${e.tabSpace}`:i,title:t.__("Change the indentation…")})}!function(e){class t extends c.VDomModel{constructor(e){super(),this.languages=e,this._onMIMETypeChange=(e,t)=>{var i;const o=this._language,s=this.languages.findByMIME(t.newValue);this._language=null!==(i=null==s?void 0:s.name)&&void 0!==i?i:n.IEditorMimeTypeService.defaultMimeType,this._triggerChange(o,this._language)},this._language="",this._editor=null}get language(){return this._language}get editor(){return this._editor}set editor(e){var t;const i=this._editor;null!==i&&i.model.mimeTypeChanged.disconnect(this._onMIMETypeChange);const o=this._language;if(this._editor=e,null===this._editor)this._language="";else{const e=this.languages.findByMIME(this._editor.model.mimeType);this._language=null!==(t=null==e?void 0:e.name)&&void 0!==t?t:n.IEditorMimeTypeService.defaultMimeType,this._editor.model.mimeTypeChanged.connect(this._onMIMETypeChange)}this._triggerChange(o,this._language)}_triggerChange(e,t){e!==t&&this.stateChanged.emit(void 0)}}e.Model=t}(T||(T={}));class w extends c.VDomRenderer{constructor(e){super(new w.Model),this._popup=null,this._menu=e.menu,this.translator=e.translator||f.nullTranslator,this.addClass("jp-mod-highlighted")}render(){var e;if(null===(e=this.model)||void 0===e?void 0:e.indentUnit){const e="Tab"===this.model.indentUnit?null:parseInt(this.model.indentUnit,10);return _().createElement(x,{tabSpace:e,handleClick:()=>this._handleClick(),translator:this.translator})}return null}_handleClick(){const e=this._menu;this._popup&&this._popup.dispose(),e.aboutToClose.connect(this._menuClosed,this),this._popup=(0,y.showPopup)({body:e,anchor:this,align:"right"}),e.update()}_menuClosed(){this.removeClass("jp-mod-clicked")}}!function(e){class t extends c.VDomModel{get indentUnit(){return this._indentUnit}set indentUnit(e){e!==this._indentUnit&&(this._indentUnit=e,this.stateChanged.emit())}}e.Model=t}(w||(w={}));var E=i(45776);class b extends E.TableOfContentsFactory{createNew(e,t){const i=super.createNew(e,t),n=(t,i)=>{i&&e.content.editor.setCursorPosition({line:i.line,column:0})};return i.activeHeadingChanged.connect(n),e.disposed.connect((()=>{i.activeHeadingChanged.disconnect(n)})),i}}const M={part:1,chapter:1,section:1,subsection:2,subsubsection:3,paragraph:4,subparagraph:5},P=/^\s*\\(section|subsection|subsubsection){(.+)}/;class A extends E.TableOfContentsModel{get documentType(){return"latex"}get supportedOptions(){return["maximalDepth","numberHeaders"]}getHeadings(){if(!this.isActive)return Promise.resolve(null);const e=this.widget.content.model.sharedModel.getSource().split("\n"),t=new Array;let i=t.length;const n=new Array;for(let o=0;o<e.length;o++){const s=e[o].match(P);if(s){const e=M[s[1]];if(e<=this.configuration.maximalDepth){const r=E.TableOfContentsUtils.getPrefix(e,i,t,{...this.configuration,baseNumbering:1,numberingH1:!0});i=e,n.push({text:s[2],prefix:r,level:e,line:o})}}}return Promise.resolve(n)}}class S extends b{isApplicable(e){var t,i;if(super.isApplicable(e)){let n=null===(i=null===(t=e.content)||void 0===t?void 0:t.model)||void 0===i?void 0:i.mimeType;return n&&("text/x-latex"===n||"text/x-stex"===n)}return!1}_createNew(e,t){return new A(e,t)}}class O extends E.TableOfContentsModel{get documentType(){return"markdown"}getHeadings(){if(!this.isActive)return Promise.resolve(null);const e=this.widget.content.model.sharedModel.getSource(),t=E.TableOfContentsUtils.filterHeadings(E.TableOfContentsUtils.Markdown.getHeadings(e),{...this.configuration,numberHeaders:!1});return Promise.resolve(t)}}class k extends b{isApplicable(e){var t,i;if(super.isApplicable(e)){let n=null===(i=null===(t=e.content)||void 0===t?void 0:t.model)||void 0===i?void 0:i.mimeType;return n&&E.TableOfContentsUtils.Markdown.isMarkdown(n)}return!1}_createNew(e,t){return new O(e,t)}}let F;try{F=new RegExp("^\\s*(class |def |async def |from |import )","d")}catch(e){F=new RegExp("^\\s*(class |def |async def |from |import )")}class D extends E.TableOfContentsModel{get documentType(){return"python"}async getHeadings(){if(!this.isActive)return Promise.resolve(null);const e=this.widget.content.model.sharedModel.getSource().split("\n");let t=new Array,n=!1,o=1,s=-1;for(const r of e){let e;if(s++,F.flags.includes("d"))e=F.exec(r);else{const{default:t}=await i.e(2913).then(i.t.bind(i,32913,23));e=t(F,r)}if(e){const[i]=e.indices[1];1===o&&i>0&&(o=i);const a=["from ","import "].includes(e[1]);if(a&&n)continue;n=a;const d=1+i/o;if(d>this.configuration.maximalDepth)continue;t.push({text:r.slice(i),level:d,line:s})}}return Promise.resolve(t)}}class I extends b{isApplicable(e){var t,i;if(super.isApplicable(e)){let n=null===(i=null===(t=e.content)||void 0===t?void 0:t.model)||void 0===i?void 0:i.mimeType;return n&&("application/x-python-code"===n||"text/x-python"===n)}return!1}_createNew(e,t){return new D(e,t)}}const U=new s.Token("@jupyterlab/fileeditor:IEditorTracker","A widget tracker for file editors.\n Use this if you want to be able to iterate over and interact with file editors\n created by the application.")}}]);
|
notebook/static/1958.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[1958],{31958:(e,t,a)=>{a.r(t),a.d(t,{Grid:()=>i,GridModel:()=>c});var o,r=a(59072),s=a(81997),n=a(63485),l=a(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[1958],{31958:(e,t,a)=>{a.r(t),a.d(t,{Grid:()=>i,GridModel:()=>c});var o,r=a(59072),s=a(81997),n=a(63485),l=a(25291),d=a(78947);class i extends n.Panel{constructor(e){super();const{commands:t,model:a,themeManager:s}=e;this.model=a;const n=new c(e.translator),l=new r.DataGrid,i=new o.MouseHandler;i.doubleClicked.connect(((e,a)=>t.execute(d.q.CommandIDs.inspectVariable,{variableReference:n.getVariableReference(a.row),name:n.getVariableName(a.row)}))),i.selected.connect(((e,t)=>{const{row:a}=t;this.model.selectedVariable={name:n.getVariableName(a),value:n.data("body",a,1),type:n.data("body",a,2),variablesReference:n.getVariableReference(a)}})),l.dataModel=n,l.keyHandler=new r.BasicKeyHandler,l.mouseHandler=i,l.selectionModel=new r.BasicSelectionModel({dataModel:n}),l.stretchLastColumn=!0,l.node.style.height="100%",this._grid=l,s&&s.themeChanged.connect(this._updateStyles,this),this.addWidget(l)}set filter(e){this._grid.dataModel.filter=e,this.update()}set scope(e){this._grid.dataModel.scope=e,this.update()}get dataModel(){return this._grid.dataModel}onAfterAttach(e){super.onAfterAttach(e),this._updateStyles()}_updateStyles(){const{style:e,textRenderer:t}=o.computeStyle();this._grid.cellRenderers.update({},t),this._grid.style=e}}class c extends r.DataModel{constructor(e){super(),this._filter=new Set,this._scope="",this._data={name:[],type:[],value:[],variablesReference:[]},this._trans=(e||l.nullTranslator).load("jupyterlab")}get filter(){return this._filter}set filter(e){this._filter=e}get scope(){return this._scope}set scope(e){this._scope=e}rowCount(e){return"body"===e?this._data.name.length:1}columnCount(e){return"body"===e?2:1}data(e,t,a){return"row-header"===e?this._data.name[t]:"column-header"===e?1===a?this._trans.__("Value"):this._trans.__("Type"):"corner-header"===e?this._trans.__("Name"):1===a?this._data.value[t]:this._data.type[t]}getVariableReference(e){return this._data.variablesReference[e]}getVariableName(e){return this._data.name[e]}setData(e){var t,a;this._clearData(),this.emitChanged({type:"model-reset"});const o=null!==(t=e.find((e=>e.name===this._scope)))&&void 0!==t?t:e[0],r=(null!==(a=null==o?void 0:o.variables)&&void 0!==a?a:[]).filter((e=>e.name&&!this._filter.has(e.name)));r.forEach(((e,t)=>{var a;this._data.name[t]=e.name,this._data.type[t]=null!==(a=e.type)&&void 0!==a?a:"",this._data.value[t]=e.value,this._data.variablesReference[t]=e.variablesReference})),this.emitChanged({type:"rows-inserted",region:"body",index:1,span:r.length})}_clearData(){this._data={name:[],type:[],value:[],variablesReference:[]}}}!function(e){e.computeStyle=function(){const e=function(){const e=document.createElement("div");return e.className="jp-DebuggerVariables-colorPalette",e.innerHTML='\n <div class="jp-mod-void"></div>\n <div class="jp-mod-background"></div>\n <div class="jp-mod-header-background"></div>\n <div class="jp-mod-grid-line"></div>\n <div class="jp-mod-header-grid-line"></div>\n <div class="jp-mod-selection"></div>\n <div class="jp-mod-text"></div>\n ',e}();let t;document.body.appendChild(e),t=e.querySelector(".jp-mod-void");const a=getComputedStyle(t).color;t=e.querySelector(".jp-mod-background");const o=getComputedStyle(t).color;t=e.querySelector(".jp-mod-header-background");const s=getComputedStyle(t).color;t=e.querySelector(".jp-mod-grid-line");const n=getComputedStyle(t).color;t=e.querySelector(".jp-mod-header-grid-line");const l=getComputedStyle(t).color;t=e.querySelector(".jp-mod-selection");const d=getComputedStyle(t).color;t=e.querySelector(".jp-mod-text");const i=getComputedStyle(t).color;return document.body.removeChild(e),{style:{voidColor:a,backgroundColor:o,headerBackgroundColor:s,gridLineColor:n,headerGridLineColor:l,rowBackgroundColor:e=>e%2==0?a:o,selectionFillColor:d},textRenderer:new r.TextRenderer({font:"12px sans-serif",textColor:i,backgroundColor:"",verticalAlignment:"center",horizontalAlignment:"left"})}};class t extends r.BasicMouseHandler{constructor(){super(...arguments),this._doubleClicked=new s.Signal(this),this._selected=new s.Signal(this)}get doubleClicked(){return this._doubleClicked}get selected(){return this._selected}dispose(){this.isDisposed||(s.Signal.disconnectSender(this),super.dispose())}onMouseDoubleClick(e,t){const a=e.hitTest(t.clientX,t.clientY);this._doubleClicked.emit(a)}onMouseDown(e,t){let{clientX:a,clientY:o}=t,r=e.hitTest(a,o);this._selected.emit(r),super.onMouseDown(e,t)}onContextMenu(e,t){let{clientX:a,clientY:o}=t,r=e.hitTest(a,o);this._selected.emit(r)}}e.MouseHandler=t}(o||(o={}))}}]);
|