Spaces:
Runtime error
Runtime error
"webpackChunk_jupyterlab_application_top"]=self["webpackChunk_jupyterlab_application_top"]||[]).push([[2104],{72104:(e,t,r)=>{r.r(t);r.d(t,{DefaultBufferLength:()=>i,IterMode:()=>d,MountedTree:()=>o,NodeProp:()=>l,NodeSet:()=>u,NodeType:()=>h,NodeWeakMap:()=>M,Parser:()=>P,Tree:()=>c,TreeBuffer:()=>m,TreeCursor:()=>C,TreeFragment:()=>z,parseMixed:()=>O});const i=1024;let n=0;class s{constructor(e,t){this.from=e;this.to=t}}class l{constructor(e={}){this.id=n++;this.perNode=!!e.perNode;this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");if(typeof e!="function")e=h.match(e);return t=>{let r=e(t);return r===undefined?null:[this,r]}}}l.closedBy=new l({deserialize:e=>e.split(" ")});l.openedBy=new l({deserialize:e=>e.split(" ")});l.group=new l({deserialize:e=>e.split(" ")});l.contextHash=new l({perNode:true});l.lookAhead=new l({perNode:true});l.mounted=new l({perNode:true});class o{constructor(e,t,r){this.tree=e;this.overlay=t;this.parser=r}}const f=Object.create(null);class h{constructor(e,t,r,i=0){this.name=e;this.props=t;this.id=r;this.flags=i}static define(e){let t=e.props&&e.props.length?Object.create(null):f;let r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0);let i=new h(e.name||"",t,e.id,r);if(e.props)for(let n of e.props){if(!Array.isArray(n))n=n(i);if(n){if(n[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[n[0].id]=n[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return true;let t=this.prop(l.group);return t?t.indexOf(e)>-1:false}return this.id==e}static match(e){let t=Object.create(null);for(let r in e)for(let i of r.split(" "))t[i]=e[r];return e=>{for(let r=e.prop(l.group),i=-1;i<(r?r.length:0);i++){let n=t[i<0?e.name:r[i]];if(n)return n}}}}h.none=new h("",Object.create(null),0,8);class u{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let r of this.types){let i=null;for(let t of e){let e=t(r);if(e){if(!i)i=Object.assign({},r.props);i[e[0].id]=e[1]}}t.push(i?new h(r.name,i,r.id,r.flags):r)}return new u(t)}}const a=new WeakMap,p=new WeakMap;var d;(function(e){e[e["ExcludeBuffers"]=1]="ExcludeBuffers";e[e["IncludeAnonymous"]=2]="IncludeAnonymous";e[e["IgnoreMounts"]=4]="IgnoreMounts";e[e["IgnoreOverlays"]=8]="IgnoreOverlays"})(d||(d={}));class c{constructor(e,t,r,i,n){this.type=e;this.children=t;this.positions=r;this.length=i;this.props=null;if(n&&n.length){this.props=Object.create(null);for(let[e,t]of n)this.props[typeof e=="number"?e:e.id]=t}}toString(){let e=this.prop(l.mounted);if(e&&!e.overlay)return e.tree.toString();let t="";for(let r of this.children){let e=r.toString();if(e){if(t)t+=",";t+=e}}return!this.type.name?t:(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":"")}cursor(e=0){return new C(this.topNode,e)}cursorAt(e,t=0,r=0){let i=a.get(this)||this.topNode;let n=new C(i);n.moveTo(e,t);a.set(this,n._tree);return n}get topNode(){return new w(this,0,0,null)}resolve(e,t=0){let r=y(a.get(this)||this.topNode,e,t,false);a.set(this,r);return r}resolveInner(e,t=0){let r=y(p.get(this)||this.topNode,e,t,true);p.set(this,r);return r}iterate(e){let{enter:t,leave:r,from:i=0,to:n=this.length}=e;for(let s=this.cursor((e.mode||0)|d.IncludeAnonymous);;){let e=false;if(s.from<=n&&s.to>=i&&(s.type.isAnonymous||t(s)!==false)){if(s.firstChild())continue;e=true}for(;;){if(e&&r&&!s.type.isAnonymous)r(s);if(s.nextSibling())break;if(!s.parent())return;e=true}}}prop(e){return!e.perNode?this.type.prop(e):this.props?this.props[e.id]:undefined}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:T(h.none,this.children,this.positions,0,this.children.length,0,this.length,((e,t,r)=>new c(this.type,e,t,r,this.propValues)),e.makeTree||((e,t,r)=>new c(h.none,e,t,r)))}static build(e){return N(e)}}c.empty=new c(h.none,[],[],0);class g{constructor(e,t){this.buffer=e;this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new g(this.buffer,this.index)}}class m{constructor(e,t,r){this.buffer=e;this.length=t;this.set=r}get type(){return h.none}toString(){let e=[];for(let t=0;t<this.buffer.length;){e.push(this.childString(t));t=this.buffer[t+3]}return e.join(",")}childString(e){let t=this.buffer[e],r=this.buffer[e+3];let i=this.set.types[t],n=i.name;if(/\W/.test(n)&&!i.isError)n=JSON.stringify(n);e+=4;if(r==e)return n;let s=[];while(e<r){s.push(this.childString(e));e=this.buffer[e+3]}return n+"("+s.join(",")+")"}findChild(e,t,r,i,n){let{buffer:s}=this,l=-1;for(let o=e;o!=t;o=s[o+3]){if(b(n,i,s[o+1],s[o+2])){l=o;if(r>0)break}}return l}slice(e,t,r){let i=this.buffer;let n=new Uint16Array(t-e),s=0;for(let l=e,o=0;l<t;){n[o++]=i[l++];n[o++]=i[l++]-r;let t=n[o++]=i[l++]-r;n[o++]=i[l++]-e;s=Math.max(s,t)}return new m(n,s,this.set)}}function b(e,t,r,i){switch(e){case-2:return r<t;case-1:return i>=t&&r<t;case 0:return r<t&&i>t;case 1:return r<=t&&i>t;case 2:return i>t;case 4:return true}}function x(e,t){let r=e.childBefore(t);while(r){let t=r.lastChild;if(!t||t.to!=r.to)break;if(t.type.isError&&t.from==t.to){e=r;r=t.prevSibling}else{r=t}}return e}function y(e,t,r,i){var n;while(e.from==e.to||(r<1?e.from>=t:e.from>t)||(r>-1?e.to<=t:e.to<t)){let t=!i&&e instanceof w&&e.index<0?null:e.parent;if(!t)return e;e=t}let s=i?0:d.IgnoreOverlays;if(i)for(let l=e,o=l.parent;o;l=o,o=l.parent){if(l instanceof w&&l.index<0&&((n=o.enter(t,r,s))===null||n===void 0?void 0:n.from)!=l.from)e=o}for(;;){let i=e.enter(t,r,s);if(!i)return e;e=i}}class w{constructor(e,t,r,i){this._tree=e;this.from=t;this.index=r;this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,r,i,n=0){for(let s=this;;){for(let{children:o,positions:f}=s._tree,h=t>0?o.length:-1;e!=h;e+=t){let h=o[e],u=f[e]+s.from;if(!b(i,r,u,u+h.length))continue;if(h instanceof m){if(n&d.ExcludeBuffers)continue;let l=h.findChild(0,h.buffer.length,t,r-u,i);if(l>-1)return new A(new k(s,h,e,u),null,l)}else if(n&d.IncludeAnonymous||(!h.type.isAnonymous||S(h))){let o;if(!(n&d.IgnoreMounts)&&h.props&&(o=h.prop(l.mounted))&&!o.overlay)return new w(o.tree,u,e,s);let f=new w(h,u,e,s);return n&d.IncludeAnonymous||!f.type.isAnonymous?f:f.nextChild(t<0?h.children.length-1:0,t,r,i)}}if(n&d.IncludeAnonymous||!s.type.isAnonymous)return null;if(s.index>=0)e=s.index+t;else e=t<0?-1:s._parent._tree.children.length;s=s._parent;if(!s)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,r=0){let i;if(!(r&d.IgnoreOverlays)&&(i=this._tree.prop(l.mounted))&&i.overlay){let r=e-this.from;for(let{from:e,to:n}of i.overlay){if((t>0?e<=r:e<r)&&(t<0?n>=r:n>r))return new w(i.tree,i.overlay[0].from+this.from,-1,this)}}return this.nextChild(0,1,e,t,r)}nextSignificantParent(){let e=this;while(e.type.isAnonymous&&e._parent)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}cursor(e=0){return new C(this,e)}get tree(){return this._tree}toTree(){return this._tree}resolve(e,t=0){return y(this,e,t,false)}resolveInner(e,t=0){return y(this,e,t,true)}enterUnfinishedNodesBefore(e){return x(this,e)}getChild(e,t=null,r=null){let i=v(this,e,t,r);return i.length?i[0]:null}getChildren(e,t=null,r=null){return v(this,e,t,r)}toString(){return this._tree.toString()}get node(){return this}matchContext(e){return _(this,e)}}function v(e,t,r,i){let n=e.cursor(),s=[];if(!n.firstChild())return s;if(r!=null)while(!n.type.is(r))if(!n.nextSibling())return s;for(;;){if(i!=null&&n.type.is(i))return s;if(n.type.is(t))s.push(n.node);if(!n.nextSibling())return i==null?s:[]}}function _(e,t,r=t.length-1){for(let i=e.parent;r>=0;i=i.parent){if(!i)return false;if(!i.type.isAnonymous){if(t[r]&&t[r]!=i.name)return false;r--}}return true}class k{constructor(e,t,r,i){this.parent=e;this.buffer=t;this.index=r;this.start=i}}class A{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,r){this.context=e;this._parent=t;this.index=r;this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,t,r){let{buffer:i}=this.context;let n=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.context.start,r);return n<0?null:new A(this.context,this,n)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,r=0){if(r&d.ExcludeBuffers)return null;let{buffer:i}=this.context;let n=i.findChild(this.index+4,i.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return n<0?null:new A(this.context,this,n)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context;let t=e.buffer[this.index+3];if(t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length))return new A(this.context,this._parent,t);return this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context;let t=this._parent?this._parent.index+4:0;if(this.index==t)return this.externalSibling(-1);return new A(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}cursor(e=0){return new C(this,e)}get tree(){return null}toTree(){let e=[],t=[];let{buffer:r}=this.context;let i=this.index+4,n=r.buffer[this.index+3];if(n>i){let s=r.buffer[this.index+1];e.push(r.slice(i,n,s));t.push(0)}return new c(this.type,e,t,this.to-this.from)}resolve(e,t=0){return y(this,e,t,false)}resolveInner(e,t=0){return y(this,e,t,true)}enterUnfinishedNodesBefore(e){return x(this,e)}toString(){return this.context.buffer.childString(this.index)}getChild(e,t=null,r=null){let i=v(this,e,t,r);return i.length?i[0]:null}getChildren(e,t=null,r=null){return v(this,e,t,r)}get node(){return this}matchContext(e){return _(this,e)}}class C{get name(){return this.type.name}constructor(e,t=0){this.mode=t;this.buffer=null;this.stack=[];this.index=0;this.bufferNode=null;if(e instanceof w){this.yieldNode(e)}else{this._tree=e.context.parent;this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e;this.yieldBuf(e.index)}}yieldNode(e){if(!e)return false;this._tree=e;this.type=e.type;this.from=e.from;this.to=e.to;return true}yieldBuf(e,t){this.index=e;let{start:r,buffer:i}=this.buffer;this.type=t||i.set.types[i.buffer[e]];this.from=r+i.buffer[e+1];this.to=r+i.buffer[e+2];return true}yield(e){if(!e)return false;if(e instanceof w){this.buffer=null;return this.yieldNode(e)}this.buffer=e.context;return this.yieldBuf(e.index,e.type)}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,r,this.mode));let{buffer:i}=this.buffer;let n=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.buffer.start,r);if(n<0)return false;this.stack.push(this.index);return this.yieldBuf(n)}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,r=this.mode){if(!this.buffer)return this.yield(this._tree.enter(e,t,r));return r&d.ExcludeBuffers?false:this.enterChild(1,e,t)}parent(){if(!this.buffer)return this.yieldNode(this.mode&d.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&d.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();this.buffer=null;return this.yieldNode(e)}sibling(e){if(!this.buffer)return!this._tree._parent?false:this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode));let{buffer:t}=this.buffer,r=this.stack.length-1;if(e<0){let e=r<0?0:this.stack[r]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(r<0?t.buffer.length:t.buffer[this.stack[r]+3]))return this.yieldBuf(e)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):false}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return false}else{for(let e=0;e<this.index;e++)if(i.buffer.buffer[e+3]<this.index)return false}({index:t,parent:r}=i)}else{({index:t,_parent:r}=this._tree)}for(;r;({index:t,_parent:r}=r)){if(t>-1)for(let i=t+e,n=e<0?-1:r._tree.children.length;i!=n;i+=e){let e=r._tree.children[i];if(this.mode&d.IncludeAnonymous||e instanceof m||!e.type.isAnonymous||S(e))return false}}return true}move(e,t){if(t&&this.enterChild(e,0,4))return true;for(;;){if(this.sibling(e))return true;if(this.atLastNode(e)||!this.parent())return false}}next(e=true){return this.move(1,e)}prev(e=true){return this.move(-1,e)}moveTo(e,t=0){while(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))if(!this.parent())break;while(this.enterChild(1,e,t)){}return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,r=0;if(e&&e.context==this.buffer){e:for(let i=this.index,n=this.stack.length;n>=0;){for(let s=e;s;s=s._parent)if(s.index==i){if(i==this.index)return s;t=s;r=n+1;break e}i=this.stack[--n]}}for(let i=r;i<this.stack.length;i++)t=new A(this.buffer,t,this.stack[i]);return this.bufferNode=new A(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let r=0;;){let i=false;if(this.type.isAnonymous||e(this)!==false){if(this.firstChild()){r++;continue}if(!this.type.isAnonymous)i=true}for(;;){if(i&&t)t(this);i=this.type.isAnonymous;if(this.nextSibling())break;if(!r)return;this.parent();r--;i=true}}}matchContext(e){if(!this.buffer)return _(this.node,e);let{buffer:t}=this.buffer,{types:r}=t.set;for(let i=e.length-1,n=this.stack.length-1;i>=0;n--){if(n<0)return _(this.node,e,i);let s=r[t.buffer[this.stack[n]]];if(!s.isAnonymous){if(e[i]&&e[i]!=s.name)return false;i--}}return true}}function S(e){return e.children.some((e=>e instanceof m||!e.type.isAnonymous||S(e)))}function N(e){var t;let{buffer:r,nodeSet:n,maxBufferLength:s=i,reused:o=[],minRepeatType:f=n.types.length}=e;let h=Array.isArray(r)?new g(r,r.length):r;let u=n.types;let a=0,p=0;function d(e,t,r,i,l){let{id:c,start:g,end:_,size:k}=h;let A=p;while(k<0){h.next();if(k==-1){let t=o[c];r.push(t);i.push(g-e);return}else if(k==-3){a=c;return}else if(k==-4){p=c;return}else{throw new RangeError(`Unrecognized record size: ${k}`)}}let C=u[c],S,N;let I=g-e;if(_-g<=s&&(N=w(h.pos-t,l))){let t=new Uint16Array(N.size-N.skip);let r=h.pos-N.size,i=t.length;while(h.pos>r)i=v(N.start,t,i);S=new m(t,_-N.start,n);I=N.start-e}else{let e=h.pos-k;h.next();let t=[],r=[];let i=c>=f?c:-1;let n=0,l=_;while(h.pos>e){if(i>=0&&h.id==i&&h.size>=0){if(h.end<=l-s){x(t,r,g,n,h.end,l,i,A);n=t.length;l=h.end}h.next()}else{d(g,e,t,r,i)}}if(i>=0&&n>0&&n<t.length)x(t,r,g,n,g,l,i,A);t.reverse();r.reverse();if(i>-1&&n>0){let e=b(C);S=T(C,t,r,0,t.length,0,_-g,e,e)}else{S=y(C,t,r,_-g,A-_)}}r.push(S);i.push(I)}function b(e){return(t,r,i)=>{let n=0,s=t.length-1,o,f;if(s>=0&&(o=t[s])instanceof c){if(!s&&o.type==e&&o.length==i)return o;if(f=o.prop(l.lookAhead))n=r[s]+o.length+f}return y(e,t,r,i,n)}}function x(e,t,r,i,s,l,o,f){let h=[],u=[];while(e.length>i){h.push(e.pop());u.push(t.pop()+r-s)}e.push(y(n.types[o],h,u,l-s,f-l));t.push(s-r)}function y(e,t,r,i,n=0,s){if(a){let e=[l.contextHash,a];s=s?[e].concat(s):[e]}if(n>25){let e=[l.lookAhead,n];s=s?[e].concat(s):[e]}return new c(e,t,r,i,s)}function w(e,t){let r=h.fork();let i=0,n=0,l=0,o=r.end-s;let u={size:0,start:0,skip:0};e:for(let s=r.pos-e;r.pos>s;){let e=r.size;if(r.id==t&&e>=0){u.size=i;u.start=n;u.skip=l;l+=4;i+=4;r.next();continue}let h=r.pos-e;if(e<0||h<s||r.start<o)break;let a=r.id>=f?4:0;let p=r.start;r.next();while(r.pos>h){if(r.size<0){if(r.size==-3)a+=4;else break e}else if(r.id>=f){a+=4}r.next()}n=p;i+=e;l+=a}if(t<0||i==e){u.size=i;u.start=n;u.skip=l}return u.size>4?u:undefined}function v(e,t,r){let{id:i,start:n,end:s,size:l}=h;h.next();if(l>=0&&i<f){let o=r;if(l>4){let i=h.pos-(l-4);while(h.pos>i)r=v(e,t,r)}t[--r]=o;t[--r]=s-e;t[--r]=n-e;t[--r]=i}else if(l==-3){a=i}else if(l==-4){p=i}return r}let _=[],k=[];while(h.pos>0)d(e.start||0,e.bufferStart||0,_,k,-1);let A=(t=e.length)!==null&&t!==void 0?t:_.length?k[0]+_[0].length:0;return new c(u[e.topID],_.reverse(),k.reverse(),A)}const I=new WeakMap;function B(e,t){if(!e.isAnonymous||t instanceof m||t.type!=e)return 1;let r=I.get(t);if(r==null){r=1;for(let i of t.children){if(i.type!=e||!(i instanceof c)){r=1;break}r+=B(e,i)}I.set(t,r)}return r}function T(e,t,r,i,n,s,l,o,f){let h=0;for(let c=i;c<n;c++)h+=B(e,t[c]);let u=Math.ceil(h*1.5/8);let a=[],p=[];function d(t,r,i,n,l){for(let o=i;o<n;){let i=o,h=r[o],c=B(e,t[o]);o++;for(;o<n;o++){let r=B(e,t[o]);if(c+r>=u)break;c+=r}if(o==i+1){if(c>u){let e=t[i];d(e.children,e.positions,0,e.children.length,r[i]+l);continue}a.push(t[i])}else{let n=r[o-1]+t[o-1].length-h;a.push(T(e,t,r,i,o,h,n,null,f))}p.push(h+l-s)}}d(t,r,i,n,0);return(o||f)(a,p,l)}class M{constructor(){this.map=new WeakMap}setBuffer(e,t,r){let i=this.map.get(e);if(!i)this.map.set(e,i=new Map);i.set(t,r)}getBuffer(e,t){let r=this.map.get(e);return r&&r.get(t)}set(e,t){if(e instanceof A)this.setBuffer(e.context.buffer,e.index,t);else if(e instanceof w)this.map.set(e.tree,t)}get(e){return e instanceof A?this.getBuffer(e.context.buffer,e.index):e instanceof w?this.map.get(e.tree):undefined}cursorSet(e,t){if(e.buffer)this.setBuffer(e.buffer.buffer,e.index,t);else this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class z{constructor(e,t,r,i,n=false,s=false){this.from=e;this.to=t;this.tree=r;this.offset=i;this.open=(n?1:0)|(s?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],r=false){let i=[new z(0,e.length,e,0,false,r)];for(let n of t)if(n.to>e.length)i.push(n);return i}static applyChanges(e,t,r=128){if(!t.length)return e;let i=[];let n=1,s=e.length?e[0]:null;for(let l=0,o=0,f=0;;l++){let h=l<t.length?t[l]:null;let u=h?h.fromA:1e9;if(u-o>=r)while(s&&s.from<u){let t=s;if(o>=t.from||u<=t.to||f){let e=Math.max(t.from,o)-f,r=Math.min(t.to,u)-f;t=e>=r?null:new z(e,r,t.tree,t.offset+f,l>0,!!h)}if(t)i.push(t);if(s.to>u)break;s=n<e.length?e[n++]:null}if(!h)break;o=h.toA;f=h.toA-h.toB}return i}}class P{startParse(e,t,r){if(typeof e=="string")e=new E(e);r=!r?[new s(0,e.length)]:r.length?r.map((e=>new s(e.from,e.to))):[new s(0,0)];return this.createParse(e,t||[],r)}parse(e,t,r){let i=this.startParse(e,t,r);for(;;){let e=i.advance();if(e)return e}}}class E{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return false}read(e,t){return this.string.slice(e,t)}}function O(e){return(t,r,i,n)=>new W(t,e,r,i,n)}class j{constructor(e,t,r,i,n){this.parser=e;this.parse=t;this.overlay=r;this.target=i;this.ranges=n}}class F{constructor(e,t,r,i,n,s,l){this.parser=e;this.predicate=t;this.mounts=r;this.index=i;this.start=n;this.target=s;this.prev=l;this.depth=0;this.ranges=[]}}const D=new l({perNode:true});class W{constructor(e,t,r,i,n){this.nest=t;this.input=r;this.fragments=i;this.ranges=n;this.inner=[];this.innerDone=0;this.baseTree=null;this.stoppedAt=null;this.baseParse=e}advance(){if(this.baseParse){let e=this.baseParse.advance();if(!e)return null;this.baseParse=null;this.baseTree=e;this.startInner();if(this.stoppedAt!=null)for(let t of this.inner)t.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let e=this.baseTree;if(this.stoppedAt!=null)e=new c(e.type,e.children,e.positions,e.length,e.propValues.concat([[D,this.stoppedAt]]));return e}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let r=Object.assign(Object.create(null),e.target.props);r[l.mounted.id]=new o(t,e.overlay,e.parser);e.target.props=r}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++){if(this.inner[t].ranges[0].from<e)e=Math.min(e,this.inner[t].parse.parsedPos)}return e}stopAt(e){this.stoppedAt=e;if(this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new H(this.fragments);let t=null;let r=null;let i=new C(new w(this.baseTree,this.ranges[0].from,0,null),d.IncludeAnonymous|d.IgnoreMounts);e:for(let n,l;this.stoppedAt==null||i.from<this.stoppedAt;){let o=true,f;if(e.hasNode(i)){if(t){let e=t.mounts.find((e=>e.frag.from<=i.from&&e.frag.to>=i.to&&e.mount.overlay));if(e)for(let r of e.mount.overlay){let n=r.from+e.pos,s=r.to+e.pos;if(n>=i.from&&s<=i.to&&!t.ranges.some((e=>e.from<s&&e.to>n)))t.ranges.push({from:n,to:s})}}o=false}else if(r&&(l=R(r.ranges,i.from,i.to))){o=l!=2}else if(!i.type.isAnonymous&&i.from<i.to&&(n=this.nest(i,this.input))){if(!i.tree)L(i);let l=e.findMounts(i.from,n.parser);if(typeof n.overlay=="function"){t=new F(n.parser,n.overlay,l,this.inner.length,i.from,i.tree,t)}else{let e=J(this.ranges,n.overlay||[new s(i.from,i.to)]);if(e.length)this.inner.push(new j(n.parser,n.parser.startParse(this.input,$(l,e),e),n.overlay?n.overlay.map((e=>new s(e.from-i.from,e.to-i.from))):null,i.tree,e));if(!n.overlay)o=false;else if(e.length)r={ranges:e,depth:0,prev:r}}}else if(t&&(f=t.predicate(i))){if(f===true)f=new s(i.from,i.to);if(f.from<f.to)t.ranges.push(f)}if(o&&i.firstChild()){if(t)t.depth++;if(r)r.depth++}else{for(;;){if(i.nextSibling())break;if(!i.parent())break e;if(t&&!--t.depth){let e=J(this.ranges,t.ranges);if(e.length)this.inner.splice(t.index,0,new j(t.parser,t.parser.startParse(this.input,$(t.mounts,e),e),t.ranges.map((e=>new s(e.from-t.start,e.to-t.start))),t.target,e));t=t.prev}if(r&&!--r.depth)r=r.prev}}}}}function R(e,t,r){for(let i of e){if(i.from>=r)break;if(i.to>t)return i.from<=t&&i.to>=r?2:1}return 0}function U(e,t,r,i,n,s){if(t<r){let l=e.buffer[t+1];i.push(e.slice(t,r,l));n.push(l-s)}}function L(e){let{node:t}=e,r=0;do{e.parent();r++}while(!e.tree);let i=0,n=e.tree,s=0;for(;;i++){s=n.positions[i]+e.from;if(s<=t.from&&s+n.children[i].length>=t.to)break}let l=n.children[i],o=l.buffer;function f(e,r,i,n,h){let u=e;while(o[u+2]+s<=t.from)u=o[u+3];let a=[],p=[];U(l,e,u,a,p,n);let d=o[u+1],g=o[u+2];let m=d+s==t.from&&g+s==t.to&&o[u]==t.type.id;a.push(m?t.toTree():f(u+4,o[u+3],l.set.types[o[u]],d,g-d));p.push(d-n);U(l,o[u+3],r,a,p,n);return new c(i,a,p,h)}n.children[i]=f(0,o.length,h.none,0,l.length);for(let h=0;h<=r;h++)e.childAfter(t.from)}class V{constructor(e,t){this.offset=t;this.done=false;this.cursor=e.cursor(d.IncludeAnonymous|d.IgnoreMounts)}moveTo(e){let{cursor:t}=this,r=e-this.offset;while(!this.done&&t.from<r){if(t.to>=e&&t.enter(r,1,d.IgnoreOverlays|d.ExcludeBuffers));else if(!t.next(false))this.done=true}}hasNode(e){this.moveTo(e.from);if(!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree){for(let t=this.cursor.tree;;){if(t==e.tree)return true;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof c)t=t.children[0];else break}}return false}}class H{constructor(e){var t;this.fragments=e;this.curTo=0;this.fragI=0;if(e.length){let r=this.curFrag=e[0];this.curTo=(t=r.tree.prop(D))!==null&&t!==void 0?t:r.to;this.inner=new V(r.tree,-r.offset)}else{this.curFrag=this.inner=null}}hasNode(e){while(this.curFrag&&e.from>=this.curTo)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;this.fragI++;if(this.fragI==this.fragments.length){this.curFrag=this.inner=null}else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(D))!==null&&e!==void 0?e:t.to;this.inner=new V(t.tree,-t.offset)}}findMounts(e,t){var r;let i=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let e=this.inner.cursor.node;e;e=e.parent){let n=(r=e.tree)===null||r===void 0?void 0:r.prop(l.mounted);if(n&&n.parser==t){for(let t=this.fragI;t<this.fragments.length;t++){let r=this.fragments[t];if(r.from>=e.to)break;if(r.tree==this.curFrag.tree)i.push({frag:r,pos:e.from-r.offset,mount:n})}}}}return i}}function J(e,t){let r=null,i=t;for(let n=1,l=0;n<e.length;n++){let o=e[n-1].to,f=e[n].from;for(;l<i.length;l++){let e=i[l];if(e.from>=f)break;if(e.to<=o)continue;if(!r)i=r=t.slice();if(e.from<o){r[l]=new s(e.from,o);if(e.to>f)r.splice(l+1,0,new s(f,e.to))}else if(e.to>f){r[l--]=new s(f,e.to)}else{r.splice(l--,1)}}}return i}function G(e,t,r,i){let n=0,l=0,o=false,f=false,h=-1e9;let u=[];for(;;){let a=n==e.length?1e9:o?e[n].to:e[n].from;let p=l==t.length?1e9:f?t[l].to:t[l].from;if(o!=f){let e=Math.max(h,r),t=Math.min(a,p,i);if(e<t)u.push(new s(e,t))}h=Math.min(a,p);if(h==1e9)break;if(a==h){if(!o)o=true;else{o=false;n++}}if(p==h){if(!f)f=true;else{f=false;l++}}}return u}function $(e,t){let r=[];for(let{pos:i,mount:n,frag:l}of e){let e=i+(n.overlay?n.overlay[0].from:0),o=e+n.tree.length;let f=Math.max(l.from,e),h=Math.min(l.to,o);if(n.overlay){let o=n.overlay.map((e=>new s(e.from+i,e.to+i)));let u=G(t,o,f,h);for(let t=0,i=f;;t++){let s=t==u.length,o=s?h:u[t].from;if(o>i)r.push(new z(i,o,n.tree,-e,l.from>=i||l.openStart,l.to<=o||l.openEnd));if(s)break;i=u[t].to}}else{r.push(new z(f,h,n.tree,-e,l.from>=e||l.openStart,l.to<=o||l.openEnd))}}return r}}}]); | ;(self[