1import{O as Wt,R as Ht,a as rt,b as it,d as L,f as ye,h as Ut,i as pe,l as j}from"./chunk-MUL6BMC6.js";import{A as Re,B as jt,l as $,m as Ze,n as et,s as be,v as de,w as tt,z as nt}from"./chunk-ZNKLWIXO.js";import{a as Ee,b as zt}from"./chunk-HE2D45TV.js";var Wn=0,F=class{constructor(e,t){this.from=e,this.to=t}},b=class{constructor(e={}){this.id=Wn++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=_.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}};b.closedBy=new b({deserialize:r=>r.split(" ")});b.openedBy=new b({deserialize:r=>r.split(" ")});b.group=new b({deserialize:r=>r.split(" ")});b.isolate=new b({deserialize:r=>{if(r&&r!="rtl"&&r!="ltr"&&r!="auto")throw new RangeError("Invalid value for isolate: "+r);return r||"auto"}});b.contextHash=new b({perNode:!0});b.lookAhead=new b({perNode:!0});b.mounted=new b({perNode:!0});var ee=class{constructor(e,t,n,i=!1){this.tree=e,this.overlay=t,this.parser=n,this.bracketed=i}static get(e){return e&&e.props&&e.props[b.mounted.id]}},Hn=Object.create(null),_=class r{constructor(e,t,n,i=0){this.name=e,this.props=t,this.id=n,this.flags=i}static define(e){let t=e.props&&e.props.length?Object.create(null):Hn,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new r(e.name||"",t,e.id,n);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(i)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");
1t[s[0].id]=s[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!0;let t=this.prop(b.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let i of n.split(" "))t[i]=e[n];return n=>{for(let i=n.prop(b.group),s=-1;s<(i?i.length:0);s++){let l=t[s<0?n.name:i[s]];if(l)return l}}}};_.none=new _("",Object.create(null),0,8);var Fe=class r{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 n of this.types){let i=null;for(let s of e){let l=s(n);if(l){i||(i=Object.assign({},n.props));let o=l[1],a=l[0];a.combine&&a.id in i&&(o=a.combine(i[a.id],o)),i[a.id]=o}}t.push(i?new _(n.name,i,n.id,n.flags):n)}return new r(t)}},_e=new WeakMap,Vt=new WeakMap,S=(function(r){return r[r.ExcludeBuffers=1]="ExcludeBuffers",r[r.IncludeAnonymous=2]="IncludeAnonymous",r[r.IgnoreMounts=4]="IgnoreMounts",r[r.IgnoreOverlays=8]="IgnoreOverlays",r[r.EnterBracketed=16]="EnterBracketed",r})(S||{}),A=class r{constructor(e,t,n,i,s){if(this.type=e,this.children=t,this.positions=n,this.length=i,this.props=null,s&&s.length){this.props=Object.create(null);for(let[l,o]of s)this.props[typeof l=="number"?l:l.id]=o}}toString(){let e=ee.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let n of this.children){let i=n.toString();i&&(t&&(t+=","),t+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new ge(this.topNode,e)}cursorAt(e,t=0,n=0){let i=_e.get(this)||this.topNode,s=new ge(i);return s.moveTo(e,t),_e.set(this,s._tree),s}get topNode(){return new z(this,0,0,null)}resolve(e,t=0){let n=xe(_e.get(this)||this.topNode,e,t,!1);return _e.set(this,n),n}resolveInner(e,t=0){let n=xe(Vt.get(this)||this.topNode,e,t,!0);return Vt.set(this,n),n}resolveStack(e,t=0){return Vn(this,e,t)}iterate(e){let{enter:t,leave:n,from:i=0,to:s=this.length}=e,l=e.mode||0,o=(l&S.IncludeAnonymous)>0;for(let a=this.cursor(l|S.IncludeAnonymous);;){let h=!1;if(a.from<=s&&a.to>=i&&(!o&&a.type.isAnonymous||t(a)!==!1)){if(a.firstChild())continue;h=!0}for(;h&&n&&(o||!a.type.isAnonymous)&&n(a),!a.nextSibling();){if(!a.parent())return;h=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];
vendor: 7,781 bytes, line 1
1if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:gt(_.none,this.children,this.positions,0,this.children.length,0,this.length,(t,n,i)=>new r(this.type,t,n,i,this.propValues),e.makeTree||((t,n,i)=>new r(_.none,t,n,i)))}static build(e){return $n(e)}};A.empty=new A(_.none,[],[],0);var st=class r{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 r(this.buffer,this.index)}},te=class r{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return _.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],n=this.buffer[e+3],i=this.set.types[t],s=i.name;if(/\W/.test(s)&&!i.isError&&(s=JSON.stringify(s)),e+=4,n==e)return s;let l=[];for(;e<n;)l.push(this.childString(e)),e=this.buffer[e+3];return s+"("+l.join(",")+")"}findChild(e,t,n,i,s){let{buffer:l}=this,o=-1;for(let a=e;a!=t&&!(Yt(s,i,l[a+1],l[a+2])&&(o=a,n>0));a=l[a+3]);return o}slice(e,t,n){let i=this.buffer,s=new Uint16Array(t-e),l=0;for(let o=e,a=0;o<t;){s[a++]=i[o++],s[a++]=i[o++]-n;let h=s[a++]=i[o++]-n;s[a++]=i[o++]-e,l=Math.max(l,h)}return new r(s,l,this.set)}};function Yt(r,e,t,n){switch(r){case-2:return t<e;case-1:return n>=e&&t<e;case 0:return t<e&&n>e;case 1:return t<=e&&n>e;case 2:return n>e;case 4:return!0}}function xe(r,e,t,n){for(var i;r.from==r.to||(t<1?r.from>=e:r.from>e)||(t>-1?r.to<=e:r.to<e);){let l=!n&&r instanceof z&&r.index<0?null:r.parent;if(!l)return r;r=l}let s=n?0:S.IgnoreOverlays;if(n)for(let l=r,o=l.parent;o;l=o,o=l.parent)l instanceof z&&l.index<0&&((i=o.enter(e,t,s))===null||i===void 0?void 0:i.from)!=l.from&&(r=o);for(;;){let l=r.enter(e,t,s);if(!l)return r;r=l}}var ze=class{cursor(e=0){return new ge(this,e)}getChild(e,t=null,n=null){let i=$t(this,e,t,n);return i.length?i[0]:null}getChildren(e,t=null,n=null){return $t(this,e,t,n)}resolve(e,t=0){return xe(this,e,t,!1)}resolveInner(e,t=0){return xe(this,e,t,!0)}matchContext(e){return lt(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let i=t.lastChild;if(!i||i.to!=t.to)break;i.type.isError&&i.from==i.to?(n=t,t=i.prevSibling):t=i}return n}get node(){return this}get next(){return this.parent}},z=class r extends ze{constructor(e,t,n,i){super(),this._tree=e,this.from=t,this.index=n,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,n,i,s=0){for(let l=this;;){for(let{children:o,positions:a}=l._tree,h=t>0?o.length:-1;e!=h;e+=t){let f=o[e],u=a[e]+l.from,p;if(!(!(s&S.EnterBracketed&&f instanceof A&&(p=ee.get(f))&&!p.overlay&&p.bracketed&&n>=u&&n<=u+f.length)&&!Yt(i,n,u,u+f.length))){if(f instanceof te){if(s&S.ExcludeBuffers)continue;let m=f.findChild(0,f.buffer.length,t,n-u,i);if(m>-1)return new ae(new ot(l,f,e,u),null,m)}else if(s&S.IncludeAnonymous||!f.type.isAnonymous||pt(f)){let m;if(!(s&S.IgnoreMounts)&&(m=ee.get(f))&&!m.overlay)return new r(m.tree,u,e,l);let y=new r(f,u,e,l);return s&S.IncludeAnonymous||!y.type.isAnonymous?y:y.nextChild(t<0?f.children.length-1:0,t,n,i,s)}}}if(s&S.IncludeAnonymous||!l.type.isAnonymous||(l.index>=0?e=l.index+t:e=t<0?-1:l._parent._tree.children.length,l=l._parent,!l))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)}prop(e){return this._tree.prop(e)}enter(e,t,n=0){let i;if(!(n&S.IgnoreOverlays)&&(i=ee.get(this._tree))&&i.overlay){let s=e-this.from,l=n&S.EnterBracketed&&i.bracketed;for(let{from:o,to:a}of i.overlay)if((t>0||l?o<=s:o<s)&&(t<0||l?a>=s:a>s))return new r(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;for(;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}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};function $t(r,e,t,n){let i=r.cursor(),s=[];if(!i.firstChild())return s;if(t!=null){for(let l=!1;!l;)if(l=i.type.is(t),!i.nextSibling())return s}for(;;){if(n!=null&&i.type.is(n))return s;if(i.type.is(e)&&s.push(i.node),!i.nextSibling())return n==null?s:[]}}function lt(r,e,t=e.length-1){for(let n=r;t>=0;n=n.parent){if(!n)return!1;if(!n.type.isAnonymous){if(e[t]&&e[t]!=n.name)return!1;t--}}return!0}var ot=class{constructor(e,t,n,i){this.parent=e,this.buffer=t,this.index=n,this.start=i}},ae=class r extends ze{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,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.context.start,n);return s<0?null:new r(this.context,this,s)}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)}prop(e){return this.type.prop(e)}enter(e,t,n=0){if(n&S.ExcludeBuffers)return null;let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new r(this.context,this,s)}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,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new r(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new r(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,i=this.index+4,s=n.buffer[this.index+3];if(s>i){let l=n.buffer[this.index+1];e.push(n.slice(i,s,l)),t.push(0)}return new A(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}};function Zt(r){if(!r.length)return null;let e=0,t=r[0];for(let s=1;s<r.length;s++){let l=r[s];(l.from>t.from||l.to<t.to)&&(t=l,e=s)}let n=t instanceof z&&t.index<0?null:t.parent,i=r.slice();return n?i[e]=n:i.splice(e,1),new at(i,t)}var at=class{constructor(e,t){this.heads=e,this.node=t}get next(){return Zt(this.heads)}};function Vn(r,e,t){let n=r.resolveInner(e,t),i=null;for(let s=n instanceof z?n:n.context.parent;s;s=s.parent)if(s.index<0){let l=s.parent;(i||(i=[n])).push(l.resolve(e,t)),s=l}else{let l=ee.get(s.tree);if(l&&l.overlay&&l.overlay[0].from<=e&&l.overlay[l.overlay.length-1].to>=e){let o=new z(l.tree,l.overlay[0].from+s.from,-1,s);(i||(i=[n])).push(xe(o,e,t,!1))}}return i?Zt(i):n}var ge=class{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~S.EnterBracketed,e instanceof z)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;
vendor: 4,065 bytes, line 1
1for(let n=e._parent;n;n=n._parent)this.stack.unshift(n.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:n,buffer:i}=this.buffer;return this.type=t||i.set.types[i.buffer[e]],this.from=n+i.buffer[e+1],this.to=n+i.buffer[e+2],!0}yield(e){return e?e instanceof z?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:i}=this.buffer,s=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.buffer.start,n);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}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,n=this.mode){return this.buffer?n&S.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&S.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&S.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let i=n<0?0:this.stack[n]+4;if(this.index!=i)return this.yieldBuf(t.findChild(i,this.index,-1,0,4))}else{let i=t.buffer[this.index+3];if(i<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(i)}return n<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(i.buffer.buffer[s+3]<this.index)return!1;({index:t,parent:n}=i)}else({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let s=t+e,l=e<0?-1:n._tree.children.length;s!=l;s+=e){let o=n._tree.children[s];if(this.mode&S.IncludeAnonymous||o instanceof te||!o.type.isAnonymous||pt(o))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)e:for(let i=this.index,s=this.stack.length;s>=0;){for(let l=e;l;l=l._parent)if(l.index==i){if(i==this.index)return l;t=l,n=s+1;break e}i=this.stack[--s]}for(let i=n;i<this.stack.length;i++)t=new ae(this.buffer,t,this.stack[i]);return this.bufferNode=new ae(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&t&&t(this),i=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,i=!0}}}matchContext(e){if(!this.buffer)return lt(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let i=e.length-1,s=this.stack.length-1;i>=0;s--){if(s<0)return lt(this._tree,e,i);let l=n[t.buffer[this.stack[s]]];if(!l.isAnonymous){if(e[i]&&e[i]!=l.name)return!1;i--}}return!0}};function pt(r){return r.children.some(e=>e instanceof te||!e.type.isAnonymous||pt(e))}function $n(r){var e;let{buffer:t,nodeSet:n,maxBufferLength:i=1024,reused:s=[],minRepeatType:l=n.types.length}
vendor: 3,860 bytes, line 1
1=r,o=Array.isArray(t)?new st(t,t.length):t,a=n.types,h=0,f=0;function u(w,N,g,B,C,M){let{id:x,start:k,end:P,size:I}=o,R=f,Z=h;if(I<0)if(o.next(),I==-1){let X=s[x];g.push(X),B.push(k-w);return}else if(I==-3){h=x;return}else if(I==-4){f=x;return}else throw new RangeError(`Unrecognized record size: ${I}`);let ke=a[x],Oe,le,Lt=k-w;if(P-k<=i&&(le=D(o.pos-N,C))){let X=new Uint16Array(le.size-le.skip),V=o.pos-le.size,G=X.length;for(;o.pos>V;)G=O(le.start,X,G);Oe=new te(X,P-le.start,n),Lt=le.start-w}else{let X=o.pos-I;o.next();let V=[],G=[],oe=x>=l?x:-1,ce=0,De=P;for(;o.pos>X;)oe>=0&&o.id==oe&&o.size>=0?(o.end<=De-i&&(y(V,G,k,ce,o.end,De,oe,R,Z),ce=V.length,De=o.end),o.next()):M>2500?p(k,X,V,G):u(k,X,V,G,oe,M+1);if(oe>=0&&ce>0&&ce<V.length&&y(V,G,k,ce,k,De,oe,R,Z),V.reverse(),G.reverse(),oe>-1&&ce>0){let Ft=m(ke,Z);Oe=gt(ke,V,G,0,V.length,0,P-k,Ft,Ft)}else Oe=v(ke,V,G,P-k,R-P,Z)}g.push(Oe),B.push(Lt)}function p(w,N,g,B){let C=[],M=0,x=-1;for(;o.pos>N;){let{id:k,start:P,end:I,size:R}=o;if(R>4)o.next();else{if(x>-1&&P<x)break;x<0&&(x=I-i),C.push(k,P,I),M++,o.next()}}if(M){let k=new Uint16Array(M*4),P=C[C.length-2];for(let I=C.length-3,R=0;I>=0;I-=3)k[R++]=C[I],k[R++]=C[I+1]-P,k[R++]=C[I+2]-P,k[R++]=R;g.push(new te(k,C[2]-P,n)),B.push(P-w)}}function m(w,N){return(g,B,C)=>{let M=0,x=g.length-1,k,P;if(x>=0&&(k=g[x])instanceof A){if(!x&&k.type==w&&k.length==C)return k;(P=k.prop(b.lookAhead))&&(M=B[x]+k.length+P)}return v(w,g,B,C,M,N)}}function y(w,N,g,B,C,M,x,k,P){let I=[],R=[];for(;w.length>B;)I.push(w.pop()),R.push(N.pop()+g-C);w.push(v(n.types[x],I,R,M-C,k-M,P)),N.push(C-g)}function v(w,N,g,B,C,M,x){if(M){let k=[b.contextHash,M];x=x?[k].concat(x):[k]}if(C>25){let k=[b.lookAhead,C];x=x?[k].concat(x):[k]}return new A(w,N,g,B,x)}function D(w,N){let g=o.fork(),B=0,C=0,M=0,x=g.end-i,k={size:0,start:0,skip:0};e:for(let P=g.pos-w;g.pos>P;){let I=g.size;if(g.id==N&&I>=0){k.size=B,k.start=C,k.skip=M,M+=4,B+=4,g.next();continue}let R=g.pos-I;if(I<0||R<P||g.start<x)break;let Z=g.id>=l?4:0,ke=g.start;for(g.next();g.pos>R;){if(g.size<0)if(g.size==-3||g.size==-4)Z+=4;else break e;else g.id>=l&&(Z+=4);g.next()}C=ke,B+=I,M+=Z}return(N<0||B==w)&&(k.size=B,k.start=C,k.skip=M),k.size>4?k:void 0}function O(w,N,g){let{id:B,start:C,end:M,size:x}=o;if(o.next(),x>=0&&B<l){let k=g;if(x>4){let P=o.pos-(x-4);for(;o.pos>P;)g=O(w,N,g)}N[--g]=k,N[--g]=M-w,N[--g]=C-w,N[--g]=B}else x==-3?h=B:x==-4&&(f=B);return g}let E=[],T=[];for(;o.pos>0;)u(r.start||0,r.bufferStart||0,E,T,-1,0);let H=(e=r.length)!==null&&e!==void 0?e:E.length?T[0]+E[0].length:0;return new A(a[r.topID],E.reverse(),T.reverse(),H)}var qt=new WeakMap;function Le(r,e){if(!r.isAnonymous||e instanceof te||e.type!=r)return 1;let t=qt.get(e);if(t==null){t=1;for(let n of e.children){if(n.type!=r||!(n instanceof A)){t=1;break}t+=Le(r,n)}qt.set(e,t)}return t}function gt(r,e,t,n,i,s,l,o,a){let h=0;for(let y=n;y<i;y++)h+=Le(r,e[y]);let f=Math.ceil(h*1.5/8),u=[],p=[];function m(y,v,D,O,E){for(let T=D;T<O;){let H=T,w=v[T],N=Le(r,y[T]);for(T++;T<O;T++){let g=Le(r,y[T]);if(N+g>=f)break;N+=g}if(T==H+1){if(N>f){let g=y[H];m(g.children,g.positions,0,g.children.length,v[H]+E);continue}u.push(y[H])}else{let g=v[T-1]+y[T-1].length-w;u.push(gt(r,y,v,H,T,w,g,null,a))}p.push(w+E-s)}}return m(e,t,n,i,0),(o||a)(u,p,l)}var Gt=class{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof ae?this.setBuffer(e.context.buffer,e.index,t):e instanceof z&&this.map.set(e.tree,t)}get(e){return e instanceof ae?this.getBuffer(e.context.buffer,e.index):e instanceof z?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}
vendor: 4,639 bytes, line 1
1,Y=class r{constructor(e,t,n,i,s=!1,l=!1){this.from=e,this.to=t,this.tree=n,this.offset=i,this.open=(s?1:0)|(l?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],n=!1){let i=[new r(0,e.length,e,0,!1,n)];for(let s of t)s.to>e.length&&i.push(s);return i}static applyChanges(e,t,n=128){if(!t.length)return e;let i=[],s=1,l=e.length?e[0]:null;for(let o=0,a=0,h=0;;o++){let f=o<t.length?t[o]:null,u=f?f.fromA:1e9;if(u-a>=n)for(;l&&l.from<u;){let p=l;if(a>=p.from||u<=p.to||h){let m=Math.max(p.from,a)-h,y=Math.min(p.to,u)-h;p=m>=y?null:new r(m,y,p.tree,p.offset+h,o>0,!!f)}if(p&&i.push(p),l.to>u)break;l=s<e.length?e[s++]:null}if(!f)break;a=f.toA,h=f.toA-f.toB}return i}},we=class{startParse(e,t,n){return typeof e=="string"&&(e=new ht(e)),n=n?n.length?n.map(i=>new F(i.from,i.to)):[new F(0,0)]:[new F(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let i=this.startParse(e,t,n);for(;;){let s=i.advance();if(s)return s}}},ht=class{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}};function Vr(r){return(e,t,n,i)=>new ct(e,r,t,n,i)}var je=class{constructor(e,t,n,i,s,l){this.parser=e,this.parse=t,this.overlay=n,this.bracketed=i,this.target=s,this.from=l}};function Jt(r){if(!r.length||r.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(r))}var ft=class{constructor(e,t,n,i,s,l,o,a){this.parser=e,this.predicate=t,this.mounts=n,this.index=i,this.start=s,this.bracketed=l,this.target=o,this.prev=a,this.depth=0,this.ranges=[]}},ut=new b({perNode:!0}),ct=class{constructor(e,t,n,i,s){this.nest=t,this.input=n,this.fragments=i,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let n=this.baseParse.advance();if(!n)return null;if(this.baseParse=null,this.baseTree=n,this.startInner(),this.stoppedAt!=null)for(let i of this.inner)i.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let n=this.baseTree;return this.stoppedAt!=null&&(n=new A(n.type,n.children,n.positions,n.length,n.propValues.concat([[ut,this.stoppedAt]]))),n}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let n=Object.assign(Object.create(null),e.target.props);n[b.mounted.id]=new ee(t,e.overlay,e.parser,e.bracketed),e.target.props=n}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,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 dt(this.fragments),t=null,n=null,i=new ge(new z(this.baseTree,this.ranges[0].from,0,null),S.IncludeAnonymous|S.IgnoreMounts);e:for(let s,l;;){let o=!0,a;if(this.stoppedAt!=null&&i.from>=this.stoppedAt)o=!1;else if(e.hasNode(i)){if(t){let h=t.mounts.find(f=>f.frag.from<=i.from&&f.frag.to>=i.to&&f.mount.overlay);if(h)for(let f of h.mount.overlay){let u=f.from+h.pos,p=f.to+h.pos;u>=i.from&&p<=i.to&&!t.ranges.some(m=>m.from<p&&m.to>u)&&t.ranges.push({from:u,to:p})}}o=!1}else if(n&&(l=qn(n.ranges,i.from,i.to)))o=l!=2;else if(!i.type.isAnonymous&&(s=this.nest(i,this.input))&&(i.from<i.to||!s.overlay)){i.tree||(Gn(i),t&&t.depth++,n&&n.depth++);let h=e.findMounts(i.from,s.parser);if(typeof s.overlay=="function")t=new ft(s.parser,s.overlay,h,this.inner.length,i.from,!!s.bracketed,i.tree,t);else{let f=Qt(this.ranges,s.overlay||(i.from<i.to?[new F(i.from,i.to)]:[]));f.length&&Jt(f),(f.length||!s.overlay)&&this.inner.push(new je(s.parser,f.length?s.parser.startParse(this.input,Xt(h,f),f):s.parser.startParse(""),s.overlay?s.overlay.map(u=>new F(u.from-i.from,u.to-i.from)):null,!!s.bracketed,i.tree,f.length?f[0].from:i.from)),s.overlay?f.length&&(n={ranges:f,depth:0,prev:n}):o=!1}}else if(t&&(a=t.predicate(i))&&(a===!0&&(a=new F(i.from,i.to)),a.from<a.to)){let h=t.ranges.length-1;h>=0&&t.ranges[h].to==a.from?t.ranges[h]={from:t.ranges[h].from,to:a.to}:t.ranges.push(a)}if(o&&i.firstChild())t&&t.depth++,n&&n.depth++;else for(;!i.nextSibling();){if(!i.parent())break e;if(t&&!--t.depth){let h=Qt(this.ranges,t.ranges);h.length&&(Jt(h),this.inner.splice(t.index,0,new je(t.parser,t.parser.startParse(this.input,Xt(t.mounts,h),h),t.ranges.map(f=>new F(f.from-t.start,f.to-t.start)),t.bracketed,t.target,h[0].from))),t=t.prev}n&&!--n.depth&&(n=n.prev)}}}};function qn(r,e,t){for(let n of r){if(n.from>=t)break;
vendor: 3,336 bytes, line 1
1if(n.to>e)return n.from<=e&&n.to>=t?2:1}return 0}function Kt(r,e,t,n,i,s){if(e<t){let l=r.buffer[e+1];n.push(r.slice(e,t,l)),i.push(l-s)}}function Gn(r){let{node:e}=r,t=[],n=e.context.buffer;do t.push(r.index),r.parent();while(!r.tree);let i=r.tree,s=i.children.indexOf(n),l=i.children[s],o=l.buffer,a=[s];function h(f,u,p,m,y,v){let D=t[v],O=[],E=[];Kt(l,f,D,O,E,m);let T=o[D+1],H=o[D+2];a.push(O.length);let w=v?h(D+4,o[D+3],l.set.types[o[D]],T,H-T,v-1):e.toTree();return O.push(w),E.push(T-m),Kt(l,o[D+3],u,O,E,m),new A(p,O,E,y)}i.children[s]=h(0,o.length,_.none,0,l.length,t.length-1);for(let f of a){let u=r.tree.children[f],p=r.tree.positions[f];r.yield(new z(u,p+r.from,f,r._tree))}}var Ue=class{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(S.IncludeAnonymous|S.IgnoreMounts)}moveTo(e){let{cursor:t}=this,n=e-this.offset;for(;!this.done&&t.from<n;)if(!(t.to>=e&&t.enter(n,1,S.IgnoreOverlays|S.ExcludeBuffers)))if(t.to<=e)t.next(!1)||(this.done=!0);else break}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof A)t=t.children[0];else break}return!1}},dt=class{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let n=this.curFrag=e[0];this.curTo=(t=n.tree.prop(ut))!==null&&t!==void 0?t:n.to,this.inner=new Ue(n.tree,-n.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;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;if(this.fragI++,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(ut))!==null&&e!==void 0?e:t.to,this.inner=new Ue(t.tree,-t.offset)}}findMounts(e,t){var n;let i=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let l=(n=s.tree)===null||n===void 0?void 0:n.prop(b.mounted);if(l&&l.parser==t)for(let o=this.fragI;o<this.fragments.length;o++){let a=this.fragments[o];if(a.from>=s.to)break;a.tree==this.curFrag.tree&&i.push({frag:a,pos:s.from-a.offset,mount:l})}}}return i}};function Qt(r,e){let t=null,n=e;for(let i=1,s=0;i<r.length;i++){let l=r[i-1].to,o=r[i].from;for(;s<n.length;s++){let a=n[s];if(a.from>=o)break;a.to<=l||(t||(n=t=e.slice()),a.from<l?(t[s]=new F(a.from,l),a.to>o&&t.splice(s+1,0,new F(o,a.to))):a.to>o?t[s--]=new F(o,a.to):t.splice(s--,1))}}return n}function Jn(r,e,t,n){let i=0,s=0,l=!1,o=!1,a=-1e9,h=[];for(;;){let f=i==r.length?1e9:l?r[i].to:r[i].from,u=s==e.length?1e9:o?e[s].to:e[s].from;if(l!=o){let p=Math.max(a,t),m=Math.min(f,u,n);p<m&&h.push(new F(p,m))}if(a=Math.min(f,u),a==1e9)break;f==a&&(l?(l=!1,i++):l=!0),u==a&&(o?(o=!1,s++):o=!0)}return h}function Xt(r,e){let t=[];for(let{pos:n,mount:i,frag:s}of r){let l=n+(i.overlay?i.overlay[0].from:0),o=l+i.tree.length,a=Math.max(s.from,l),h=Math.min(s.to,o);if(i.overlay){let f=i.overlay.map(p=>new F(p.from+n,p.to+n)),u=Jn(e,f,a,h);for(let p=0,m=a;;p++){let y=p==u.length,v=y?h:u[p].from;if(v>m&&t.push(new Y(m,v,i.tree,-l,s.from>=m||s.openStart,s.to<=v||s.openEnd)),y)break;m=u[p].to}}else t.push(new Y(a,h,i.tree,-l,s.from>=l||s.openStart,s.to<=o||s.openEnd))}return t}
vendor: 4,270 bytes, line 1
1var Kn=0,q=class r{constructor(e,t,n,i){this.name=e,this.set=t,this.base=n,this.modified=i,this.id=Kn++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let n=typeof e=="string"?e:"?";if(e instanceof r&&(t=e),t?.base)throw new Error("Can not derive from a modified tag");let i=new r(n,[],null,[]);if(i.set.push(i),t)for(let s of t.set)i.set.push(s);return i}static defineModifier(e){let t=new $e(e);return n=>n.modified.indexOf(t)>-1?n:$e.get(n.base||n,n.modified.concat(t).sort((i,s)=>i.id-s.id))}},Qn=0,$e=class r{constructor(e){this.name=e,this.instances=[],this.id=Qn++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find(o=>o.base==e&&Xn(t,o.modified));if(n)return n;let i=[],s=new q(e.name,i,e,t);for(let o of t)o.instances.push(s);let l=Yn(t);for(let o of e.set)if(!o.modified.length)for(let a of l)i.push(r.get(o,a));return s}};function Xn(r,e){return r.length==e.length&&r.every((t,n)=>t==e[n])}function Yn(r){let e=[[]];for(let t=0;t<r.length;t++)for(let n=0,i=e.length;n<i;n++)e.push(e[n].concat(r[t]));return e.sort((t,n)=>n.length-t.length)}function nn(r){let e=Object.create(null);for(let t in r){let n=r[t];Array.isArray(n)||(n=[n]);for(let i of t.split(" "))if(i){let s=[],l=2,o=i;for(let u=0;;){if(o=="..."&&u>0&&u+3==i.length){l=1;break}let p=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(o);if(!p)throw new RangeError("Invalid path: "+i);if(s.push(p[0]=="*"?"":p[0][0]=='"'?JSON.parse(p[0]):p[0]),u+=p[0].length,u==i.length)break;let m=i[u++];if(u==i.length&&m=="!"){l=0;break}if(m!="/")throw new RangeError("Invalid path: "+i);o=i.slice(u)}let a=s.length-1,h=s[a];if(!h)throw new RangeError("Invalid path: "+i);let f=new fe(n,l,a>0?s.slice(0,a):null);e[h]=f.sort(e[h])}}return rn.add(e)}var rn=new b({combine(r,e){let t,n,i;for(;r||e;){if(!r||e&&r.depth>=e.depth?(i=e,e=e.next):(i=r,r=r.next),t&&t.mode==i.mode&&!i.context&&!t.context)continue;let s=new fe(i.tags,i.mode,i.context);t?t.next=s:n=s,t=s}return n}}),fe=class{constructor(e,t,n,i){this.tags=e,this.mode=t,this.context=n,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}};fe.empty=new fe([],2,null);function yt(r,e){let t=Object.create(null);for(let s of r)if(!Array.isArray(s.tag))t[s.tag.id]=s.class;else for(let l of s.tag)t[l.id]=s.class;let{scope:n,all:i=null}=e||{};return{style:s=>{let l=i;for(let o of s)for(let a of o.set){let h=t[a.id];if(h){l=l?l+" "+h:h;break}}return l},scope:n}}function Zn(r,e){let t=null;for(let n of r){let i=n.style(e);i&&(t=t?t+" "+i:i)}return t}function sn(r,e,t,n=0,i=r.length){let s=new kt(n,Array.isArray(e)?e:[e],t);s.highlightRange(r.cursor(),n,i,"",s.highlighters),s.flush(i)}var kt=class{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,i,s){let{type:l,from:o,to:a}=e;if(o>=n||a<=t)return;l.isTop&&(s=this.highlighters.filter(m=>!m.scope||m.scope(l)));let h=i,f=er(e)||fe.empty,u=Zn(s,f.tags);if(u&&(h&&(h+=" "),h+=u,f.mode==1&&(i+=(i?" ":"")+u)),this.startSpan(Math.max(t,o),h),f.opaque)return;let p=e.tree&&e.tree.prop(b.mounted);if(p&&p.overlay){let m=e.node.enter(p.overlay[0].from+o,1),y=this.highlighters.filter(D=>!D.scope||D.scope(p.tree.type)),v=e.firstChild();for(let D=0,O=o;;D++){let E=D<p.overlay.length?p.overlay[D]:null,T=E?E.from+o:a,H=Math.max(t,O),w=Math.min(n,T);if(H<w&&v)for(;e.from<w&&(this.highlightRange(e,H,w,i,s),this.startSpan(Math.min(w,e.to),h),!(e.to>=T||!e.nextSibling())););if(!E||T>n)break;O=E.to+o,O>t&&(this.highlightRange(m.cursor(),Math.max(t,E.from+o),Math.min(n,O),"",y),this.startSpan(Math.min(n,O),h))}v&&e.parent()}else if(e.firstChild()){p&&(i="");do if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,i,s),this.startSpan(Math.min(n,e.to),h)}while(e.nextSibling());e.parent()}}};function er(r){let e=r.type.prop(rn);for(;e&&e.context&&!r.matchContext(e.context);)e=e.next;return e||null}var c=q.define,We=c(),ne=c(),en=c(ne),tn=c(ne),re=c(),He=c(re),mt=c(re),Q=c(),he
1=c(Q),J=c(),K=c(),bt=c(),ve=c(bt),Ve=c(),d={comment:We,lineComment:c(We),blockComment:c(We),docComment:c(We),name:ne,variableName:c(ne),typeName:en,tagName:c(en),propertyName:tn,attributeName:c(tn),className:c(ne),labelName:c(ne),namespace:c(ne),macroName:c(ne),literal:re,string:He,docString:c(He),character:c(He),attributeValue:c(He),number:mt,integer:c(mt),float:c(mt),bool:c(re),regexp:c(re),escape:c(re),color:c(re),url:c(re),keyword:J,self:c(J),null:c(J),atom:c(J),unit:c(J),modifier:c(J),operatorKeyword:c(J),controlKeyword:c(J),definitionKeyword:c(J),moduleKeyword:c(J),operator:K,derefOperator:c(K),arithmeticOperator:c(K),logicOperator:c(K),bitwiseOperator:c(K),compareOperator:c(K),updateOperator:c(K),definitionOperator:c(K),typeOperator:c(K),controlOperator:c(K),punctuation:bt,separator:c(bt),bracket:ve,angleBracket:c(ve),squareBracket:c(ve),paren:c(ve),brace:c(ve),content:Q,heading:he,heading1:c(he),heading2:c(he),heading3:c(he),heading4:c(he),heading5:c(he),heading6:c(he),contentSeparator:c(Q),list:c(Q),quote:c(Q),emphasis:c(Q),strong:c(Q),link:c(Q),monospace:c(Q),strikethrough:c(Q),inserted:c(),deleted:c(),changed:c(),invalid:c(),meta:Ve,documentMeta:c(Ve),annotation:c(Ve),processingInstruction:c(Ve),definition:q.defineModifier("definition"),constant:q.defineModifier("constant"),function:q.defineModifier("function"),standard:q.defineModifier("standard"),local:q.defineModifier("local"),special:q.defineModifier("special")};for(let r in d){let e=d[r];e instanceof q&&(e.name=r)}var Gr=yt([{tag:d.link,class:"tok-link"},{tag:d.heading,class:"tok-heading"},{tag:d.emphasis,class:"tok-emphasis"},{tag:d.strong,class:"tok-strong"},{tag:d.keyword,class:"tok-keyword"},{tag:d.atom,class:"tok-atom"},{tag:d.bool,class:"tok-bool"},{tag:d.url,class:"tok-url"},{tag:d.labelName,class:"tok-labelName"},{tag:d.inserted,class:"tok-inserted"},{tag:d.deleted,class:"tok-deleted"},{tag:d.literal,class:"tok-literal"},{tag:d.string,class:"tok-string"},{tag:d.number,class:"tok-number"},{tag:[d.regexp,d.escape,d.special(d.string)],class:"tok-string2"},{tag:d.variableName,class:"tok-variableName"},{tag:d.local(d.variableName),class:"tok-variableName tok-local"},{tag:d.definition(d.variableName),class:"tok-variableName tok-definition"},{tag:d.special(d.variableName),class:"tok-variableName2"},{tag:d.definition(d.propertyName),class:"tok-propertyName tok-definition"},{tag:d.typeName,class:"tok-typeName"},{tag:d.namespace,class:"tok-namespace"},{tag:d.className,class:"tok-className"},{tag:d.macroName,class:"tok-macroName"},{tag:d.propertyName,class:"tok-propertyName"},{tag:d.operator,class:"tok-operator"},{tag:d.comment,class:"tok-comment"},{tag:d.meta,class:"tok-meta"},{tag:d.invalid,class:"tok-invalid"},{tag:d.punctuation,class:"tok-punctuation"}]);var xt,ue=new b;function xn(r){return $.define({combine:r?e=>e.concat(r):void 0})}var tr=new b,U=(()=>{class r{constructor(t,n,i=[],s=""){this.data=t,this.name=s,de.prototype.hasOwnProperty("tree")||Object.defineProperty(de.prototype,"tree",{get(){return W(this)}}),this.parser=n,this.extension=[ie.of(this),de.languageData.of((l,o,a)=>{let h=ln(l,o,a),f=h.type.prop(ue);if(!f)return[];let u=l.facet(f),p=h.type.prop(tr);if(p){let m=h.resolve(o-h.from,a);for(let y of p)if(y.test(m,l)){let v=l.facet(y.facet);return y.type=="replace"?v:v.concat(u)}}return u})].concat(i)}isActiveAt(t,n,i=-1){return ln(t,n,i).type.prop(ue)==this.data}findRegions(t){let n=t.facet(ie);if(n?.data==this.data)return[{from:0,to:t.doc.length}];if(!n||!n.allowsNesting)return[];let i=[],s=(l,o)=>{if(l.prop(ue)==this.data){i.push({from:o,to:o+l.length});return}let a=l.prop(b.mounted);if(a){if(a.tree.prop(ue)==this.data){if(a.overlay)for(let h of a.overlay)i.push({from:h.from+o,to:h.to+o});else i.push({from:o,to:o+l.length});return}else if(a.overlay){let h=i.length;if(s(a.tree,a.overlay[0].from+o),i.length>h)return}}for(let h=0;h<l.children.length;h++){let f=l.children[h];f instanceof A&&s(f,l.positions[h]+o)}};return s(W(t),0),i}get allowsNesting(){return!0}}return r.setState=be.define(),r})();function ln(r,e,t){let n=r.facet(ie),i=W(r).topNode;if(!n||n.allowsNesting)for(let s=i;s;s=s.enter(e,t,S.ExcludeBuffers|S.EnterBracketed))s.type.isTop&&(i=s);return i}var on=class r extends U{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(e){let t=xn(e.languageData);return new r(t,e.parser.configure({props:[ue.add(n=>n.isTop?t:void 0)]}),e.name)}configure(e,t){return new r(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}};function W(r){let e=r.field(U.state,!1);return e?e.tree:A.empty}function nr(r,e,t=50){var n;let i=(n=r.field(U.state,!1))===null||n===void 0?void 0:n.context;if(!i)return null;let s=i.viewport;i.updateViewport({from:0,to:e});let l=i.isDone(e)||i.work(t,e)?i.tree:null;return i.updateViewport(s),l}function ei(r,e=r.doc.length){var t;return((t=r.field(U.state,!1))===null||t===void 0?void 0:t.context.
vendor: 5,250 bytes, line 1
1isDone(e))||!1}function ti(r,e=r.viewport.to,t=100){let n=nr(r.state,e,t);return n!=W(r.state)&&r.dispatch({}),!!n}function ni(r){var e;return((e=r.plugin(vn))===null||e===void 0?void 0:e.isWorking())||!1}var St=class{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}},Se=null,Ce=class r{constructor(e,t,n=[],i,s,l,o,a){this.parser=e,this.state=t,this.fragments=n,this.tree=i,this.treeLen=s,this.viewport=l,this.skipped=o,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new r(e,t,[],A.empty,0,n,[],null)}startParse(){return this.parser.startParse(new St(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=A.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var n;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(Y.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(n=this.parse.stoppedAt)!==null&&n!==void 0?n:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(t??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(Y.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=Se;Se=this;try{return e()}finally{Se=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=an(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:i,treeLen:s,viewport:l,skipped:o}=this;if(this.takeTree(),!e.empty){let a=[];if(e.iterChangedRanges((h,f,u,p)=>a.push({fromA:h,toA:f,fromB:u,toB:p})),n=Y.applyChanges(n,a),i=A.empty,s=0,l={from:e.mapPos(l.from,-1),to:e.mapPos(l.to,1)},this.skipped.length){o=[];for(let h of this.skipped){let f=e.mapPos(h.from,1),u=e.mapPos(h.to,-1);f<u&&o.push({from:f,to:u})}}}return new r(this.parser,t,n,i,s,l,o,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let n=0;n<this.skipped.length;n++){let{from:i,to:s}=this.skipped[n];i<e.to&&s>e.from&&(this.fragments=an(this.fragments,i,s),this.skipped.splice(n--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends we{createParse(t,n,i){let s=i[0].from,l=i[i.length-1].to;return{parsedPos:s,advance(){let a=Se;if(a){for(let h of i)a.tempSkipped.push(h);e&&(a.scheduleOn=a.scheduleOn?Promise.all([a.scheduleOn,e]):e)}return this.parsedPos=l,new A(_.none,[],[],l-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return Se}};function an(r,e,t){return Y.applyChanges(r,[{fromA:e,toA:t,fromB:e,toB:t}])}var Te=class r{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new r(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=Ce.create(e.facet(ie).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new r(n)}};U.state=Ze.define({create:Te.init,update(r,e){for(let t of e.effects)if(t.is(U.setState))return t.value;return e.startState.facet(ie)!=e.state.facet(ie)?Te.init(e.state):r.apply(e)}});var wn=r=>{let e=setTimeout(()=>r(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(wn=r=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(r,{timeout:400})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});var wt=typeof navigator<"u"&&(!((xt=navigator.scheduling)===null||xt===void 0)&&xt.isInputPending)?()=>navigator.scheduling.isInputPending():null,vn=pe.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(U.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(U.state);
1(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=wn(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:i}}=this.view,s=n.field(U.state);if(s.tree==s.context.tree&&s.context.isDone(i+1e5))return;let l=Date.now()+Math.min(this.chunkBudget,100,e&&!wt?Math.max(25,e.timeRemaining()-5):1e9),o=s.context.treeLen<i&&n.doc.length>i+1e3,a=s.context.work(()=>wt&&wt()||Date.now()>l,i+(o?0:1e5));this.chunkBudget-=Date.now()-t,(a||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:U.setState.of(new Te(s.context))})),this.chunkBudget>0&&!(a&&!o)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Ut(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),ie=$.define({combine(r){return r.length?r[0]:null},enables:r=>[U.state,vn,j.contentAttributes.compute([r],e=>{let t=e.facet(r);return t&&t.name?{"data-language":t.name}:{}})]}),hn=class{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}},fn=class r{constructor(e,t,n,i,s,l=void 0){this.name=e,this.alias=t,this.extensions=n,this.filename=i,this.loadFunc=s,this.support=l,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(e=>this.support=e,e=>{throw this.loading=null,e}))}static of(e){let{load:t,support:n}=e;if(!t){if(!n)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");t=()=>Promise.resolve(n)}return new r(e.name,(e.alias||[]).concat(e.name).map(i=>i.toLowerCase()),e.extensions||[],e.filename,t,n)}static matchFilename(e,t){for(let i of e)if(i.filename&&i.filename.test(t))return i;let n=/\.([^.]+)$/.exec(t);if(n){for(let i of e)if(i.extensions.indexOf(n[1])>-1)return i}return null}static matchLanguageName(e,t,n=!0){t=t.toLowerCase();for(let i of e)if(i.alias.some(s=>s==t))return i;if(n)for(let i of e)for(let s of i.alias){let l=t.indexOf(s);if(l>-1&&(s.length>2||!/\w/.test(t[l-1])&&!/\w/.test(t[l+s.length])))return i}return null}},rr=$.define(),Sn=$.define({combine:r=>{if(!r.length)return" ";let e=r[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(r[0]));return e}});function Je(r){let e=r.facet(Sn);return e.charCodeAt(0)==9?r.tabSize*e.length:e.length}function An(r,e){let t="",n=r.tabSize,i=r.facet(Sn)[0];if(i==" "){for(;e>=n;)t+=" ",e-=n;i=" "}for(let s=0;s<e;s++)t+=i;return t}function Cn(r,e){r instanceof de&&(r=new Pe(r));for(let n of r.state.facet(rr)){let i=n(r,e);if(i!==void 0)return i}let t=W(r.state);return t.length>=e?ir(r,t,e):null}function ii(r,e,t){let n=Object.create(null),i=new Pe(r,{overrideIndentation:l=>{var o;return(o=n[l])!==null&&o!==void 0?o:-1}}),s=[];for(let l=e;l<=t;){let o=r.doc.lineAt(l);l=o.to+1;let a=Cn(i,o.from);if(a==null)continue;/\S/.test(o.text)||(a=0);let h=/^\s*/.exec(o.text)[0],f=An(r,a);h!=f&&(n[o.from]=a,s.push({from:o.from,to:o.from+h.length,insert:f}))}return r.changes(s)}var Pe=class{constructor(e,t={}){this.state=e,this.options=t,this.unit=Je(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:s}=this.options;return i!=null&&i>=n.from&&i<=n.to?s&&i==e?{text:"",from:e}:(t<0?i<e:i<=e)?{text:n.text.slice(i-n.from),from:i}:{text:n.text.slice(0,i-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:n,from:i}=this.lineAt(e,t);return n.slice(e-i,Math.min(n.length,e+100-i))}column(e,t=1){let{text:n,from:i}=this.lineAt(e,t),s=this.countColumn(n,e-i),l=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return l>-1&&(s+=l-this.countColumn(n,n.search(/\S|$/))),s}countColumn(e,t=e.length){return jt(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:i}=this.lineAt(e,t),s=this.options.overrideIndentation;if(s){let l=s(i);if(l>-1)return l}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}},Tn=new b;function ir(r,e,t){let n=e.resolveStack(t),i=e.resolveInner(t,-1).resolve(t,0).enterUnfinishedNodesBefore(t);if(i!=n.node){let s=[];for(let l=i;l&&!(l.from<n.node.from||l.to>n.node.to||l.from==n.node.from&&l.type==n.node.type);l=l.parent)s.push(l);for(let l=s.length-1;l>=0;l--)n={node:s[l],next:n}}return Pn(n,r,t)}function Pn(r,e,t){for(let n=r;n;n=n.next){let i=lr(n.node);
vendor: 3,824 bytes, line 1
1if(i)return i(At.create(e,t,n))}return 0}function sr(r){return r.pos==r.options.simulateBreak&&r.options.simulateDoubleBreak}function lr(r){let e=r.type.prop(Tn);if(e)return e;let t=r.firstChild,n;if(t&&(n=t.type.prop(b.closedBy))){let i=r.lastChild,s=i&&n.indexOf(i.name)>-1;return l=>Nn(l,!0,1,void 0,s&&!sr(l)?i.from:void 0)}return r.parent==null?or:null}function or(){return 0}var At=class r extends Pe{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(e,t,n){return new r(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(ar(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return Pn(this.context.next,this.base,this.pos)}};function ar(r,e){for(let t=e;t;t=t.parent)if(r==t)return!0;return!1}function hr(r){let e=r.node,t=e.childAfter(e.from),n=e.lastChild;if(!t)return null;let i=r.options.simulateBreak,s=r.state.doc.lineAt(t.from),l=i==null||i<=s.from?s.to:Math.min(s.to,i);for(let o=t.to;;){let a=e.childAfter(o);if(!a||a==n)return null;if(!a.type.isSkipped){if(a.from>=l)return null;let h=/^ */.exec(s.text.slice(t.to-s.from))[0].length;return{from:t.from,to:t.to+h}}o=a.to}}function si({closing:r,align:e=!0,units:t=1}){return n=>Nn(n,e,t,r)}function Nn(r,e,t,n,i){let s=r.textAfter,l=s.match(/^\s*/)[0].length,o=n&&s.slice(l,l+n.length)==n||i==r.pos+l,a=e?hr(r):null;return a?o?r.column(a.from):r.column(a.to):r.baseIndent+(o?0:r.unit*t)}var li=r=>r.baseIndent;function oi({except:r,units:e=1}={}){return t=>{let n=r&&r.test(t.textAfter);return t.baseIndent+(n?0:e*t.unit)}}var fr=200;function ai(){return de.transactionFilter.of(r=>{if(!r.docChanged||!r.isUserEvent("input.type")&&!r.isUserEvent("input.complete"))return r;let e=r.startState.languageDataAt("indentOnInput",r.startState.selection.main.head);if(!e.length)return r;let t=r.newDoc,{head:n}=r.newSelection.main,i=t.lineAt(n);if(n>i.from+fr)return r;let s=t.sliceString(i.from,n);if(!e.some(h=>h.test(s)))return r;let{state:l}=r,o=-1,a=[];for(let{head:h}of l.selection.ranges){let f=l.doc.lineAt(h);if(f.from==o)continue;o=f.from;let u=Cn(l,f.from);if(u==null)continue;let p=/^\s*/.exec(f.text)[0],m=An(l,u);p!=m&&a.push({from:f.from,to:f.from+p.length,insert:m})}return a.length?[r,{changes:a,sequential:!0}]:r})}var ur=$.define(),cr=new b;function hi(r){let e=r.firstChild,t=r.lastChild;return e&&e.to<t.from?{from:e.to,to:t.type.isError?r.to:t.from}:null}function dr(r,e,t){let n=W(r);if(n.length<t)return null;let i=n.resolveStack(t,1),s=null;for(let l=i;l;l=l.next){let o=l.node;if(o.to<=t||o.from>t)continue;if(s&&o.from<e)break;let a=o.type.prop(cr);if(a&&(o.to<n.length-50||n.length==r.doc.length||!pr(o))){let h=a(o,r);h&&h.from<=t&&h.from>=e&&h.to>t&&(s=h)}}return s}function pr(r){let e=r.lastChild;return e&&e.to==r.to&&e.type.isError}function Ne(r,e,t){for(let n of r.facet(ur)){let i=n(r,e,t);if(i)return i}return dr(r,e,t)}function In(r,e){let t=e.mapPos(r.from,1),n=e.mapPos(r.to,-1);return t>=n?void 0:{from:t,to:n}}var Me=be.define({map:In}),me=be.define({map:In});function Ot(r){let e=[];for(let{head:t}of r.state.selection.ranges)e.some(n=>n.from<=t&&n.to>=t)||e.push(r.lineBlockAt(t));return e}var se=Ze.define({create(){return L.none},update(r,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((n,i)=>r=un(r,n,i)),r=r.map(e.changes);let t=[];for(let n of e.effects)n.is(Me)&&!gr(r,n.value.from,n.value.to)?t.push(n.value):n.is(me)&&(r=r.update({filter:(i,s)=>n.value.from!=i||n.value.to!=s,filterFrom:n.value.from,filterTo:n.value.to}));if(t.length){let{preparePlaceholder:n}=e.state.facet(Et),i=t.map(s=>
1(n?L.replace({widget:new Ct(n(e.state,s))}):cn).range(s.from,s.to));r=r.update({add:i})}return e.selection&&(r=un(r,e.selection.main.head)),r},provide:r=>j.decorations.from(r),toJSON(r,e){let t=[];return r.between(0,e.doc.length,(n,i)=>{t.push(n,i)}),t},fromJSON(r){if(!Array.isArray(r)||r.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t<r.length;){let n=r[t++],i=r[t++];if(typeof n!="number"||typeof i!="number")throw new RangeError("Invalid JSON for fold state");e.push(cn.range(n,i))}return L.set(e,!0)}});function un(r,e,t=e){let n=!1;return r.between(e,t,(i,s)=>{i<t&&s>e&&(n=!0)}),n?r.update({filterFrom:e,filterTo:t,filter:(i,s)=>i>=t||s<=e}):r}function fi(r){return r.field(se,!1)||nt.empty}function Ie(r,e,t){var n;let i=null;return(n=r.field(se,!1))===null||n===void 0||n.between(e,t,(s,l)=>{(!i||i.from>s)&&(i={from:s,to:l})}),i}function gr(r,e,t){let n=!1;return r.between(e,e,(i,s)=>{i==e&&s==t&&(n=!0)}),n}function Dt(r,e){return r.field(se,!1)?e:e.concat(be.appendConfig.of(Bn()))}var mr=r=>{for(let e of Ot(r)){let t=Ne(r.state,e.from,e.to);if(t)return r.dispatch({effects:Dt(r.state,[Me.of(t),Ke(r,t)])}),!0}return!1},kr=r=>{if(!r.state.field(se,!1))return!1;let e=[];for(let t of Ot(r)){let n=Ie(r.state,t.from,t.to);n&&e.push(me.of(n),Ke(r,n,!1))}return e.length&&r.dispatch({effects:e}),e.length>0};function Ke(r,e,t=!0){let n=r.state.doc.lineAt(e.from).number,i=r.state.doc.lineAt(e.to).number;return j.announce.of(`${r.state.phrase(t?"Folded lines":"Unfolded lines")} ${n} ${r.state.phrase("to")} ${i}.`)}var br=r=>{let{state:e}=r,t=[];for(let n=0;n<e.doc.length;){let i=r.lineBlockAt(n),s=Ne(e,i.from,i.to);s&&t.push(Me.of(s)),n=(s?r.lineBlockAt(s.to):i).to+1}return t.length&&r.dispatch({effects:Dt(r.state,t)}),!!t.length},yr=r=>{let e=r.state.field(se,!1);if(!e||!e.size)return!1;let t=[];return e.between(0,r.state.doc.length,(n,i)=>{t.push(me.of({from:n,to:i}))}),r.dispatch({effects:t}),!0};function xr(r,e){for(let t=e;;){let n=Ne(r.state,t.from,t.to);if(n&&n.to>e.from)return n;if(!t.from)return null;t=r.lineBlockAt(t.from-1)}}var ui=r=>{let e=[];for(let t of Ot(r)){let n=Ie(r.state,t.from,t.to);if(n)e.push(me.of(n),Ke(r,n,!1));else{let i=xr(r,t);i&&e.push(Me.of(i),Ke(r,i))}}return e.length>0&&r.dispatch({effects:Dt(r.state,e)}),!!e.length},ci=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:mr},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:kr},{key:"Ctrl-Alt-[",run:br},{key:"Ctrl-Alt-]",run:yr}],wr={placeholderDOM:null,preparePlaceholder:null,placeholderText:"\u2026"},Et=$.define({combine(r){return tt(r,wr)}});function Bn(r){let e=[se,Sr];return r&&e.push(Et.of(r)),e}function Mn(r,e){let{state:t}=r,n=t.facet(Et),i=l=>{let o=r.lineBlockAt(r.posAtDOM(l.target)),a=Ie(r.state,o.from,o.to);a&&r.dispatch({effects:me.of(a)}),l.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(r,i,e);let s=document.createElement("span");return s.textContent=n.placeholderText,s.setAttribute("aria-label",t.phrase("folded code")),s.title=t.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=i,s}var cn=L.replace({widget:new class extends it{toDOM(r){return Mn(r,null)}}}),Ct=class extends it{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return Mn(e,this.value)}},vr={openText:"\u2304",closedText:"\u203A",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1},Ae=class extends Wt{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}};function di(r={}){let e=Ee(Ee({},vr),r),t=new Ae(e,!0),n=new Ae(e,!1),i=pe.fromClass(class{constructor(l){this.from=l.viewport.from,this.markers=this.buildMarkers(l)}update(l){(l.docChanged||l.viewportChanged||l.startState.facet(ie)!=l.state.facet(ie)||l.startState.field(se,!1)!=l.state.field(se,!1)||W(l.startState)!=W(l.state)||e.foldingChanged(l))&&(this.markers=this.buildMarkers(l.view))}buildMarkers(l){let o=new Re;for(let a of l.viewportLineBlocks){let h=Ie(l.state,a.from,a.to)?n:Ne(l.state,a.from,a.to)?t:null;h&&o.add(a.from,a.from,h)}return o.finish()}}),{domEventHandlers:s}=e;return[i,Ht({class:"cm-foldGutter",markers(l){var o;return((o=l.plugin(i))===null||o===void 0?void 0:o.markers)||nt.empty},initialSpacer(){return new Ae(e,!1)},domEventHandlers:zt(Ee({},s),{click:(l,o,a)=>
vendor: 11,170 bytes, lines 1-3
1{if(s.click&&s.click(l,o,a))return!0;let h=Ie(l.state,o.from,o.to);if(h)return l.dispatch({effects:me.of(h)}),!0;let f=Ne(l.state,o.from,o.to);return f?(l.dispatch({effects:Me.of(f)}),!0):!1}})}),Bn()]}var Sr=j.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"}}),Qe=class r{constructor(e,t){this.specs=e;let n;function i(o){let a=rt.newName();return(n||(n=Object.create(null)))["."+a]=o,a}let s=typeof t.all=="string"?t.all:t.all?i(t.all):void 0,l=t.scope;this.scope=l instanceof U?o=>o.prop(ue)==l.data:l?o=>o==l:void 0,this.style=yt(e.map(o=>({tag:o.tag,class:o.class||i(Object.assign({},o,{tag:null}))})),{all:s}).style,this.module=n?new rt(n):null,this.themeType=t.themeType}static define(e,t){return new r(e,t||{})}},Tt=$.define(),On=$.define({combine(r){return r.length?[r[0]]:null}});function Ge(r){let e=r.facet(Tt);return e.length?e:r.facet(On)}function pi(r,e){let t=[Ar],n;return r instanceof Qe&&(r.module&&t.push(j.styleModule.of(r.module)),n=r.themeType),e?.fallback?t.push(On.of(r)):n?t.push(Tt.computeN([j.darkTheme],i=>i.facet(j.darkTheme)==(n=="dark")?[r]:[])):t.push(Tt.of(r)),t}function gi(r,e,t){let n=Ge(r),i=null;if(n){for(let s of n)if(!s.scope||t&&s.scope(t)){let l=s.style(e);l&&(i=i?i+" "+l:l)}}return i}var Pt=class{constructor(e){this.markCache=Object.create(null),this.tree=W(e.state),this.decorations=this.buildDeco(e,Ge(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=W(e.state),n=Ge(e.state),i=n!=Ge(e.startState),{viewport:s}=e.view,l=e.changes.mapPos(this.decoratedTo,1);t.length<s.to&&!i&&t.type==this.tree.type&&l>=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=l):(t!=this.tree||e.viewportChanged||i)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=s.to)}buildDeco(e,t){if(!t||!this.tree.length)return L.none;let n=new Re;for(let{from:i,to:s}of e.visibleRanges)sn(this.tree,t,(l,o,a)=>{n.add(l,o,this.markCache[a]||(this.markCache[a]=L.mark({class:a})))},i,s);return n.finish()}},Ar=et.high(pe.fromClass(Pt,{decorations:r=>r.decorations})),mi=Qe.define([{tag:d.meta,color:"#404740"},{tag:d.link,textDecoration:"underline"},{tag:d.heading,textDecoration:"underline",fontWeight:"bold"},{tag:d.emphasis,fontStyle:"italic"},{tag:d.strong,fontWeight:"bold"},{tag:d.strikethrough,textDecoration:"line-through"},{tag:d.keyword,color:"#708"},{tag:[d.atom,d.bool,d.url,d.contentSeparator,d.labelName],color:"#219"},{tag:[d.literal,d.inserted],color:"#164"},{tag:[d.string,d.deleted],color:"#a11"},{tag:[d.regexp,d.escape,d.special(d.string)],color:"#e40"},{tag:d.definition(d.variableName),color:"#00f"},{tag:d.local(d.variableName),color:"#30a"},{tag:[d.typeName,d.namespace],color:"#085"},{tag:d.className,color:"#167"},{tag:[d.special(d.variableName),d.macroName],color:"#256"},{tag:d.definition(d.propertyName),color:"#00c"},{tag:d.comment,color:"#940"},{tag:d.invalid,color:"#f00"}]),Cr=j.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),Dn=1e4,En="()[]{}",Rn=$.define({combine(r){return tt(r,{afterCursor:!0,brackets:En,maxScanDistance:Dn,renderMatch:Nr})}}),Tr=L.mark({class:"cm-matchingBracket"}),Pr=L.mark({class:"cm-nonmatchingBracket"});function Nr(r){let e=[],t=r.matched?Tr:Pr;return e.push(t.range(r.start.from,r.start.to)),r.end&&e.push(t.range(r.end.from,r.end.to)),e}function dn(r){let e=[],t=r.facet(Rn);for(let n of r.selection.ranges){if(!n.empty)continue;let i=qe(r,n.head,-1,t)||n.head>0&&qe(r,n.head-1,1,t)||t.afterCursor&&(qe(r,n.head,1,t)||n.head<r.doc.length&&qe(r,n.head+1,-1,t));i&&(e=e.concat(t.renderMatch(i,r)))}return L.set(e,!0)}var Ir=pe.fromClass(class{constructor(r){this.paused=!1,this.decorations=dn(r.state)}update(r){(r.docChanged||r.selectionSet||this.paused)&&(r.view.composing?(this.decorations=this.decorations.map(r.changes),this.paused=!0):(this.decorations=dn(r.state),this.paused=!1))}},{decorations:r=>r.decorations}),Br=[Ir,Cr];function ki(r={}){return[Rn.of(r),Br]}var Mr=new b;function Nt(r,e,t){let n=r.prop(e<0?b.openedBy:b.closedBy);if(n)return n;if(r.name.length==1){let i=t.indexOf(r.name);if(i>-1&&i%2==(e<0?1:0))return[t[i+e]]}return null}function It(r){let e=r.type.prop(Mr);return e?e(r.node):r}function qe(r,e,t,n={}){let i=n.maxScanDistance||Dn,s=n.brackets||En,l=W(r),o=l.resolveInner(e,t);for(let a=o;a;a=a.parent){let h=Nt(a.type,t,s);if(h&&a.from<a.to){let f=It(a);if(f&&(t>0?e>=f.from&&e<f.to:e>f.from&&e<=f.to))return Or(r,e,t,a,f,h,s)}}return Dr(r,e,t,l,o.type,i,s)}function Or(r,e,t,n,i,s,l){let o=n.parent,a={from:i.from,to:i.to},h=0,f=o?.cursor();if(f&&(t<0?f.childBefore(n.from):f.childAfter(n.to)))do if(t<0?f.to<=n.from:f.from>=n.to){if(h==0&&s.indexOf(f.type.name)>-1&&f.from<f.to){let u=It(f);return{start:a,end:u?{from:u.from,to:u.to}:void 0,matched:!0}}else if(Nt(f.type,t,l))h++;else if(Nt(f.type,-t,l)){if(h==0){let u=It(f);return{start:a,end:u&&u.from<u.to?{from:u.from,to:u.to}:void 0,matched:!1}}h--}}while(t<0?f.prevSibling():f.nextSibling());return{start:a,matched:!1}}function Dr(r,e,t,n,i,s,l){if(t<0?!e:e==r.doc.length)return null;let o=t<0?r.sliceDoc(e-1,e):r.sliceDoc(e,e+1),a=l.indexOf(o);if(a<0||a%2==0!=t>0)return null;let h={from:t<0?e-1:e,to:t>0?e+1:e},f=r.doc.iterRange(e,t>0?r.doc.length:0),u=0;for(let p=0;!f.next().done&&p<=s;){let m=f.value;t<0&&(p+=m.length);let y=e+p*t;for(let v=t>0?0:m.length-1,D=t>0?m.length:-1;v!=D;v+=t){let O=l.indexOf(m[v]);if(!(O<0||n.resolveInner(y+v,1).type!=i))if(O%2==0==t>0)u++;else{if(u==1)return{start:h,end:{from:y+v,to:y+v+1},matched:O>>1==a>>1};u--}}t>0&&(p+=m.length)}return f.done?{start:h,matched:!1}:null}function pn(r,e,t,n=0,i=0){e==null&&(e=r.search(/[^\s\u00a0]/),e==-1&&(e=r.length));let s=i;for(let l=n;l<e;l++)r.charCodeAt(l)==9?s+=t-s%t:s++;return s}var Xe=class{constructor(e,t,n,i){this.string=e,this.tabSize=t,this.indentUnit=n,this.overrideIndent=i,this.pos=0,this.start=0,this.lastColumnPos=0,this.lastColumnValue=0}eol(){return this.pos>=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)}eat(e){let t=this.string.charAt(this.pos),n;if(typeof e=="string"?n=t==e:n=t&&(e instanceof RegExp?e.test(t):e(t)),n)return++this.pos,t}eatWhile(e){let t=this.pos;for(;this.eat(e););return this.pos>t}eatSpace(){let e=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e}skipToEnd(){this.pos=this.string.length}skipTo(e){let t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0}backUp(e){this.pos-=e}column(){return this.lastColumnPos<this.start&&(this.lastColumnValue=pn(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue}indentation(){var e;return(e=this.overrideIndent)!==null&&e!==void 0?e:pn(this.string,null,this.tabSize)}match(e,t,n){if(typeof e=="string"){let i=l=>n?l.toLowerCase():l,s=this.string.substr(this.pos,e.length);return i(s)==i(e)?(t!==!1&&(this.pos+=e.length),!0):null}else{let i=this.string.slice(this.pos).match(e);return i&&i.index>0?null:(i&&t!==!1&&(this.pos+=i[0].length),i)}}current(){return this.string.slice(this.start,this.pos)}};function Er(r){return{name:r.name||"",token:r.token,blankLine:r.blankLine||(()=>{}),startState:r.startState||(()=>!0),copyState:r.copyState||Rr,indent:r.indent||(()=>null),languageData:r.languageData||{},tokenTable:r.tokenTable||_t,mergeTokens:r.mergeTokens!==!1}}function Rr(r){if(typeof r!="object")return r;let e={};for(let t in r){let n=r[t];e[t]=n instanceof Array?n.slice():n}return e}var gn=new WeakMap,mn=class r extends U{constructor(e){let t=xn(e.languageData),n=Er(e),i,s=new class extends we{createParse(l,o,a){return new Bt(i,l,o,a)}};super(t,s,[],e.name),this.topNode=zr(t,this),i=this,this.streamParser=n,this.stateAfter=new b({perNode:!0}),this.tokenTable=e.tokenTable?new Ye(n.tokenTable):Fr}static define(e){return new r(e)}getIndent(e){let t,{overrideIndentation:n}=e.options;n&&(t=gn.get(e.state),t!=null&&t<e.pos-1e4&&(t=void 0));let i=Rt(this,e.node.tree,e.node.from,e.node.from,t??e.pos),s,l;if(i?(l=i.state,s=i.pos+1):(l=this.streamParser.startState(e.unit),s=e.node.from),e.pos-s>1e4)return null;for(;s<e.pos;){let a=e.state.doc.lineAt(s),h=Math.min(e.pos,a.to);if(a.length){let f=n?n(a.from):-1,u=new Xe(a.text,e.state.tabSize,e.unit,f<0?void 0:f);for(;u.pos<h-a.from;)Ln(this.streamParser.token,u,l)}else this.streamParser.blankLine(l,e.unit);if(h==e.pos)break;s=a.to+1}let o=e.lineAt(e.pos);return n&&t==null&&gn.set(e.state,o.from),this.streamParser.indent(l,/^\s*(.*)/.exec(o.text)[1],e)}get allowsNesting(){return!1}};function Rt(r,e,t,n,i){let s=t>=n&&t+e.length<=i&&e.prop(r.stateAfter);if(s)return{state:r.streamParser.copyState(s),pos:t+e.length};for(let l=e.children.length-1;l>=0;l--){let o=e.children[l],a=t+e.positions[l],h=o instanceof A&&a<i&&Rt(r,o,a,n,i);if(h)return h}return null}function _n(r,e,t,n,i){if(i&&t<=0&&n>=e.length)return e;!i&&t==0&&e.type==r.topNode&&(i=!0);for(let s=e.children.length-1;s>=0;s--){let l=e.positions[s],o=e.children[s],a;if(l<n&&o instanceof A){if(!(a=_n(r,o,t-l,n-l,i)))break;return i?new A(e.type,e.children.slice(0,s).concat(a),e.positions.slice(0,s+1),l+a.length):a}}return null}function _r(r,e,t,n,i){for(let s of e){let l=s.from+(s.openStart?25:0),o=s.to-(s.openEnd?25:0),a=l<=t&&o>t&&Rt(r,s.tree,0-s.offset,t,o),h;if(a&&a.pos<=n&&(h=_n(r,s.tree,t+s.offset,a.pos+s.offset,!1)))return{state:a.state,tree:h}}return{state:r.streamParser.startState(i?Je(i):4),tree:A.empty}}var Bt=class{constructor(e,t,n,i){this.lang=e,this.input=t,this.fragments=n,this.ranges=i,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=i[i.length-1].to;let s=Ce.get(),l=i[0].from,{state:o,tree:a}=_r(e,n,l,this.to,s?.state);this.state=o,this.parsedPos=this.chunkStart=l+a.length;for(let h=0;h<a.children.length;h++)this.chunks.push(a.children[h]),this.chunkPos.push(a.positions[h]);s&&this.parsedPos<s.viewport.from-1e5&&i.some(h=>h.from<=s.viewport.from&&h.to>=s.viewport.from)&&(this.state=this.lang.streamParser.startState(Je(s.state)),s.skipUntilInView(this.parsedPos,s.viewport.from),this.parsedPos=s.viewport.from),this.moveRangeIndex()}advance(){let e=Ce.get(),t=this.stoppedAt==null?this.to:Math.min(this.to,this.stoppedAt),n=Math.min(t,this.chunkStart+512);for(e&&(n=Math.min(n,e.viewport.to));this.parsedPos<n;)this.parseLine(e);return this.chunkStart<this.parsedPos&&this.finishChunk(),this.parsedPos>=t?this.finish():e&&this.parsedPos>=e.viewport.to?(e.skipUntilInView(this.parsedPos,t),this.finish()):null}stopAt(e){this.stoppedAt=e}lineAfter(e){let t=this.input.chunk(e);if(this.input.lineChunks)t==` 2`&&(t="");else{let n=t.indexOf(` 3`);n>-1&&(t=t.slice(0,n))}return e+t.length<=this.to?t:t.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,t=this.lineAfter(e),n=e+t.length;for(let i=this.rangeIndex;;){let s=this.ranges[i].to;
3if(s>=n||(t=t.slice(0,s-(n-t.length)),i++,i==this.ranges.length))break;let l=this.ranges[i].from,o=this.lineAfter(l);t+=o,n=l+o.length}return{line:t,end:n}}skipGapsTo(e,t,n){for(;;){let i=this.ranges[this.rangeIndex].to,s=e+t;if(n>0?i>s:i>=s)break;let l=this.ranges[++this.rangeIndex].from;t+=l-i}return t}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to<this.parsedPos;)this.rangeIndex++}emitToken(e,t,n,i){let s=4;if(this.ranges.length>1){i=this.skipGapsTo(t,i,1),t+=i;let o=this.chunk.length;i=this.skipGapsTo(n,i,-1),n+=i,s+=this.chunk.length-o}let l=this.chunk.length-4;return this.lang.streamParser.mergeTokens&&s==4&&l>=0&&this.chunk[l]==e&&this.chunk[l+2]==t?this.chunk[l+2]=n:this.chunk.push(e,t,n,s),i}parseLine(e){let{line:t,end:n}=this.nextLine(),i=0,{streamParser:s}=this.lang,l=new Xe(t,e?e.state.tabSize:4,e?Je(e.state):2);if(l.eol())s.blankLine(this.state,l.indentUnit);else for(;!l.eol();){let o=Ln(s.token,l,this.state);if(o&&(i=this.emitToken(this.lang.tokenTable.resolve(o),this.parsedPos+l.start,this.parsedPos+l.pos,i)),l.start>1e4)break}this.parsedPos=n,this.moveRangeIndex(),this.parsedPos<this.to&&this.parsedPos++}finishChunk(){let e=A.build({buffer:this.chunk,start:this.chunkStart,length:this.parsedPos-this.chunkStart,nodeSet:Lr,topID:0,maxBufferLength:512,reused:this.chunkReused});e=new A(e.type,e.children,e.positions,e.length,[[this.lang.stateAfter,this.lang.streamParser.copyState(this.state)]]),this.chunks.push(e),this.chunkPos.push(this.chunkStart-this.ranges[0].from),this.chunk=[],this.chunkReused=void 0,this.chunkStart=this.parsedPos}finish(){return new A(this.lang.topNode,this.chunks,this.chunkPos,this.parsedPos-this.ranges[0].from).balance()}};function Ln(r,e,t){e.start=e.pos;for(let n=0;n<10;n++){let i=r(e,t);if(e.pos>e.start)return i}throw new Error("Stream parser failed to advance stream.")}var _t=Object.create(null),Be=[_.none],Lr=new Fe(Be),kn=[],bn=Object.create(null),Fn=Object.create(null);for(let[r,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"]])Fn[r]=zn(_t,e);var Ye=class{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),Fn)}resolve(e){return e?this.table[e]||(this.table[e]=zn(this.extra,e)):0}},Fr=new Ye(_t);function vt(r,e){kn.indexOf(r)>-1||(kn.push(r),console.warn(e))}function zn(r,e){let t=[];for(let o of e.split(" ")){let a=[];for(let h of o.split(".")){let f=r[h]||d[h];f?typeof f=="function"?a.length?a=a.map(f):vt(h,`Modifier ${h} used at start of tag`):a.length?vt(h,`Tag ${h} used as modifier`):a=Array.isArray(f)?f:[f]:vt(h,`Unknown highlighting tag ${h}`)}for(let h of a)t.push(h)}if(!t.length)return 0;let n=e.replace(/ /g,"_"),i=n+" "+t.map(o=>o.id),s=bn[i];if(s)return s.id;let l=bn[i]=_.define({id:Be.length,name:n,props:[nn({[n]:t})]});return Be.push(l),l.id}function zr(r,e){let t=_.define({id:Be.length,name:"Document",props:[ue.add(()=>r),Tn.add(()=>n=>e.getIndent(n))],top:!0});return Be.push(t),t}function jn(r){return r.length<=4096&&/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/.test(r)}function Un(r){for(let e=r.iter();!e.next().done;)if(jn(e.value))return!0;return!1}function jr(r){let e=!1;return r.iterChanges((t,n,i,s,l)=>{!e&&Un(l)&&(e=!0)}),e}var Mt=$.define({combine:r=>r.some(e=>e)});function bi(r={}){let e=[Ur];return r.alwaysIsolate&&e.push(Mt.of(!0)),e}var Ur=pe.fromClass(class{constructor(r){this.always=r.state.facet(Mt)||r.textDirection!=ye.LTR||r.state.facet(j.perLineTextDirection),this.hasRTL=!this.always&&Un(r.state.doc),this.tree=W(r.state),this.decorations=this.always||this.hasRTL?yn(r,this.tree,this.always):L.none}update(r){let e=r.state.facet(Mt)||r.view.textDirection!=ye.LTR||r.state.facet(j.perLineTextDirection);if(!e&&!this.hasRTL&&jr(r.changes)&&(this.hasRTL=!0),!e&&!this.hasRTL)return;let t=W(r.state);(e!=this.always||t!=this.tree||r.docChanged||r.viewportChanged)&&(this.tree=t,this.always=e,this.decorations=yn(r.view,t,e))}},{provide:r=>{function e(t){var n,i;return(i=(n=t.plugin(r))===null||n===void 0?void 0:n.decorations)!==null&&i!==void 0?i:L.none}return[j.outerDecorations.of(e),et.lowest(j.bidiIsolatedRanges.of(e))]}});function yn(r,e,t){let n=new Re,i=r.visibleRanges;t||(i=Wr(i,r.state.doc));for(let{from:s,to:l}of i)e.iterate({enter:o=>{let a=o.type.prop(b.isolate);a&&n.add(o.from,o.to,Hr[a])},from:s,to:l});return n.finish()}function Wr(r,e){let t=e.iter(),n=0,i=[],s=null;for(let{from:l,to:o}of r)if(!(s&&s.to>l&&(l=s.to,l>=o)))for(n+t.value.length<l&&(t.next(l-(n+t.value.length)),n=l);;){let a=n,h=n+t.value.length;if(!t.lineBreak&&jn(t.value)&&(s&&s.to>a-10?s.to=Math.min(o,h):i.push(s={from:a,to:Math.min(o,h)})),h>=o)break;n=h,t.next()}return i}var Hr={rtl:L.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"rtl"},bidiIsolate:ye.RTL}),ltr:L.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"ltr"},bidiIsolate:ye.LTR}
3),auto:L.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"auto"},bidiIsolate:null})};export{b as a,_ as b,Fe as c,S as d,A as e,Gt as f,we as g,Vr as h,nn as i,d as j,ue as k,xn as l,tr as m,U as n,on as o,W as p,nr as q,ei as r,ti as s,ni as t,St as u,Ce as v,ie as w,hn as x,fn as y,rr as z,Sn as A,Je as B,An as C,Cn as D,ii as E,Pe as F,Tn as G,At as H,si as I,li as J,oi as K,ai as L,ur as M,cr as N,hi as O,Ne as P,Me as Q,me as R,se as S,fi as T,mr as U,kr as V,br as W,yr as X,ui as Y,ci as Z,Bn as _,di as $,Qe as aa,pi as ba,gi as ca,mi as da,ki as ea,Mr as fa,qe as ga,Xe as ha,mn as ia,bi as ja}; 4//noopchunk-J7Z6TRJ3.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.