File: /var/www/html/insiders/wp-load/wp-content/plugins/breadly/build/settings-main.js
(self.webpackChunkgutenmate_blocks=self.webpackChunkgutenmate_blocks||[]).push([[3440],{8903:function(e,t,i){"use strict";var n=i(9196),s=i.n(n),r=i(932),o=i(5736),a=i(5609),l=i(9307),h=i(4333),c=i(9818),u=i(2819),d=window.wp.notices,f=i(5990),O=i(915),p=i(3499);function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},m.apply(this,arguments)}const g=e=>e||(0,o.__)("auto","gutenmate"),Q=r.Z.div`
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: calc(24px) calc(16px);
`,S=e=>{const{value:t,onChange:i,editOnly:n=!1}=e,r=e=>{i([...t,{enable:!0,name:"new-image-size",width:500,height:500,crop:!1,cropX:"center",cropY:"center"}])};return s().createElement(l.Fragment,null,s().createElement(p.Yc,m({values:t,renderLabel:({item:e,i:t})=>s().createElement("span",null,s().createElement(p.m0,null,e.name),s().createElement(p.LK,null,`${g(e.width)} × ${g(e.height)}`),!e.enable&&s().createElement(p.c4,null,(0,o.__)("Disabled","gutenmate")))},n?{}:{renderActions:({item:e,i:n})=>s().createElement(l.Fragment,null,s().createElement(a.MenuItem,{onClick:e=>{((e,n)=>{t.splice(n,1),i([...t])})(0,n)}},(0,o.__)("Delete","gutenmate")))},{renderBody:({item:e,i:r})=>s().createElement(l.Fragment,null,s().createElement(a.ToggleControl,{label:(0,o.__)("Enable","gutenmate"),checked:e.enable,onChange:n=>{t[r]={...e,enable:n},i([...t])}}),s().createElement(a.TextControl,m({label:(0,o.__)("Name","gutenmate"),value:e.name},e.enable&&!n?{}:{disabled:"disabled"},{spellcheck:!1,onChange:n=>{t[r]={...e,name:n},i([...t])},onBlur:n=>{let s=e.name;s=s.replaceAll(/[^a-z0-9_-]+/gi," "),s=s.trim(),s=s.replaceAll(/[ ]+/g,"_"),s!=e.name&&(t[r]={...e,name:s},i([...t]))}})),s().createElement(Q,null,s().createElement(a.TextControl,m({type:"number",autoComplete:"off",label:(0,o.__)("Width","gutenmate"),required:!0,value:e.width},e.enable?{}:{disabled:"disabled"},{min:"0",onChange:n=>{t[r]={...e,width:n},i([...t])},onBlur:n=>{""==e.width&&(t[r]={...e,width:0},i([...t]))}})),s().createElement(a.TextControl,m({type:"number",autoComplete:"off",label:(0,o.__)("Height","gutenmate"),required:!0,value:e.height},e.enable?{}:{disabled:"disabled"},{min:"0",onChange:n=>{t[r]={...e,height:n},i([...t])},onBlur:n=>{""==e.height&&(t[r]={...e,height:0},i([...t]))}}))),s().createElement(a.ToggleControl,{label:(0,o.__)("Crop","gutenmate"),checked:e.crop,disabled:!e.enable,onChange:n=>{t[r]={...e,crop:n},i([...t])}}),e.crop&&s().createElement(Q,null,s().createElement(a.SelectControl,m({label:(0,o.__)("Crop X Position","gutenmate"),value:e.cropX},e.enable?{}:{disabled:"disabled"},{options:[{label:(0,o.__)("Left","gutenmate"),value:"left"},{label:(0,o.__)("Center","gutenmate"),value:"center"},{label:(0,o.__)("Right","gutenmate"),value:"right"}],onChange:n=>{t[r]={...e,cropX:n},i([...t])}})),s().createElement(a.SelectControl,m({label:(0,o.__)("Crop Y Position","gutenmate"),value:e.cropY},e.enable?{}:{disabled:"disabled"},{options:[{label:(0,o.__)("Top","gutenmate"),value:"top"},{label:(0,o.__)("Center","gutenmate"),value:"center"},{label:(0,o.__)("Bottom","gutenmate"),value:"bottom"}],onChange:n=>{t[r]={...e,cropY:n},i([...t])}}))))},n?{}:{renderFooter:()=>s().createElement(a.Button,{isSecondary:!0,variant:"secondary",onClick:r},(0,o.__)("Add New","gutenmate"))})))};var v=i(6526),b=i(9153);const y=r.Z.div`
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: calc(24px) calc(16px);
`,w={200:"200",300:"300",400:"400 (Normal)",500:"500",600:"600",700:"700 (Bold)",800:"800",900:"900"},x={"200i":"200i","300i":"300i","400i":"400i","500i":"500i","600i":"600i","700i":"700i","800i":"800i","900i":"900i"},$=(0,b.k7)(),k=e=>{const{value:t,onChange:i,label:n,help:r}=e,{originalFamilies:h}=(0,c.useSelect)((e=>({originalFamilies:e("core").getThemeSupports()["gutenmate-font-families"]})));return h?s().createElement(l.Fragment,null,s().createElement(a.BaseControl,{label:n,help:r}),s().createElement(p.Yc,{values:h??[],renderLabel:({item:e,i:t})=>s().createElement("span",null,s().createElement(p.m0,null,e.name)),renderBody:({item:e,i:n})=>{const r=(0,u.filter)(t,{slug:e.slug}).length,[h,c]=(0,l.useState)(r);let d=(h?t[n].preloadFontWeight:e.preloadFontWeight).split(",");return s().createElement(l.Fragment,null,s().createElement(a.ToggleControl,{label:(0,o.__)("Override","gutenmate"),checked:h,onChange:s=>{s?t[n]={...e}:t.splice(n,1),c(s),i([...t])}}),s().createElement(a.SelectControl,{label:(0,o.__)("Font Family","gutenmate"),disabled:!h,className:"gtm-font-selector-select",value:h?t[n].fontFamily:e.fontFamily,onChange:e=>{t[n].fontFamily=e,i([...t])},options:$}),s().createElement(a.BaseControl,{label:(0,o.__)("Preload font weights","gutenmate"),help:(0,o.__)("Choose font weights to be loaded by default. Please note that some weights are not available in some font.","gutenmate")}),s().createElement(y,null,s().createElement("div",null,Object.keys(w).map((e=>{const r=w[e];return s().createElement(a.CheckboxControl,{label:r,disabled:!h,checked:d.includes(e),onChange:s=>{s?d.push(e):d=(0,u.difference)(d,[e]),d=d.filter(Boolean),t[n].preloadFontWeight=d.join(","),i([...t])}})}))),s().createElement("div",null,Object.keys(x).map((e=>{const r=x[e];return s().createElement(a.CheckboxControl,{label:r,disabled:!h,checked:d.includes(e),onChange:s=>{s?d.push(e):d=(0,u.difference)(d,[e]),d=d.filter(Boolean),t[n].preloadFontWeight=d.join(","),i([...t])}})})))))}})):null};var P=i(9972);function T(){return T=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},T.apply(this,arguments)}class _{constructor(){}lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){let n=[];return this.decompose(0,e,n,2),i.length&&i.decompose(0,i.length,n,3),this.decompose(t,this.length,n,1),W.from(n,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){let i=[];return this.decompose(e,t,i,0),W.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),n=new X(this),s=new X(e);for(let e=t,r=t;;){if(n.next(e),s.next(e),e=0,n.lineBreak!=s.lineBreak||n.done!=s.done||n.value!=s.value)return!1;if(r+=n.value.length,n.done||r>=i)return!0}}iter(e=1){return new X(this,e)}iterRange(e,t=this.length){return new V(this,e,t)}iterLines(e,t){let i;if(null==e)i=this.iter();else{null==t&&(t=this.lines+1);let n=this.line(e).from;i=this.iterRange(n,Math.max(n,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new R(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}static of(e){if(0==e.length)throw new RangeError("A document must have at least one line");return 1!=e.length||e[0]?e.length<=32?new C(e):W.from(C.split(e,[])):_.empty}}class C extends _{constructor(e,t=function(e){let t=-1;for(let i of e)t+=i.length+1;return t}(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,n){for(let s=0;;s++){let r=this.text[s],o=n+r.length;if((t?i:o)>=e)return new q(n,o,i,r);n=o+1,i++}}decompose(e,t,i,n){let s=e<=0&&t>=this.length?this:new C(Z(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(1&n){let e=i.pop(),t=A(s.text,e.text.slice(),0,s.length);if(t.length<=32)i.push(new C(t,e.length+s.length));else{let e=t.length>>1;i.push(new C(t.slice(0,e)),new C(t.slice(e)))}}else i.push(s)}replace(e,t,i){if(!(i instanceof C))return super.replace(e,t,i);let n=A(this.text,A(i.text,Z(this.text,0,e)),t),s=this.length+i.length-(t-e);return n.length<=32?new C(n,s):W.from(C.split(n,[]),s)}sliceString(e,t=this.length,i="\n"){let n="";for(let s=0,r=0;s<=t&&r<this.text.length;r++){let o=this.text[r],a=s+o.length;s>e&&r&&(n+=i),e<a&&t>s&&(n+=o.slice(Math.max(0,e-s),t-s)),s=a+1}return n}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],n=-1;for(let s of e)i.push(s),n+=s.length+1,32==i.length&&(t.push(new C(i,n)),i=[],n=-1);return n>-1&&t.push(new C(i,n)),t}}class W extends _{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,i,n){for(let s=0;;s++){let r=this.children[s],o=n+r.length,a=i+r.lines-1;if((t?a:o)>=e)return r.lineInner(e,t,i,n);n=o+1,i=a+1}}decompose(e,t,i,n){for(let s=0,r=0;r<=t&&s<this.children.length;s++){let o=this.children[s],a=r+o.length;if(e<=a&&t>=r){let s=n&((r<=e?1:0)|(a>=t?2:0));r>=e&&a<=t&&!s?i.push(o):o.decompose(e-r,t-r,i,s)}r=a+1}}replace(e,t,i){if(i.lines<this.lines)for(let n=0,s=0;n<this.children.length;n++){let r=this.children[n],o=s+r.length;if(e>=s&&t<=o){let a=r.replace(e-s,t-s,i),l=this.lines-r.lines+a.lines;if(a.lines<l>>4&&a.lines>l>>6){let s=this.children.slice();return s[n]=a,new W(s,this.length-(t-e)+i.length)}return super.replace(s,o,a)}s=o+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i="\n"){let n="";for(let s=0,r=0;s<this.children.length&&r<=t;s++){let o=this.children[s],a=r+o.length;r>e&&s&&(n+=i),e<a&&t>r&&(n+=o.sliceString(e-r,t-r,i)),r=a+1}return n}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof W))return 0;let i=0,[n,s,r,o]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;n+=t,s+=t){if(n==r||s==o)return i;let a=this.children[n],l=e.children[s];if(a!=l)return i+a.scanIdentical(l,t);i+=a.length+1}}static from(e,t=e.reduce(((e,t)=>e+t.length+1),-1)){let i=0;for(let t of e)i+=t.lines;if(i<32){let i=[];for(let t of e)t.flatten(i);return new C(i,t)}let n=Math.max(32,i>>5),s=n<<1,r=n>>1,o=[],a=0,l=-1,h=[];function c(e){let t;if(e.lines>s&&e instanceof W)for(let t of e.children)c(t);else e.lines>r&&(a>r||!a)?(u(),o.push(e)):e instanceof C&&a&&(t=h[h.length-1])instanceof C&&e.lines+t.lines<=32?(a+=e.lines,l+=e.length+1,h[h.length-1]=new C(t.text.concat(e.text),t.length+1+e.length)):(a+e.lines>n&&u(),a+=e.lines,l+=e.length+1,h.push(e))}function u(){0!=a&&(o.push(1==h.length?h[0]:W.from(h,l)),l=-1,a=h.length=0)}for(let t of e)c(t);return u(),1==o.length?o[0]:new W(o,t)}}function A(e,t,i=0,n=1e9){for(let s=0,r=0,o=!0;r<e.length&&s<=n;r++){let a=e[r],l=s+a.length;l>=i&&(l>n&&(a=a.slice(0,n-s)),s<i&&(a=a.slice(i-s)),o?(t[t.length-1]+=a,o=!1):t.push(a)),s=l+1}return t}function Z(e,t,i){return A(e,[""],t,i)}_.empty=new C([""],0);class X{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof C?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,n=this.nodes[i],s=this.offsets[i],r=s>>1,o=n instanceof C?n.text.length:n.children.length;if(r==(t>0?o:0)){if(0==i)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&s)==(t>0?0:1)){if(this.offsets[i]+=t,0==e)return this.lineBreak=!0,this.value="\n",this;e--}else if(n instanceof C){let s=n.text[r+(t<0?-1:0)];if(this.offsets[i]+=t,s.length>Math.max(0,e))return this.value=0==e?s:t>0?s.slice(e):s.slice(0,s.length-e),this;e-=s.length}else{let s=n.children[r+(t<0?-1:0)];e>s.length?(e-=s.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(s),this.offsets.push(t>0?1:(s instanceof C?s.text.length:s.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class V{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new X(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:n}=this.cursor.next(e);return this.pos+=(n.length+e)*t,this.value=n.length<=i?n:t<0?n.slice(n.length-i):n.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class R{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:n}=this.inner.next(e);return t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=n,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(_.prototype[Symbol.iterator]=function(){return this.iter()},X.prototype[Symbol.iterator]=V.prototype[Symbol.iterator]=R.prototype[Symbol.iterator]=function(){return this});class q{constructor(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2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((e=>e?parseInt(e,36):1));for(let e=1;e<M.length;e++)M[e]+=M[e-1];function E(e){for(let t=1;t<M.length;t+=2)if(M[t]>e)return M[t-1]<=e;return!1}function D(e){return e>=127462&&e<=127487}function I(e,t,i=!0,n=!0){return(i?U:Y)(e,t,n)}function U(e,t,i){if(t==e.length)return t;t&&j(e.charCodeAt(t))&&B(e.charCodeAt(t-1))&&t--;let n=N(e,t);for(t+=z(n);t<e.length;){let s=N(e,t);if(8205==n||8205==s||i&&E(s))t+=z(s),n=s;else{if(!D(s))break;{let i=0,n=t-2;for(;n>=0&&D(N(e,n));)i++,n-=2;if(i%2==0)break;t+=2}}}return t}function Y(e,t,i){for(;t>0;){let n=U(e,t-2,i);if(n<t)return n;t--}return 0}function j(e){return e>=56320&&e<57344}function B(e){return e>=55296&&e<56320}function N(e,t){let i=e.charCodeAt(t);if(!B(i)||t+1==e.length)return i;let n=e.charCodeAt(t+1);return j(n)?n-56320+(i-55296<<10)+65536:i}function G(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function z(e){return e<65536?1:2}const L=/\r\n?|\n/;var F=function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e}(F||(F={}));class H{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t+1];e+=i<0?this.sections[t]:i}return e}get empty(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}iterGaps(e){for(let t=0,i=0,n=0;t<this.sections.length;){let s=this.sections[t++],r=this.sections[t++];r<0?(e(i,n,s),n+=s):n+=r,i+=s}}iterChangedRanges(e,t=!1){te(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let i=this.sections[t++],n=this.sections[t++];n<0?e.push(i,n):e.push(n,i)}return new H(e)}composeDesc(e){return this.empty?e:e.empty?this:ne(this,e)}mapDesc(e,t=!1){return e.empty?this:ie(this,e,t)}mapPos(e,t=-1,i=F.Simple){let n=0,s=0;for(let r=0;r<this.sections.length;){let o=this.sections[r++],a=this.sections[r++],l=n+o;if(a<0){if(l>e)return s+(e-n);s+=o}else{if(i!=F.Simple&&l>=e&&(i==F.TrackDel&&n<e&&l>e||i==F.TrackBefore&&n<e||i==F.TrackAfter&&l>e))return null;if(l>e||l==e&&t<0&&!o)return e==n||t<0?s:s+a;s+=a}n=l}if(e>n)throw new RangeError(`Position ${e} is out of range for changeset of length ${n}`);return s}touchesRange(e,t=e){for(let i=0,n=0;i<this.sections.length&&n<=t;){let s=n+this.sections[i++];if(this.sections[i++]>=0&&n<=t&&s>=e)return!(n<e&&s>t)||"cover";n=s}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let i=this.sections[t++],n=this.sections[t++];e+=(e?" ":"")+i+(n>=0?":"+n:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some((e=>"number"!=typeof e)))throw new RangeError("Invalid JSON representation of ChangeDesc");return new H(e)}static create(e){return new H(e)}}class J extends H{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return te(this,((t,i,n,s,r)=>e=e.replace(n,n+(i-t),r)),!1),e}mapDesc(e,t=!1){return ie(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let n=0,s=0;n<t.length;n+=2){let r=t[n],o=t[n+1];if(o>=0){t[n]=o,t[n+1]=r;let a=n>>1;for(;i.length<a;)i.push(_.empty);i.push(r?e.slice(s,s+r):_.empty)}s+=r}return new J(t,i)}compose(e){return this.empty?e:e.empty?this:ne(this,e,!0)}map(e,t=!1){return e.empty?this:ie(this,e,t,!0)}iterChanges(e,t=!1){te(this,e,t)}get desc(){return H.create(this.sections)}filter(e){let t=[],i=[],n=[],s=new se(this);e:for(let r=0,o=0;;){let a=r==e.length?1e9:e[r++];for(;o<a||o==a&&0==s.len;){if(s.done)break e;let e=Math.min(s.len,a-o);K(n,e,-1);let r=-1==s.ins?-1:0==s.off?s.ins:0;K(t,e,r),r>0&&ee(i,t,s.text),s.forward(e),o+=e}let l=e[r++];for(;o<l;){if(s.done)break e;let e=Math.min(s.len,l-o);K(t,e,-1),K(n,e,-1==s.ins?-1:0==s.off?s.ins:0),s.forward(e),o+=e}}return{changes:new J(t,i),filtered:H.create(n)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t],n=this.sections[t+1];n<0?e.push(i):0==n?e.push([i]):e.push([i].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,i){let n=[],s=[],r=0,o=null;function a(e=!1){if(!e&&!n.length)return;r<t&&K(n,t-r,-1);let i=new J(n,s);o=o?o.compose(i.map(o)):i,n=[],s=[],r=0}return function e(l){if(Array.isArray(l))for(let t of l)e(t);else if(l instanceof J){if(l.length!=t)throw new RangeError(`Mismatched change set length (got ${l.length}, expected ${t})`);a(),o=o?o.compose(l.map(o)):l}else{let{from:e,to:o=e,insert:h}=l;if(e>o||e<0||o>t)throw new RangeError(`Invalid change range ${e} to ${o} (in doc of length ${t})`);let c=h?"string"==typeof h?_.of(h.split(i||L)):h:_.empty,u=c.length;if(e==o&&0==u)return;e<r&&a(),e>r&&K(n,e-r,-1),K(n,o-e,u),ee(s,n,c),r=o}}(e),a(!o),o}static empty(e){return new J(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let n=0;n<e.length;n++){let s=e[n];if("number"==typeof s)t.push(s,-1);else{if(!Array.isArray(s)||"number"!=typeof s[0]||s.some(((e,t)=>t&&"string"!=typeof e)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==s.length)t.push(s[0],0);else{for(;i.length<n;)i.push(_.empty);i[n]=_.of(s.slice(1)),t.push(s[0],i[n].length)}}}return new J(t,i)}static createSet(e,t){return new J(e,t)}}function K(e,t,i,n=!1){if(0==t&&i<=0)return;let s=e.length-2;s>=0&&i<=0&&i==e[s+1]?e[s]+=t:0==t&&0==e[s]?e[s+1]+=i:n?(e[s]+=t,e[s+1]+=i):e.push(t,i)}function ee(e,t,i){if(0==i.length)return;let n=t.length-2>>1;if(n<e.length)e[e.length-1]=e[e.length-1].append(i);else{for(;e.length<n;)e.push(_.empty);e.push(i)}}function te(e,t,i){let n=e.inserted;for(let s=0,r=0,o=0;o<e.sections.length;){let a=e.sections[o++],l=e.sections[o++];if(l<0)s+=a,r+=a;else{let h=s,c=r,u=_.empty;for(;h+=a,c+=l,l&&n&&(u=u.append(n[o-2>>1])),!(i||o==e.sections.length||e.sections[o+1]<0);)a=e.sections[o++],l=e.sections[o++];t(s,h,r,c,u),s=h,r=c}}}function ie(e,t,i,n=!1){let s=[],r=n?[]:null,o=new se(e),a=new se(t);for(let e=-1;;)if(-1==o.ins&&-1==a.ins){let e=Math.min(o.len,a.len);K(s,e,-1),o.forward(e),a.forward(e)}else if(a.ins>=0&&(o.ins<0||e==o.i||0==o.off&&(a.len<o.len||a.len==o.len&&!i))){let t=a.len;for(K(s,a.ins,-1);t;){let i=Math.min(o.len,t);o.ins>=0&&e<o.i&&o.len<=i&&(K(s,0,o.ins),r&&ee(r,s,o.text),e=o.i),o.forward(i),t-=i}a.next()}else{if(!(o.ins>=0)){if(o.done&&a.done)return r?J.createSet(s,r):H.create(s);throw new Error("Mismatched change set lengths")}{let t=0,i=o.len;for(;i;)if(-1==a.ins){let e=Math.min(i,a.len);t+=e,i-=e,a.forward(e)}else{if(!(0==a.ins&&a.len<i))break;i-=a.len,a.next()}K(s,t,e<o.i?o.ins:0),r&&e<o.i&&ee(r,s,o.text),e=o.i,o.forward(o.len-i)}}}function ne(e,t,i=!1){let n=[],s=i?[]:null,r=new se(e),o=new se(t);for(let e=!1;;){if(r.done&&o.done)return s?J.createSet(n,s):H.create(n);if(0==r.ins)K(n,r.len,0,e),r.next();else if(0!=o.len||o.done){if(r.done||o.done)throw new Error("Mismatched change set lengths");{let t=Math.min(r.len2,o.len),i=n.length;if(-1==r.ins){let i=-1==o.ins?-1:o.off?0:o.ins;K(n,t,i,e),s&&i&&ee(s,n,o.text)}else-1==o.ins?(K(n,r.off?0:r.len,t,e),s&&ee(s,n,r.textBit(t))):(K(n,r.off?0:r.len,o.off?0:o.ins,e),s&&!o.off&&ee(s,n,o.text));e=(r.ins>t||o.ins>=0&&o.len>t)&&(e||n.length>i),r.forward2(t),o.forward(t)}}else K(n,0,o.ins,e),s&&ee(s,n,o.text),o.next()}}class se{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return-2==this.ins}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?_.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?_.empty:t[i].slice(this.off,null==e?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){-1==this.ins?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class re{constructor(e,t,i){this.from=e,this.to=t,this.flags=i}get anchor(){return 16&this.flags?this.to:this.from}get head(){return 16&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 4&this.flags?-1:8&this.flags?1:0}get bidiLevel(){let e=3&this.flags;return 3==e?null:e}get goalColumn(){let e=this.flags>>5;return 33554431==e?void 0:e}map(e,t=-1){let i,n;return this.empty?i=n=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),n=e.mapPos(this.to,-1)),i==this.from&&n==this.to?this:new re(i,n,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return oe.range(e,t);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return oe.range(this.anchor,i)}eq(e){return this.anchor==e.anchor&&this.head==e.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||"number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid JSON representation for SelectionRange");return oe.range(e.anchor,e.head)}static create(e,t,i){return new re(e,t,i)}}class oe{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:oe.create(this.ranges.map((i=>i.map(e,t))),this.mainIndex)}eq(e){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let t=0;t<this.ranges.length;t++)if(!this.ranges[t].eq(e.ranges[t]))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new oe([this.main],0)}addRange(e,t=!0){return oe.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let i=this.ranges.slice();return i[t]=e,oe.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map((e=>e.toJSON())),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||"number"!=typeof e.main||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new oe(e.ranges.map((e=>re.fromJSON(e))),e.main)}static single(e,t=e){return new oe([oe.range(e,t)],0)}static create(e,t=0){if(0==e.length)throw new RangeError("A selection needs at least one range");for(let i=0,n=0;n<e.length;n++){let s=e[n];if(s.empty?s.from<=i:s.from<i)return oe.normalized(e.slice(),t);i=s.to}return new oe(e,t)}static cursor(e,t=0,i,n){return re.create(e,e,(0==t?0:t<0?4:8)|(null==i?3:Math.min(2,i))|(null!=n?n:33554431)<<5)}static range(e,t,i,n){let s=(null!=i?i:33554431)<<5|(null==n?3:Math.min(2,n));return t<e?re.create(t,e,24|s):re.create(e,t,(t>e?4:0)|s)}static normalized(e,t=0){let i=e[t];e.sort(((e,t)=>e.from-t.from)),t=e.indexOf(i);for(let i=1;i<e.length;i++){let n=e[i],s=e[i-1];if(n.empty?n.from<=s.to:n.from<s.to){let r=s.from,o=Math.max(n.to,s.to);i<=t&&t--,e.splice(--i,2,n.anchor>n.head?oe.range(o,r):oe.range(r,o))}}return new oe(e,t)}}function ae(e,t){for(let i of e.ranges)if(i.to>t)throw new RangeError("Selection points outside of document")}let le=0;class he{constructor(e,t,i,n,s){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=n,this.id=le++,this.default=e([]),this.extensions="function"==typeof s?s(this):s}static define(e={}){return new he(e.combine||(e=>e),e.compareInput||((e,t)=>e===t),e.compare||(e.combine?(e,t)=>e===t:ce),!!e.static,e.enables)}of(e){return new ue([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new ue(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new ue(e,this,2,t)}from(e,t){return t||(t=e=>e),this.compute([e],(i=>t(i.field(e))))}}function ce(e,t){return e==t||e.length==t.length&&e.every(((e,i)=>e===t[i]))}class ue{constructor(e,t,i,n){this.dependencies=e,this.facet=t,this.type=i,this.value=n,this.id=le++}dynamicSlot(e){var t;let i=this.value,n=this.facet.compareInput,s=this.id,r=e[s]>>1,o=2==this.type,a=!1,l=!1,h=[];for(let i of this.dependencies)"doc"==i?a=!0:"selection"==i?l=!0:0==(1&(null!==(t=e[i.id])&&void 0!==t?t:1))&&h.push(e[i.id]);return{create:e=>(e.values[r]=i(e),1),update(e,t){if(a&&t.docChanged||l&&(t.docChanged||t.selection)||fe(e,h)){let t=i(e);if(o?!de(t,e.values[r],n):!n(t,e.values[r]))return e.values[r]=t,1}return 0},reconfigure:(e,t)=>{let a,l=t.config.address[s];if(null!=l){let s=xe(t,l);if(this.dependencies.every((i=>i instanceof he?t.facet(i)===e.facet(i):!(i instanceof me)||t.field(i,!1)==e.field(i,!1)))||(o?de(a=i(e),s,n):n(a=i(e),s)))return e.values[r]=s,0}else a=i(e);return e.values[r]=a,1}}}}function de(e,t,i){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!i(e[n],t[n]))return!1;return!0}function fe(e,t){let i=!1;for(let n of t)1&we(e,n)&&(i=!0);return i}function Oe(e,t,i){let n=i.map((t=>e[t.id])),s=i.map((e=>e.type)),r=n.filter((e=>!(1&e))),o=e[t.id]>>1;function a(e){let i=[];for(let t=0;t<n.length;t++){let r=xe(e,n[t]);if(2==s[t])for(let e of r)i.push(e);else i.push(r)}return t.combine(i)}return{create(e){for(let t of n)we(e,t);return e.values[o]=a(e),1},update(e,i){if(!fe(e,r))return 0;let n=a(e);return t.compare(n,e.values[o])?0:(e.values[o]=n,1)},reconfigure(e,s){let r=fe(e,n),l=s.config.facets[t.id],h=s.facet(t);if(l&&!r&&ce(i,l))return e.values[o]=h,0;let c=a(e);return t.compare(c,h)?(e.values[o]=h,0):(e.values[o]=c,1)}}}const pe=he.define({static:!0});class me{constructor(e,t,i,n,s){this.id=e,this.createF=t,this.updateF=i,this.compareF=n,this.spec=s,this.provides=void 0}static define(e){let t=new me(le++,e.create,e.update,e.compare||((e,t)=>e===t),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(pe).find((e=>e.field==this));return((null==t?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,i)=>{let n=e.values[t],s=this.updateF(n,i);return this.compareF(n,s)?0:(e.values[t]=s,1)},reconfigure:(e,i)=>null!=i.config.address[this.id]?(e.values[t]=i.field(this),0):(e.values[t]=this.create(e),1)}}init(e){return[this,pe.of({field:this,create:e})]}get extension(){return this}}function ge(e){return t=>new Se(t,e)}const Qe={highest:ge(0),high:ge(1),default:ge(2),low:ge(3),lowest:ge(4)};class Se{constructor(e,t){this.inner=e,this.prec=t}}class ve{of(e){return new be(this,e)}reconfigure(e){return ve.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class be{constructor(e,t){this.compartment=e,this.inner=t}}class ye{constructor(e,t,i,n,s,r){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=n,this.staticValues=s,this.facets=r,this.statusTemplate=[];this.statusTemplate.length<i.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return null==t?e.default:this.staticValues[t>>1]}static resolve(e,t,i){let n=[],s=Object.create(null),r=new Map;for(let i of function(e,t,i){let n=[[],[],[],[],[]],s=new Map;return function e(r,o){let a=s.get(r);if(null!=a){if(a<=o)return;let e=n[a].indexOf(r);e>-1&&n[a].splice(e,1),r instanceof be&&i.delete(r.compartment)}if(s.set(r,o),Array.isArray(r))for(let t of r)e(t,o);else if(r instanceof be){if(i.has(r.compartment))throw new RangeError("Duplicate use of compartment in extensions");let n=t.get(r.compartment)||r.inner;i.set(r.compartment,n),e(n,o)}else if(r instanceof Se)e(r.inner,r.prec);else if(r instanceof me)n[o].push(r),r.provides&&e(r.provides,o);else if(r instanceof ue)n[o].push(r),r.facet.extensions&&e(r.facet.extensions,2);else{let t=r.extension;if(!t)throw new Error(`Unrecognized extension value in extension set (${r}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);e(t,o)}}(e,2),n.reduce(((e,t)=>e.concat(t)))}(e,t,r))i instanceof me?n.push(i):(s[i.facet.id]||(s[i.facet.id]=[])).push(i);let o=Object.create(null),a=[],l=[];for(let e of n)o[e.id]=l.length<<1,l.push((t=>e.slot(t)));let h=null==i?void 0:i.config.facets;for(let e in s){let t=s[e],n=t[0].facet,r=h&&h[e]||[];if(t.every((e=>0==e.type)))if(o[n.id]=a.length<<1|1,ce(r,t))a.push(i.facet(n));else{let e=n.combine(t.map((e=>e.value)));a.push(i&&n.compare(e,i.facet(n))?i.facet(n):e)}else{for(let e of t)0==e.type?(o[e.id]=a.length<<1|1,a.push(e.value)):(o[e.id]=l.length<<1,l.push((t=>e.dynamicSlot(t))));o[n.id]=l.length<<1,l.push((e=>Oe(e,n,t)))}}let c=l.map((e=>e(o)));return new ye(e,r,c,o,a,s)}}function we(e,t){if(1&t)return 2;let i=t>>1,n=e.status[i];if(4==n)throw new Error("Cyclic dependency between fields and/or facets");if(2&n)return n;e.status[i]=4;let s=e.computeSlot(e,e.config.dynamicSlots[i]);return e.status[i]=2|s}function xe(e,t){return 1&t?e.config.staticValues[t>>1]:e.values[t>>1]}const $e=he.define(),ke=he.define({combine:e=>e.some((e=>e)),static:!0}),Pe=he.define({combine:e=>e.length?e[0]:void 0,static:!0}),Te=he.define(),_e=he.define(),Ce=he.define(),We=he.define({combine:e=>!!e.length&&e[0]});class Ae{constructor(e,t){this.type=e,this.value=t}static define(){return new Ze}}class Ze{of(e){return new Ae(this,e)}}class Xe{constructor(e){this.map=e}of(e){return new Ve(this,e)}}class Ve{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return void 0===t?void 0:t==this.value?this:new Ve(this.type,t)}is(e){return this.type==e}static define(e={}){return new Xe(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let n of e){let e=n.map(t);e&&i.push(e)}return i}}Ve.reconfigure=Ve.define(),Ve.appendConfig=Ve.define();class Re{constructor(e,t,i,n,s,r){this.startState=e,this.changes=t,this.selection=i,this.effects=n,this.annotations=s,this.scrollIntoView=r,this._doc=null,this._state=null,i&&ae(i,t.newLength),s.some((e=>e.type==Re.time))||(this.annotations=s.concat(Re.time.of(Date.now())))}static create(e,t,i,n,s,r){return new Re(e,t,i,n,s,r)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(Re.userEvent);return!(!t||!(t==e||t.length>e.length&&t.slice(0,e.length)==e&&"."==t[e.length]))}}function qe(e,t){let i=[];for(let n=0,s=0;;){let r,o;if(n<e.length&&(s==t.length||t[s]>=e[n]))r=e[n++],o=e[n++];else{if(!(s<t.length))return i;r=t[s++],o=t[s++]}!i.length||i[i.length-1]<r?i.push(r,o):i[i.length-1]<o&&(i[i.length-1]=o)}}function Me(e,t,i){var n;let s,r,o;return i?(s=t.changes,r=J.empty(t.changes.length),o=e.changes.compose(t.changes)):(s=t.changes.map(e.changes),r=e.changes.mapDesc(t.changes,!0),o=e.changes.compose(s)),{changes:o,selection:t.selection?t.selection.map(r):null===(n=e.selection)||void 0===n?void 0:n.map(s),effects:Ve.mapEffects(e.effects,s).concat(Ve.mapEffects(t.effects,r)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function Ee(e,t,i){let n=t.selection,s=Ue(t.annotations);return t.userEvent&&(s=s.concat(Re.userEvent.of(t.userEvent))),{changes:t.changes instanceof J?t.changes:J.of(t.changes||[],i,e.facet(Pe)),selection:n&&(n instanceof oe?n:oe.single(n.anchor,n.head)),effects:Ue(t.effects),annotations:s,scrollIntoView:!!t.scrollIntoView}}function De(e,t,i){let n=Ee(e,t.length?t[0]:{},e.doc.length);t.length&&!1===t[0].filter&&(i=!1);for(let s=1;s<t.length;s++){!1===t[s].filter&&(i=!1);let r=!!t[s].sequential;n=Me(n,Ee(e,t[s],r?n.changes.newLength:e.doc.length),r)}let s=Re.create(e,n.changes,n.selection,n.effects,n.annotations,n.scrollIntoView);return function(e){let t=e.startState,i=t.facet(Ce),n=e;for(let s=i.length-1;s>=0;s--){let r=i[s](e);r&&Object.keys(r).length&&(n=Me(n,Ee(t,r,e.changes.newLength),!0))}return n==e?e:Re.create(t,e.changes,e.selection,n.effects,n.annotations,n.scrollIntoView)}(i?function(e){let t=e.startState,i=!0;for(let n of t.facet(Te)){let t=n(e);if(!1===t){i=!1;break}Array.isArray(t)&&(i=!0===i?t:qe(i,t))}if(!0!==i){let n,s;if(!1===i)s=e.changes.invertedDesc,n=J.empty(t.doc.length);else{let t=e.changes.filter(i);n=t.changes,s=t.filtered.mapDesc(t.changes).invertedDesc}e=Re.create(t,n,e.selection&&e.selection.map(s),Ve.mapEffects(e.effects,s),e.annotations,e.scrollIntoView)}let n=t.facet(_e);for(let i=n.length-1;i>=0;i--){let s=n[i](e);e=s instanceof Re?s:Array.isArray(s)&&1==s.length&&s[0]instanceof Re?s[0]:De(t,Ue(s),!1)}return e}(s):s)}Re.time=Ae.define(),Re.userEvent=Ae.define(),Re.addToHistory=Ae.define(),Re.remote=Ae.define();const Ie=[];function Ue(e){return null==e?Ie:Array.isArray(e)?e:[e]}var Ye=function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e}(Ye||(Ye={}));const je=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Be;try{Be=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(e){}class Ne{constructor(e,t,i,n,s,r){this.config=e,this.doc=t,this.selection=i,this.values=n,this.status=e.statusTemplate.slice(),this.computeSlot=s,r&&(r._state=this);for(let e=0;e<this.config.dynamicSlots.length;e++)we(this,e<<1);this.computeSlot=null}field(e,t=!0){let i=this.config.address[e.id];if(null!=i)return we(this,i),xe(this,i);if(t)throw new RangeError("Field is not present in this state")}update(...e){return De(this,e,!0)}applyTransaction(e){let t,i=this.config,{base:n,compartments:s}=i;for(let t of e.effects)t.is(ve.reconfigure)?(i&&(s=new Map,i.compartments.forEach(((e,t)=>s.set(t,e))),i=null),s.set(t.value.compartment,t.value.extension)):t.is(Ve.reconfigure)?(i=null,n=t.value):t.is(Ve.appendConfig)&&(i=null,n=Ue(n).concat(t.value));i?t=e.startState.values.slice():(i=ye.resolve(n,s,this),t=new Ne(i,this.doc,this.selection,i.dynamicSlots.map((()=>null)),((e,t)=>t.reconfigure(e,this)),null).values),new Ne(i,e.newDoc,e.newSelection,t,((t,i)=>i.update(t,e)),e)}replaceSelection(e){return"string"==typeof e&&(e=this.toText(e)),this.changeByRange((t=>({changes:{from:t.from,to:t.to,insert:e},range:oe.cursor(t.from+e.length)})))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),n=this.changes(i.changes),s=[i.range],r=Ue(i.effects);for(let i=1;i<t.ranges.length;i++){let o=e(t.ranges[i]),a=this.changes(o.changes),l=a.map(n);for(let e=0;e<i;e++)s[e]=s[e].map(l);let h=n.mapDesc(a,!0);s.push(o.range.map(h)),n=n.compose(l),r=Ve.mapEffects(r,l).concat(Ve.mapEffects(Ue(o.effects),h))}return{changes:n,selection:oe.create(s,t.mainIndex),effects:r}}changes(e=[]){return e instanceof J?e:J.of(e,this.doc.length,this.facet(Ne.lineSeparator))}toText(e){return _.of(e.split(this.facet(Ne.lineSeparator)||L))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return null==t?e.default:(we(this,t),xe(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let i in e){let n=e[i];n instanceof me&&null!=this.config.address[n.id]&&(t[i]=n.spec.toJSON(this.field(e[i]),this))}return t}static fromJSON(e,t={},i){if(!e||"string"!=typeof e.doc)throw new RangeError("Invalid JSON representation for EditorState");let n=[];if(i)for(let t in i)if(Object.prototype.hasOwnProperty.call(e,t)){let s=i[t],r=e[t];n.push(s.init((e=>s.spec.fromJSON(r,e))))}return Ne.create({doc:e.doc,selection:oe.fromJSON(e.selection),extensions:t.extensions?n.concat([t.extensions]):n})}static create(e={}){let t=ye.resolve(e.extensions||[],new Map),i=e.doc instanceof _?e.doc:_.of((e.doc||"").split(t.staticFacet(Ne.lineSeparator)||L)),n=e.selection?e.selection instanceof oe?e.selection:oe.single(e.selection.anchor,e.selection.head):oe.single(0);return ae(n,i.length),t.staticFacet(ke)||(n=n.asSingle()),new Ne(t,i,n,t.dynamicSlots.map((()=>null)),((e,t)=>t.create(e)),null)}get tabSize(){return this.facet(Ne.tabSize)}get lineBreak(){return this.facet(Ne.lineSeparator)||"\n"}get readOnly(){return this.facet(We)}phrase(e,...t){for(let t of this.facet(Ne.phrases))if(Object.prototype.hasOwnProperty.call(t,e)){e=t[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,((e,i)=>{if("$"==i)return"$";let n=+(i||1);return!n||n>t.length?e:t[n-1]}))),e}languageDataAt(e,t,i=-1){let n=[];for(let s of this.facet($e))for(let r of s(this,t,i))Object.prototype.hasOwnProperty.call(r,e)&&n.push(r[e]);return n}charCategorizer(e){return t=this.languageDataAt("wordChars",e).join(""),e=>{if(!/\S/.test(e))return Ye.Space;if(function(e){if(Be)return Be.test(e);for(let t=0;t<e.length;t++){let i=e[t];if(/\w/.test(i)||i>""&&(i.toUpperCase()!=i.toLowerCase()||je.test(i)))return!0}return!1}(e))return Ye.Word;for(let i=0;i<t.length;i++)if(e.indexOf(t[i])>-1)return Ye.Word;return Ye.Other};var t}wordAt(e){let{text:t,from:i,length:n}=this.doc.lineAt(e),s=this.charCategorizer(e),r=e-i,o=e-i;for(;r>0;){let e=I(t,r,!1);if(s(t.slice(e,r))!=Ye.Word)break;r=e}for(;o<n;){let e=I(t,o);if(s(t.slice(o,e))!=Ye.Word)break;o=e}return r==o?null:oe.range(r+i,o+i)}}function Ge(e,t,i={}){let n={};for(let t of e)for(let e of Object.keys(t)){let s=t[e],r=n[e];if(void 0===r)n[e]=s;else if(r===s||void 0===s);else{if(!Object.hasOwnProperty.call(i,e))throw new Error("Config merge conflict for field "+e);n[e]=i[e](r,s)}}for(let e in t)void 0===n[e]&&(n[e]=t[e]);return n}Ne.allowMultipleSelections=ke,Ne.tabSize=he.define({combine:e=>e.length?e[0]:4}),Ne.lineSeparator=Pe,Ne.readOnly=We,Ne.phrases=he.define({compare(e,t){let i=Object.keys(e),n=Object.keys(t);return i.length==n.length&&i.every((i=>e[i]==t[i]))}}),Ne.languageData=$e,Ne.changeFilter=Te,Ne.transactionFilter=_e,Ne.transactionExtender=Ce,ve.reconfigure=Ve.define();class ze{eq(e){return this==e}range(e,t=e){return Le.create(e,t,this)}}ze.prototype.startSide=ze.prototype.endSide=0,ze.prototype.point=!1,ze.prototype.mapMode=F.TrackDel;class Le{constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new Le(e,t,i)}}function Fe(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class He{constructor(e,t,i,n){this.from=e,this.to=t,this.value=i,this.maxPoint=n}get length(){return this.to[this.to.length-1]}findIndex(e,t,i,n=0){let s=i?this.to:this.from;for(let r=n,o=s.length;;){if(r==o)return r;let n=r+o>>1,a=s[n]-e||(i?this.value[n].endSide:this.value[n].startSide)-t;if(n==r)return a>=0?r:o;a>=0?o=n:r=n+1}}between(e,t,i,n){for(let s=this.findIndex(t,-1e9,!0),r=this.findIndex(i,1e9,!1,s);s<r;s++)if(!1===n(this.from[s]+e,this.to[s]+e,this.value[s]))return!1}map(e,t){let i=[],n=[],s=[],r=-1,o=-1;for(let a=0;a<this.value.length;a++){let l,h,c=this.value[a],u=this.from[a]+e,d=this.to[a]+e;if(u==d){let e=t.mapPos(u,c.startSide,c.mapMode);if(null==e)continue;if(l=h=e,c.startSide!=c.endSide&&(h=t.mapPos(u,c.endSide),h<l))continue}else if(l=t.mapPos(u,c.startSide),h=t.mapPos(d,c.endSide),l>h||l==h&&c.startSide>0&&c.endSide<=0)continue;(h-l||c.endSide-c.startSide)<0||(r<0&&(r=l),c.point&&(o=Math.max(o,h-l)),i.push(c),n.push(l-r),s.push(h-r))}return{mapped:i.length?new He(n,s,i,o):null,pos:r}}}class Je{constructor(e,t,i,n){this.chunkPos=e,this.chunk=t,this.nextLayer=i,this.maxPoint=n}static create(e,t,i,n){return new Je(e,t,i,n)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:i=!1,filterFrom:n=0,filterTo:s=this.length}=e,r=e.filter;if(0==t.length&&!r)return this;if(i&&(t=t.slice().sort(Fe)),this.isEmpty)return t.length?Je.of(t):this;let o=new tt(this,null,-1).goto(0),a=0,l=[],h=new Ke;for(;o.value||a<t.length;)if(a<t.length&&(o.from-t[a].from||o.startSide-t[a].value.startSide)>=0){let e=t[a++];h.addInner(e.from,e.to,e.value)||l.push(e)}else 1==o.rangeIndex&&o.chunkIndex<this.chunk.length&&(a==t.length||this.chunkEnd(o.chunkIndex)<t[a].from)&&(!r||n>this.chunkEnd(o.chunkIndex)||s<this.chunkPos[o.chunkIndex])&&h.addChunk(this.chunkPos[o.chunkIndex],this.chunk[o.chunkIndex])?o.nextChunk():((!r||n>o.to||s<o.from||r(o.from,o.to,o.value))&&(h.addInner(o.from,o.to,o.value)||l.push(Le.create(o.from,o.to,o.value))),o.next());return h.finishInner(this.nextLayer.isEmpty&&!l.length?Je.empty:this.nextLayer.update({add:l,filter:r,filterFrom:n,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],i=[],n=-1;for(let s=0;s<this.chunk.length;s++){let r=this.chunkPos[s],o=this.chunk[s],a=e.touchesRange(r,r+o.length);if(!1===a)n=Math.max(n,o.maxPoint),t.push(o),i.push(e.mapPos(r));else if(!0===a){let{mapped:s,pos:a}=o.map(r,e);s&&(n=Math.max(n,s.maxPoint),t.push(s),i.push(a))}}let s=this.nextLayer.map(e);return 0==t.length?s:new Je(i,t,s||Je.empty,n)}between(e,t,i){if(!this.isEmpty){for(let n=0;n<this.chunk.length;n++){let s=this.chunkPos[n],r=this.chunk[n];if(t>=s&&e<=s+r.length&&!1===r.between(s,e-s,t-s,i))return}this.nextLayer.between(e,t,i)}}iter(e=0){return it.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return it.from(e).goto(t)}static compare(e,t,i,n,s=-1){let r=e.filter((e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=s)),o=t.filter((e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=s)),a=et(r,o,i),l=new st(r,a,s),h=new st(o,a,s);i.iterGaps(((e,t,i)=>rt(l,e,h,t,i,n))),i.empty&&0==i.length&&rt(l,0,h,0,0,n)}static eq(e,t,i=0,n){null==n&&(n=999999999);let s=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0)),r=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0));if(s.length!=r.length)return!1;if(!s.length)return!0;let o=et(s,r),a=new st(s,o,0).goto(i),l=new st(r,o,0).goto(i);for(;;){if(a.to!=l.to||!ot(a.active,l.active)||a.point&&(!l.point||!a.point.eq(l.point)))return!1;if(a.to>n)return!0;a.next(),l.next()}}static spans(e,t,i,n,s=-1){let r=new st(e,null,s).goto(t),o=t,a=r.openStart;for(;;){let e=Math.min(r.to,i);if(r.point){let i=r.activeForPoint(r.to),s=r.pointFrom<t?i.length+1:Math.min(i.length,a);n.point(o,e,r.point,i,s,r.pointRank),a=Math.min(r.openEnd(e),i.length)}else e>o&&(n.span(o,e,r.active,a),a=r.openEnd(e));if(r.to>i)return a+(r.point&&r.to>i?1:0);o=r.to,r.next()}}static of(e,t=!1){let i=new Ke;for(let n of e instanceof Le?[e]:t?function(e){if(e.length>1)for(let t=e[0],i=1;i<e.length;i++){let n=e[i];if(Fe(t,n)>0)return e.slice().sort(Fe);t=n}return e}(e):e)i.add(n.from,n.to,n.value);return i.finish()}}Je.empty=new Je([],[],null,-1),Je.empty.nextLayer=Je.empty;class Ke{constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}finishChunk(e){this.chunks.push(new He(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}add(e,t,i){this.addInner(e,t,i)||(this.nextLayer||(this.nextLayer=new Ke)).add(e,t,i)}addInner(e,t,i){let n=e-this.lastTo||i.startSide-this.last.endSide;if(n<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(n<0||(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=t,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),0))}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let i=t.value.length-1;return this.last=t.value[i],this.lastFrom=t.from[i]+e,this.lastTo=t.to[i]+e,!0}finish(){return this.finishInner(Je.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return e;let t=Je.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function et(e,t,i){let n=new Map;for(let t of e)for(let e=0;e<t.chunk.length;e++)t.chunk[e].maxPoint<=0&&n.set(t.chunk[e],t.chunkPos[e]);let s=new Set;for(let e of t)for(let t=0;t<e.chunk.length;t++){let r=n.get(e.chunk[t]);null==r||(i?i.mapPos(r):r)!=e.chunkPos[t]||(null==i?void 0:i.touchesRange(r,r+e.chunk[t].length))||s.add(e.chunk[t])}return s}class tt{constructor(e,t,i,n=0){this.layer=e,this.skip=t,this.minPoint=i,this.rank=n}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,i){for(;this.chunkIndex<this.layer.chunk.length;){let t=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(t)||this.layer.chunkEnd(this.chunkIndex)<e||t.maxPoint<this.minPoint))break;this.chunkIndex++,i=!1}if(this.chunkIndex<this.layer.chunk.length){let n=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!i||this.rangeIndex<n)&&this.setRangeIndex(n)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],i=e+t.from[this.rangeIndex];if(this.from=i,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class it{constructor(e){this.heap=e}static from(e,t=null,i=-1){let n=[];for(let s=0;s<e.length;s++)for(let r=e[s];!r.isEmpty;r=r.nextLayer)r.maxPoint>=i&&n.push(new tt(r,t,i,s));return 1==n.length?n[0]:new it(n)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let i of this.heap)i.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)nt(this.heap,e);return this.next(),this}forward(e,t){for(let i of this.heap)i.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)nt(this.heap,e);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),nt(this.heap,0)}}}function nt(e,t){for(let i=e[t];;){let n=1+(t<<1);if(n>=e.length)break;let s=e[n];if(n+1<e.length&&s.compare(e[n+1])>=0&&(s=e[n+1],n++),i.compare(s)<0)break;e[n]=i,e[t]=s,t=n}}class st{constructor(e,t,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=it.from(e,t,i)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){at(this.active,e),at(this.activeTo,e),at(this.activeRank,e),this.minActive=ht(this.active,this.activeTo)}addActive(e){let t=0,{value:i,to:n,rank:s}=this.cursor;for(;t<this.activeRank.length&&this.activeRank[t]<=s;)t++;lt(this.active,t,i),lt(this.activeTo,t,n),lt(this.activeRank,t,s),e&<(e,t,this.cursor.from),this.minActive=ht(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let n=this.minActive;if(n>-1&&(this.activeTo[n]-this.cursor.from||this.active[n].endSide-this.cursor.startSide)<0){if(this.activeTo[n]>e){this.to=this.activeTo[n],this.endSide=this.active[n].endSide;break}this.removeActive(n),i&&at(i,n)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let e=this.cursor.value;if(e.point){if(!(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)){this.point=e,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=e.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(i),this.cursor.next()}}}if(i){this.openStart=0;for(let t=i.length-1;t>=0&&i[t]<e;t--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let i=this.active.length-1;i>=0&&!(this.activeRank[i]<this.pointRank);i--)(this.activeTo[i]>e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&t.push(this.active[i]);return t.reverse()}openEnd(e){let t=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)t++;return t}}function rt(e,t,i,n,s,r){e.goto(t),i.goto(n);let o=n+s,a=n,l=n-t;for(;;){let t=e.to+l-i.to||e.endSide-i.endSide,n=t<0?e.to+l:i.to,s=Math.min(n,o);if(e.point||i.point?e.point&&i.point&&(e.point==i.point||e.point.eq(i.point))&&ot(e.activeForPoint(e.to+l),i.activeForPoint(i.to))||r.comparePoint(a,s,e.point,i.point):s>a&&!ot(e.active,i.active)&&r.compareRange(a,s,e.active,i.active),n>o)break;a=n,t<=0&&e.next(),t>=0&&i.next()}}function ot(e,t){if(e.length!=t.length)return!1;for(let i=0;i<e.length;i++)if(e[i]!=t[i]&&!e[i].eq(t[i]))return!1;return!0}function at(e,t){for(let i=t,n=e.length-1;i<n;i++)e[i]=e[i+1];e.pop()}function lt(e,t,i){for(let i=e.length-1;i>=t;i--)e[i+1]=e[i];e[t]=i}function ht(e,t){let i=-1,n=1e9;for(let s=0;s<t.length;s++)(t[s]-n||e[s].endSide-e[i].endSide)<0&&(i=s,n=t[s]);return i}function ct(e,t,i=e.length){let n=0;for(let s=0;s<i;)9==e.charCodeAt(s)?(n+=t-n%t,s++):(n++,s=I(e,s));return n}function ut(e,t,i,n){for(let n=0,s=0;;){if(s>=t)return n;if(n==e.length)break;s+=9==e.charCodeAt(n)?i-s%i:1,n=I(e,n)}return!0===n?-1:e.length}const dt="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),ft="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),Ot="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class pt{constructor(e,t){this.rules=[];let{finish:i}=t||{};function n(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function s(e,t,r,o){let a=[],l=/^@(\w+)\b/.exec(e[0]),h=l&&"keyframes"==l[1];if(l&&null==t)return r.push(e[0]+";");for(let i in t){let o=t[i];if(/&/.test(i))s(i.split(/,\s*/).map((t=>e.map((e=>t.replace(/&/,e))))).reduce(((e,t)=>e.concat(t))),o,r);else if(o&&"object"==typeof o){if(!l)throw new RangeError("The value of a property ("+i+") should be a primitive value.");s(n(i),o,a,h)}else null!=o&&a.push(i.replace(/_.*/,"").replace(/[A-Z]/g,(e=>"-"+e.toLowerCase()))+": "+o+";")}(a.length||h)&&r.push((!i||l||o?e:e.map(i)).join(", ")+" {"+a.join(" ")+"}")}for(let t in e)s(n(t),e[t],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=Ot[dt]||1;return Ot[dt]=e+1,"ͼ"+e.toString(36)}static mount(e,t){(e[ft]||new gt(e)).mount(Array.isArray(t)?t:[t])}}let mt=null;class gt{constructor(e){if(!e.head&&e.adoptedStyleSheets&&"undefined"!=typeof CSSStyleSheet){if(mt)return e.adoptedStyleSheets=[mt.sheet].concat(e.adoptedStyleSheets),e[ft]=mt;this.sheet=new CSSStyleSheet,e.adoptedStyleSheets=[this.sheet].concat(e.adoptedStyleSheets),mt=this}else{this.styleTag=(e.ownerDocument||e).createElement("style");let t=e.head||e;t.insertBefore(this.styleTag,t.firstChild)}this.modules=[],e[ft]=this}mount(e){let t=this.sheet,i=0,n=0;for(let s=0;s<e.length;s++){let r=e[s],o=this.modules.indexOf(r);if(o<n&&o>-1&&(this.modules.splice(o,1),n--,o=-1),-1==o){if(this.modules.splice(n++,0,r),t)for(let e=0;e<r.rules.length;e++)t.insertRule(r.rules[e],i++)}else{for(;n<o;)i+=this.modules[n++].rules.length;i+=r.rules.length,n++}}if(!t){let e="";for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+"\n";this.styleTag.textContent=e}}}for(var Qt={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},St={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},vt="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),bt=("undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),"undefined"!=typeof navigator&&/Mac/.test(navigator.platform)),yt="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),wt=bt||vt&&+vt[1]<57,xt=0;xt<10;xt++)Qt[48+xt]=Qt[96+xt]=String(xt);for(xt=1;xt<=24;xt++)Qt[xt+111]="F"+xt;for(xt=65;xt<=90;xt++)Qt[xt]=String.fromCharCode(xt+32),St[xt]=String.fromCharCode(xt);for(var $t in Qt)St.hasOwnProperty($t)||(St[$t]=Qt[$t]);function kt(e){let t;return t=11==e.nodeType?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function Pt(e,t){return!!t&&(e==t||e.contains(1!=t.nodeType?t.parentNode:t))}function Tt(e,t){if(!t.anchorNode)return!1;try{return Pt(e,t.anchorNode)}catch(e){return!1}}function _t(e){return 3==e.nodeType?It(e,0,e.nodeValue.length).getClientRects():1==e.nodeType?e.getClientRects():[]}function Ct(e,t,i,n){return!!i&&(At(e,t,i,n,-1)||At(e,t,i,n,1))}function Wt(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t}function At(e,t,i,n,s){for(;;){if(e==i&&t==n)return!0;if(t==(s<0?0:Zt(e))){if("DIV"==e.nodeName)return!1;let i=e.parentNode;if(!i||1!=i.nodeType)return!1;t=Wt(e)+(s<0?0:1),e=i}else{if(1!=e.nodeType)return!1;if(1==(e=e.childNodes[t+(s<0?-1:0)]).nodeType&&"false"==e.contentEditable)return!1;t=s<0?Zt(e):0}}}function Zt(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}const Xt={left:0,right:0,top:0,bottom:0};function Vt(e,t){let i=t?e.left:e.right;return{left:i,right:i,top:e.top,bottom:e.bottom}}function Rt(e){return{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}class qt{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){this.set(e.anchorNode,e.anchorOffset,e.focusNode,e.focusOffset)}set(e,t,i,n){this.anchorNode=e,this.anchorOffset=t,this.focusNode=i,this.focusOffset=n}}let Mt,Et=null;function Dt(e){if(e.setActive)return e.setActive();if(Et)return e.focus(Et);let t=[];for(let i=e;i&&(t.push(i,i.scrollTop,i.scrollLeft),i!=i.ownerDocument);i=i.parentNode);if(e.focus(null==Et?{get preventScroll(){return Et={preventScroll:!0},!0}}:void 0),!Et){Et=!1;for(let e=0;e<t.length;){let i=t[e++],n=t[e++],s=t[e++];i.scrollTop!=n&&(i.scrollTop=n),i.scrollLeft!=s&&(i.scrollLeft=s)}}}function It(e,t,i=t){let n=Mt||(Mt=document.createRange());return n.setEnd(e,i),n.setStart(e,t),n}function Ut(e,t,i){let n={key:t,code:t,keyCode:i,which:i,cancelable:!0},s=new KeyboardEvent("keydown",n);s.synthetic=!0,e.dispatchEvent(s);let r=new KeyboardEvent("keyup",n);return r.synthetic=!0,e.dispatchEvent(r),s.defaultPrevented||r.defaultPrevented}function Yt(e){for(;e.attributes.length;)e.removeAttributeNode(e.attributes[0])}class jt{constructor(e,t,i=!0){this.node=e,this.offset=t,this.precise=i}static before(e,t){return new jt(e.parentNode,Wt(e),t)}static after(e,t){return new jt(e.parentNode,Wt(e)+1,t)}}const Bt=[];class Nt{constructor(){this.parent=null,this.dom=null,this.dirty=2}get editorView(){if(!this.parent)throw new Error("Accessing view in orphan content view");return this.parent.editorView}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let t=this.posAtStart;for(let i of this.children){if(i==e)return t;t+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}coordsAt(e,t){return null}sync(e){if(2&this.dirty){let t,i=this.dom,n=null;for(let s of this.children){if(s.dirty){if(!s.dom&&(t=n?n.nextSibling:i.firstChild)){let e=Nt.get(t);(!e||!e.parent&&e.canReuseDOM(s))&&s.reuseDOM(t)}s.sync(e),s.dirty=0}if(t=n?n.nextSibling:i.firstChild,e&&!e.written&&e.node==i&&t!=s.dom&&(e.written=!0),s.dom.parentNode==i)for(;t&&t!=s.dom;)t=Gt(t);else i.insertBefore(s.dom,t);n=s.dom}for(t=n?n.nextSibling:i.firstChild,t&&e&&e.node==i&&(e.written=!0);t;)t=Gt(t)}else if(1&this.dirty)for(let t of this.children)t.dirty&&(t.sync(e),t.dirty=0)}reuseDOM(e){}localPosFromDOM(e,t){let i;if(e==this.dom)i=this.dom.childNodes[t];else{let n=0==Zt(e)?0:0==t?-1:1;for(;;){let t=e.parentNode;if(t==this.dom)break;0==n&&t.firstChild!=t.lastChild&&(n=e==t.firstChild?-1:1),e=t}i=n<0?e:e.nextSibling}if(i==this.dom.firstChild)return 0;for(;i&&!Nt.get(i);)i=i.nextSibling;if(!i)return this.length;for(let e=0,t=0;;e++){let n=this.children[e];if(n.dom==i)return t;t+=n.length+n.breakAfter}}domBoundsAround(e,t,i=0){let n=-1,s=-1,r=-1,o=-1;for(let a=0,l=i,h=i;a<this.children.length;a++){let i=this.children[a],c=l+i.length;if(l<e&&c>t)return i.domBoundsAround(e,t,l);if(c>=e&&-1==n&&(n=a,s=l),l>t&&i.dom.parentNode==this.dom){r=a,o=h;break}h=c,l=c+i.breakAfter}return{from:s,to:o<0?i+this.length:o,startDOM:(n?this.children[n-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:r<this.children.length&&r>=0?this.children[r].dom:null}}markDirty(e=!1){this.dirty|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.dirty|=2),1&t.dirty)return;t.dirty|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.dirty&&this.markParentsDirty(!0))}setDOM(e){this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,i=Bt){this.markDirty();for(let i=e;i<t;i++){let e=this.children[i];e.parent==this&&e.destroy()}this.children.splice(e,t-e,...i);for(let e=0;e<i.length;e++)i[e].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new zt(this.children,e,this.children.length)}childPos(e,t=1){return this.childCursor().findPos(e,t)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==e?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}merge(e,t,i,n,s,r){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor}getSide(){return 0}destroy(){this.parent=null}}function Gt(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}Nt.prototype.breakAfter=0;class zt{constructor(e,t,i){this.children=e,this.pos=t,this.i=i,this.off=0}findPos(e,t=1){for(;;){if(e>this.pos||e==this.pos&&(t>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function Lt(e,t,i,n,s,r,o,a,l){let{children:h}=e,c=h.length?h[t]:null,u=r.length?r[r.length-1]:null,d=u?u.breakAfter:o;if(!(t==n&&c&&!o&&!d&&r.length<2&&c.merge(i,s,r.length?u:null,0==i,a,l))){if(n<h.length){let e=h[n];e&&s<e.length?(t==n&&(e=e.split(s),s=0),!d&&u&&e.merge(0,s,u,!0,0,l)?r[r.length-1]=e:(s&&e.merge(0,s,null,!1,0,l),r.push(e))):(null==e?void 0:e.breakAfter)&&(u?u.breakAfter=1:o=1),n++}for(c&&(c.breakAfter=o,i>0&&(!o&&r.length&&c.merge(i,c.length,r[0],!1,a,0)?c.breakAfter=r.shift().breakAfter:(i<c.length||c.children.length&&0==c.children[c.children.length-1].length)&&c.merge(i,c.length,null,!1,a,0),t++));t<n&&r.length;)if(h[n-1].become(r[r.length-1]))n--,r.pop(),l=r.length?0:a;else{if(!h[t].become(r[0]))break;t++,r.shift(),a=r.length?0:l}!r.length&&t&&n<h.length&&!h[t-1].breakAfter&&h[n].merge(0,0,h[t-1],!1,a,l)&&t--,(t<n||r.length)&&e.replaceChildren(t,n,r)}}function Ft(e,t,i,n,s,r){let o=e.childCursor(),{i:a,off:l}=o.findPos(i,1),{i:h,off:c}=o.findPos(t,-1),u=t-i;for(let e of n)u+=e.length;e.length+=u,Lt(e,h,c,a,l,n,0,s,r)}let Ht="undefined"!=typeof navigator?navigator:{userAgent:"",vendor:"",platform:""},Jt="undefined"!=typeof document?document:{documentElement:{style:{}}};const Kt=/Edge\/(\d+)/.exec(Ht.userAgent),ei=/MSIE \d/.test(Ht.userAgent),ti=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ht.userAgent),ii=!!(ei||ti||Kt),ni=!ii&&/gecko\/(\d+)/i.test(Ht.userAgent),si=!ii&&/Chrome\/(\d+)/.exec(Ht.userAgent),ri="webkitFontSmoothing"in Jt.documentElement.style,oi=!ii&&/Apple Computer/.test(Ht.vendor),ai=oi&&(/Mobile\/\w+/.test(Ht.userAgent)||Ht.maxTouchPoints>2);var li={mac:ai||/Mac/.test(Ht.platform),windows:/Win/.test(Ht.platform),linux:/Linux|X11/.test(Ht.platform),ie:ii,ie_version:ei?Jt.documentMode||6:ti?+ti[1]:Kt?+Kt[1]:0,gecko:ni,gecko_version:ni?+(/Firefox\/(\d+)/.exec(Ht.userAgent)||[0,0])[1]:0,chrome:!!si,chrome_version:si?+si[1]:0,ios:ai,android:/Android\b/.test(Ht.userAgent),webkit:ri,safari:oi,webkit_version:ri?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=Jt.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class hi extends Nt{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){3==e.nodeType&&this.createDOM(e)}merge(e,t,i){return(!i||i instanceof hi&&!(this.length-(t-e)+i.length>256))&&(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new hi(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new jt(this.dom,e)}domBoundsAround(e,t,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return ui(this.dom,e,t)}}class ci extends Nt{constructor(e,t=[],i=0){super(),this.mark=e,this.children=t,this.length=i;for(let e of t)e.setParent(this)}setAttrs(e){if(Yt(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.dirty|=6)}sync(e){this.dom?4&this.dirty&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e)}merge(e,t,i,n,s,r){return!(i&&(!(i instanceof ci&&i.mark.eq(this.mark))||e&&s<=0||t<this.length&&r<=0)||(Ft(this,e,t,i?i.children:[],s-1,r-1),this.markDirty(),0))}split(e){let t=[],i=0,n=-1,s=0;for(let r of this.children){let o=i+r.length;o>e&&t.push(i<e?r.split(e-i):r),n<0&&i>=e&&(n=s),i=o,s++}let r=this.length-e;return this.length=e,n>-1&&(this.children.length=n,this.markDirty()),new ci(this.mark,t,r)}domAtPos(e){return gi(this,e)}coordsAt(e,t){return Si(this,e,t)}}function ui(e,t,i){let n=e.nodeValue.length;t>n&&(t=n);let s=t,r=t,o=0;0==t&&i<0||t==n&&i>=0?li.chrome||li.gecko||(t?(s--,o=1):r<n&&(r++,o=-1)):i<0?s--:r<n&&r++;let a=It(e,s,r).getClientRects();if(!a.length)return Xt;let l=a[(o?o<0:i>=0)?0:a.length-1];return li.safari&&!o&&0==l.width&&(l=Array.prototype.find.call(a,(e=>e.width))||l),o?Vt(l,o<0):l||null}class di extends Nt{constructor(e,t,i){super(),this.widget=e,this.length=t,this.side=i,this.prevWidget=null}static create(e,t,i){return new(e.customView||di)(e,t,i)}split(e){let t=di.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(){this.dom&&this.widget.updateDOM(this.dom)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(this.editorView)),this.dom.contentEditable="false")}getSide(){return this.side}merge(e,t,i,n,s,r){return!(i&&(!(i instanceof di&&this.widget.compare(i.widget))||e>0&&s<=0||t<this.length&&r<=0)||(this.length=e+(i?i.length:0)+(this.length-t),0))}become(e){return e.length==this.length&&e instanceof di&&e.side==this.side&&this.widget.constructor==e.widget.constructor&&(this.widget.eq(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,!0)}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(0==this.length)return _.empty;let e=this;for(;e.parent;)e=e.parent;let t=e.editorView,i=t&&t.state.doc,n=this.posAtStart;return i?i.slice(n,n+this.length):_.empty}domAtPos(e){return 0==e?jt.before(this.dom):jt.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let i=this.dom.getClientRects(),n=null;if(!i.length)return Xt;for(let t=e>0?i.length-1:0;n=i[t],!(e>0?0==t:t==i.length-1||n.top<n.bottom);t+=e>0?-1:1);return this.length?n:Vt(n,this.side>0)}get isEditable(){return!1}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class fi extends di{domAtPos(e){let{topView:t,text:i}=this.widget;return t?Oi(e,0,t,i,((e,t)=>e.domAtPos(t)),(e=>new jt(i,Math.min(e,i.nodeValue.length)))):new jt(i,Math.min(e,i.nodeValue.length))}sync(){this.setDOM(this.widget.toDOM())}localPosFromDOM(e,t){let{topView:i,text:n}=this.widget;return i?pi(e,t,i,n):Math.min(t,this.length)}ignoreMutation(){return!1}get overrideDOMText(){return null}coordsAt(e,t){let{topView:i,text:n}=this.widget;return i?Oi(e,t,i,n,((e,t,i)=>e.coordsAt(t,i)),((e,t)=>ui(n,e,t))):ui(n,e,t)}destroy(){var e;super.destroy(),null===(e=this.widget.topView)||void 0===e||e.destroy()}get isEditable(){return!0}canReuseDOM(){return!0}}function Oi(e,t,i,n,s,r){if(i instanceof ci){for(let o=i.dom.firstChild;o;o=o.nextSibling){let i=Nt.get(o);if(!i)return r(e,t);let a=Pt(o,n),l=i.length+(a?n.nodeValue.length:0);if(e<l||e==l&&i.getSide()<=0)return a?Oi(e,t,i,n,s,r):s(i,e,t);e-=l}return s(i,i.length,-1)}return i.dom==n?r(e,t):s(i,e,t)}function pi(e,t,i,n){if(i instanceof ci)for(let s of i.children){let i=0,r=Pt(s.dom,n);if(Pt(s.dom,e))return i+(r?pi(e,t,s,n):s.localPosFromDOM(e,t));i+=r?n.nodeValue.length:s.length}else if(i.dom==n)return Math.min(t,n.nodeValue.length);return i.localPosFromDOM(e,t)}class mi extends Nt{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof mi&&e.side==this.side}split(){return new mi(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return jt.before(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){let t=this.dom.getBoundingClientRect(),i=function(e,t){let i=e.parent,n=i?i.children.indexOf(e):-1;for(;i&&n>=0;)if(t<0?n>0:n<i.children.length){let e=i.children[n+t];if(e instanceof hi){let i=e.coordsAt(t<0?e.length:0,t);if(i)return i}n+=t}else{if(!(i instanceof ci&&i.parent)){let e=i.dom.lastChild;if(e&&"BR"==e.nodeName)return e.getClientRects()[0];break}n=i.parent.children.indexOf(i)+(t<0?0:1),i=i.parent}}(this,this.side>0?-1:1);return i&&i.top<t.bottom&&i.bottom>t.top?{left:t.left,right:t.right,top:i.top,bottom:i.bottom}:t}get overrideDOMText(){return _.empty}}function gi(e,t){let i=e.dom,{children:n}=e,s=0;for(let e=0;s<n.length;s++){let r=n[s],o=e+r.length;if(!(o==e&&r.getSide()<=0)){if(t>e&&t<o&&r.dom.parentNode==i)return r.domAtPos(t-e);if(t<=e)break;e=o}}for(let e=s;e>0;e--){let t=n[e-1];if(t.dom.parentNode==i)return t.domAtPos(t.length)}for(let e=s;e<n.length;e++){let t=n[e];if(t.dom.parentNode==i)return t.domAtPos(0)}return new jt(i,0)}function Qi(e,t,i){let n,{children:s}=e;i>0&&t instanceof ci&&s.length&&(n=s[s.length-1])instanceof ci&&n.mark.eq(t.mark)?Qi(n,t.children[0],i-1):(s.push(t),t.setParent(e)),e.length+=t.length}function Si(e,t,i){let n=null,s=-1,r=null,o=-1;!function e(t,i){for(let a=0,l=0;a<t.children.length&&l<=i;a++){let h=t.children[a],c=l+h.length;c>=i&&(h.children.length?e(h,i-l):!r&&(c>i||l==c&&h.getSide()>0)?(r=h,o=i-l):(l<i||l==c&&h.getSide()<0)&&(n=h,s=i-l)),l=c}}(e,t);let a=(i<0?n:r)||n||r;return a?a.coordsAt(Math.max(0,a==n?s:o),i):function(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let i=_t(t);return i[i.length-1]||null}(e)}function vi(e,t){for(let i in e)"class"==i&&t.class?t.class+=" "+e.class:"style"==i&&t.style?t.style+=";"+e.style:t[i]=e[i];return t}function bi(e,t){if(e==t)return!0;if(!e||!t)return!1;let i=Object.keys(e),n=Object.keys(t);if(i.length!=n.length)return!1;for(let s of i)if(-1==n.indexOf(s)||e[s]!==t[s])return!1;return!0}function yi(e,t,i){let n=null;if(t)for(let s in t)i&&s in i||e.removeAttribute(n=s);if(i)for(let s in i)t&&t[s]==i[s]||e.setAttribute(n=s,i[s]);return!!n}hi.prototype.children=di.prototype.children=mi.prototype.children=Bt;class wi{eq(e){return!1}updateDOM(e){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}ignoreEvent(e){return!0}get customView(){return null}destroy(e){}}var xi=function(e){return e[e.Text=0]="Text",e[e.WidgetBefore=1]="WidgetBefore",e[e.WidgetAfter=2]="WidgetAfter",e[e.WidgetRange=3]="WidgetRange",e}(xi||(xi={}));class $i extends ze{constructor(e,t,i,n){super(),this.startSide=e,this.endSide=t,this.widget=i,this.spec=n}get heightRelevant(){return!1}static mark(e){return new ki(e)}static widget(e){let t=e.side||0,i=!!e.block;return t+=i?t>0?3e8:-4e8:t>0?1e8:-1e8,new Ti(e,t,t,i,e.widget||null,!1)}static replace(e){let t,i,n=!!e.block;if(e.isBlockGap)t=-5e8,i=4e8;else{let{start:s,end:r}=_i(e,n);t=(s?n?-3e8:-1:5e8)-1,i=1+(r?n?2e8:1:-6e8)}return new Ti(e,t,i,n,e.widget||null,!0)}static line(e){return new Pi(e)}static set(e,t=!1){return Je.of(e,t)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}$i.none=Je.empty;class ki extends $i{constructor(e){let{start:t,end:i}=_i(e);super(t?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){return this==e||e instanceof ki&&this.tagName==e.tagName&&this.class==e.class&&bi(this.attrs,e.attrs)}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}ki.prototype.point=!1;class Pi extends $i{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Pi&&this.spec.class==e.spec.class&&bi(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}Pi.prototype.mapMode=F.TrackBefore,Pi.prototype.point=!0;class Ti extends $i{constructor(e,t,i,n,s,r){super(t,i,s,e),this.block=n,this.isReplace=r,this.mapMode=n?t<=0?F.TrackBefore:F.TrackAfter:F.TrackDel}get type(){return this.startSide<this.endSide?xi.WidgetRange:this.startSide<=0?xi.WidgetBefore:xi.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&this.widget.estimatedHeight>=5}eq(e){return e instanceof Ti&&((t=this.widget)==(i=e.widget)||!!(t&&i&&t.compare(i)))&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide;var t,i}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}function _i(e,t=!1){let{inclusiveStart:i,inclusiveEnd:n}=e;return null==i&&(i=e.inclusive),null==n&&(n=e.inclusive),{start:null!=i?i:t,end:null!=n?n:t}}function Ci(e,t,i,n=0){let s=i.length-1;s>=0&&i[s]+n>=e?i[s]=Math.max(i[s],t):i.push(e,t)}Ti.prototype.point=!0;class Wi extends Nt{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,i,n,s,r){if(i){if(!(i instanceof Wi))return!1;this.dom||i.transferDOM(this)}return n&&this.setDeco(i?i.attrs:null),Ft(this,e,t,i?i.children:[],s,r),!0}split(e){let t=new Wi;if(t.breakAfter=this.breakAfter,0==this.length)return t;let{i:i,off:n}=this.childPos(e);n&&(t.append(this.children[i].split(n),0),this.children[i].merge(n,this.children[i].length,null,!1,0,0),i++);for(let e=i;e<this.children.length;e++)t.append(this.children[e],0);for(;i>0&&0==this.children[i-1].length;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){bi(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){Qi(this,e,t)}addLineDeco(e){let t=e.spec.attributes,i=e.spec.class;t&&(this.attrs=vi(t,this.attrs||{})),i&&(this.attrs=vi({class:i},this.attrs||{}))}domAtPos(e){return gi(this,e)}reuseDOM(e){"DIV"==e.nodeName&&(this.setDOM(e),this.dirty|=6)}sync(e){var t;this.dom?4&this.dirty&&(Yt(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(yi(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e);let i=this.dom.lastChild;for(;i&&Nt.get(i)instanceof ci;)i=i.lastChild;if(!(i&&this.length&&("BR"==i.nodeName||0!=(null===(t=Nt.get(i))||void 0===t?void 0:t.isEditable)||li.ios&&this.children.some((e=>e instanceof hi))))){let e=document.createElement("BR");e.cmIgnore=!0,this.dom.appendChild(e)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let e=0;for(let t of this.children){if(!(t instanceof hi)||/[^ -~]/.test(t.text))return null;let i=_t(t.dom);if(1!=i.length)return null;e+=i[0].width}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length}:null}coordsAt(e,t){return Si(this,e,t)}become(e){return!1}get type(){return xi.Text}static find(e,t){for(let i=0,n=0;i<e.children.length;i++){let s=e.children[i],r=n+s.length;if(r>=t){if(s instanceof Wi)return s;if(r>t)break}n=r+s.breakAfter}return null}}class Ai extends Nt{constructor(e,t,i){super(),this.widget=e,this.length=t,this.type=i,this.breakAfter=0,this.prevWidget=null}merge(e,t,i,n,s,r){return!(i&&(!(i instanceof Ai&&this.widget.compare(i.widget))||e>0&&s<=0||t<this.length&&r<=0)||(this.length=e+(i?i.length:0)+(this.length-t),0))}domAtPos(e){return 0==e?jt.before(this.dom):jt.after(this.dom,e==this.length)}split(e){let t=this.length-e;this.length=e;let i=new Ai(this.widget,t,this.type);return i.breakAfter=this.breakAfter,i}get children(){return Bt}sync(){this.dom&&this.widget.updateDOM(this.dom)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(this.editorView)),this.dom.contentEditable="false")}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):_.empty}domBoundsAround(){return null}become(e){return e instanceof Ai&&e.type==this.type&&e.widget.constructor==this.widget.constructor&&(e.widget.eq(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.breakAfter=e.breakAfter,!0)}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class Zi{constructor(e,t,i,n){this.doc=e,this.pos=t,this.end=i,this.disallowBlockEffectsFor=n,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Ai&&e.type==xi.WidgetBefore)}getLine(){return this.curLine||(this.content.push(this.curLine=new Wi),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Xi(new mi(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||this.getLine()}buildText(e,t,i){for(;e>0;){if(this.textOff==this.text.length){let{value:t,lineBreak:i,done:n}=this.cursor.next(this.skip);if(this.skip=0,n)throw new Error("Ran out of text content when drawing inline views");if(i){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}this.text=t,this.textOff=0}let n=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-i)),this.getLine().append(Xi(new hi(this.text.slice(this.textOff,this.textOff+n)),t),i),this.atCursorPos=!0,this.textOff+=n,e-=n,i=0}}span(e,t,i,n){this.buildText(t-e,i,n),this.pos=t,this.openStart<0&&(this.openStart=n)}point(e,t,i,n,s,r){if(this.disallowBlockEffectsFor[r]&&i instanceof Ti){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let o=t-e;if(i instanceof Ti)if(i.block){let{type:e}=i;e!=xi.WidgetAfter||this.posCovered()||this.getLine(),this.addBlockWidget(new Ai(i.widget||new Vi("div"),o,e))}else{let r=di.create(i.widget||new Vi("span"),o,o?0:i.startSide),a=this.atCursorPos&&!r.isEditable&&s<=n.length&&(e<t||i.startSide>0),l=!r.isEditable&&(e<t||s>n.length||i.startSide<=0),h=this.getLine();2!=this.pendingBuffer||a||(this.pendingBuffer=0),this.flushBuffer(n),a&&(h.append(Xi(new mi(1),n),s),s=n.length+Math.max(0,s-n.length)),h.append(Xi(r,n),s),this.atCursorPos=l,this.pendingBuffer=l?e<t||s>n.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=n.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);o&&(this.textOff+o<=this.text.length?this.textOff+=o:(this.skip+=o-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=s)}static build(e,t,i,n,s){let r=new Zi(e,t,i,s);return r.openEnd=Je.spans(n,t,i,r),r.openStart<0&&(r.openStart=r.openEnd),r.finish(r.openEnd),r}}function Xi(e,t){for(let i of t)e=new ci(i,[e],e.length);return e}class Vi extends wi{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}}const Ri=he.define(),qi=he.define(),Mi=he.define(),Ei=he.define(),Di=he.define(),Ii=he.define(),Ui=he.define({combine:e=>e.some((e=>e))}),Yi=he.define({combine:e=>e.some((e=>e))});class ji{constructor(e,t="nearest",i="nearest",n=5,s=5){this.range=e,this.y=t,this.x=i,this.yMargin=n,this.xMargin=s}map(e){return e.empty?this:new ji(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin)}}const Bi=Ve.define({map:(e,t)=>e.map(t)});function Ni(e,t,i){let n=e.facet(Ei);n.length?n[0](t):window.onerror?window.onerror(String(t),i,void 0,void 0,t):i?console.error(i+":",t):console.error(t)}const Gi=he.define({combine:e=>!e.length||e[0]});let zi=0;const Li=he.define();class Fi{constructor(e,t,i,n){this.id=e,this.create=t,this.domEventHandlers=i,this.extension=n(this)}static define(e,t){const{eventHandlers:i,provide:n,decorations:s}=t||{};return new Fi(zi++,e,i,(e=>{let t=[Li.of(e)];return s&&t.push(en.of((t=>{let i=t.plugin(e);return i?s(i):$i.none}))),n&&t.push(n(e)),t}))}static fromClass(e,t){return Fi.define((t=>new e(t)),t)}}class Hi{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(Ni(e.state,t,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(e){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){Ni(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(null===(t=this.value)||void 0===t?void 0:t.destroy)try{this.value.destroy()}catch(t){Ni(e.state,t,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const Ji=he.define(),Ki=he.define(),en=he.define(),tn=he.define(),nn=he.define(),sn=he.define();class rn{constructor(e,t,i,n){this.fromA=e,this.toA=t,this.fromB=i,this.toB=n}join(e){return new rn(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,i=this;for(;t>0;t--){let n=e[t-1];if(!(n.fromA>i.toA)){if(n.toA<i.fromA)break;i=i.join(n),e.splice(t-1,1)}}return e.splice(t,0,i),e}static extendWithRanges(e,t){if(0==t.length)return e;let i=[];for(let n=0,s=0,r=0,o=0;;n++){let a=n==e.length?null:e[n],l=r-o,h=a?a.fromB:1e9;for(;s<t.length&&t[s]<h;){let e=t[s],n=t[s+1],r=Math.max(o,e),a=Math.min(h,n);if(r<=a&&new rn(r+l,a+l,r,a).addToSet(i),n>h)break;s+=2}if(!a)return i;new rn(a.fromA,a.toA,a.fromB,a.toB).addToSet(i),r=a.toA,o=a.toB}}}class on{constructor(e,t,i){this.view=e,this.state=t,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=J.empty(this.startState.doc.length);for(let e of i)this.changes=this.changes.compose(e.changes);let n=[];this.changes.iterChangedRanges(((e,t,i,s)=>n.push(new rn(e,t,i,s)))),this.changedRanges=n;let s=e.hasFocus;s!=e.inputState.notifiedFocused&&(e.inputState.notifiedFocused=s,this.flags|=1)}static create(e,t,i){return new on(e,t,i)}get viewportChanged(){return(4&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(10&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some((e=>e.selection))}get empty(){return 0==this.flags&&0==this.transactions.length}}var an=function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e}(an||(an={}));const ln=an.LTR,hn=an.RTL;function cn(e){let t=[];for(let i=0;i<e.length;i++)t.push(1<<+e[i]);return t}const un=cn("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),dn=cn("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),fn=Object.create(null),On=[];for(let e of["()","[]","{}"]){let t=e.charCodeAt(0),i=e.charCodeAt(1);fn[t]=i,fn[i]=-t}const pn=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class mn{constructor(e,t,i){this.from=e,this.to=t,this.level=i}get dir(){return this.level%2?hn:ln}side(e,t){return this.dir==t==e?this.to:this.from}static find(e,t,i,n){let s=-1;for(let r=0;r<e.length;r++){let o=e[r];if(o.from<=t&&o.to>=t){if(o.level==i)return r;(s<0||(0!=n?n<0?o.from<t:o.to>t:e[s].level>o.level))&&(s=r)}}if(s<0)throw new RangeError("Index out of range");return s}}const gn=[];function Qn(e){return[new mn(0,e,0)]}let Sn="";function vn(e,t,i,n,s){var r;let o=n.head-e.from,a=-1;if(0==o){if(!s||!e.length)return null;t[0].level!=i&&(o=t[0].side(!1,i),a=0)}else if(o==e.length){if(s)return null;let e=t[t.length-1];e.level!=i&&(o=e.side(!0,i),a=t.length-1)}a<0&&(a=mn.find(t,o,null!==(r=n.bidiLevel)&&void 0!==r?r:-1,n.assoc));let l=t[a];o==l.side(s,i)&&(l=t[a+=s?1:-1],o=l.side(!s,i));let h=s==(l.dir==i),c=I(e.text,o,h);if(Sn=e.text.slice(Math.min(o,c),Math.max(o,c)),c!=l.side(s,i))return oe.cursor(c+e.from,h?-1:1,l.level);let u=a==(s?t.length-1:0)?null:t[a+(s?1:-1)];return u||l.level==i?u&&u.level<l.level?oe.cursor(u.side(!s,i)+e.from,s?1:-1,u.level):oe.cursor(c+e.from,s?-1:1,l.level):oe.cursor(s?e.to:e.from,s?-1:1,i)}const bn="";class yn{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(Ne.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=bn}readRange(e,t){if(!e)return this;let i=e.parentNode;for(let n=e;;){this.findPointBefore(i,n),this.readNode(n);let e=n.nextSibling;if(e==t)break;let s=Nt.get(n),r=Nt.get(e);(s&&r?s.breakAfter:(s?s.breakAfter:wn(n))||wn(e)&&("BR"!=n.nodeName||n.cmIgnore))&&this.lineBreak(),n=e}return this.findPointBefore(i,t),this}readTextNode(e){let t=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,t.length));for(let i=0,n=this.lineSeparator?null:/\r\n?|\n/g;;){let s,r=-1,o=1;if(this.lineSeparator?(r=t.indexOf(this.lineSeparator,i),o=this.lineSeparator.length):(s=n.exec(t))&&(r=s.index,o=s[0].length),this.append(t.slice(i,r<0?t.length:r)),r<0)break;if(this.lineBreak(),o>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=o-1);i=r+o}}readNode(e){if(e.cmIgnore)return;let t=Nt.get(e),i=t&&t.overrideDOMText;if(null!=i){this.findPointInside(e,i.length);for(let e=i.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else 3==e.nodeType?this.readTextNode(e):"BR"==e.nodeName?e.nextSibling&&this.lineBreak():1==e.nodeType&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==t&&(i.pos=this.text.length)}findPointInside(e,t){for(let i of this.points)(3==e.nodeType?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+Math.min(t,i.offset))}}function wn(e){return 1==e.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}class xn{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class $n extends Nt{constructor(e){super(),this.view=e,this.compositionDeco=$i.none,this.decorations=[],this.dynamicDecorationMap=[],this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Wi],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new rn(0,0,0,e.state.doc.length)],0)}get editorView(){return this.view}get length(){return this.view.state.doc.length}update(e){let t=e.changedRanges;this.minWidth>0&&t.length&&(t.every((({fromA:e,toA:t})=>t<this.minWidthFrom||e>this.minWidthTo))?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.view.inputState.composing<0?this.compositionDeco=$i.none:(e.transactions.length||this.dirty)&&(this.compositionDeco=function(e,t){let i=Pn(e);if(!i)return $i.none;let{from:n,to:s,node:r,text:o}=i,a=t.mapPos(n,1),l=Math.max(a,t.mapPos(s,-1)),{state:h}=e,c=3==r.nodeType?r.nodeValue:new yn([],h).readRange(r.firstChild,null).text;if(l-a<c.length)if(h.doc.sliceString(a,Math.min(h.doc.length,a+c.length),bn)==c)l=a+c.length;else{if(h.doc.sliceString(Math.max(0,l-c.length),l,bn)!=c)return $i.none;a=l-c.length}else if(h.doc.sliceString(a,l,bn)!=c)return $i.none;let u=Nt.get(r);return u instanceof fi?u=u.widget.topView:u&&(u.parent=null),$i.set($i.replace({widget:new Tn(r,o,u),inclusive:!0}).range(a,l))}(this.view,e.changes)),(li.ie||li.chrome)&&!this.compositionDeco.size&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let i=function(e,t,i){let n=new Wn;return Je.compare(e,t,i,n),n.changes}(this.decorations,this.updateDeco(),e.changes);return t=rn.extendWithRanges(t,i),(0!=this.dirty||0!=t.length)&&(this.updateInner(t,e.startState.doc.length),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t);let{observer:i}=this.view;i.ignore((()=>{this.dom.style.height=this.view.viewState.contentHeight+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let e=li.chrome||li.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(e),this.dirty=0,e&&(e.written||i.selectionRange.focusNode!=e.node)&&(this.forceSelection=!0),this.dom.style.height=""}));let n=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let e of this.children)e instanceof Ai&&e.widget instanceof kn&&n.push(e.dom);i.updateGaps(n)}updateChildren(e,t){let i=this.childCursor(t);for(let t=e.length-1;;t--){let n=t>=0?e[t]:null;if(!n)break;let{fromA:s,toA:r,fromB:o,toB:a}=n,{content:l,breakAtStart:h,openStart:c,openEnd:u}=Zi.build(this.view.state.doc,o,a,this.decorations,this.dynamicDecorationMap),{i:d,off:f}=i.findPos(r,1),{i:O,off:p}=i.findPos(s,-1);Lt(this,O,p,d,f,l,h,c,u)}}updateSelection(e=!1,t=!1){if(!e&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange(),!t&&!this.mayControlSelection())return;let i=this.forceSelection;this.forceSelection=!1;let n=this.view.state.selection.main,s=this.domAtPos(n.anchor),r=n.empty?s:this.domAtPos(n.head);if(li.gecko&&n.empty&&1==(o=s).node.nodeType&&o.node.firstChild&&(0==o.offset||"false"==o.node.childNodes[o.offset-1].contentEditable)&&(o.offset==o.node.childNodes.length||"false"==o.node.childNodes[o.offset].contentEditable)){let e=document.createTextNode("");this.view.observer.ignore((()=>s.node.insertBefore(e,s.node.childNodes[s.offset]||null))),s=r=new jt(e,0),i=!0}var o;let a=this.view.observer.selectionRange;!i&&a.focusNode&&Ct(s.node,s.offset,a.anchorNode,a.anchorOffset)&&Ct(r.node,r.offset,a.focusNode,a.focusOffset)||(this.view.observer.ignore((()=>{li.android&&li.chrome&&this.dom.contains(a.focusNode)&&function(e,t){for(let i=e;i&&i!=t;i=i.assignedSlot||i.parentNode)if(1==i.nodeType&&"false"==i.contentEditable)return!0;return!1}(a.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let e=kt(this.view.root);if(e)if(n.empty){if(li.gecko){let e=(t=s.node,i=s.offset,1!=t.nodeType?0:(i&&"false"==t.childNodes[i-1].contentEditable?1:0)|(i<t.childNodes.length&&"false"==t.childNodes[i].contentEditable?2:0));if(e&&3!=e){let t=Cn(s.node,s.offset,1==e?1:-1);t&&(s=new jt(t,1==e?0:t.nodeValue.length))}}e.collapse(s.node,s.offset),null!=n.bidiLevel&&null!=a.cursorBidiLevel&&(a.cursorBidiLevel=n.bidiLevel)}else if(e.extend){e.collapse(s.node,s.offset);try{e.extend(r.node,r.offset)}catch(e){}}else{let t=document.createRange();n.anchor>n.head&&([s,r]=[r,s]),t.setEnd(r.node,r.offset),t.setStart(s.node,s.offset),e.removeAllRanges(),e.addRange(t)}var t,i})),this.view.observer.setSelectionRange(s,r)),this.impreciseAnchor=s.precise?null:new jt(a.anchorNode,a.anchorOffset),this.impreciseHead=r.precise?null:new jt(a.focusNode,a.focusOffset)}enforceCursorAssoc(){if(this.compositionDeco.size)return;let{view:e}=this,t=e.state.selection.main,i=kt(e.root),{anchorNode:n,anchorOffset:s}=e.observer.selectionRange;if(!(i&&t.empty&&t.assoc&&i.modify))return;let r=Wi.find(this,t.head);if(!r)return;let o=r.posAtStart;if(t.head==o||t.head==o+r.length)return;let a=this.coordsAt(t.head,-1),l=this.coordsAt(t.head,1);if(!a||!l||a.bottom>l.top)return;let h=this.domAtPos(t.head+t.assoc);i.collapse(h.node,h.offset),i.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let c=e.observer.selectionRange;e.docView.posFromDOM(c.anchorNode,c.anchorOffset)!=t.from&&i.collapse(n,s)}mayControlSelection(){let e=this.view.root.activeElement;return e==this.dom||Tt(this.dom,this.view.observer.selectionRange)&&!(e&&this.dom.contains(e))}nearest(e){for(let t=e;t;){let e=Nt.get(t);if(e&&e.rootView==this)return e;t=t.parentNode}return null}posFromDOM(e,t){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,t)+i.posAtStart}domAtPos(e){let{i:t,off:i}=this.childCursor().findPos(e,-1);for(;t<this.children.length-1;){let e=this.children[t];if(i<e.length||e instanceof Wi)break;t++,i=0}return this.children[t].domAtPos(i)}coordsAt(e,t){for(let i=this.length,n=this.children.length-1;;n--){let s=this.children[n],r=i-s.breakAfter-s.length;if(e>r||e==r&&s.type!=xi.WidgetBefore&&s.type!=xi.WidgetAfter&&(!n||2==t||this.children[n-1].breakAfter||this.children[n-1].type==xi.WidgetBefore&&t>-2))return s.coordsAt(e-r,t);i=r}}measureVisibleLineHeights(e){let t=[],{from:i,to:n}=e,s=this.view.contentDOM.clientWidth,r=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,o=-1,a=this.view.textDirection==an.LTR;for(let e=0,l=0;l<this.children.length;l++){let h=this.children[l],c=e+h.length;if(c>n)break;if(e>=i){let i=h.dom.getBoundingClientRect();if(t.push(i.height),r){let t=h.dom.lastChild,n=t?_t(t):[];if(n.length){let t=n[n.length-1],r=a?t.right-i.left:i.right-t.left;r>o&&(o=r,this.minWidth=s,this.minWidthFrom=e,this.minWidthTo=c)}}}e=c+h.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return"rtl"==getComputedStyle(this.children[t].dom).direction?an.RTL:an.LTR}measureTextSize(){for(let e of this.children)if(e instanceof Wi){let t=e.measureTextSize();if(t)return t}let e,t,i=document.createElement("div");return i.className="cm-line",i.style.width="99999px",i.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((()=>{this.dom.appendChild(i);let n=_t(i.firstChild)[0];e=i.getBoundingClientRect().height,t=n?n.width/27:7,i.remove()})),{lineHeight:e,charWidth:t}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new zt(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let i=0,n=0;;n++){let s=n==t.viewports.length?null:t.viewports[n],r=s?s.from-1:this.length;if(r>i){let n=t.lineBlockAt(r).bottom-t.lineBlockAt(i).top;e.push($i.replace({widget:new kn(n),block:!0,inclusive:!0,isBlockGap:!0}).range(i,r))}if(!s)break;i=s.to+1}return $i.set(e)}updateDeco(){let e=this.view.state.facet(en).map(((e,t)=>(this.dynamicDecorationMap[t]="function"==typeof e)?e(this.view):e));for(let t=e.length;t<e.length+3;t++)this.dynamicDecorationMap[t]=!1;return this.decorations=[...e,this.compositionDeco,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco]}scrollIntoView(e){let t,{range:i}=e,n=this.coordsAt(i.head,i.empty?i.assoc:i.head>i.anchor?-1:1);if(!n)return;!i.empty&&(t=this.coordsAt(i.anchor,i.anchor>i.head?-1:1))&&(n={left:Math.min(n.left,t.left),top:Math.min(n.top,t.top),right:Math.max(n.right,t.right),bottom:Math.max(n.bottom,t.bottom)});let s=0,r=0,o=0,a=0;for(let e of this.view.state.facet(nn).map((e=>e(this.view))))if(e){let{left:t,right:i,top:n,bottom:l}=e;null!=t&&(s=Math.max(s,t)),null!=i&&(r=Math.max(r,i)),null!=n&&(o=Math.max(o,n)),null!=l&&(a=Math.max(a,l))}let l={left:n.left-s,top:n.top-o,right:n.right+r,bottom:n.bottom+a};!function(e,t,i,n,s,r,o,a){let l=e.ownerDocument,h=l.defaultView||window;for(let c=e;c;)if(1==c.nodeType){let e,u=c==l.body;if(u)e=Rt(h);else{if(c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let t=c.getBoundingClientRect();e={left:t.left,right:t.left+c.clientWidth,top:t.top,bottom:t.top+c.clientHeight}}let d=0,f=0;if("nearest"==s)t.top<e.top?(f=-(e.top-t.top+o),i>0&&t.bottom>e.bottom+f&&(f=t.bottom-e.bottom+f+o)):t.bottom>e.bottom&&(f=t.bottom-e.bottom+o,i<0&&t.top-f<e.top&&(f=-(e.top+f-t.top+o)));else{let n=t.bottom-t.top,r=e.bottom-e.top;f=("center"==s&&n<=r?t.top+n/2-r/2:"start"==s||"center"==s&&i<0?t.top-o:t.bottom-r+o)-e.top}if("nearest"==n?t.left<e.left?(d=-(e.left-t.left+r),i>0&&t.right>e.right+d&&(d=t.right-e.right+d+r)):t.right>e.right&&(d=t.right-e.right+r,i<0&&t.left<e.left+d&&(d=-(e.left+d-t.left+r))):d=("center"==n?t.left+(t.right-t.left)/2-(e.right-e.left)/2:"start"==n==a?t.left-r:t.right-(e.right-e.left)+r)-e.left,d||f)if(u)h.scrollBy(d,f);else{let e=0,i=0;if(f){let e=c.scrollTop;c.scrollTop+=f,i=c.scrollTop-e}if(d){let t=c.scrollLeft;c.scrollLeft+=d,e=c.scrollLeft-t}t={left:t.left-e,top:t.top-i,right:t.right-e,bottom:t.bottom-i},e&&Math.abs(e-d)<1&&(n="nearest"),i&&Math.abs(i-f)<1&&(s="nearest")}if(u)break;c=c.assignedSlot||c.parentNode}else{if(11!=c.nodeType)break;c=c.host}}(this.view.scrollDOM,l,i.head<i.anchor?-1:1,e.x,e.y,e.xMargin,e.yMargin,this.view.textDirection==an.LTR)}}class kn extends wi{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get estimatedHeight(){return this.height}}function Pn(e){let t=e.observer.selectionRange,i=t.focusNode&&Cn(t.focusNode,t.focusOffset,0);if(!i)return null;let n=e.docView.nearest(i);if(!n)return null;if(n instanceof Wi){let e=i;for(;e.parentNode!=n.dom;)e=e.parentNode;let t=e.previousSibling;for(;t&&!Nt.get(t);)t=t.previousSibling;let s=t?Nt.get(t).posAtEnd:n.posAtStart;return{from:s,to:s,node:e,text:i}}{for(;;){let{parent:e}=n;if(!e)return null;if(e instanceof Wi)break;n=e}let e=n.posAtStart;return{from:e,to:e+n.length,node:n.dom,text:i}}}class Tn extends wi{constructor(e,t,i){super(),this.top=e,this.text=t,this.topView=i}eq(e){return this.top==e.top&&this.text==e.text}toDOM(){return this.top}ignoreEvent(){return!1}get customView(){return fi}}function Cn(e,t,i){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0&&i<=0)t=Zt(e=e.childNodes[t-1]);else{if(!(1==e.nodeType&&t<e.childNodes.length&&i>=0))return null;e=e.childNodes[t],t=0}}}class Wn{constructor(){this.changes=[]}compareRange(e,t){Ci(e,t,this.changes)}comparePoint(e,t){Ci(e,t,this.changes)}}function An(e,t){return t.left>e?t.left-e:Math.max(0,e-t.right)}function Zn(e,t){return t.top>e?t.top-e:Math.max(0,e-t.bottom)}function Xn(e,t){return e.top<t.bottom-1&&e.bottom>t.top+1}function Vn(e,t){return t<e.top?{top:t,left:e.left,right:e.right,bottom:e.bottom}:e}function Rn(e,t){return t>e.bottom?{top:e.top,left:e.left,right:e.right,bottom:t}:e}function qn(e,t,i){let n,s,r,o,a,l,h,c,u=!1;for(let d=e.firstChild;d;d=d.nextSibling){let e=_t(d);for(let f=0;f<e.length;f++){let O=e[f];s&&Xn(s,O)&&(O=Vn(Rn(O,s.bottom),s.top));let p=An(t,O),m=Zn(i,O);if(0==p&&0==m)return 3==d.nodeType?Mn(d,t,i):qn(d,t,i);(!n||o>m||o==m&&r>p)&&(n=d,s=O,r=p,o=m,u=!p||(p>0?f<e.length-1:f>0)),0==p?i>O.bottom&&(!h||h.bottom<O.bottom)?(a=d,h=O):i<O.top&&(!c||c.top>O.top)&&(l=d,c=O):h&&Xn(h,O)?h=Rn(h,O.bottom):c&&Xn(c,O)&&(c=Vn(c,O.top))}}if(h&&h.bottom>=i?(n=a,s=h):c&&c.top<=i&&(n=l,s=c),!n)return{node:e,offset:0};let d=Math.max(s.left,Math.min(s.right,t));return 3==n.nodeType?Mn(n,d,i):u&&"false"!=n.contentEditable?qn(n,d,i):{node:e,offset:Array.prototype.indexOf.call(e.childNodes,n)+(t>=(s.left+s.right)/2?1:0)}}function Mn(e,t,i){let n=e.nodeValue.length,s=-1,r=1e9,o=0;for(let a=0;a<n;a++){let n=It(e,a,a+1).getClientRects();for(let l=0;l<n.length;l++){let h=n[l];if(h.top==h.bottom)continue;o||(o=t-h.left);let c=(h.top>i?h.top-i:i-h.bottom)-1;if(h.left-1<=t&&h.right+1>=t&&c<r){let i=t>=(h.left+h.right)/2,n=i;if((li.chrome||li.gecko)&&It(e,a).getBoundingClientRect().left==h.right&&(n=!i),c<=0)return{node:e,offset:a+(n?1:0)};s=a+(n?1:0),r=c}}}return{node:e,offset:s>-1?s:o>0?e.nodeValue.length:0}}function En(e,{x:t,y:i},n,s=-1){var r;let o,a=e.contentDOM.getBoundingClientRect(),l=a.top+e.viewState.paddingTop,{docHeight:h}=e.viewState,c=i-l;if(c<0)return 0;if(c>h)return e.state.doc.length;for(let t=e.defaultLineHeight/2,i=!1;o=e.elementAtHeight(c),o.type!=xi.Text;)for(;c=s>0?o.bottom+t:o.top-t,!(c>=0&&c<=h);){if(i)return n?null:0;i=!0,s=-s}i=l+c;let u=o.from;if(u<e.viewport.from)return 0==e.viewport.from?0:n?null:Dn(e,a,o,t,i);if(u>e.viewport.to)return e.viewport.to==e.state.doc.length?e.state.doc.length:n?null:Dn(e,a,o,t,i);let d=e.dom.ownerDocument,f=e.root.elementFromPoint?e.root:d,O=f.elementFromPoint(t,i);O&&!e.contentDOM.contains(O)&&(O=null),O||(t=Math.max(a.left+1,Math.min(a.right-1,t)),O=f.elementFromPoint(t,i),O&&!e.contentDOM.contains(O)&&(O=null));let p,m=-1;if(O&&0!=(null===(r=e.docView.nearest(O))||void 0===r?void 0:r.isEditable))if(d.caretPositionFromPoint){let e=d.caretPositionFromPoint(t,i);e&&({offsetNode:p,offset:m}=e)}else if(d.caretRangeFromPoint){let n=d.caretRangeFromPoint(t,i);n&&(({startContainer:p,startOffset:m}=n),(!e.contentDOM.contains(p)||li.safari&&function(e,t,i){let n;if(3!=e.nodeType||t!=(n=e.nodeValue.length))return!1;for(let t=e.nextSibling;t;t=t.nextSibling)if(1!=t.nodeType||"BR"!=t.nodeName)return!1;return It(e,n-1,n).getBoundingClientRect().left>i}(p,m,t)||li.chrome&&function(e,t,i){if(0!=t)return!1;for(let t=e;;){let e=t.parentNode;if(!e||1!=e.nodeType||e.firstChild!=t)return!1;if(e.classList.contains("cm-line"))break;t=e}return i-(1==e.nodeType?e.getBoundingClientRect():It(e,0,Math.max(e.nodeValue.length,1)).getBoundingClientRect()).left>5}(p,m,t))&&(p=void 0))}if(!p||!e.docView.dom.contains(p)){let n=Wi.find(e.docView,u);if(!n)return c>o.top+o.height/2?o.to:o.from;({node:p,offset:m}=qn(n.dom,t,i))}return e.docView.posFromDOM(p,m)}function Dn(e,t,i,n,s){let r=Math.round((n-t.left)*e.defaultCharacterWidth);e.lineWrapping&&i.height>1.5*e.defaultLineHeight&&(r+=Math.floor((s-i.top)/e.defaultLineHeight)*e.viewState.heightOracle.lineLength);let o=e.state.sliceDoc(i.from,i.to);return i.from+ut(o,r,e.state.tabSize)}function In(e,t,i,n){let s=e.state.doc.lineAt(t.head),r=e.bidiSpans(s),o=e.textDirectionAt(s.from);for(let a=t,l=null;;){let t=vn(s,r,o,a,i),h=Sn;if(!t){if(s.number==(i?e.state.doc.lines:1))return a;h="\n",s=e.state.doc.line(s.number+(i?1:-1)),r=e.bidiSpans(s),t=oe.cursor(i?s.from:s.to)}if(l){if(!l(h))return a}else{if(!n)return t;l=n(h)}a=t}}function Un(e,t,i){let n=e.state.facet(tn).map((t=>t(e)));for(;;){let e=!1;for(let s of n)s.between(i.from-1,i.from+1,((n,s,r)=>{i.from>n&&i.from<s&&(i=t.head>i.from?oe.cursor(n,1):oe.cursor(s,-1),e=!0)}));if(!e)return i}}class Yn{constructor(e){this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.chromeScrollHack=-1,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.mouseSelection=null;let t=(t,i)=>{this.ignoreDuringComposition(i)||"keydown"==i.type&&this.keydown(e,i)||(this.mustFlushObserver(i)&&e.observer.forceFlush(),this.runCustomHandlers(i.type,e,i)?i.preventDefault():t(e,i))};for(let i in Fn){let n=Fn[i];e.contentDOM.addEventListener(i,(i=>{Ln(e,i)&&t(n,i)}),Hn[i]),this.registeredEvents.push(i)}e.scrollDOM.addEventListener("mousedown",(i=>{i.target==e.scrollDOM&&t(Fn.mousedown,i)})),li.chrome&&102==li.chrome_version&&e.scrollDOM.addEventListener("wheel",(()=>{this.chromeScrollHack<0?e.contentDOM.style.pointerEvents="none":window.clearTimeout(this.chromeScrollHack),this.chromeScrollHack=setTimeout((()=>{this.chromeScrollHack=-1,e.contentDOM.style.pointerEvents=""}),100)}),{passive:!0}),this.notifiedFocused=e.hasFocus,li.safari&&e.contentDOM.addEventListener("input",(()=>null))}setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}ensureHandlers(e,t){var i;let n;this.customHandlers=[];for(let s of t)if(n=null===(i=s.update(e).spec)||void 0===i?void 0:i.domEventHandlers){this.customHandlers.push({plugin:s.value,handlers:n});for(let t in n)this.registeredEvents.indexOf(t)<0&&"scroll"!=t&&(this.registeredEvents.push(t),e.contentDOM.addEventListener(t,(i=>{Ln(e,i)&&this.runCustomHandlers(t,e,i)&&i.preventDefault()})))}}runCustomHandlers(e,t,i){for(let n of this.customHandlers){let s=n.handlers[e];if(s)try{if(s.call(n.plugin,i,t)||i.defaultPrevented)return!0}catch(e){Ni(t.state,e)}}return!1}runScrollHandlers(e,t){this.lastScrollTop=e.scrollDOM.scrollTop,this.lastScrollLeft=e.scrollDOM.scrollLeft;for(let i of this.customHandlers){let n=i.handlers.scroll;if(n)try{n.call(i.plugin,t,e)}catch(t){Ni(e.state,t)}}}keydown(e,t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),9==t.keyCode&&Date.now()<this.lastEscPress+2e3)return!0;if(li.android&&li.chrome&&!t.synthetic&&(13==t.keyCode||8==t.keyCode))return e.observer.delayAndroidKey(t.key,t.keyCode),!0;let i;return!(!li.ios||t.synthetic||t.altKey||t.metaKey||!((i=jn.find((e=>e.keyCode==t.keyCode)))&&!t.ctrlKey||Bn.indexOf(t.key)>-1&&t.ctrlKey&&!t.shiftKey)||(this.pendingIOSKey=i||t,setTimeout((()=>this.flushIOSKey(e)),250),0))}flushIOSKey(e){let t=this.pendingIOSKey;return!!t&&(this.pendingIOSKey=void 0,Ut(e.contentDOM,t.key,t.keyCode))}ignoreDuringComposition(e){return!!/^key/.test(e.type)&&(this.composing>0||!!(li.safari&&!li.ios&&Date.now()-this.compositionEndedAt<100)&&(this.compositionEndedAt=0,!0))}mustFlushObserver(e){return"keydown"==e.type&&229!=e.keyCode}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}const jn=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Bn="dthko",Nn=[16,17,18,20,91,92,224,225];function Gn(e){return.7*e+8}class zn{constructor(e,t,i,n){this.view=e,this.style=i,this.mustSelect=n,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParent=function(e){let t=e.ownerDocument;for(let i=e.parentNode;i&&i!=t.body;)if(1==i.nodeType){if(i.scrollHeight>i.clientHeight||i.scrollWidth>i.clientWidth)return i;i=i.assignedSlot||i.parentNode}else{if(11!=i.nodeType)break;i=i.host}return null}(e.contentDOM);let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(Ne.allowMultipleSelections)&&function(e,t){let i=e.state.facet(Ri);return i.length?i[0](t):li.mac?t.metaKey:t.ctrlKey}(e,t),this.dragMove=function(e,t){let i=e.state.facet(qi);return i.length?i[0](t):li.mac?!t.altKey:!t.ctrlKey}(e,t),this.dragging=!(!function(e,t){let{main:i}=e.state.selection;if(i.empty)return!1;let n=kt(e.root);if(!n||0==n.rangeCount)return!0;let s=n.getRangeAt(0).getClientRects();for(let e=0;e<s.length;e++){let i=s[e];if(i.left<=t.clientX&&i.right>=t.clientX&&i.top<=t.clientY&&i.bottom>=t.clientY)return!0}return!1}(e,t)||1!=hs(t))&&null,!1===this.dragging&&(t.preventDefault(),this.select(t))}move(e){var t;if(0==e.buttons)return this.destroy();if(!1!==this.dragging)return;this.select(this.lastEvent=e);let i=0,n=0,s=(null===(t=this.scrollParent)||void 0===t?void 0:t.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight};e.clientX<=s.left?i=-Gn(s.left-e.clientX):e.clientX>=s.right&&(i=Gn(e.clientX-s.right)),e.clientY<=s.top?n=-Gn(s.top-e.clientY):e.clientY>=s.bottom&&(n=Gn(e.clientY-s.bottom)),this.setScrollSpeed(i,n)}up(e){null==this.dragging&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval((()=>this.scroll()),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),!1===this.dragging&&this.select(this.lastEvent)}select(e){let t=this.style.get(e,this.extend,this.multiple);!this.mustSelect&&t.eq(this.view.state.selection)&&t.main.assoc==this.view.state.selection.main.assoc||this.view.dispatch({selection:t,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.docChanged&&this.dragging&&(this.dragging=this.dragging.map(e.changes)),this.style.update(e)&&setTimeout((()=>this.select(this.lastEvent)),20)}}function Ln(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let i,n=t.target;n!=e.contentDOM;n=n.parentNode)if(!n||11==n.nodeType||(i=Nt.get(n))&&i.ignoreEvent(t))return!1;return!0}const Fn=Object.create(null),Hn=Object.create(null),Jn=li.ie&&li.ie_version<15||li.ios&&li.webkit_version<604;function Kn(e,t){let i,{state:n}=e,s=1,r=n.toText(t),o=r.lines==n.selection.ranges.length;if(null!=us&&n.selection.ranges.every((e=>e.empty))&&us==r.toString()){let e=-1;i=n.changeByRange((i=>{let a=n.doc.lineAt(i.from);if(a.from==e)return{range:i};e=a.from;let l=n.toText((o?r.line(s++).text:t)+n.lineBreak);return{changes:{from:a.from,insert:l},range:oe.cursor(i.from+l.length)}}))}else i=o?n.changeByRange((e=>{let t=r.line(s++);return{changes:{from:e.from,to:e.to,insert:t.text},range:oe.cursor(e.from+t.length)}})):n.replaceSelection(r);e.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}function es(e,t,i,n){if(1==n)return oe.cursor(t,i);if(2==n)return function(e,t,i=1){let n=e.charCategorizer(t),s=e.doc.lineAt(t),r=t-s.from;if(0==s.length)return oe.cursor(t);0==r?i=1:r==s.length&&(i=-1);let o=r,a=r;i<0?o=I(s.text,r,!1):a=I(s.text,r);let l=n(s.text.slice(o,a));for(;o>0;){let e=I(s.text,o,!1);if(n(s.text.slice(e,o))!=l)break;o=e}for(;a<s.length;){let e=I(s.text,a);if(n(s.text.slice(a,e))!=l)break;a=e}return oe.range(o+s.from,a+s.from)}(e.state,t,i);{let i=Wi.find(e.docView,t),n=e.state.doc.lineAt(i?i.posAtEnd:t),s=i?i.posAtStart:n.from,r=i?i.posAtEnd:n.to;return r<e.state.doc.length&&r==n.to&&r++,oe.range(s,r)}}Fn.keydown=(e,t)=>{e.inputState.setSelectionOrigin("select"),27==t.keyCode?e.inputState.lastEscPress=Date.now():Nn.indexOf(t.keyCode)<0&&(e.inputState.lastEscPress=0)},Fn.touchstart=(e,t)=>{e.inputState.lastTouchTime=Date.now(),e.inputState.setSelectionOrigin("select.pointer")},Fn.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")},Hn.touchstart=Hn.touchmove={passive:!0},Fn.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return;let i=null;for(let n of e.state.facet(Mi))if(i=n(e,t),i)break;if(i||0!=t.button||(i=function(e,t){let i=ss(e,t),n=hs(t),s=e.state.selection;return{update(e){e.docChanged&&(i.pos=e.changes.mapPos(i.pos),s=s.map(e.changes))},get(t,r,o){let a=ss(e,t),l=es(e,a.pos,a.bias,n);if(i.pos!=a.pos&&!r){let t=es(e,i.pos,i.bias,n),s=Math.min(t.from,l.from),r=Math.max(t.to,l.to);l=s<l.from?oe.range(s,r):oe.range(r,s)}return r?s.replaceRange(s.main.extend(l.from,l.to)):o&&s.ranges.length>1&&s.ranges.some((e=>e.eq(l)))?function(e,t){for(let i=0;;i++)if(e.ranges[i].eq(t))return oe.create(e.ranges.slice(0,i).concat(e.ranges.slice(i+1)),e.mainIndex==i?0:e.mainIndex-(e.mainIndex>i?1:0))}(s,l):o?s.addRange(l):oe.create([l])}}}(e,t)),i){let n=e.root.activeElement!=e.contentDOM;n&&e.observer.ignore((()=>Dt(e.contentDOM))),e.inputState.startMouseSelection(new zn(e,t,i,n))}};let ts=(e,t)=>e>=t.top&&e<=t.bottom,is=(e,t,i)=>ts(t,i)&&e>=i.left&&e<=i.right;function ns(e,t,i,n){let s=Wi.find(e.docView,t);if(!s)return 1;let r=t-s.posAtStart;if(0==r)return 1;if(r==s.length)return-1;let o=s.coordsAt(r,-1);if(o&&is(i,n,o))return-1;let a=s.coordsAt(r,1);return a&&is(i,n,a)?1:o&&ts(n,o)?-1:1}function ss(e,t){let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:i,bias:ns(e,i,t.clientX,t.clientY)}}const rs=li.ie&&li.ie_version<=11;let os=null,as=0,ls=0;function hs(e){if(!rs)return e.detail;let t=os,i=ls;return os=e,ls=Date.now(),as=!t||i>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(as+1)%3:1}function cs(e,t,i,n){if(!i)return;let s=e.posAtCoords({x:t.clientX,y:t.clientY},!1);t.preventDefault();let{mouseSelection:r}=e.inputState,o=n&&r&&r.dragging&&r.dragMove?{from:r.dragging.from,to:r.dragging.to}:null,a={from:s,insert:i},l=e.state.changes(o?[o,a]:a);e.focus(),e.dispatch({changes:l,selection:{anchor:l.mapPos(s,-1),head:l.mapPos(s,1)},userEvent:o?"move.drop":"input.drop"})}Fn.dragstart=(e,t)=>{let{selection:{main:i}}=e.state,{mouseSelection:n}=e.inputState;n&&(n.dragging=i),t.dataTransfer&&(t.dataTransfer.setData("Text",e.state.sliceDoc(i.from,i.to)),t.dataTransfer.effectAllowed="copyMove")},Fn.drop=(e,t)=>{if(!t.dataTransfer)return;if(e.state.readOnly)return t.preventDefault();let i=t.dataTransfer.files;if(i&&i.length){t.preventDefault();let n=Array(i.length),s=0,r=()=>{++s==i.length&&cs(e,t,n.filter((e=>null!=e)).join(e.state.lineBreak),!1)};for(let e=0;e<i.length;e++){let t=new FileReader;t.onerror=r,t.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(n[e]=t.result),r()},t.readAsText(i[e])}}else cs(e,t,t.dataTransfer.getData("Text"),!0)},Fn.paste=(e,t)=>{if(e.state.readOnly)return t.preventDefault();e.observer.flush();let i=Jn?null:t.clipboardData;i?(Kn(e,i.getData("text/plain")),t.preventDefault()):function(e){let t=e.dom.parentNode;if(!t)return;let i=t.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus(),setTimeout((()=>{e.focus(),i.remove(),Kn(e,i.value)}),50)}(e)};let us=null;function ds(e){setTimeout((()=>{e.hasFocus!=e.inputState.notifiedFocused&&e.update([])}),10)}Fn.copy=Fn.cut=(e,t)=>{let{text:i,ranges:n,linewise:s}=function(e){let t=[],i=[],n=!1;for(let n of e.selection.ranges)n.empty||(t.push(e.sliceDoc(n.from,n.to)),i.push(n));if(!t.length){let s=-1;for(let{from:n}of e.selection.ranges){let r=e.doc.lineAt(n);r.number>s&&(t.push(r.text),i.push({from:r.from,to:Math.min(e.doc.length,r.to+1)})),s=r.number}n=!0}return{text:t.join(e.lineBreak),ranges:i,linewise:n}}(e.state);if(!i&&!s)return;us=s?i:null;let r=Jn?null:t.clipboardData;r?(t.preventDefault(),r.clearData(),r.setData("text/plain",i)):function(e,t){let i=e.dom.parentNode;if(!i)return;let n=i.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.value=t,n.focus(),n.selectionEnd=t.length,n.selectionStart=0,setTimeout((()=>{n.remove(),e.focus()}),50)}(e,i),"cut"!=t.type||e.state.readOnly||e.dispatch({changes:n,scrollIntoView:!0,userEvent:"delete.cut"})},Fn.focus=e=>{e.inputState.lastFocusTime=Date.now(),e.scrollDOM.scrollTop||!e.inputState.lastScrollTop&&!e.inputState.lastScrollLeft||(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),ds(e)},Fn.blur=e=>{e.observer.clearSelectionRange(),ds(e)},Fn.compositionstart=Fn.compositionupdate=e=>{null==e.inputState.compositionFirstChange&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0)},Fn.compositionend=e=>{e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionFirstChange=null,li.chrome&&li.android&&e.observer.flushSoon(),setTimeout((()=>{e.inputState.composing<0&&e.docView.compositionDeco.size&&e.update([])}),50)},Fn.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},Fn.beforeinput=(e,t)=>{var i;let n;if(li.chrome&&li.android&&(n=jn.find((e=>e.inputType==t.inputType)))&&(e.observer.delayAndroidKey(n.key,n.keyCode),"Backspace"==n.key||"Delete"==n.key)){let t=(null===(i=window.visualViewport)||void 0===i?void 0:i.height)||0;setTimeout((()=>{var i;((null===(i=window.visualViewport)||void 0===i?void 0:i.height)||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())}),100)}};const fs=["pre-wrap","normal","pre-line","break-spaces"];class Os{constructor(e){this.lineWrapping=e,this.doc=_.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.lineLength=30,this.heightChanged=!1}heightForGap(e,t){let i=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.ceil((t-e-i*this.lineLength*.5)/this.lineLength)),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return fs.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let i=0;i<e.length;i++){let n=e[i];n<0?i++:this.heightSamples[Math.floor(10*n)]||(t=!0,this.heightSamples[Math.floor(10*n)]=!0)}return t}refresh(e,t,i,n,s){let r=fs.indexOf(e)>-1,o=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=r;if(this.lineWrapping=r,this.lineHeight=t,this.charWidth=i,this.lineLength=n,o){this.heightSamples={};for(let e=0;e<s.length;e++){let t=s[e];t<0?e++:this.heightSamples[Math.floor(10*t)]=!0}}return o}}class ps{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class ms{constructor(e,t,i,n,s){this.from=e,this.length=t,this.top=i,this.height=n,this.type=s}get to(){return this.from+this.length}get bottom(){return this.top+this.height}join(e){let t=(Array.isArray(this.type)?this.type:[this]).concat(Array.isArray(e.type)?e.type:[e]);return new ms(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var gs=function(e){return e[e.ByPos=0]="ByPos",e[e.ByHeight=1]="ByHeight",e[e.ByPosNoHeight=2]="ByPosNoHeight",e}(gs||(gs={}));const Qs=.001;class Ss{constructor(e,t,i=2){this.length=e,this.height=t,this.flags=i}get outdated(){return(2&this.flags)>0}set outdated(e){this.flags=(e?2:0)|-3&this.flags}setHeight(e,t){this.height!=t&&(Math.abs(this.height-t)>Qs&&(e.heightChanged=!0),this.height=t)}replace(e,t,i){return Ss.of(i)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,i,n){let s=this;for(let r=n.length-1;r>=0;r--){let{fromA:o,toA:a,fromB:l,toB:h}=n[r],c=s.lineAt(o,gs.ByPosNoHeight,t,0,0),u=c.to>=a?c:s.lineAt(a,gs.ByPosNoHeight,t,0,0);for(h+=u.to-a,a=u.to;r>0&&c.from<=n[r-1].toA;)o=n[r-1].fromA,l=n[r-1].fromB,r--,o<c.from&&(c=s.lineAt(o,gs.ByPosNoHeight,t,0,0));l+=c.from-o,o=c.from;let d=$s.build(i,e,l,h);s=s.replace(o,a,d)}return s.updateHeight(i,0)}static empty(){return new bs(0,0)}static of(e){if(1==e.length)return e[0];let t=0,i=e.length,n=0,s=0;for(;;)if(t==i)if(n>2*s){let s=e[t-1];s.break?e.splice(--t,1,s.left,null,s.right):e.splice(--t,1,s.left,s.right),i+=1+s.break,n-=s.size}else{if(!(s>2*n))break;{let t=e[i];t.break?e.splice(i,1,t.left,null,t.right):e.splice(i,1,t.left,t.right),i+=2+t.break,s-=t.size}}else if(n<s){let i=e[t++];i&&(n+=i.size)}else{let t=e[--i];t&&(s+=t.size)}let r=0;return null==e[t-1]?(r=1,t--):null==e[t]&&(r=1,i++),new ws(Ss.of(e.slice(0,t)),r,Ss.of(e.slice(i)))}}Ss.prototype.size=1;class vs extends Ss{constructor(e,t,i){super(e,t),this.type=i}blockAt(e,t,i,n){return new ms(n,this.length,i,this.height,this.type)}lineAt(e,t,i,n,s){return this.blockAt(0,i,n,s)}forEachLine(e,t,i,n,s,r){e<=s+this.length&&t>=s&&r(this.blockAt(0,i,n,s))}updateHeight(e,t=0,i=!1,n){return n&&n.from<=t&&n.more&&this.setHeight(e,n.heights[n.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class bs extends vs{constructor(e,t){super(e,t,xi.Text),this.collapsed=0,this.widgetHeight=0}replace(e,t,i){let n=i[0];return 1==i.length&&(n instanceof bs||n instanceof ys&&4&n.flags)&&Math.abs(this.length-n.length)<10?(n instanceof ys?n=new bs(n.length,this.height):n.height=this.height,this.outdated||(n.outdated=!1),n):Ss.of(i)}updateHeight(e,t=0,i=!1,n){return n&&n.from<=t&&n.more?this.setHeight(e,n.heights[n.index++]):(i||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class ys extends Ss{constructor(e){super(e,0)}lines(e,t){let i=e.lineAt(t).number,n=e.lineAt(t+this.length).number;return{firstLine:i,lastLine:n,lineHeight:this.height/(n-i+1)}}blockAt(e,t,i,n){let{firstLine:s,lastLine:r,lineHeight:o}=this.lines(t,n),a=Math.max(0,Math.min(r-s,Math.floor((e-i)/o))),{from:l,length:h}=t.line(s+a);return new ms(l,h,i+o*a,o,xi.Text)}lineAt(e,t,i,n,s){if(t==gs.ByHeight)return this.blockAt(e,i,n,s);if(t==gs.ByPosNoHeight){let{from:t,to:n}=i.lineAt(e);return new ms(t,n-t,0,0,xi.Text)}let{firstLine:r,lineHeight:o}=this.lines(i,s),{from:a,length:l,number:h}=i.lineAt(e);return new ms(a,l,n+o*(h-r),o,xi.Text)}forEachLine(e,t,i,n,s,r){let{firstLine:o,lineHeight:a}=this.lines(i,s);for(let l=Math.max(e,s),h=Math.min(s+this.length,t);l<=h;){let t=i.lineAt(l);l==e&&(n+=a*(t.number-o)),r(new ms(t.from,t.length,n,a,xi.Text)),n+=a,l=t.to+1}}replace(e,t,i){let n=this.length-t;if(n>0){let e=i[i.length-1];e instanceof ys?i[i.length-1]=new ys(e.length+n):i.push(null,new ys(n-1))}if(e>0){let t=i[0];t instanceof ys?i[0]=new ys(e+t.length):i.unshift(new ys(e-1),null)}return Ss.of(i)}decomposeLeft(e,t){t.push(new ys(e-1),null)}decomposeRight(e,t){t.push(null,new ys(this.length-e-1))}updateHeight(e,t=0,i=!1,n){let s=t+this.length;if(n&&n.from<=t+this.length&&n.more){let i=[],r=Math.max(t,n.from),o=-1,a=e.heightChanged;for(n.from>t&&i.push(new ys(n.from-t-1).updateHeight(e,t));r<=s&&n.more;){let t=e.doc.lineAt(r).length;i.length&&i.push(null);let s=n.heights[n.index++];-1==o?o=s:Math.abs(s-o)>=Qs&&(o=-2);let a=new bs(t,s);a.outdated=!1,i.push(a),r+=t+1}r<=s&&i.push(null,new ys(s-r).updateHeight(e,r));let l=Ss.of(i);return e.heightChanged=a||o<0||Math.abs(l.height-this.height)>=Qs||Math.abs(o-this.lines(e.doc,t).lineHeight)>=Qs,l}return(i||this.outdated)&&(this.setHeight(e,e.heightForGap(t,t+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class ws extends Ss{constructor(e,t,i){super(e.length+t+i.length,e.height+i.height,t|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return 1&this.flags}blockAt(e,t,i,n){let s=i+this.left.height;return e<s?this.left.blockAt(e,t,i,n):this.right.blockAt(e,t,s,n+this.left.length+this.break)}lineAt(e,t,i,n,s){let r=n+this.left.height,o=s+this.left.length+this.break,a=t==gs.ByHeight?e<r:e<o,l=a?this.left.lineAt(e,t,i,n,s):this.right.lineAt(e,t,i,r,o);if(this.break||(a?l.to<o:l.from>o))return l;let h=t==gs.ByPosNoHeight?gs.ByPosNoHeight:gs.ByPos;return a?l.join(this.right.lineAt(o,h,i,r,o)):this.left.lineAt(o,h,i,n,s).join(l)}forEachLine(e,t,i,n,s,r){let o=n+this.left.height,a=s+this.left.length+this.break;if(this.break)e<a&&this.left.forEachLine(e,t,i,n,s,r),t>=a&&this.right.forEachLine(e,t,i,o,a,r);else{let l=this.lineAt(a,gs.ByPos,i,n,s);e<l.from&&this.left.forEachLine(e,l.from-1,i,n,s,r),l.to>=e&&l.from<=t&&r(l),t>l.to&&this.right.forEachLine(l.to+1,t,i,o,a,r)}}replace(e,t,i){let n=this.left.length+this.break;if(t<n)return this.balanced(this.left.replace(e,t,i),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-n,t-n,i));let s=[];e>0&&this.decomposeLeft(e,s);let r=s.length;for(let e of i)s.push(e);if(e>0&&xs(s,r-1),t<this.length){let e=s.length;this.decomposeRight(t,s),xs(s,e)}return Ss.of(s)}decomposeLeft(e,t){let i=this.left.length;if(e<=i)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(i++,e>=i&&t.push(null)),e>i&&this.right.decomposeLeft(e-i,t)}decomposeRight(e,t){let i=this.left.length,n=i+this.break;if(e>=n)return this.right.decomposeRight(e-n,t);e<i&&this.left.decomposeRight(e,t),this.break&&e<n&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?Ss.of(this.break?[e,null,t]:[e,t]):(this.left=e,this.right=t,this.height=e.height+t.height,this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,i=!1,n){let{left:s,right:r}=this,o=t+s.length+this.break,a=null;return n&&n.from<=t+s.length&&n.more?a=s=s.updateHeight(e,t,i,n):s.updateHeight(e,t,i),n&&n.from<=o+r.length&&n.more?a=r=r.updateHeight(e,o,i,n):r.updateHeight(e,o,i),a?this.balanced(s,r):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function xs(e,t){let i,n;null==e[t]&&(i=e[t-1])instanceof ys&&(n=e[t+1])instanceof ys&&e.splice(t-1,3,new ys(i.length+1+n.length))}class $s{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof bs?i.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new bs(e-this.pos,-1)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,i){if(e<t||i.heightRelevant){let n=i.widget?i.widget.estimatedHeight:0;n<0&&(n=this.oracle.lineHeight);let s=t-e;i.block?this.addBlock(new vs(s,n,i.type)):(s||n>=5)&&this.addLineDeco(n,s)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||null==this.nodes[this.nodes.length-1])&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new bs(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let i=new ys(t-e);return this.oracle.doc.lineAt(e).to==t&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof bs)return e;let t=new bs(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine(),e.type!=xi.WidgetAfter||this.isCovered||this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,e.type!=xi.WidgetBefore&&(this.covering=e)}addLineDeco(e,t){let i=this.ensureLine();i.length+=t,i.collapsed+=t,i.widgetHeight=Math.max(i.widgetHeight,e),this.writtenTo=this.pos=this.pos+t}finish(e){let t=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||t instanceof bs||this.isCovered?(this.writtenTo<this.pos||null==t)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new bs(0,-1));let i=e;for(let e of this.nodes)e instanceof bs&&e.updateHeight(this.oracle,i),i+=e?e.length:1;return this.nodes}static build(e,t,i,n){let s=new $s(i,e);return Je.spans(t,i,n,s,0),s.finish(i)}}class ks{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,i,n){(e<t||i&&i.heightRelevant||n&&n.heightRelevant)&&Ci(e,t,this.changes,5)}}function Ps(e,t){let i=e.getBoundingClientRect(),n=e.ownerDocument,s=n.defaultView||window,r=Math.max(0,i.left),o=Math.min(s.innerWidth,i.right),a=Math.max(0,i.top),l=Math.min(s.innerHeight,i.bottom);for(let t=e.parentNode;t&&t!=n.body;)if(1==t.nodeType){let i=t,n=window.getComputedStyle(i);if((i.scrollHeight>i.clientHeight||i.scrollWidth>i.clientWidth)&&"visible"!=n.overflow){let n=i.getBoundingClientRect();r=Math.max(r,n.left),o=Math.min(o,n.right),a=Math.max(a,n.top),l=t==e.parentNode?n.bottom:Math.min(l,n.bottom)}t="absolute"==n.position||"fixed"==n.position?i.offsetParent:i.parentNode}else{if(11!=t.nodeType)break;t=t.host}return{left:r-i.left,right:Math.max(r,o)-i.left,top:a-(i.top+t),bottom:Math.max(a,l)-(i.top+t)}}function Ts(e,t){let i=e.getBoundingClientRect();return{left:0,right:i.right-i.left,top:t,bottom:i.bottom-(i.top+t)}}class _s{constructor(e,t,i){this.from=e,this.to=t,this.size=i}static same(e,t){if(e.length!=t.length)return!1;for(let i=0;i<e.length;i++){let n=e[i],s=t[i];if(n.from!=s.from||n.to!=s.to||n.size!=s.size)return!1}return!0}draw(e){return $i.replace({widget:new Cs(this.size,e)}).range(this.from,this.to)}}class Cs extends wi{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class Ws{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaler=Rs,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=an.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet(Ki).some((e=>"function"!=typeof e&&"cm-lineWrapping"==e.class));this.heightOracle=new Os(t),this.stateDeco=e.facet(en).filter((e=>"function"!=typeof e)),this.heightMap=Ss.empty().applyChanges(this.stateDeco,_.empty,this.heightOracle.setDoc(e.doc),[new rn(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=$i.set(this.lineGaps.map((e=>e.draw(!1)))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let i=0;i<=1;i++){let n=i?t.head:t.anchor;if(!e.some((({from:e,to:t})=>n>=e&&n<=t))){let{from:t,to:i}=this.lineBlockAt(n);e.push(new As(t,i))}}this.viewports=e.sort(((e,t)=>e.from-t.from)),this.scaler=this.heightMap.height<=7e6?Rs:new qs(this.heightOracle.doc,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.state.doc,0,0,(e=>{this.viewportLines.push(1==this.scaler.scale?e:Ms(e,this.scaler))}))}update(e,t=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(en).filter((e=>"function"!=typeof e));let n=e.changedRanges,s=rn.extendWithRanges(n,function(e,t,i){let n=new ks;return Je.compare(e,t,i,n,0),n.changes}(i,this.stateDeco,e?e.changes:J.empty(this.state.doc.length))),r=this.heightMap.height;this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),this.heightMap.height!=r&&(e.flags|=2);let o=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<o.from||t.range.head>o.to)||!this.viewportIsAppropriate(o))&&(o=this.getViewport(0,t));let a=!e.changes.empty||2&e.flags||o.from!=this.viewport.from||o.to!=this.viewport.to;this.viewport=o,this.updateForViewport(),a&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(Yi)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,i=window.getComputedStyle(t),n=this.heightOracle,s=i.whiteSpace;this.defaultTextDirection="rtl"==i.direction?an.RTL:an.LTR;let r=this.heightOracle.mustRefreshForWrapping(s),o=r||this.mustMeasureContent||this.contentDOMHeight!=t.clientHeight;this.contentDOMHeight=t.clientHeight,this.mustMeasureContent=!1;let a=0,l=0,h=parseInt(i.paddingTop)||0,c=parseInt(i.paddingBottom)||0;this.paddingTop==h&&this.paddingBottom==c||(this.paddingTop=h,this.paddingBottom=c,a|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(n.lineWrapping&&(o=!0),this.editorWidth=e.scrollDOM.clientWidth,a|=8);let u=(this.printing?Ts:Ps)(t,this.paddingTop),d=u.top-this.pixelViewport.top,f=u.bottom-this.pixelViewport.bottom;this.pixelViewport=u;let O=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(O!=this.inView&&(this.inView=O,O&&(o=!0)),!this.inView&&!this.scrollTarget)return 0;let p=t.clientWidth;if(this.contentDOMWidth==p&&this.editorHeight==e.scrollDOM.clientHeight||(this.contentDOMWidth=p,this.editorHeight=e.scrollDOM.clientHeight,a|=8),o){let t=e.docView.measureVisibleLineHeights(this.viewport);if(n.mustRefreshForHeights(t)&&(r=!0),r||n.lineWrapping&&Math.abs(p-this.contentDOMWidth)>n.charWidth){let{lineHeight:i,charWidth:o}=e.docView.measureTextSize();r=i>0&&n.refresh(s,i,o,p/o,t),r&&(e.docView.minWidth=0,a|=8)}d>0&&f>0?l=Math.max(d,f):d<0&&f<0&&(l=Math.min(d,f)),n.heightChanged=!1;for(let i of this.viewports){let s=i.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(i);this.heightMap=(r?Ss.empty().applyChanges(this.stateDeco,_.empty,this.heightOracle,[new rn(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(n,0,r,new ps(i.from,s))}n.heightChanged&&(a|=2)}let m=!this.viewportIsAppropriate(this.viewport,l)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return m&&(this.viewport=this.getViewport(l,this.scrollTarget)),this.updateForViewport(),(2&a||m)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(r?[]:this.lineGaps,e)),a|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),a}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),n=this.heightMap,s=this.state.doc,{visibleTop:r,visibleBottom:o}=this,a=new As(n.lineAt(r-1e3*i,gs.ByHeight,s,0,0).from,n.lineAt(o+1e3*(1-i),gs.ByHeight,s,0,0).to);if(t){let{head:e}=t.range;if(e<a.from||e>a.to){let i,r=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),o=n.lineAt(e,gs.ByPos,s,0,0);i="center"==t.y?(o.top+o.bottom)/2-r/2:"start"==t.y||"nearest"==t.y&&e<a.from?o.top:o.bottom-r,a=new As(n.lineAt(i-500,gs.ByHeight,s,0,0).from,n.lineAt(i+r+500,gs.ByHeight,s,0,0).to)}}return a}mapViewport(e,t){let i=t.mapPos(e.from,-1),n=t.mapPos(e.to,1);return new As(this.heightMap.lineAt(i,gs.ByPos,this.state.doc,0,0).from,this.heightMap.lineAt(n,gs.ByPos,this.state.doc,0,0).to)}viewportIsAppropriate({from:e,to:t},i=0){if(!this.inView)return!0;let{top:n}=this.heightMap.lineAt(e,gs.ByPos,this.state.doc,0,0),{bottom:s}=this.heightMap.lineAt(t,gs.ByPos,this.state.doc,0,0),{visibleTop:r,visibleBottom:o}=this;return(0==e||n<=r-Math.max(10,Math.min(-i,250)))&&(t==this.state.doc.length||s>=o+Math.max(10,Math.min(i,250)))&&n>r-2e3&&s<o+2e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let i=[];for(let n of e)t.touchesRange(n.from,n.to)||i.push(new _s(t.mapPos(n.from),t.mapPos(n.to),n.size));return i}ensureLineGaps(e,t){let i=this.heightOracle.lineWrapping,n=i?1e4:2e3,s=n>>1,r=n<<1;if(this.defaultTextDirection!=an.LTR&&!i)return[];let o=[],a=(n,r,l,h)=>{if(r-n<s)return;let c=this.state.selection.main,u=[c.from];c.empty||u.push(c.to);for(let e of u)if(e>n&&e<r)return a(n,e-10,l,h),void a(e+10,r,l,h);let d=function(e,t){for(let i of e)if(t(i))return i}(e,(e=>e.from>=l.from&&e.to<=l.to&&Math.abs(e.from-n)<s&&Math.abs(e.to-r)<s&&!u.some((t=>e.from<t&&e.to>t))));if(!d){if(r<l.to&&t&&i&&t.visibleRanges.some((e=>e.from<=r&&e.to>=r))){let e=t.moveToLineBoundary(oe.cursor(r),!1,!0).head;e>n&&(r=e)}d=new _s(n,r,this.gapSize(l,n,r,h))}o.push(d)};for(let e of this.viewportLines){if(e.length<r)continue;let t=Zs(e.from,e.to,this.stateDeco);if(t.total<r)continue;let s,o,l=this.scrollTarget?this.scrollTarget.range.head:null;if(i){let i,r,a=n/this.heightOracle.lineLength*this.heightOracle.lineHeight;if(null!=l){let n=Vs(t,l),s=((this.visibleBottom-this.visibleTop)/2+a)/e.height;i=n-s,r=n+s}else i=(this.visibleTop-e.top-a)/e.height,r=(this.visibleBottom-e.top+a)/e.height;s=Xs(t,i),o=Xs(t,r)}else{let e,i,r=t.total*this.heightOracle.charWidth,a=n*this.heightOracle.charWidth;if(null!=l){let n=Vs(t,l),s=((this.pixelViewport.right-this.pixelViewport.left)/2+a)/r;e=n-s,i=n+s}else e=(this.pixelViewport.left-a)/r,i=(this.pixelViewport.right+a)/r;s=Xs(t,e),o=Xs(t,i)}s>e.from&&a(e.from,s,e,t),o<e.to&&a(o,e.to,e,t)}return o}gapSize(e,t,i,n){let s=Vs(n,i)-Vs(n,t);return this.heightOracle.lineWrapping?e.height*s:n.total*this.heightOracle.charWidth*s}updateLineGaps(e){_s.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=$i.set(e.map((e=>e.draw(this.heightOracle.lineWrapping)))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];Je.spans(e,this.viewport.from,this.viewport.to,{span(e,i){t.push({from:e,to:i})},point(){}},20);let i=t.length!=this.visibleRanges.length||this.visibleRanges.some(((e,i)=>e.from!=t[i].from||e.to!=t[i].to));return this.visibleRanges=t,i?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find((t=>t.from<=e&&t.to>=e))||Ms(this.heightMap.lineAt(e,gs.ByPos,this.state.doc,0,0),this.scaler)}lineBlockAtHeight(e){return Ms(this.heightMap.lineAt(this.scaler.fromDOM(e),gs.ByHeight,this.state.doc,0,0),this.scaler)}elementAtHeight(e){return Ms(this.heightMap.blockAt(this.scaler.fromDOM(e),this.state.doc,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class As{constructor(e,t){this.from=e,this.to=t}}function Zs(e,t,i){let n=[],s=e,r=0;return Je.spans(i,e,t,{span(){},point(e,t){e>s&&(n.push({from:s,to:e}),r+=e-s),s=t}},20),s<t&&(n.push({from:s,to:t}),r+=t-s),{total:r,ranges:n}}function Xs({total:e,ranges:t},i){if(i<=0)return t[0].from;if(i>=1)return t[t.length-1].to;let n=Math.floor(e*i);for(let e=0;;e++){let{from:i,to:s}=t[e],r=s-i;if(n<=r)return i+n;n-=r}}function Vs(e,t){let i=0;for(let{from:n,to:s}of e.ranges){if(t<=s){i+=t-n;break}i+=s-n}return i/e.total}const Rs={toDOM:e=>e,fromDOM:e=>e,scale:1};class qs{constructor(e,t,i){let n=0,s=0,r=0;this.viewports=i.map((({from:i,to:s})=>{let r=t.lineAt(i,gs.ByPos,e,0,0).top,o=t.lineAt(s,gs.ByPos,e,0,0).bottom;return n+=o-r,{from:i,to:s,top:r,bottom:o,domTop:0,domBottom:0}})),this.scale=(7e6-n)/(t.height-n);for(let e of this.viewports)e.domTop=r+(e.top-s)*this.scale,r=e.domBottom=e.domTop+(e.bottom-e.top),s=e.bottom}toDOM(e){for(let t=0,i=0,n=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.top)return n+(e-i)*this.scale;if(e<=s.bottom)return s.domTop+(e-s.top);i=s.bottom,n=s.domBottom}}fromDOM(e){for(let t=0,i=0,n=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.domTop)return i+(e-n)/this.scale;if(e<=s.domBottom)return s.top+(e-s.domTop);i=s.bottom,n=s.domBottom}}}function Ms(e,t){if(1==t.scale)return e;let i=t.toDOM(e.top),n=t.toDOM(e.bottom);return new ms(e.from,e.length,i,n-i,Array.isArray(e.type)?e.type.map((e=>Ms(e,t))):e.type)}const Es=he.define({combine:e=>e.join(" ")}),Ds=he.define({combine:e=>e.indexOf(!0)>-1}),Is=pt.newName(),Us=pt.newName(),Ys=pt.newName(),js={"&light":"."+Us,"&dark":"."+Ys};function Bs(e,t,i){return new pt(t,{finish:t=>/&/.test(t)?t.replace(/&\w*/,(t=>{if("&"==t)return e;if(!i||!i[t])throw new RangeError(`Unsupported selector: ${t}`);return i[t]})):e+" "+t})}const Ns=Bs("."+Is,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},"&.cm-focused .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",left:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},js);class Gs{constructor(e,t,i,n){this.typeOver=n,this.bounds=null,this.text="";let{impreciseHead:s,impreciseAnchor:r}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,i,0))){let t=s||r?[]:function(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:i,anchorOffset:n,focusNode:s,focusOffset:r}=e.observer.selectionRange;return i&&(t.push(new xn(i,n)),s==i&&r==n||t.push(new xn(s,r))),t}(e),i=new yn(t,e.state);i.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=i.text,this.newSel=function(e,t){if(0==e.length)return null;let i=e[0].pos,n=2==e.length?e[1].pos:i;return i>-1&&n>-1?oe.single(i+t,n+t):null}(t,this.bounds.from)}else{let t=e.observer.selectionRange,i=s&&s.node==t.focusNode&&s.offset==t.focusOffset||!Pt(e.contentDOM,t.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),n=r&&r.node==t.anchorNode&&r.offset==t.anchorOffset||!Pt(e.contentDOM,t.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset);this.newSel=oe.single(n,i)}}}function zs(e,t){let i,{newSel:n}=t,s=e.state.selection.main;if(t.bounds){let{from:n,to:r}=t.bounds,o=s.from,a=null;(8===e.inputState.lastKeyCode&&e.inputState.lastKeyTime>Date.now()-100||li.android&&t.text.length<r-n)&&(o=s.to,a="end");let l=function(e,t,i,n){let s=Math.min(e.length,t.length),r=0;for(;r<s&&e.charCodeAt(r)==t.charCodeAt(r);)r++;if(r==s&&e.length==t.length)return null;let o=e.length,a=t.length;for(;o>0&&a>0&&e.charCodeAt(o-1)==t.charCodeAt(a-1);)o--,a--;return"end"==n&&(i-=o+Math.max(0,r-Math.min(o,a))-r),o<r&&e.length<t.length?(r-=i<=r&&i>=o?r-i:0,a=r+(a-o),o=r):a<r&&(r-=i<=r&&i>=a?r-i:0,o=r+(o-a),a=r),{from:r,toA:o,toB:a}}(e.state.doc.sliceString(n,r,bn),t.text,o-n,a);l&&(li.chrome&&13==e.inputState.lastKeyCode&&l.toB==l.from+2&&""==t.text.slice(l.from,l.toB)&&l.toB--,i={from:n+l.from,to:n+l.toA,insert:_.of(t.text.slice(l.from,l.toB).split(bn))})}else n&&(!e.hasFocus&&e.state.facet(Gi)||n.main.eq(s))&&(n=null);if(!i&&!n)return!1;if(!i&&t.typeOver&&!s.empty&&n&&n.main.empty?i={from:s.from,to:s.to,insert:e.state.doc.slice(s.from,s.to)}:i&&i.from>=s.from&&i.to<=s.to&&(i.from!=s.from||i.to!=s.to)&&s.to-s.from-(i.to-i.from)<=4?i={from:s.from,to:s.to,insert:e.state.doc.slice(s.from,i.from).append(i.insert).append(e.state.doc.slice(i.to,s.to))}:(li.mac||li.android)&&i&&i.from==i.to&&i.from==s.head-1&&/^\. ?$/.test(i.insert.toString())?(n&&2==i.insert.length&&(n=oe.single(n.main.anchor-1,n.main.head-1)),i={from:s.from,to:s.to,insert:_.of([" "])}):li.chrome&&i&&i.from==i.to&&i.from==s.head&&"\n "==i.insert.toString()&&e.lineWrapping&&(n&&(n=oe.single(n.main.anchor-1,n.main.head-1)),i={from:s.from,to:s.to,insert:_.of([" "])}),i){let t=e.state;if(li.ios&&e.inputState.flushIOSKey(e))return!0;if(li.android&&(i.from==s.from&&i.to==s.to&&1==i.insert.length&&2==i.insert.lines&&Ut(e.contentDOM,"Enter",13)||i.from==s.from-1&&i.to==s.to&&0==i.insert.length&&Ut(e.contentDOM,"Backspace",8)||i.from==s.from&&i.to==s.to+1&&0==i.insert.length&&Ut(e.contentDOM,"Delete",46)))return!0;let r,o=i.insert.toString();if(e.state.facet(Ii).some((t=>t(e,i.from,i.to,o))))return!0;if(e.inputState.composing>=0&&e.inputState.composing++,i.from>=s.from&&i.to<=s.to&&i.to-i.from>=(s.to-s.from)/3&&(!n||n.main.empty&&n.main.from==i.from+i.insert.length)&&e.inputState.composing<0){let n=s.from<i.from?t.sliceDoc(s.from,i.from):"",o=s.to>i.to?t.sliceDoc(i.to,s.to):"";r=t.replaceSelection(e.state.toText(n+i.insert.sliceString(0,void 0,e.state.lineBreak)+o))}else{let o=t.changes(i),a=n&&!t.selection.main.eq(n.main)&&n.main.to<=o.newLength?n.main:void 0;if(t.selection.ranges.length>1&&e.inputState.composing>=0&&i.to<=s.to&&i.to>=s.to-10){let n=e.state.sliceDoc(i.from,i.to),l=Pn(e)||e.state.doc.lineAt(s.head),h=s.to-i.to,c=s.to-s.from;r=t.changeByRange((r=>{if(r.from==s.from&&r.to==s.to)return{changes:o,range:a||r.map(o)};let u=r.to-h,d=u-n.length;if(r.to-r.from!=c||e.state.sliceDoc(d,u)!=n||l&&r.to>=l.from&&r.from<=l.to)return{range:r};let f=t.changes({from:d,to:u,insert:i.insert}),O=r.to-s.to;return{changes:f,range:a?oe.range(Math.max(0,a.anchor+O),Math.max(0,a.head+O)):r.map(f)}}))}else r={changes:o,selection:a&&t.selection.replaceRange(a)}}let a="input.type";return e.composing&&(a+=".compose",e.inputState.compositionFirstChange&&(a+=".start",e.inputState.compositionFirstChange=!1)),e.dispatch(r,{scrollIntoView:!0,userEvent:a}),!0}if(n&&!n.main.eq(s)){let t=!1,i="select";return e.inputState.lastSelectionTime>Date.now()-50&&("select"==e.inputState.lastSelectionOrigin&&(t=!0),i=e.inputState.lastSelectionOrigin),e.dispatch({selection:n,scrollIntoView:t,userEvent:i}),!0}return!1}const Ls={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Fs=li.ie&&li.ie_version<=11;class Hs{constructor(e){this.view=e,this.active=!1,this.selectionRange=new qt,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.resizeContent=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver((t=>{for(let e of t)this.queue.push(e);(li.ie&&li.ie_version<=11||li.ios&&e.composing)&&t.some((e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length))?this.flushSoon():this.flush()})),Fs&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver((()=>{var e;(null===(e=this.view.docView)||void 0===e?void 0:e.lastUpdate)<Date.now()-75&&this.onResize()})),this.resizeScroll.observe(e.scrollDOM),this.resizeContent=new ResizeObserver((()=>this.view.requestMeasure())),this.resizeContent.observe(e.contentDOM)),this.addWindowListeners(this.win=e.win),this.start(),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver((e=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))}),{}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runScrollHandlers(this.view,e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout((()=>{this.resizeTimeout=-1,this.view.requestMeasure()}),50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout((()=>{this.view.viewState.printing=!1,this.view.requestMeasure()}),500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some(((t,i)=>t!=e[i])))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,n=this.selectionRange;if(i.state.facet(Gi)?i.root.activeElement!=this.dom:!Tt(i.dom,n))return;let s=n.anchorNode&&i.docView.nearest(n.anchorNode);s&&s.ignoreEvent(e)?t||(this.selectionChanged=!1):(li.ie&&li.ie_version<=11||li.android&&li.chrome)&&!i.state.selection.main.empty&&n.focusNode&&Ct(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=li.safari&&11==e.root.nodeType&&function(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom&&function(e){let t=null;function i(e){e.preventDefault(),e.stopImmediatePropagation(),t=e.getTargetRanges()[0]}if(e.contentDOM.addEventListener("beforeinput",i,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",i,!0),!t)return null;let n=t.startContainer,s=t.startOffset,r=t.endContainer,o=t.endOffset,a=e.docView.domAtPos(e.state.selection.main.anchor);return Ct(a.node,a.offset,r,o)&&([n,s,r,o]=[r,o,n,s]),{anchorNode:n,anchorOffset:s,focusNode:r,focusOffset:o}}(this.view)||kt(e.root);if(!t||this.selectionRange.eq(t))return!1;let i=Tt(this.dom,t);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&function(e,t){let i=t.focusNode,n=t.focusOffset;if(!i||t.anchorNode!=i||t.anchorOffset!=n)return!1;for(;;)if(n){if(1!=i.nodeType)return!1;let e=i.childNodes[n-1];"false"==e.contentEditable?n--:(i=e,n=Zt(i))}else{if(i==e)return!0;n=Wt(i),i=i.parentNode}}(this.dom,t)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(t),i&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let i=this.dom;i;)if(1==i.nodeType)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==i?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(i),i=i.assignedSlot||i.parentNode;else{if(11!=i.nodeType)break;i=i.host}if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);for(let e of this.scrollTargets=t)e.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,Ls),Fs&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Fs&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var i;if(!this.delayedAndroidKey){let e=()=>{let e=this.delayedAndroidKey;e&&(this.clearDelayedAndroidKey(),!this.flush()&&e.force&&Ut(this.dom,e.key,e.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}this.delayedAndroidKey&&"Enter"!=e||(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(null===(i=this.delayedAndroidKey)||void 0===i?void 0:i.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame((()=>{this.delayedFlush=-1,this.flush()})))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}processRecords(){let e=this.queue;for(let t of this.observer.takeRecords())e.push(t);e.length&&(this.queue=[]);let t=-1,i=-1,n=!1;for(let s of e){let e=this.readMutation(s);e&&(e.typeOver&&(n=!0),-1==t?({from:t,to:i}=e):(t=Math.min(e.from,t),i=Math.max(e.to,i)))}return{from:t,to:i,typeOver:n}}readChange(){let{from:e,to:t,typeOver:i}=this.processRecords(),n=this.selectionChanged&&Tt(this.dom,this.selectionRange);return e<0&&!n?null:(e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1,new Gs(this.view,e,t,i))}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return!1;let i=this.view.state,n=zs(this.view,t);return this.view.state==i&&this.view.update([]),n}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty("attributes"==e.type),"attributes"==e.type&&(t.dirty|=4),"childList"==e.type){let i=Js(t,e.previousSibling||e.target.previousSibling,-1),n=Js(t,e.nextSibling||e.target.nextSibling,1);return{from:i?t.posAfter(i):t.posAtStart,to:n?t.posBefore(n):t.posAtEnd,typeOver:!1}}return"characterData"==e.type?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,t,i,n;this.stop(),null===(e=this.intersection)||void 0===e||e.disconnect(),null===(t=this.gapIntersection)||void 0===t||t.disconnect(),null===(i=this.resizeScroll)||void 0===i||i.disconnect(),null===(n=this.resizeContent)||void 0===n||n.disconnect();for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function Js(e,t,i){for(;t;){let n=Nt.get(t);if(n&&n.parent==e)return n;let s=t.parentNode;t=s!=e.dom?s:i>0?t.nextSibling:t.previousSibling}return null}class Ks{constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),this._dispatch=e.dispatch||(e=>this.update([e])),this.dispatch=this.dispatch.bind(this),this._root=e.root||function(e){for(;e;){if(e&&(9==e.nodeType||11==e.nodeType&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}(e.parent)||document,this.viewState=new Ws(e.state||Ne.create(e)),this.plugins=this.state.facet(Li).map((e=>new Hi(e)));for(let e of this.plugins)e.update(this);this.observer=new Hs(this),this.inputState=new Yn(this),this.inputState.ensureHandlers(this,this.plugins),this.docView=new $n(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}dispatch(...e){this._dispatch(1==e.length&&e[0]instanceof Re?e[0]:this.state.update(...e))}update(e){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t,i=!1,n=!1,s=this.state;for(let t of e){if(t.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=t.state}if(this.destroyed)return void(this.viewState.state=s);let r=this.observer.delayedAndroidKey,o=null;if(r?(this.observer.clearDelayedAndroidKey(),o=this.observer.readChange(),(o&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(o=null)):this.observer.clear(),s.facet(Ne.phrases)!=this.state.facet(Ne.phrases))return this.setState(s);t=on.create(this,s,e);let a=this.viewState.scrollTarget;try{this.updateState=2;for(let t of e){if(a&&(a=a.map(t.changes)),t.scrollIntoView){let{main:e}=t.state.selection;a=new ji(e.empty?e:oe.cursor(e.head,e.head>e.anchor?-1:1))}for(let e of t.effects)e.is(Bi)&&(a=e.value)}this.viewState.update(t,a),this.bidiCache=ir.update(this.bidiCache,t.changes),t.empty||(this.updatePlugins(t),this.inputState.update(t)),i=this.docView.update(t),this.state.facet(sn)!=this.styleModules&&this.mountStyles(),n=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(i,e.some((e=>e.isUserEvent("select.pointer"))))}finally{this.updateState=0}if(t.startState.facet(Es)!=t.state.facet(Es)&&(this.viewState.mustMeasureContent=!0),(i||n||a||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!t.empty)for(let e of this.state.facet(Di))e(t);o&&!zs(this,o)&&r.force&&Ut(this.contentDOM,r.key,r.keyCode)}setState(e){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=e);this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new Ws(e),this.plugins=e.facet(Li).map((e=>new Hi(e))),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView=new $n(this),this.inputState.ensureHandlers(this,this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Li),i=e.state.facet(Li);if(t!=i){let n=[];for(let s of i){let i=t.indexOf(s);if(i<0)n.push(new Hi(s));else{let t=this.plugins[i];t.mustUpdate=e,n.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=n,this.pluginMap.clear(),this.inputState.ensureHandlers(this,this.plugins)}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e<this.plugins.length;e++)this.plugins[e].update(this)}measure(e=!0){if(this.destroyed)return;this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,{scrollHeight:i,scrollTop:n,clientHeight:s}=this.scrollDOM,r=n>i-s-4?i:n;try{for(let e=0;;e++){this.updateState=1;let i=this.viewport,n=this.viewState.lineBlockAtHeight(r),s=this.viewState.measure(this);if(!s&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(e>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let o=[];4&s||([this.measureRequests,o]=[o,this.measureRequests]);let a=o.map((e=>{try{return e.read(this)}catch(e){return Ni(this.state,e),tr}})),l=on.create(this,this.state,[]),h=!1,c=!1;l.flags|=s,t?t.flags|=s:t=l,this.updateState=2,l.empty||(this.updatePlugins(l),this.inputState.update(l),this.updateAttrs(),h=this.docView.update(l));for(let e=0;e<o.length;e++)if(a[e]!=tr)try{let t=o[e];t.write&&t.write(a[e],this)}catch(e){Ni(this.state,e)}if(this.viewState.editorHeight)if(this.viewState.scrollTarget)this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,c=!0;else{let e=this.viewState.lineBlockAt(n.from).top-n.top;(e>1||e<-1)&&(this.scrollDOM.scrollTop+=e,c=!0)}if(h&&this.docView.updateSelection(!0),this.viewport.from==i.from&&this.viewport.to==i.to&&!c&&0==this.measureRequests.length)break}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(Di))e(t)}get themeClasses(){return Is+" "+(this.state.facet(Ds)?Ys:Us)+" "+this.state.facet(Es)}updateAttrs(){let e=nr(this,Ji,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Gi)?"true":"false",class:"cm-content",style:`${li.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),nr(this,Ki,t);let i=this.observer.ignore((()=>{let i=yi(this.contentDOM,this.contentAttrs,t),n=yi(this.dom,this.editorAttrs,e);return i||n}));return this.editorAttrs=e,this.contentAttrs=t,i}showAnnouncements(e){let t=!0;for(let i of e)for(let e of i.effects)e.is(Ks.announce)&&(t&&(this.announceDOM.textContent=""),t=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=e.value)}mountStyles(){this.styleModules=this.state.facet(sn),pt.mount(this.root,this.styleModules.concat(Ns).reverse())}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame((()=>this.measure()))),e){if(this.measureRequests.indexOf(e)>-1)return;if(null!=e.key)for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key)return void(this.measureRequests[t]=e);this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(void 0===t||t&&t.spec!=e)&&this.pluginMap.set(e,t=this.plugins.find((t=>t.spec==e))||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,i){return Un(this,e,In(this,e,t,i))}moveByGroup(e,t){return Un(this,e,In(this,e,t,(t=>function(e,t,i){let n=e.state.charCategorizer(t),s=n(i);return e=>{let t=n(e);return s==Ye.Space&&(s=t),s==t}}(this,e.head,t))))}moveToLineBoundary(e,t,i=!0){return function(e,t,i,n){let s=e.state.doc.lineAt(t.head),r=n&&e.lineWrapping?e.coordsAtPos(t.assoc<0&&t.head>s.from?t.head-1:t.head):null;if(r){let t=e.dom.getBoundingClientRect(),n=e.textDirectionAt(s.from),o=e.posAtCoords({x:i==(n==an.LTR)?t.right-1:t.left+1,y:(r.top+r.bottom)/2});if(null!=o)return oe.cursor(o,i?-1:1)}let o=Wi.find(e.docView,t.head),a=o?i?o.posAtEnd:o.posAtStart:i?s.to:s.from;return oe.cursor(a,i?-1:1)}(this,e,t,i)}moveVertically(e,t,i){return Un(this,e,function(e,t,i,n){let s=t.head,r=i?1:-1;if(s==(i?e.state.doc.length:0))return oe.cursor(s,t.assoc);let o,a=t.goalColumn,l=e.contentDOM.getBoundingClientRect(),h=e.coordsAtPos(s),c=e.documentTop;if(h)null==a&&(a=h.left-l.left),o=r<0?h.top:h.bottom;else{let t=e.viewState.lineBlockAt(s);null==a&&(a=Math.min(l.right-l.left,e.defaultCharacterWidth*(s-t.from))),o=(r<0?t.top:t.bottom)+c}let u=l.left+a,d=null!=n?n:e.defaultLineHeight>>1;for(let i=0;;i+=10){let n=o+(d+i)*r,h=En(e,{x:u,y:n},!1,r);if(n<l.top||n>l.bottom||(r<0?h<s:h>s))return oe.cursor(h,t.assoc,void 0,a)}}(this,e,t,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),En(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let i=this.docView.coordsAt(e,t);if(!i||i.left==i.right)return i;let n=this.state.doc.lineAt(e),s=this.bidiSpans(n);return Vt(i,s[mn.find(s,e-n.from,-1,t)].dir==an.LTR==t>0)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(Ui)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>er)return Qn(e.length);let t=this.textDirectionAt(e.from);for(let i of this.bidiCache)if(i.from==e.from&&i.dir==t)return i.order;let i=function(e,t){let i=e.length,n=t==ln?1:2,s=t==ln?2:1;if(!e||1==n&&!pn.test(e))return Qn(i);for(let t=0,s=n,o=n;t<i;t++){let i=(r=e.charCodeAt(t))<=247?un[r]:1424<=r&&r<=1524?2:1536<=r&&r<=1785?dn[r-1536]:1774<=r&&r<=2220?4:8192<=r&&r<=8203?256:64336<=r&&r<=65023?4:8204==r?256:1;512==i?i=s:8==i&&4==o&&(i=16),gn[t]=4==i?2:i,7&i&&(o=i),s=i}var r;for(let e=0,t=n,s=n;e<i;e++){let n=gn[e];if(128==n)e<i-1&&t==gn[e+1]&&24&t?n=gn[e]=t:gn[e]=256;else if(64==n){let n=e+1;for(;n<i&&64==gn[n];)n++;let r=e&&8==t||n<i&&8==gn[n]?1==s?1:8:256;for(let t=e;t<n;t++)gn[t]=r;e=n-1}else 8==n&&1==s&&(gn[e]=1);t=n,7&n&&(s=n)}for(let t,r,o,a=0,l=0,h=0;a<i;a++)if(r=fn[t=e.charCodeAt(a)])if(r<0){for(let e=l-3;e>=0;e-=3)if(On[e+1]==-r){let t=On[e+2],i=2&t?n:4&t?1&t?s:n:0;i&&(gn[a]=gn[On[e]]=i),l=e;break}}else{if(189==On.length)break;On[l++]=a,On[l++]=t,On[l++]=h}else if(2==(o=gn[a])||1==o){let e=o==n;h=e?0:1;for(let t=l-3;t>=0;t-=3){let i=On[t+2];if(2&i)break;if(e)On[t+2]|=2;else{if(4&i)break;On[t+2]|=4}}}for(let e=0;e<i;e++)if(256==gn[e]){let t=e+1;for(;t<i&&256==gn[t];)t++;let s=1==(e?gn[e-1]:n),r=s==(1==(t<i?gn[t]:n))?s?1:2:n;for(let i=e;i<t;i++)gn[i]=r;e=t-1}let o=[];if(1==n)for(let e=0;e<i;){let t=e,n=1!=gn[e++];for(;e<i&&n==(1!=gn[e]);)e++;if(n)for(let i=e;i>t;){let e=i,n=2!=gn[--i];for(;i>t&&n==(2!=gn[i-1]);)i--;o.push(new mn(i,e,n?2:1))}else o.push(new mn(t,e,0))}else for(let e=0;e<i;){let t=e,n=2==gn[e++];for(;e<i&&n==(2==gn[e]);)e++;o.push(new mn(t,e,n?1:2))}return o}(e.text,t);return this.bidiCache.push(new ir(e.from,e.to,t,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||li.safari&&(null===(e=this.inputState)||void 0===e?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore((()=>{Dt(this.contentDOM),this.docView.updateSelection()}))}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((9==e.nodeType?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return Bi.of(new ji("number"==typeof e?oe.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}static domEventHandlers(e){return Fi.define((()=>({})),{eventHandlers:e})}static theme(e,t){let i=pt.newName(),n=[Es.of(i),sn.of(Bs(`.${i}`,e))];return t&&t.dark&&n.push(Ds.of(!0)),n}static baseTheme(e){return Qe.lowest(sn.of(Bs("."+Is,e,js)))}static findFromDOM(e){var t;let i=e.querySelector(".cm-content"),n=i&&Nt.get(i)||Nt.get(e);return(null===(t=null==n?void 0:n.rootView)||void 0===t?void 0:t.view)||null}}Ks.styleModule=sn,Ks.inputHandler=Ii,Ks.perLineTextDirection=Ui,Ks.exceptionSink=Ei,Ks.updateListener=Di,Ks.editable=Gi,Ks.mouseSelectionStyle=Mi,Ks.dragMovesSelection=qi,Ks.clickAddsSelectionRange=Ri,Ks.decorations=en,Ks.atomicRanges=tn,Ks.scrollMargins=nn,Ks.darkTheme=Ds,Ks.contentAttributes=Ki,Ks.editorAttributes=Ji,Ks.lineWrapping=Ks.contentAttributes.of({class:"cm-lineWrapping"}),Ks.announce=Ve.define();const er=4096,tr={};class ir{constructor(e,t,i,n){this.from=e,this.to=t,this.dir=i,this.order=n}static update(e,t){if(t.empty)return e;let i=[],n=e.length?e[e.length-1].dir:an.LTR;for(let s=Math.max(0,e.length-10);s<e.length;s++){let r=e[s];r.dir!=n||t.touchesRange(r.from,r.to)||i.push(new ir(t.mapPos(r.from,1),t.mapPos(r.to,-1),r.dir,r.order))}return i}}function nr(e,t,i){for(let n=e.state.facet(t),s=n.length-1;s>=0;s--){let t=n[s],r="function"==typeof t?t(e):t;r&&vi(r,i)}return i}const sr=li.mac?"mac":li.windows?"win":li.linux?"linux":"key";function rr(e,t,i){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==i&&t.shiftKey&&(e="Shift-"+e),e}const or=Qe.default(Ks.domEventHandlers({keydown:(e,t)=>ur(hr(t.state),e,t,"editor")})),ar=he.define({enables:or}),lr=new WeakMap;function hr(e){let t=e.facet(ar),i=lr.get(t);return i||lr.set(t,i=function(e,t=sr){let i=Object.create(null),n=Object.create(null),s=(e,t)=>{let i=n[e];if(null==i)n[e]=t;else if(i!=t)throw new Error("Key binding "+e+" is used both as a regular binding and as a multi-stroke prefix")},r=(e,n,r,o)=>{var a,l;let h=i[e]||(i[e]=Object.create(null)),c=n.split(/ (?!$)/).map((e=>function(e,t){const i=e.split(/-(?!$)/);let n,s,r,o,a=i[i.length-1];"Space"==a&&(a=" ");for(let e=0;e<i.length-1;++e){const a=i[e];if(/^(cmd|meta|m)$/i.test(a))o=!0;else if(/^a(lt)?$/i.test(a))n=!0;else if(/^(c|ctrl|control)$/i.test(a))s=!0;else if(/^s(hift)?$/i.test(a))r=!0;else{if(!/^mod$/i.test(a))throw new Error("Unrecognized modifier name: "+a);"mac"==t?o=!0:s=!0}}return n&&(a="Alt-"+a),s&&(a="Ctrl-"+a),o&&(a="Meta-"+a),r&&(a="Shift-"+a),a}(e,t)));for(let t=1;t<c.length;t++){let i=c.slice(0,t).join(" ");s(i,!0),h[i]||(h[i]={preventDefault:!0,run:[t=>{let n=cr={view:t,prefix:i,scope:e};return setTimeout((()=>{cr==n&&(cr=null)}),4e3),!0}]})}let u=c.join(" ");s(u,!1);let d=h[u]||(h[u]={preventDefault:!1,run:(null===(l=null===(a=h._any)||void 0===a?void 0:a.run)||void 0===l?void 0:l.slice())||[]});r&&d.run.push(r),o&&(d.preventDefault=!0)};for(let n of e){let e=n.scope?n.scope.split(" "):["editor"];if(n.any)for(let t of e){let e=i[t]||(i[t]=Object.create(null));e._any||(e._any={preventDefault:!1,run:[]});for(let t in e)e[t].run.push(n.any)}let s=n[t]||n.key;if(s)for(let t of e)r(t,s,n.run,n.preventDefault),n.shift&&r(t,"Shift-"+s,n.shift,n.preventDefault)}return i}(t.reduce(((e,t)=>e.concat(t)),[]))),i}let cr=null;function ur(e,t,i,n){let s=function(e){var t=!(wt&&(e.ctrlKey||e.altKey||e.metaKey)||yt&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?St:Qt)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(t),r=z(N(s,0))==s.length&&" "!=s,o="",a=!1;cr&&cr.view==i&&cr.scope==n&&(o=cr.prefix+" ",(a=Nn.indexOf(t.keyCode)<0)&&(cr=null));let l,h,c=new Set,u=e=>{if(e){for(let n of e.run)if(!c.has(n)&&(c.add(n),n(i,t)))return!0;e.preventDefault&&(a=!0)}return!1},d=e[n];if(d){if(u(d[o+rr(s,t,!r)]))return!0;if(r&&(t.altKey||t.metaKey||t.ctrlKey)&&!(li.windows&&t.ctrlKey&&t.altKey)&&(l=Qt[t.keyCode])&&l!=s){if(u(d[o+rr(l,t,!0)]))return!0;if(t.shiftKey&&(h=St[t.keyCode])!=s&&h!=l&&u(d[o+rr(h,t,!1)]))return!0}else if(r&&t.shiftKey&&u(d[o+rr(s,t,!0)]))return!0;if(u(d._any))return!0}return a}class dr{constructor(e,t,i,n,s){this.className=e,this.left=t,this.top=i,this.width=n,this.height=s}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className==this.className&&(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",null!=this.width&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,i){if(i.empty){let n=e.coordsAtPos(i.head,i.assoc||1);if(!n)return[];let s=fr(e);return[new dr(t,n.left-s.left,n.top-s.top,null,n.bottom-n.top)]}return function(e,t,i){if(i.to<=e.viewport.from||i.from>=e.viewport.to)return[];let n=Math.max(i.from,e.viewport.from),s=Math.min(i.to,e.viewport.to),r=e.textDirection==an.LTR,o=e.contentDOM,a=o.getBoundingClientRect(),l=fr(e),h=window.getComputedStyle(o.firstChild),c=a.left+parseInt(h.paddingLeft)+Math.min(0,parseInt(h.textIndent)),u=a.right-parseInt(h.paddingRight),d=pr(e,n),f=pr(e,s),O=d.type==xi.Text?d:null,p=f.type==xi.Text?f:null;if(e.lineWrapping&&(O&&(O=Or(e,n,O)),p&&(p=Or(e,s,p))),O&&p&&O.from==p.from)return g(Q(i.from,i.to,O));{let t=O?Q(i.from,null,O):S(d,!1),n=p?Q(null,i.to,p):S(f,!0),s=[];return(O||d).to<(p||f).from-1?s.push(m(c,t.bottom,u,n.top)):t.bottom<n.top&&e.elementAtHeight((t.bottom+n.top)/2).type==xi.Text&&(t.bottom=n.top=(t.bottom+n.top)/2),g(t).concat(s).concat(g(n))}function m(e,i,n,s){return new dr(t,e-l.left,i-l.top-.01,n-e,s-i+.01)}function g({top:e,bottom:t,horizontal:i}){let n=[];for(let s=0;s<i.length;s+=2)n.push(m(i[s],e,i[s+1],t));return n}function Q(t,i,n){let s=1e9,o=-1e9,a=[];function l(t,i,l,h,d){let f=e.coordsAtPos(t,t==n.to?-2:2),O=e.coordsAtPos(l,l==n.from?2:-2);s=Math.min(f.top,O.top,s),o=Math.max(f.bottom,O.bottom,o),d==an.LTR?a.push(r&&i?c:f.left,r&&h?u:O.right):a.push(!r&&h?c:O.left,!r&&i?u:f.right)}let h=null!=t?t:n.from,d=null!=i?i:n.to;for(let n of e.visibleRanges)if(n.to>h&&n.from<d)for(let s=Math.max(n.from,h),r=Math.min(n.to,d);;){let n=e.state.doc.lineAt(s);for(let o of e.bidiSpans(n)){let e=o.from+n.from,a=o.to+n.from;if(e>=r)break;a>s&&l(Math.max(e,s),null==t&&e<=h,Math.min(a,r),null==i&&a>=d,o.dir)}if(s=n.to+1,s>=r)break}return 0==a.length&&l(h,null==t,d,null==i,e.textDirection),{top:s,bottom:o,horizontal:a}}function S(e,t){let i=a.top+(t?e.top:e.bottom);return{top:i,bottom:i,horizontal:[]}}}(e,t,i)}}function fr(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==an.LTR?t.left:t.right-e.scrollDOM.clientWidth)-e.scrollDOM.scrollLeft,top:t.top-e.scrollDOM.scrollTop}}function Or(e,t,i){let n=oe.cursor(t);return{from:Math.max(i.from,e.moveToLineBoundary(n,!1,!0).from),to:Math.min(i.to,e.moveToLineBoundary(n,!0,!0).from),type:xi.Text}}function pr(e,t){let i=e.lineBlockAt(t);if(Array.isArray(i.type))for(let e of i.type)if(e.to>t||e.to==t&&(e.to==i.to||e.type==xi.Text))return e;return i}class mr{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(gr)!=e.state.facet(gr)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&e.view.requestMeasure(this.measureReq)}setOrder(e){let t=0,i=e.facet(gr);for(;t<i.length&&i[t]!=this.layer;)t++;this.dom.style.zIndex=String((this.layer.above?150:-1)-t)}measure(){return this.layer.markers(this.view)}draw(e){if(e.length!=this.drawn.length||e.some(((e,t)=>{return i=e,n=this.drawn[t],!(i.constructor==n.constructor&&i.eq(n));var i,n}))){let t=this.dom.firstChild,i=0;for(let n of e)n.update&&t&&n.constructor&&this.drawn[i].constructor&&n.update(t,this.drawn[i])?(t=t.nextSibling,i++):this.dom.insertBefore(n.draw(),t);for(;t;){let e=t.nextSibling;t.remove(),t=e}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const gr=he.define();function Qr(e){return[Fi.define((t=>new mr(t,e))),gr.of(e)]}const Sr=!li.ios,vr=he.define({combine:e=>Ge(e,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})});function br(e){return e.startState.facet(vr)!=e.state.facet(vr)}const yr=Qr({above:!0,markers(e){let{state:t}=e,i=t.facet(vr),n=[];for(let s of t.selection.ranges){let r=s==t.selection.main;if(s.empty?!r||Sr:i.drawRangeCursor){let t=r?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",i=s.empty?s:oe.cursor(s.head,s.head>s.anchor?-1:1);for(let s of dr.forRange(e,t,i))n.push(s)}}return n},update(e,t){e.transactions.some((e=>e.selection))&&(t.style.animationName="cm-blink"==t.style.animationName?"cm-blink2":"cm-blink");let i=br(e);return i&&wr(e.state,t),e.docChanged||e.selectionSet||i},mount(e,t){wr(t.state,e)},class:"cm-cursorLayer"});function wr(e,t){t.style.animationDuration=e.facet(vr).cursorBlinkRate+"ms"}const xr=Qr({above:!1,markers:e=>e.state.selection.ranges.map((t=>t.empty?[]:dr.forRange(e,"cm-selectionBackground",t))).reduce(((e,t)=>e.concat(t))),update:(e,t)=>e.docChanged||e.selectionSet||e.viewportChanged||br(e),class:"cm-selectionLayer"}),$r={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};Sr&&($r[".cm-line"].caretColor="transparent !important");const kr=Qe.highest(Ks.theme($r)),Pr=Ve.define({map:(e,t)=>null==e?null:t.mapPos(e)}),Tr=me.define({create:()=>null,update:(e,t)=>(null!=e&&(e=t.changes.mapPos(e)),t.effects.reduce(((e,t)=>t.is(Pr)?t.value:e),e))}),_r=Fi.fromClass(class{constructor(e){this.view=e,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(e){var t;let i=e.state.field(Tr);null==i?null!=this.cursor&&(null===(t=this.cursor)||void 0===t||t.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(e.startState.field(Tr)!=i||e.docChanged||e.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let e=this.view.state.field(Tr),t=null!=e&&this.view.coordsAtPos(e);if(!t)return null;let i=this.view.scrollDOM.getBoundingClientRect();return{left:t.left-i.left+this.view.scrollDOM.scrollLeft,top:t.top-i.top+this.view.scrollDOM.scrollTop,height:t.bottom-t.top}}drawCursor(e){this.cursor&&(e?(this.cursor.style.left=e.left+"px",this.cursor.style.top=e.top+"px",this.cursor.style.height=e.height+"px"):this.cursor.style.left="-100000px")}destroy(){this.cursor&&this.cursor.remove()}setDropPos(e){this.view.state.field(Tr)!=e&&this.view.dispatch({effects:Pr.of(e)})}},{eventHandlers:{dragover(e){this.setDropPos(this.view.posAtCoords({x:e.clientX,y:e.clientY}))},dragleave(e){e.target!=this.view.contentDOM&&this.view.contentDOM.contains(e.relatedTarget)||this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function Cr(e,t,i,n,s){t.lastIndex=0;for(let r,o=e.iterRange(i,n),a=i;!o.next().done;a+=o.value.length)if(!o.lineBreak)for(;r=t.exec(o.value);)s(a+r.index,r)}class Wr{constructor(e){const{regexp:t,decoration:i,decorate:n,boundary:s,maxLength:r=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,n)this.addMatch=(e,t,i,s)=>n(s,i,i+e[0].length,e,t);else if("function"==typeof i)this.addMatch=(e,t,n,s)=>{let r=i(e,t,n);r&&s(n,n+e[0].length,r)};else{if(!i)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=(e,t,n,s)=>s(n,n+e[0].length,i)}this.boundary=s,this.maxLength=r}createDeco(e){let t=new Ke,i=t.add.bind(t);for(let{from:t,to:n}of function(e,t){let i=e.visibleRanges;if(1==i.length&&i[0].from==e.viewport.from&&i[0].to==e.viewport.to)return i;let n=[];for(let{from:s,to:r}of i)s=Math.max(e.state.doc.lineAt(s).from,s-t),r=Math.min(e.state.doc.lineAt(r).to,r+t),n.length&&n[n.length-1].to>=s?n[n.length-1].to=r:n.push({from:s,to:r});return n}(e,this.maxLength))Cr(e.state.doc,this.regexp,t,n,((t,n)=>this.addMatch(n,e,t,i)));return t.finish()}updateDeco(e,t){let i=1e9,n=-1;return e.docChanged&&e.changes.iterChanges(((t,s,r,o)=>{o>e.view.viewport.from&&r<e.view.viewport.to&&(i=Math.min(r,i),n=Math.max(o,n))})),e.viewportChanged||n-i>1e3?this.createDeco(e.view):n>-1?this.updateRange(e.view,t.map(e.changes),i,n):t}updateRange(e,t,i,n){for(let s of e.visibleRanges){let r=Math.max(s.from,i),o=Math.min(s.to,n);if(o>r){let i=e.state.doc.lineAt(r),n=i.to<o?e.state.doc.lineAt(o):i,a=Math.max(s.from,i.from),l=Math.min(s.to,n.to);if(this.boundary){for(;r>i.from;r--)if(this.boundary.test(i.text[r-1-i.from])){a=r;break}for(;o<n.to;o++)if(this.boundary.test(n.text[o-n.from])){l=o;break}}let h,c=[],u=(e,t,i)=>c.push(i.range(e,t));if(i==n)for(this.regexp.lastIndex=a-i.from;(h=this.regexp.exec(i.text))&&h.index<l-i.from;)this.addMatch(h,e,h.index+i.from,u);else Cr(e.state.doc,this.regexp,a,l,((t,i)=>this.addMatch(i,e,t,u)));t=t.update({filterFrom:a,filterTo:l,filter:(e,t)=>e<a||t>l,add:c})}}return t}}const Ar=null!=/x/.unicode?"gu":"g",Zr=new RegExp("[\0-\b\n--\u2028\u2029\ufeff-]",Ar),Xr={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Vr=null;const Rr=he.define({combine(e){let t=Ge(e,{render:null,specialChars:Zr,addSpecialChars:null});return(t.replaceTabs=!function(){var e;if(null==Vr&&"undefined"!=typeof document&&document.body){let t=document.body.style;Vr=null!=(null!==(e=t.tabSize)&&void 0!==e?e:t.MozTabSize)}return Vr||!1}())&&(t.specialChars=new RegExp("\t|"+t.specialChars.source,Ar)),t.addSpecialChars&&(t.specialChars=new RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,Ar)),t}});let qr=null;class Mr extends wi{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=function(e){return e>=32?"•":10==e?"":String.fromCharCode(9216+e)}(this.code),i=e.state.phrase("Control character")+" "+(Xr[this.code]||"0x"+this.code.toString(16)),n=this.options.render&&this.options.render(this.code,i,t);if(n)return n;let s=document.createElement("span");return s.textContent=t,s.title=i,s.setAttribute("aria-label",i),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class Er extends wi{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent="\t",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}const Dr=$i.line({class:"cm-activeLine"}),Ir=Fi.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=-1,i=[];for(let n of e.state.selection.ranges){let s=e.lineBlockAt(n.head);s.from>t&&(i.push(Dr.range(s.from)),t=s.from)}return $i.set(i)}},{decorations:e=>e.decorations});class Ur extends wi{constructor(e){super(),this.content=e}toDOM(){let e=document.createElement("span");return e.className="cm-placeholder",e.style.pointerEvents="none",e.appendChild("string"==typeof this.content?document.createTextNode(this.content):this.content),"string"==typeof this.content?e.setAttribute("aria-label","placeholder "+this.content):e.setAttribute("aria-hidden","true"),e}ignoreEvent(){return!1}}const Yr=2e3;function jr(e,t){let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1),n=e.state.doc.lineAt(i),s=i-n.from,r=s>Yr?-1:s==n.length?function(e,t){let i=e.coordsAtPos(e.viewport.from);return i?Math.round(Math.abs((i.left-t)/e.defaultCharacterWidth)):-1}(e,t.clientX):ct(n.text,e.state.tabSize,i-n.from);return{line:n.number,col:r,off:s}}const Br={Alt:[18,e=>e.altKey],Control:[17,e=>e.ctrlKey],Shift:[16,e=>e.shiftKey],Meta:[91,e=>e.metaKey]},Nr={style:"cursor: crosshair"},Gr="-10000px";class zr{constructor(e,t,i){this.facet=t,this.createTooltipView=i,this.input=e.state.facet(t),this.tooltips=this.input.filter((e=>e)),this.tooltipViews=this.tooltips.map(i)}update(e){var t;let i=e.state.facet(this.facet),n=i.filter((e=>e));if(i===this.input){for(let t of this.tooltipViews)t.update&&t.update(e);return!1}let s=[];for(let t=0;t<n.length;t++){let i=n[t],r=-1;if(i){for(let e=0;e<this.tooltips.length;e++){let t=this.tooltips[e];t&&t.create==i.create&&(r=e)}if(r<0)s[t]=this.createTooltipView(i);else{let i=s[t]=this.tooltipViews[r];i.update&&i.update(e)}}}for(let e of this.tooltipViews)s.indexOf(e)<0&&(e.dom.remove(),null===(t=e.destroy)||void 0===t||t.call(e));return this.input=i,this.tooltips=n,this.tooltipViews=s,!0}}function Lr(e){let{win:t}=e;return{top:0,left:0,bottom:t.innerHeight,right:t.innerWidth}}const Fr=he.define({combine:e=>{var t,i,n;return{position:li.ios?"absolute":(null===(t=e.find((e=>e.position)))||void 0===t?void 0:t.position)||"fixed",parent:(null===(i=e.find((e=>e.parent)))||void 0===i?void 0:i.parent)||null,tooltipSpace:(null===(n=e.find((e=>e.tooltipSpace)))||void 0===n?void 0:n.tooltipSpace)||Lr}}}),Hr=Fi.fromClass(class{constructor(e){this.view=e,this.inView=!0,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(Fr);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new zr(e,eo,(e=>this.createTooltip(e))),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver((e=>{Date.now()>this.lastTransaction-50&&e.length>0&&e[e.length-1].intersectionRatio<1&&this.measureSoon()}),{threshold:[1]}):null,this.observeIntersection(),e.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let e of this.manager.tooltipViews)this.intersectionObserver.observe(e.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout((()=>{this.measureTimeout=-1,this.maybeMeasure()}),50))}update(e){e.transactions.length&&(this.lastTransaction=Date.now());let t=this.manager.update(e);t&&this.observeIntersection();let i=t||e.geometryChanged,n=e.state.facet(Fr);if(n.position!=this.position){this.position=n.position;for(let e of this.manager.tooltipViews)e.dom.style.position=this.position;i=!0}if(n.parent!=this.parent){this.parent&&this.container.remove(),this.parent=n.parent,this.createContainer();for(let e of this.manager.tooltipViews)this.container.appendChild(e.dom);i=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);i&&this.maybeMeasure()}createTooltip(e){let t=e.create(this.view);if(t.dom.classList.add("cm-tooltip"),e.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let e=document.createElement("div");e.className="cm-tooltip-arrow",t.dom.appendChild(e)}return t.dom.style.position=this.position,t.dom.style.top=Gr,this.container.appendChild(t.dom),t.mount&&t.mount(this.view),t}destroy(){var e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let t of this.manager.tooltipViews)t.dom.remove(),null===(e=t.destroy)||void 0===e||e.call(t);null===(t=this.intersectionObserver)||void 0===t||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let e=this.view.dom.getBoundingClientRect();return{editor:e,parent:this.parent?this.container.getBoundingClientRect():e,pos:this.manager.tooltips.map(((e,t)=>{let i=this.manager.tooltipViews[t];return i.getCoords?i.getCoords(e.pos):this.view.coordsAtPos(e.pos)})),size:this.manager.tooltipViews.map((({dom:e})=>e.getBoundingClientRect())),space:this.view.state.facet(Fr).tooltipSpace(this.view)}}writeMeasure(e){let{editor:t,space:i}=e,n=[];for(let s=0;s<this.manager.tooltips.length;s++){let r=this.manager.tooltips[s],o=this.manager.tooltipViews[s],{dom:a}=o,l=e.pos[s],h=e.size[s];if(!l||l.bottom<=Math.max(t.top,i.top)||l.top>=Math.min(t.bottom,i.bottom)||l.right<Math.max(t.left,i.left)-.1||l.left>Math.min(t.right,i.right)+.1){a.style.top=Gr;continue}let c=r.arrow?o.dom.querySelector(".cm-tooltip-arrow"):null,u=c?7:0,d=h.right-h.left,f=h.bottom-h.top,O=o.offset||Kr,p=this.view.textDirection==an.LTR,m=h.width>i.right-i.left?p?i.left:i.right-h.width:p?Math.min(l.left-(c?14:0)+O.x,i.right-d):Math.max(i.left,l.left-d+(c?14:0)-O.x),g=!!r.above;!r.strictSide&&(g?l.top-(h.bottom-h.top)-O.y<i.top:l.bottom+(h.bottom-h.top)+O.y>i.bottom)&&g==i.bottom-l.bottom>l.top-i.top&&(g=!g);let Q=(g?l.top-i.top:i.bottom-l.bottom)-u;if(Q<f&&!1!==o.resize){if(Q<this.view.defaultLineHeight){a.style.top=Gr;continue}a.style.height=(f=Q)+"px"}else a.style.height&&(a.style.height="");let S=g?l.top-f-u-O.y:l.bottom+u+O.y,v=m+d;if(!0!==o.overlap)for(let e of n)e.left<v&&e.right>m&&e.top<S+f&&e.bottom>S&&(S=g?e.top-f-2-u:e.bottom+u+2);"absolute"==this.position?(a.style.top=S-e.parent.top+"px",a.style.left=m-e.parent.left+"px"):(a.style.top=S+"px",a.style.left=m+"px"),c&&(c.style.left=l.left+(p?O.x:-O.x)-(m+14-7)+"px"),!0!==o.overlap&&n.push({left:m,top:S,right:v,bottom:S+f}),a.classList.toggle("cm-tooltip-above",g),a.classList.toggle("cm-tooltip-below",!g),o.positioned&&o.positioned(e.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let e of this.manager.tooltipViews)e.dom.style.top=Gr}},{eventHandlers:{scroll(){this.maybeMeasure()}}}),Jr=Ks.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Kr={x:0,y:0},eo=he.define({enables:[Hr,Jr]}),to=he.define();class io{constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new zr(e,to,(e=>this.createHostedView(e)))}static create(e){return new io(e)}createHostedView(e){let t=e.create(this.view);return t.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(t.dom),this.mounted&&t.mount&&t.mount(this.view),t}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}}const no=eo.compute([to],(e=>{let t=e.facet(to).filter((e=>e));return 0===t.length?null:{pos:Math.min(...t.map((e=>e.pos))),end:Math.max(...t.filter((e=>null!=e.end)).map((e=>e.end))),create:io.create,above:t[0].above,arrow:t.some((e=>e.arrow))}}));class so{constructor(e,t,i,n,s){this.view=e,this.source=t,this.field=i,this.setHover=n,this.hoverTime=s,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout((()=>this.startHover()),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{lastMove:e}=this,t=this.view.contentDOM.contains(e.target)?this.view.posAtCoords(e):null;if(null==t)return;let i=this.view.coordsAtPos(t);if(null==i||e.y<i.top||e.y>i.bottom||e.x<i.left-this.view.defaultCharacterWidth||e.x>i.right+this.view.defaultCharacterWidth)return;let n=this.view.bidiSpans(this.view.state.doc.lineAt(t)).find((e=>e.from<=t&&e.to>=t)),s=n&&n.dir==an.RTL?-1:1,r=this.source(this.view,t,e.x<i.left?-s:s);if(null==r?void 0:r.then){let e=this.pending={pos:t};r.then((t=>{this.pending==e&&(this.pending=null,t&&this.view.dispatch({effects:this.setHover.of(t)}))}),(e=>Ni(this.view.state,e,"hover tooltip")))}else r&&this.view.dispatch({effects:this.setHover.of(r)})}mousemove(e){var t;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let i=this.active;if(i&&!ro(this.lastMove.target)||this.pending){let{pos:n}=i||this.pending,s=null!==(t=null==i?void 0:i.end)&&void 0!==t?t:n;(n==s?this.view.posAtCoords(this.lastMove)==n:function(e,t,i,n,s,r){let o=document.createRange(),a=e.domAtPos(t),l=e.domAtPos(i);o.setEnd(l.node,l.offset),o.setStart(a.node,a.offset);let h=o.getClientRects();o.detach();for(let e=0;e<h.length;e++){let t=h[e];if(Math.max(t.top-s,s-t.bottom,t.left-n,n-t.right)<=6)return!0}return!1}(this.view,n,s,e.clientX,e.clientY))||(this.view.dispatch({effects:this.setHover.of(null)}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1,this.active&&!ro(e.relatedTarget)&&this.view.dispatch({effects:this.setHover.of(null)})}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}function ro(e){for(let t=e;t;t=t.parentNode)if(1==t.nodeType&&t.classList.contains("cm-tooltip"))return!0;return!1}function oo(e,t={}){let i=Ve.define(),n=me.define({create:()=>null,update(e,n){if(e&&(t.hideOnChange&&(n.docChanged||n.selection)||t.hideOn&&t.hideOn(n,e)))return null;if(e&&n.docChanged){let t=n.changes.mapPos(e.pos,-1,F.TrackDel);if(null==t)return null;let i=Object.assign(Object.create(null),e);i.pos=t,null!=e.end&&(i.end=n.changes.mapPos(e.end)),e=i}for(let t of n.effects)t.is(i)&&(e=t.value),t.is(ao)&&(e=null);return e},provide:e=>to.from(e)});return[n,Fi.define((s=>new so(s,e,n,i,t.hoverTime||300))),no]}const ao=Ve.define(),lo=he.define({combine(e){let t,i;for(let n of e)t=t||n.topContainer,i=i||n.bottomContainer;return{topContainer:t,bottomContainer:i}}});function ho(e,t){let i=e.plugin(co),n=i?i.specs.indexOf(t):-1;return n>-1?i.panels[n]:null}const co=Fi.fromClass(class{constructor(e){this.input=e.state.facet(Oo),this.specs=this.input.filter((e=>e)),this.panels=this.specs.map((t=>t(e)));let t=e.state.facet(lo);this.top=new uo(e,!0,t.topContainer),this.bottom=new uo(e,!1,t.bottomContainer),this.top.sync(this.panels.filter((e=>e.top))),this.bottom.sync(this.panels.filter((e=>!e.top)));for(let e of this.panels)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}update(e){let t=e.state.facet(lo);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new uo(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new uo(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let i=e.state.facet(Oo);if(i!=this.input){let t=i.filter((e=>e)),n=[],s=[],r=[],o=[];for(let i of t){let t,a=this.specs.indexOf(i);a<0?(t=i(e.view),o.push(t)):(t=this.panels[a],t.update&&t.update(e)),n.push(t),(t.top?s:r).push(t)}this.specs=t,this.panels=n,this.top.sync(s),this.bottom.sync(r);for(let e of o)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}else for(let t of this.panels)t.update&&t.update(e)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:e=>Ks.scrollMargins.of((t=>{let i=t.plugin(e);return i&&{top:i.top.scrollMargin(),bottom:i.bottom.scrollMargin()}}))});class uo{constructor(e,t,i){this.view=e,this.top=t,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let e=this.container||this.view.dom;e.insertBefore(this.dom,this.top?e.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=fo(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=fo(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function fo(e){let t=e.nextSibling;return e.remove(),t}const Oo=he.define({enables:co});class po extends ze{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}po.prototype.elementClass="",po.prototype.toDOM=void 0,po.prototype.mapMode=F.TrackBefore,po.prototype.startSide=po.prototype.endSide=-1,po.prototype.point=!0;const mo=he.define(),go={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Je.empty,lineMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Qo=he.define();function So(e){return[bo(),Qo.of(Object.assign(Object.assign({},go),e))]}const vo=he.define({combine:e=>e.some((e=>e))});function bo(e){let t=[yo];return e&&!1===e.fixed&&t.push(vo.of(!0)),t}const yo=Fi.fromClass(class{constructor(e){this.view=e,this.prevViewport=e.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight+"px",this.gutters=e.state.facet(Qo).map((t=>new ko(e,t)));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!e.state.facet(vo),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}update(e){if(this.updateGutters(e)){let t=this.prevViewport,i=e.view.viewport,n=Math.min(t.to,i.to)-Math.max(t.from,i.from);this.syncGutters(n<.8*(i.to-i.from))}e.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(vo)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&this.dom.remove();let i=Je.iter(this.view.state.facet(mo),this.view.viewport.from),n=[],s=this.gutters.map((e=>new $o(e,this.view.viewport,-this.view.documentPadding.top)));for(let e of this.view.viewportLineBlocks){let t;if(Array.isArray(e.type)){for(let i of e.type)if(i.type==xi.Text){t=i;break}}else t=e.type==xi.Text?e:void 0;if(t){n.length&&(n=[]),xo(i,n,e.from);for(let e of s)e.line(this.view,t,n)}}for(let e of s)e.finish();e&&this.view.scrollDOM.insertBefore(this.dom,t)}updateGutters(e){let t=e.startState.facet(Qo),i=e.state.facet(Qo),n=e.docChanged||e.heightChanged||e.viewportChanged||!Je.eq(e.startState.facet(mo),e.state.facet(mo),e.view.viewport.from,e.view.viewport.to);if(t==i)for(let t of this.gutters)t.update(e)&&(n=!0);else{n=!0;let s=[];for(let n of i){let i=t.indexOf(n);i<0?s.push(new ko(this.view,n)):(this.gutters[i].update(e),s.push(this.gutters[i]))}for(let e of this.gutters)e.dom.remove(),s.indexOf(e)<0&&e.destroy();for(let e of s)this.dom.appendChild(e.dom);this.gutters=s}return n}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove()}},{provide:e=>Ks.scrollMargins.of((t=>{let i=t.plugin(e);return i&&0!=i.gutters.length&&i.fixed?t.textDirection==an.LTR?{left:i.dom.offsetWidth}:{right:i.dom.offsetWidth}:null}))});function wo(e){return Array.isArray(e)?e:[e]}function xo(e,t,i){for(;e.value&&e.from<=i;)e.from==i&&t.push(e.value),e.next()}class $o{constructor(e,t,i){this.gutter=e,this.height=i,this.i=0,this.cursor=Je.iter(e.markers,t.from)}line(e,t,i){let n=[];xo(this.cursor,n,t.from),i.length&&(n=n.concat(i));let s=this.gutter.config.lineMarker(e,t,n);s&&n.unshift(s);let r=this.gutter;if(0==n.length&&!r.config.renderEmptyElements)return;let o=t.top-this.height;if(this.i==r.elements.length){let i=new Po(e,t.height,o,n);r.elements.push(i),r.dom.appendChild(i.dom)}else r.elements[this.i].update(e,t.height,o,n);this.height=t.bottom,this.i++}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class ko{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in t.domEventHandlers)this.dom.addEventListener(i,(n=>{let s,r=n.target;if(r!=this.dom&&this.dom.contains(r)){for(;r.parentNode!=this.dom;)r=r.parentNode;let e=r.getBoundingClientRect();s=(e.top+e.bottom)/2}else s=n.clientY;let o=e.lineBlockAtHeight(s-e.documentTop);t.domEventHandlers[i](e,o,n)&&n.preventDefault()}));this.markers=wo(t.markers(e)),t.initialSpacer&&(this.spacer=new Po(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=wo(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let i=e.view.viewport;return!Je.eq(this.markers,t,i.from,i.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(e)}destroy(){for(let e of this.elements)e.destroy()}}class Po{constructor(e,t,i,n){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,i,n)}update(e,t,i,n){this.height!=t&&(this.dom.style.height=(this.height=t)+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),function(e,t){if(e.length!=t.length)return!1;for(let i=0;i<e.length;i++)if(!e[i].compare(t[i]))return!1;return!0}(this.markers,n)||this.setMarkers(e,n)}setMarkers(e,t){let i="cm-gutterElement",n=this.dom.firstChild;for(let s=0,r=0;;){let o=r,a=s<t.length?t[s++]:null,l=!1;if(a){let e=a.elementClass;e&&(i+=" "+e);for(let e=r;e<this.markers.length;e++)if(this.markers[e].compare(a)){o=e,l=!0;break}}else o=this.markers.length;for(;r<o;){let e=this.markers[r++];if(e.toDOM){e.destroy(n);let t=n.nextSibling;n.remove(),n=t}}if(!a)break;a.toDOM&&(l?n=n.nextSibling:this.dom.insertBefore(a.toDOM(e),n)),l&&r++}this.dom.className=i,this.markers=t}destroy(){this.setMarkers(null,[])}}const To=he.define(),_o=he.define({combine:e=>Ge(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let i=Object.assign({},e);for(let e in t){let n=i[e],s=t[e];i[e]=n?(e,t,i)=>n(e,t,i)||s(e,t,i):s}return i}})});class Co extends po{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Wo(e,t){return e.state.facet(_o).formatNumber(t,e.state)}const Ao=Qo.compute([_o],(e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:e=>e.state.facet(To),lineMarker:(e,t,i)=>i.some((e=>e.toDOM))?null:new Co(Wo(e,e.state.doc.lineAt(t.from).number)),lineMarkerChange:e=>e.startState.facet(_o)!=e.state.facet(_o),initialSpacer:e=>new Co(Wo(e,Zo(e.state.doc.lines))),updateSpacer(e,t){let i=Wo(t.view,Zo(t.view.state.doc.lines));return i==e.number?e:new Co(i)},domEventHandlers:e.facet(_o).domEventHandlers})));function Zo(e){let t=9;for(;t<e;)t=10*t+9;return t}const Xo=new class extends po{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},Vo=mo.compute(["selection"],(e=>{let t=[],i=-1;for(let n of e.selection.ranges){let s=e.doc.lineAt(n.head).from;s>i&&(i=s,t.push(Xo.range(s)))}return Je.of(t)})),Ro=1024;let qo=0;class Mo{constructor(e,t){this.from=e,this.to=t}}class Eo{constructor(e={}){this.id=qo++,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");return"function"!=typeof e&&(e=Uo.match(e)),t=>{let i=e(t);return void 0===i?null:[this,i]}}}Eo.closedBy=new Eo({deserialize:e=>e.split(" ")}),Eo.openedBy=new Eo({deserialize:e=>e.split(" ")}),Eo.group=new Eo({deserialize:e=>e.split(" ")}),Eo.contextHash=new Eo({perNode:!0}),Eo.lookAhead=new Eo({perNode:!0}),Eo.mounted=new Eo({perNode:!0});class Do{constructor(e,t,i){this.tree=e,this.overlay=t,this.parser=i}}const Io=Object.create(null);class Uo{constructor(e,t,i,n=0){this.name=e,this.props=t,this.id=i,this.flags=n}static define(e){let t=e.props&&e.props.length?Object.create(null):Io,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(null==e.name?8:0),n=new Uo(e.name||"",t,e.id,i);if(e.props)for(let i of e.props)if(Array.isArray(i)||(i=i(n)),i){if(i[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[i[0].id]=i[1]}return n}prop(e){return this.props[e.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(e){if("string"==typeof e){if(this.name==e)return!0;let t=this.prop(Eo.group);return!!t&&t.indexOf(e)>-1}return this.id==e}static match(e){let t=Object.create(null);for(let i in e)for(let n of i.split(" "))t[n]=e[i];return e=>{for(let i=e.prop(Eo.group),n=-1;n<(i?i.length:0);n++){let s=t[n<0?e.name:i[n]];if(s)return s}}}}Uo.none=new Uo("",Object.create(null),0,8);class Yo{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 i of this.types){let n=null;for(let t of e){let e=t(i);e&&(n||(n=Object.assign({},i.props)),n[e[0].id]=e[1])}t.push(n?new Uo(i.name,n,i.id,i.flags):i)}return new Yo(t)}}const jo=new WeakMap,Bo=new WeakMap;var No;!function(e){e[e.ExcludeBuffers=1]="ExcludeBuffers",e[e.IncludeAnonymous=2]="IncludeAnonymous",e[e.IgnoreMounts=4]="IgnoreMounts",e[e.IgnoreOverlays=8]="IgnoreOverlays"}(No||(No={}));class Go{constructor(e,t,i,n,s){if(this.type=e,this.children=t,this.positions=i,this.length=n,this.props=null,s&&s.length){this.props=Object.create(null);for(let[e,t]of s)this.props["number"==typeof e?e:e.id]=t}}toString(){let e=this.prop(Eo.mounted);if(e&&!e.overlay)return e.tree.toString();let t="";for(let e of this.children){let i=e.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 sa(this.topNode,e)}cursorAt(e,t=0,i=0){let n=jo.get(this)||this.topNode,s=new sa(n);return s.moveTo(e,t),jo.set(this,s._tree),s}get topNode(){return new Ko(this,0,0,null)}resolve(e,t=0){let i=Jo(jo.get(this)||this.topNode,e,t,!1);return jo.set(this,i),i}resolveInner(e,t=0){let i=Jo(Bo.get(this)||this.topNode,e,t,!0);return Bo.set(this,i),i}iterate(e){let{enter:t,leave:i,from:n=0,to:s=this.length}=e;for(let r=this.cursor((e.mode||0)|No.IncludeAnonymous);;){let e=!1;if(r.from<=s&&r.to>=n&&(r.type.isAnonymous||!1!==t(r))){if(r.firstChild())continue;e=!0}for(;e&&i&&!r.type.isAnonymous&&i(r),!r.nextSibling();){if(!r.parent())return;e=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}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:la(Uo.none,this.children,this.positions,0,this.children.length,0,this.length,((e,t,i)=>new Go(this.type,e,t,i,this.propValues)),e.makeTree||((e,t,i)=>new Go(Uo.none,e,t,i)))}static build(e){return function(e){var t;let{buffer:i,nodeSet:n,maxBufferLength:s=Ro,reused:r=[],minRepeatType:o=n.types.length}=e,a=Array.isArray(i)?new zo(i,i.length):i,l=n.types,h=0,c=0;function u(e,t,i,p,m){let{id:g,start:Q,end:S,size:v}=a,b=c;for(;v<0;){if(a.next(),-1==v){let t=r[g];return i.push(t),void p.push(Q-e)}if(-3==v)return void(h=g);if(-4==v)return void(c=g);throw new RangeError(`Unrecognized record size: ${v}`)}let y,w,x=l[g],$=Q-e;if(S-Q<=s&&(w=function(e,t){let i=a.fork(),n=0,r=0,l=0,h=i.end-s,c={size:0,start:0,skip:0};e:for(let s=i.pos-e;i.pos>s;){let e=i.size;if(i.id==t&&e>=0){c.size=n,c.start=r,c.skip=l,l+=4,n+=4,i.next();continue}let a=i.pos-e;if(e<0||a<s||i.start<h)break;let u=i.id>=o?4:0,d=i.start;for(i.next();i.pos>a;){if(i.size<0){if(-3!=i.size)break e;u+=4}else i.id>=o&&(u+=4);i.next()}r=d,n+=e,l+=u}return(t<0||n==e)&&(c.size=n,c.start=r,c.skip=l),c.size>4?c:void 0}(a.pos-t,m))){let t=new Uint16Array(w.size-w.skip),i=a.pos-w.size,s=t.length;for(;a.pos>i;)s=O(w.start,t,s);y=new Lo(t,S-w.start,n),$=w.start-e}else{let e=a.pos-v;a.next();let t=[],i=[],n=g>=o?g:-1,r=0,l=S;for(;a.pos>e;)n>=0&&a.id==n&&a.size>=0?(a.end<=l-s&&(d(t,i,Q,r,a.end,l,n,b),r=t.length,l=a.end),a.next()):u(Q,e,t,i,n);if(n>=0&&r>0&&r<t.length&&d(t,i,Q,r,Q,l,n,b),t.reverse(),i.reverse(),n>-1&&r>0){let e=function(e){return(t,i,n)=>{let s,r,o=0,a=t.length-1;if(a>=0&&(s=t[a])instanceof Go){if(!a&&s.type==e&&s.length==n)return s;(r=s.prop(Eo.lookAhead))&&(o=i[a]+s.length+r)}return f(e,t,i,n,o)}}(x);y=la(x,t,i,0,t.length,0,S-Q,e,e)}else y=f(x,t,i,S-Q,b-S)}i.push(y),p.push($)}function d(e,t,i,s,r,o,a,l){let h=[],c=[];for(;e.length>s;)h.push(e.pop()),c.push(t.pop()+i-r);e.push(f(n.types[a],h,c,o-r,l-o)),t.push(r-i)}function f(e,t,i,n,s=0,r){if(h){let e=[Eo.contextHash,h];r=r?[e].concat(r):[e]}if(s>25){let e=[Eo.lookAhead,s];r=r?[e].concat(r):[e]}return new Go(e,t,i,n,r)}function O(e,t,i){let{id:n,start:s,end:r,size:l}=a;if(a.next(),l>=0&&n<o){let o=i;if(l>4){let n=a.pos-(l-4);for(;a.pos>n;)i=O(e,t,i)}t[--i]=o,t[--i]=r-e,t[--i]=s-e,t[--i]=n}else-3==l?h=n:-4==l&&(c=n);return i}let p=[],m=[];for(;a.pos>0;)u(e.start||0,e.bufferStart||0,p,m,-1);let g=null!==(t=e.length)&&void 0!==t?t:p.length?m[0]+p[0].length:0;return new Go(l[e.topID],p.reverse(),m.reverse(),g)}(e)}}Go.empty=new Go(Uo.none,[],[],0);class zo{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 zo(this.buffer,this.index)}}class Lo{constructor(e,t,i){this.buffer=e,this.length=t,this.set=i}get type(){return Uo.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],i=this.buffer[e+3],n=this.set.types[t],s=n.name;if(/\W/.test(s)&&!n.isError&&(s=JSON.stringify(s)),i==(e+=4))return s;let r=[];for(;e<i;)r.push(this.childString(e)),e=this.buffer[e+3];return s+"("+r.join(",")+")"}findChild(e,t,i,n,s){let{buffer:r}=this,o=-1;for(let a=e;a!=t&&!(Fo(s,n,r[a+1],r[a+2])&&(o=a,i>0));a=r[a+3]);return o}slice(e,t,i){let n=this.buffer,s=new Uint16Array(t-e),r=0;for(let o=e,a=0;o<t;){s[a++]=n[o++],s[a++]=n[o++]-i;let t=s[a++]=n[o++]-i;s[a++]=n[o++]-e,r=Math.max(r,t)}return new Lo(s,r,this.set)}}function Fo(e,t,i,n){switch(e){case-2:return i<t;case-1:return n>=t&&i<t;case 0:return i<t&&n>t;case 1:return i<=t&&n>t;case 2:return n>t;case 4:return!0}}function Ho(e,t){let i=e.childBefore(t);for(;i;){let t=i.lastChild;if(!t||t.to!=i.to)break;t.type.isError&&t.from==t.to?(e=i,i=t.prevSibling):i=t}return e}function Jo(e,t,i,n){for(var s;e.from==e.to||(i<1?e.from>=t:e.from>t)||(i>-1?e.to<=t:e.to<t);){let t=!n&&e instanceof Ko&&e.index<0?null:e.parent;if(!t)return e;e=t}let r=n?0:No.IgnoreOverlays;if(n)for(let n=e,o=n.parent;o;n=o,o=n.parent)n instanceof Ko&&n.index<0&&(null===(s=o.enter(t,i,r))||void 0===s?void 0:s.from)!=n.from&&(e=o);for(;;){let n=e.enter(t,i,r);if(!n)return e;e=n}}class Ko{constructor(e,t,i,n){this._tree=e,this.from=t,this.index=i,this._parent=n}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,i,n,s=0){for(let r=this;;){for(let{children:o,positions:a}=r._tree,l=t>0?o.length:-1;e!=l;e+=t){let l=o[e],h=a[e]+r.from;if(Fo(n,i,h,h+l.length))if(l instanceof Lo){if(s&No.ExcludeBuffers)continue;let o=l.findChild(0,l.buffer.length,t,i-h,n);if(o>-1)return new na(new ia(r,l,e,h),null,o)}else if(s&No.IncludeAnonymous||!l.type.isAnonymous||ra(l)){let o;if(!(s&No.IgnoreMounts)&&l.props&&(o=l.prop(Eo.mounted))&&!o.overlay)return new Ko(o.tree,h,e,r);let a=new Ko(l,h,e,r);return s&No.IncludeAnonymous||!a.type.isAnonymous?a:a.nextChild(t<0?l.children.length-1:0,t,i,n)}}if(s&No.IncludeAnonymous||!r.type.isAnonymous)return null;if(e=r.index>=0?r.index+t:t<0?-1:r._parent._tree.children.length,r=r._parent,!r)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,i=0){let n;if(!(i&No.IgnoreOverlays)&&(n=this._tree.prop(Eo.mounted))&&n.overlay){let i=e-this.from;for(let{from:e,to:s}of n.overlay)if((t>0?e<=i:e<i)&&(t<0?s>=i:s>i))return new Ko(n.tree,n.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,i)}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}cursor(e=0){return new sa(this,e)}get tree(){return this._tree}toTree(){return this._tree}resolve(e,t=0){return Jo(this,e,t,!1)}resolveInner(e,t=0){return Jo(this,e,t,!0)}enterUnfinishedNodesBefore(e){return Ho(this,e)}getChild(e,t=null,i=null){let n=ea(this,e,t,i);return n.length?n[0]:null}getChildren(e,t=null,i=null){return ea(this,e,t,i)}toString(){return this._tree.toString()}get node(){return this}matchContext(e){return ta(this,e)}}function ea(e,t,i,n){let s=e.cursor(),r=[];if(!s.firstChild())return r;if(null!=i)for(;!s.type.is(i);)if(!s.nextSibling())return r;for(;;){if(null!=n&&s.type.is(n))return r;if(s.type.is(t)&&r.push(s.node),!s.nextSibling())return null==n?r:[]}}function ta(e,t,i=t.length-1){for(let n=e.parent;i>=0;n=n.parent){if(!n)return!1;if(!n.type.isAnonymous){if(t[i]&&t[i]!=n.name)return!1;i--}}return!0}class ia{constructor(e,t,i,n){this.parent=e,this.buffer=t,this.index=i,this.start=n}}class na{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,i){this.context=e,this._parent=t,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,t,i){let{buffer:n}=this.context,s=n.findChild(this.index+4,n.buffer[this.index+3],e,t-this.context.start,i);return s<0?null:new na(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)}enter(e,t,i=0){if(i&No.ExcludeBuffers)return null;let{buffer:n}=this.context,s=n.findChild(this.index+4,n.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new na(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 na(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 na(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}cursor(e=0){return new sa(this,e)}get tree(){return null}toTree(){let e=[],t=[],{buffer:i}=this.context,n=this.index+4,s=i.buffer[this.index+3];if(s>n){let r=i.buffer[this.index+1];e.push(i.slice(n,s,r)),t.push(0)}return new Go(this.type,e,t,this.to-this.from)}resolve(e,t=0){return Jo(this,e,t,!1)}resolveInner(e,t=0){return Jo(this,e,t,!0)}enterUnfinishedNodesBefore(e){return Ho(this,e)}toString(){return this.context.buffer.childString(this.index)}getChild(e,t=null,i=null){let n=ea(this,e,t,i);return n.length?n[0]:null}getChildren(e,t=null,i=null){return ea(this,e,t,i)}get node(){return this}matchContext(e){return ta(this,e)}}class sa{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Ko)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){return!!e&&(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0)}yieldBuf(e,t){this.index=e;let{start:i,buffer:n}=this.buffer;return this.type=t||n.set.types[n.buffer[e]],this.from=i+n.buffer[e+1],this.to=i+n.buffer[e+2],!0}yield(e){return!!e&&(e instanceof Ko?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,i,this.mode));let{buffer:n}=this.buffer,s=n.findChild(this.index+4,n.buffer[this.index+3],e,t-this.buffer.start,i);return!(s<0)&&(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,i=this.mode){return this.buffer?!(i&No.ExcludeBuffers)&&this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&No.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&No.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));let{buffer:t}=this.buffer,i=this.stack.length-1;if(e<0){let e=i<0?0:this.stack[i]+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<(i<0?t.buffer.length:t.buffer[this.stack[i]+3]))return this.yieldBuf(e)}return i<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,i,{buffer:n}=this;if(n){if(e>0){if(this.index<n.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(n.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:i}=n)}else({index:t,_parent:i}=this._tree);for(;i;({index:t,_parent:i}=i))if(t>-1)for(let n=t+e,s=e<0?-1:i._tree.children.length;n!=s;n+=e){let e=i._tree.children[n];if(this.mode&No.IncludeAnonymous||e instanceof Lo||!e.type.isAnonymous||ra(e))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,i=0;if(e&&e.context==this.buffer)e:for(let n=this.index,s=this.stack.length;s>=0;){for(let r=e;r;r=r._parent)if(r.index==n){if(n==this.index)return r;t=r,i=s+1;break e}n=this.stack[--s]}for(let e=i;e<this.stack.length;e++)t=new na(this.buffer,t,this.stack[e]);return this.bufferNode=new na(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let i=0;;){let n=!1;if(this.type.isAnonymous||!1!==e(this)){if(this.firstChild()){i++;continue}this.type.isAnonymous||(n=!0)}for(;n&&t&&t(this),n=this.type.isAnonymous,!this.nextSibling();){if(!i)return;this.parent(),i--,n=!0}}}matchContext(e){if(!this.buffer)return ta(this.node,e);let{buffer:t}=this.buffer,{types:i}=t.set;for(let n=e.length-1,s=this.stack.length-1;n>=0;s--){if(s<0)return ta(this.node,e,n);let r=i[t.buffer[this.stack[s]]];if(!r.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}}function ra(e){return e.children.some((e=>e instanceof Lo||!e.type.isAnonymous||ra(e)))}const oa=new WeakMap;function aa(e,t){if(!e.isAnonymous||t instanceof Lo||t.type!=e)return 1;let i=oa.get(t);if(null==i){i=1;for(let n of t.children){if(n.type!=e||!(n instanceof Go)){i=1;break}i+=aa(e,n)}oa.set(t,i)}return i}function la(e,t,i,n,s,r,o,a,l){let h=0;for(let i=n;i<s;i++)h+=aa(e,t[i]);let c=Math.ceil(1.5*h/8),u=[],d=[];return function t(i,n,s,o,a){for(let h=s;h<o;){let s=h,f=n[h],O=aa(e,i[h]);for(h++;h<o;h++){let t=aa(e,i[h]);if(O+t>=c)break;O+=t}if(h==s+1){if(O>c){let e=i[s];t(e.children,e.positions,0,e.children.length,n[s]+a);continue}u.push(i[s])}else{let t=n[h-1]+i[h-1].length-f;u.push(la(e,i,n,s,h,f,t,null,l))}d.push(f+a-r)}}(t,i,n,s,0),(a||l)(u,d,o)}class ha{constructor(){this.map=new WeakMap}setBuffer(e,t,i){let n=this.map.get(e);n||this.map.set(e,n=new Map),n.set(t,i)}getBuffer(e,t){let i=this.map.get(e);return i&&i.get(t)}set(e,t){e instanceof na?this.setBuffer(e.context.buffer,e.index,t):e instanceof Ko&&this.map.set(e.tree,t)}get(e){return e instanceof na?this.getBuffer(e.context.buffer,e.index):e instanceof Ko?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)}}class ca{constructor(e,t,i,n,s=!1,r=!1){this.from=e,this.to=t,this.tree=i,this.offset=n,this.open=(s?1:0)|(r?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(e,t=[],i=!1){let n=[new ca(0,e.length,e,0,!1,i)];for(let i of t)i.to>e.length&&n.push(i);return n}static applyChanges(e,t,i=128){if(!t.length)return e;let n=[],s=1,r=e.length?e[0]:null;for(let o=0,a=0,l=0;;o++){let h=o<t.length?t[o]:null,c=h?h.fromA:1e9;if(c-a>=i)for(;r&&r.from<c;){let t=r;if(a>=t.from||c<=t.to||l){let e=Math.max(t.from,a)-l,i=Math.min(t.to,c)-l;t=e>=i?null:new ca(e,i,t.tree,t.offset+l,o>0,!!h)}if(t&&n.push(t),r.to>c)break;r=s<e.length?e[s++]:null}if(!h)break;a=h.toA,l=h.toA-h.toB}return n}}class ua{startParse(e,t,i){return"string"==typeof e&&(e=new da(e)),i=i?i.length?i.map((e=>new Mo(e.from,e.to))):[new Mo(0,0)]:[new Mo(0,e.length)],this.createParse(e,t||[],i)}parse(e,t,i){let n=this.startParse(e,t,i);for(;;){let e=n.advance();if(e)return e}}}class da{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)}}class fa{constructor(e,t,i,n,s){this.parser=e,this.parse=t,this.overlay=i,this.target=n,this.ranges=s}}class Oa{constructor(e,t,i,n,s,r,o){this.parser=e,this.predicate=t,this.mounts=i,this.index=n,this.start=s,this.target=r,this.prev=o,this.depth=0,this.ranges=[]}}const pa=new Eo({perNode:!0});class ma{constructor(e,t,i,n,s){this.nest=t,this.input=i,this.fragments=n,this.ranges=s,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;if(this.baseParse=null,this.baseTree=e,this.startInner(),null!=this.stoppedAt)for(let e of this.inner)e.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let e=this.baseTree;return null!=this.stoppedAt&&(e=new Go(e.type,e.children,e.positions,e.length,e.propValues.concat([[pa,this.stoppedAt]]))),e}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[Eo.mounted.id]=new Do(t,e.overlay,e.parser),e.target.props=i}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].ranges[0].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 ba(this.fragments),t=null,i=null,n=new sa(new Ko(this.baseTree,this.ranges[0].from,0,null),No.IncludeAnonymous|No.IgnoreMounts);e:for(let s,r;null==this.stoppedAt||n.from<this.stoppedAt;){let o,a=!0;if(e.hasNode(n)){if(t){let e=t.mounts.find((e=>e.frag.from<=n.from&&e.frag.to>=n.to&&e.mount.overlay));if(e)for(let i of e.mount.overlay){let s=i.from+e.pos,r=i.to+e.pos;s>=n.from&&r<=n.to&&!t.ranges.some((e=>e.from<r&&e.to>s))&&t.ranges.push({from:s,to:r})}}a=!1}else if(i&&(r=ga(i.ranges,n.from,n.to)))a=2!=r;else if(!n.type.isAnonymous&&n.from<n.to&&(s=this.nest(n,this.input))){n.tree||Sa(n);let r=e.findMounts(n.from,s.parser);if("function"==typeof s.overlay)t=new Oa(s.parser,s.overlay,r,this.inner.length,n.from,n.tree,t);else{let e=ya(this.ranges,s.overlay||[new Mo(n.from,n.to)]);e.length&&this.inner.push(new fa(s.parser,s.parser.startParse(this.input,xa(r,e),e),s.overlay?s.overlay.map((e=>new Mo(e.from-n.from,e.to-n.from))):null,n.tree,e)),s.overlay?e.length&&(i={ranges:e,depth:0,prev:i}):a=!1}}else t&&(o=t.predicate(n))&&(!0===o&&(o=new Mo(n.from,n.to)),o.from<o.to&&t.ranges.push(o));if(a&&n.firstChild())t&&t.depth++,i&&i.depth++;else for(;!n.nextSibling();){if(!n.parent())break e;if(t&&!--t.depth){let e=ya(this.ranges,t.ranges);e.length&&this.inner.splice(t.index,0,new fa(t.parser,t.parser.startParse(this.input,xa(t.mounts,e),e),t.ranges.map((e=>new Mo(e.from-t.start,e.to-t.start))),t.target,e)),t=t.prev}i&&!--i.depth&&(i=i.prev)}}}}function ga(e,t,i){for(let n of e){if(n.from>=i)break;if(n.to>t)return n.from<=t&&n.to>=i?2:1}return 0}function Qa(e,t,i,n,s,r){if(t<i){let o=e.buffer[t+1];n.push(e.slice(t,i,o)),s.push(o-r)}}function Sa(e){let{node:t}=e,i=0;do{e.parent(),i++}while(!e.tree);let n=0,s=e.tree,r=0;for(;r=s.positions[n]+e.from,!(r<=t.from&&r+s.children[n].length>=t.to);n++);let o=s.children[n],a=o.buffer;s.children[n]=function e(i,n,s,l,h){let c=i;for(;a[c+2]+r<=t.from;)c=a[c+3];let u=[],d=[];Qa(o,i,c,u,d,l);let f=a[c+1],O=a[c+2],p=f+r==t.from&&O+r==t.to&&a[c]==t.type.id;return u.push(p?t.toTree():e(c+4,a[c+3],o.set.types[a[c]],f,O-f)),d.push(f-l),Qa(o,a[c+3],n,u,d,l),new Go(s,u,d,h)}(0,a.length,Uo.none,0,o.length);for(let n=0;n<=i;n++)e.childAfter(t.from)}class va{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(No.IncludeAnonymous|No.IgnoreMounts)}moveTo(e){let{cursor:t}=this,i=e-this.offset;for(;!this.done&&t.from<i;)t.to>=e&&t.enter(i,1,No.IgnoreOverlays|No.ExcludeBuffers)||t.next(!1)||(this.done=!0)}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&&0==t.positions[0]&&t.children[0]instanceof Go))break;t=t.children[0]}return!1}}class ba{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=null!==(t=i.tree.prop(pa))&&void 0!==t?t:i.to,this.inner=new va(i.tree,-i.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=null!==(e=t.tree.prop(pa))&&void 0!==e?e:t.to,this.inner=new va(t.tree,-t.offset)}}findMounts(e,t){var i;let n=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let e=this.inner.cursor.node;e;e=e.parent){let s=null===(i=e.tree)||void 0===i?void 0:i.prop(Eo.mounted);if(s&&s.parser==t)for(let t=this.fragI;t<this.fragments.length;t++){let i=this.fragments[t];if(i.from>=e.to)break;i.tree==this.curFrag.tree&&n.push({frag:i,pos:e.from-i.offset,mount:s})}}}return n}}function ya(e,t){let i=null,n=t;for(let s=1,r=0;s<e.length;s++){let o=e[s-1].to,a=e[s].from;for(;r<n.length;r++){let e=n[r];if(e.from>=a)break;e.to<=o||(i||(n=i=t.slice()),e.from<o?(i[r]=new Mo(e.from,o),e.to>a&&i.splice(r+1,0,new Mo(a,e.to))):e.to>a?i[r--]=new Mo(a,e.to):i.splice(r--,1))}}return n}function wa(e,t,i,n){let s=0,r=0,o=!1,a=!1,l=-1e9,h=[];for(;;){let c=s==e.length?1e9:o?e[s].to:e[s].from,u=r==t.length?1e9:a?t[r].to:t[r].from;if(o!=a){let e=Math.max(l,i),t=Math.min(c,u,n);e<t&&h.push(new Mo(e,t))}if(l=Math.min(c,u),1e9==l)break;c==l&&(o?(o=!1,s++):o=!0),u==l&&(a?(a=!1,r++):a=!0)}return h}function xa(e,t){let i=[];for(let{pos:n,mount:s,frag:r}of e){let e=n+(s.overlay?s.overlay[0].from:0),o=e+s.tree.length,a=Math.max(r.from,e),l=Math.min(r.to,o);if(s.overlay){let o=wa(t,s.overlay.map((e=>new Mo(e.from+n,e.to+n))),a,l);for(let t=0,n=a;;t++){let a=t==o.length,h=a?l:o[t].from;if(h>n&&i.push(new ca(n,h,s.tree,-e,r.from>=n||r.openStart,r.to<=h||r.openEnd)),a)break;n=o[t].to}}else i.push(new ca(a,l,s.tree,-e,r.from>=e||r.openStart,r.to<=o||r.openEnd))}return i}let $a=0;class ka{constructor(e,t,i){this.set=e,this.base=t,this.modified=i,this.id=$a++}static define(e){if(null==e?void 0:e.base)throw new Error("Can not derive from a modified tag");let t=new ka([],null,[]);if(t.set.push(t),e)for(let i of e.set)t.set.push(i);return t}static defineModifier(){let e=new Ta;return t=>t.modified.indexOf(e)>-1?t:Ta.get(t.base||t,t.modified.concat(e).sort(((e,t)=>e.id-t.id)))}}let Pa=0;class Ta{constructor(){this.instances=[],this.id=Pa++}static get(e,t){if(!t.length)return e;let i=t[0].instances.find((i=>{return i.base==e&&(n=t,s=i.modified,n.length==s.length&&n.every(((e,t)=>e==s[t])));var n,s}));if(i)return i;let n=[],s=new ka(n,e,t);for(let e of t)e.instances.push(s);let r=function(e){let t=[[]];for(let i=0;i<e.length;i++)for(let n=0,s=t.length;n<s;n++)t.push(t[n].concat(e[i]));return t.sort(((e,t)=>t.length-e.length))}(t);for(let t of e.set)if(!t.modified.length)for(let e of r)n.push(Ta.get(t,e));return s}}function _a(e){let t=Object.create(null);for(let i in e){let n=e[i];Array.isArray(n)||(n=[n]);for(let e of i.split(" "))if(e){let i=[],s=2,r=e;for(let t=0;;){if("..."==r&&t>0&&t+3==e.length){s=1;break}let n=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(r);if(!n)throw new RangeError("Invalid path: "+e);if(i.push("*"==n[0]?"":'"'==n[0][0]?JSON.parse(n[0]):n[0]),t+=n[0].length,t==e.length)break;let o=e[t++];if(t==e.length&&"!"==o){s=0;break}if("/"!=o)throw new RangeError("Invalid path: "+e);r=e.slice(t)}let o=i.length-1,a=i[o];if(!a)throw new RangeError("Invalid path: "+e);let l=new Wa(n,s,o>0?i.slice(0,o):null);t[a]=l.sort(t[a])}}return Ca.add(t)}const Ca=new Eo;class Wa{constructor(e,t,i,n){this.tags=e,this.mode=t,this.context=i,this.next=n}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}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}}function Aa(e,t){let i=Object.create(null);for(let t of e)if(Array.isArray(t.tag))for(let e of t.tag)i[e.id]=t.class;else i[t.tag.id]=t.class;let{scope:n,all:s=null}=t||{};return{style:e=>{let t=s;for(let n of e)for(let e of n.set){let n=i[e.id];if(n){t=t?t+" "+n:n;break}}return t},scope:n}}function Za(e,t,i,n=0,s=e.length){let r=new Xa(n,Array.isArray(t)?t:[t],i);r.highlightRange(e.cursor(),n,s,"",r.highlighters),r.flush(s)}Wa.empty=new Wa([],2,null);class Xa{constructor(e,t,i){this.at=e,this.highlighters=t,this.span=i,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,i,n,s){let{type:r,from:o,to:a}=e;if(o>=i||a<=t)return;r.isTop&&(s=this.highlighters.filter((e=>!e.scope||e.scope(r))));let l=n,h=function(e){let t=e.type.prop(Ca);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}(e)||Wa.empty,c=function(e,t){let i=null;for(let n of e){let e=n.style(t);e&&(i=i?i+" "+e:e)}return i}(s,h.tags);if(c&&(l&&(l+=" "),l+=c,1==h.mode&&(n+=(n?" ":"")+c)),this.startSpan(e.from,l),h.opaque)return;let u=e.tree&&e.tree.prop(Eo.mounted);if(u&&u.overlay){let r=e.node.enter(u.overlay[0].from+o,1),h=this.highlighters.filter((e=>!e.scope||e.scope(u.tree.type))),c=e.firstChild();for(let d=0,f=o;;d++){let O=d<u.overlay.length?u.overlay[d]:null,p=O?O.from+o:a,m=Math.max(t,f),g=Math.min(i,p);if(m<g&&c)for(;e.from<g&&(this.highlightRange(e,m,g,n,s),this.startSpan(Math.min(g,e.to),l),!(e.to>=p)&&e.nextSibling()););if(!O||p>i)break;f=O.to+o,f>t&&(this.highlightRange(r.cursor(),Math.max(t,O.from+o),Math.min(i,f),n,h),this.startSpan(f,l))}c&&e.parent()}else if(e.firstChild()){do{if(!(e.to<=t)){if(e.from>=i)break;this.highlightRange(e,t,i,n,s),this.startSpan(Math.min(i,e.to),l)}}while(e.nextSibling());e.parent()}}}const Va=ka.define,Ra=Va(),qa=Va(),Ma=Va(qa),Ea=Va(qa),Da=Va(),Ia=Va(Da),Ua=Va(Da),Ya=Va(),ja=Va(Ya),Ba=Va(),Na=Va(),Ga=Va(),za=Va(Ga),La=Va(),Fa={comment:Ra,lineComment:Va(Ra),blockComment:Va(Ra),docComment:Va(Ra),name:qa,variableName:Va(qa),typeName:Ma,tagName:Va(Ma),propertyName:Ea,attributeName:Va(Ea),className:Va(qa),labelName:Va(qa),namespace:Va(qa),macroName:Va(qa),literal:Da,string:Ia,docString:Va(Ia),character:Va(Ia),attributeValue:Va(Ia),number:Ua,integer:Va(Ua),float:Va(Ua),bool:Va(Da),regexp:Va(Da),escape:Va(Da),color:Va(Da),url:Va(Da),keyword:Ba,self:Va(Ba),null:Va(Ba),atom:Va(Ba),unit:Va(Ba),modifier:Va(Ba),operatorKeyword:Va(Ba),controlKeyword:Va(Ba),definitionKeyword:Va(Ba),moduleKeyword:Va(Ba),operator:Na,derefOperator:Va(Na),arithmeticOperator:Va(Na),logicOperator:Va(Na),bitwiseOperator:Va(Na),compareOperator:Va(Na),updateOperator:Va(Na),definitionOperator:Va(Na),typeOperator:Va(Na),controlOperator:Va(Na),punctuation:Ga,separator:Va(Ga),bracket:za,angleBracket:Va(za),squareBracket:Va(za),paren:Va(za),brace:Va(za),content:Ya,heading:ja,heading1:Va(ja),heading2:Va(ja),heading3:Va(ja),heading4:Va(ja),heading5:Va(ja),heading6:Va(ja),contentSeparator:Va(Ya),list:Va(Ya),quote:Va(Ya),emphasis:Va(Ya),strong:Va(Ya),link:Va(Ya),monospace:Va(Ya),strikethrough:Va(Ya),inserted:Va(),deleted:Va(),changed:Va(),invalid:Va(),meta:La,documentMeta:Va(La),annotation:Va(La),processingInstruction:Va(La),definition:ka.defineModifier(),constant:ka.defineModifier(),function:ka.defineModifier(),standard:ka.defineModifier(),local:ka.defineModifier(),special:ka.defineModifier()};var Ha;Aa([{tag:Fa.link,class:"tok-link"},{tag:Fa.heading,class:"tok-heading"},{tag:Fa.emphasis,class:"tok-emphasis"},{tag:Fa.strong,class:"tok-strong"},{tag:Fa.keyword,class:"tok-keyword"},{tag:Fa.atom,class:"tok-atom"},{tag:Fa.bool,class:"tok-bool"},{tag:Fa.url,class:"tok-url"},{tag:Fa.labelName,class:"tok-labelName"},{tag:Fa.inserted,class:"tok-inserted"},{tag:Fa.deleted,class:"tok-deleted"},{tag:Fa.literal,class:"tok-literal"},{tag:Fa.string,class:"tok-string"},{tag:Fa.number,class:"tok-number"},{tag:[Fa.regexp,Fa.escape,Fa.special(Fa.string)],class:"tok-string2"},{tag:Fa.variableName,class:"tok-variableName"},{tag:Fa.local(Fa.variableName),class:"tok-variableName tok-local"},{tag:Fa.definition(Fa.variableName),class:"tok-variableName tok-definition"},{tag:Fa.special(Fa.variableName),class:"tok-variableName2"},{tag:Fa.definition(Fa.propertyName),class:"tok-propertyName tok-definition"},{tag:Fa.typeName,class:"tok-typeName"},{tag:Fa.namespace,class:"tok-namespace"},{tag:Fa.className,class:"tok-className"},{tag:Fa.macroName,class:"tok-macroName"},{tag:Fa.propertyName,class:"tok-propertyName"},{tag:Fa.operator,class:"tok-operator"},{tag:Fa.comment,class:"tok-comment"},{tag:Fa.meta,class:"tok-meta"},{tag:Fa.invalid,class:"tok-invalid"},{tag:Fa.punctuation,class:"tok-punctuation"}]);const Ja=new Eo;class Ka{constructor(e,t,i=[],n=""){this.data=e,this.name=n,Ne.prototype.hasOwnProperty("tree")||Object.defineProperty(Ne.prototype,"tree",{get(){return il(this)}}),this.parser=t,this.extension=[ul.of(this),Ne.languageData.of(((e,t,i)=>e.facet(el(e,t,i))))].concat(i)}isActiveAt(e,t,i=-1){return el(e,t,i)==this.data}findRegions(e){let t=e.facet(ul);if((null==t?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let i=[],n=(e,t)=>{if(e.prop(Ja)==this.data)return void i.push({from:t,to:t+e.length});let s=e.prop(Eo.mounted);if(s){if(s.tree.prop(Ja)==this.data){if(s.overlay)for(let e of s.overlay)i.push({from:e.from+t,to:e.to+t});else i.push({from:t,to:t+e.length});return}if(s.overlay){let e=i.length;if(n(s.tree,s.overlay[0].from+t),i.length>e)return}}for(let i=0;i<e.children.length;i++){let s=e.children[i];s instanceof Go&&n(s,e.positions[i]+t)}};return n(il(e),0),i}get allowsNesting(){return!0}}function el(e,t,i){let n=e.facet(ul);if(!n)return null;let s=n.data;if(n.allowsNesting)for(let n=il(e).topNode;n;n=n.enter(t,i,No.ExcludeBuffers))s=n.type.prop(Ja)||s;return s}Ka.setState=Ve.define();class tl extends Ka{constructor(e,t,i){super(e,t,[],i),this.parser=t}static define(e){let t=(i=e.languageData,he.define({combine:i?e=>e.concat(i):void 0}));var i;return new tl(t,e.parser.configure({props:[Ja.add((e=>e.isTop?t:void 0))]}),e.name)}configure(e,t){return new tl(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function il(e){let t=e.field(Ka.state,!1);return t?t.tree:Go.empty}class nl{constructor(e,t=e.length){this.doc=e,this.length=t,this.cursorPos=0,this.string="",this.cursor=e.iter()}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 i=this.cursorPos-this.string.length;return e<i||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-i,t-i)}}let sl=null;class rl{constructor(e,t,i=[],n,s,r,o,a){this.parser=e,this.state=t,this.fragments=i,this.tree=n,this.treeLen=s,this.viewport=r,this.skipped=o,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,t,i){return new rl(e,t,[],Go.empty,0,i,[],null)}startParse(){return this.parser.startParse(new nl(this.state.doc),this.fragments)}work(e,t){return null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=Go.empty&&this.isDone(null!=t?t:this.state.doc.length)?(this.takeTree(),!0):this.withContext((()=>{var i;if("number"==typeof e){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||(this.parse=this.startParse()),null!=t&&(null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let n=this.parse.advance();if(n){if(this.fragments=this.withoutTempSkipped(ca.addTree(n,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!==(i=this.parse.stoppedAt)&&void 0!==i?i:this.state.doc.length,this.tree=n,this.parse=null,!(this.treeLen<(null!=t?t:this.state.doc.length)))return!0;this.parse=this.startParse()}if(e())return!1}}))}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||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(ca.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=sl;sl=this;try{return e()}finally{sl=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=ol(e,t.from,t.to);return e}changes(e,t){let{fragments:i,tree:n,treeLen:s,viewport:r,skipped:o}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges(((e,i,n,s)=>t.push({fromA:e,toA:i,fromB:n,toB:s}))),i=ca.applyChanges(i,t),n=Go.empty,s=0,r={from:e.mapPos(r.from,-1),to:e.mapPos(r.to,1)},this.skipped.length){o=[];for(let t of this.skipped){let i=e.mapPos(t.from,1),n=e.mapPos(t.to,-1);i<n&&o.push({from:i,to:n})}}}return new rl(this.parser,t,i,n,s,r,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 t=0;t<this.skipped.length;t++){let{from:i,to:n}=this.skipped[t];i<e.to&&n>e.from&&(this.fragments=ol(this.fragments,i,n),this.skipped.splice(t--,1))}return!(this.skipped.length>=t||(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 ua{createParse(t,i,n){let s=n[0].from,r=n[n.length-1].to;return{parsedPos:s,advance(){let t=sl;if(t){for(let e of n)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=r,new Go(Uo.none,[],[],r-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&0==t[0].from&&t[0].to>=e}static get(){return sl}}function ol(e,t,i){return ca.applyChanges(e,[{fromA:t,toA:i,fromB:t,toB:i}])}class al{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),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,i)||t.takeTree(),new al(t)}static init(e){let t=Math.min(3e3,e.doc.length),i=rl.create(e.facet(ul).parser,e,{from:0,to:t});return i.work(20,t)||i.takeTree(),new al(i)}}Ka.state=me.define({create:al.init,update(e,t){for(let e of t.effects)if(e.is(Ka.setState))return e.value;return t.startState.facet(ul)!=t.state.facet(ul)?al.init(t.state):e.apply(t)}});let ll=e=>{let t=setTimeout((()=>e()),500);return()=>clearTimeout(t)};"undefined"!=typeof requestIdleCallback&&(ll=e=>{let t=-1,i=setTimeout((()=>{t=requestIdleCallback(e,{timeout:400})}),100);return()=>t<0?clearTimeout(i):cancelIdleCallback(t)});const hl="undefined"!=typeof navigator&&(null===(Ha=navigator.scheduling)||void 0===Ha?void 0:Ha.isInputPending)?()=>navigator.scheduling.isInputPending():null,cl=Fi.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(Ka.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),e.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Ka.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=ll(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:i,viewport:{to:n}}=this.view,s=i.field(Ka.state);if(s.tree==s.context.tree&&s.context.isDone(n+1e5))return;let r=Date.now()+Math.min(this.chunkBudget,100,e&&!hl?Math.max(25,e.timeRemaining()-5):1e9),o=s.context.treeLen<n&&i.doc.length>n+1e3,a=s.context.work((()=>hl&&hl()||Date.now()>r),n+(o?0:1e5));this.chunkBudget-=Date.now()-t,(a||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:Ka.setState.of(new al(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((e=>Ni(this.view.state,e))).then((()=>this.workScheduled--)),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),ul=he.define({combine:e=>e.length?e[0]:null,enables:e=>[Ka.state,cl,Ks.contentAttributes.compute([e],(t=>{let i=t.facet(e);return i&&i.name?{"data-language":i.name}:{}}))]});class dl{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const fl=he.define(),Ol=he.define({combine:e=>{if(!e.length)return" ";if(!/^(?: +|\t+)$/.test(e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(e[0]));return e[0]}});function pl(e){let t=e.facet(Ol);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function ml(e,t){let i="",n=e.tabSize;if(9==e.facet(Ol).charCodeAt(0))for(;t>=n;)i+="\t",t-=n;for(let e=0;e<t;e++)i+=" ";return i}function gl(e,t){e instanceof Ne&&(e=new Ql(e));for(let i of e.state.facet(fl)){let n=i(e,t);if(void 0!==n)return n}let i=il(e.state);return i?function(e,t,i){return bl(t.resolveInner(i).enterUnfinishedNodesBefore(i),i,e)}(e,i,t):null}class Ql{constructor(e,t={}){this.state=e,this.options=t,this.unit=pl(e)}lineAt(e,t=1){let i=this.state.doc.lineAt(e),{simulateBreak:n,simulateDoubleBreak:s}=this.options;return null!=n&&n>=i.from&&n<=i.to?s&&n==e?{text:"",from:e}:(t<0?n<e:n<=e)?{text:i.text.slice(n-i.from),from:n}:{text:i.text.slice(0,n-i.from),from:i.from}:i}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:i,from:n}=this.lineAt(e,t);return i.slice(e-n,Math.min(i.length,e+100-n))}column(e,t=1){let{text:i,from:n}=this.lineAt(e,t),s=this.countColumn(i,e-n),r=this.options.overrideIndentation?this.options.overrideIndentation(n):-1;return r>-1&&(s+=r-this.countColumn(i,i.search(/\S|$/))),s}countColumn(e,t=e.length){return ct(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:i,from:n}=this.lineAt(e,t),s=this.options.overrideIndentation;if(s){let e=s(n);if(e>-1)return e}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Sl=new Eo;function vl(e){let t=e.type.prop(Sl);if(t)return t;let i,n=e.firstChild;if(n&&(i=n.type.prop(Eo.closedBy))){let t=e.lastChild,n=t&&i.indexOf(t.name)>-1;return e=>kl(e,!0,1,void 0,n&&!function(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}(e)?t.from:void 0)}return null==e.parent?yl:null}function bl(e,t,i){for(;e;e=e.parent){let n=vl(e);if(n)return n(wl.create(i,t,e))}return null}function yl(){return 0}class wl extends Ql{constructor(e,t,i){super(e.state,e.options),this.base=e,this.pos=t,this.node=i}static create(e,t,i){return new wl(e,t,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){let e=this.state.doc.lineAt(this.node.from);for(;;){let t=this.node.resolve(e.from);for(;t.parent&&t.parent.from==t.from;)t=t.parent;if(xl(t,this.node))break;e=this.state.doc.lineAt(t.from)}return this.lineIndent(e.from)}continue(){let e=this.node.parent;return e?bl(e,this.pos,this.base):0}}function xl(e,t){for(let i=t;i;i=i.parent)if(e==i)return!0;return!1}function $l({closing:e,align:t=!0,units:i=1}){return n=>kl(n,t,i,e)}function kl(e,t,i,n,s){let r=e.textAfter,o=r.match(/^\s*/)[0].length,a=n&&r.slice(o,o+n.length)==n||s==e.pos+o,l=t?function(e){let t=e.node,i=t.childAfter(t.from),n=t.lastChild;if(!i)return null;let s=e.options.simulateBreak,r=e.state.doc.lineAt(i.from),o=null==s||s<=r.from?r.to:Math.min(r.to,s);for(let e=i.to;;){let s=t.childAfter(e);if(!s||s==n)return null;if(!s.type.isSkipped)return s.from<o?i:null;e=s.to}}(e):null;return l?a?e.column(l.from):e.column(l.to):e.baseIndent+(a?0:e.unit*i)}function Pl({except:e,units:t=1}={}){return i=>{let n=e&&e.test(i.textAfter);return i.baseIndent+(n?0:t*i.unit)}}const Tl=he.define(),_l=new Eo;function Cl(e){let t=e.firstChild,i=e.lastChild;return t&&t.to<i.from?{from:t.to,to:i.type.isError?e.to:i.from}:null}function Wl(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}function Al(e,t,i){for(let n of e.facet(Tl)){let s=n(e,t,i);if(s)return s}return function(e,t,i){let n=il(e);if(n.length<i)return null;let s=null;for(let r=n.resolveInner(i,1);r;r=r.parent){if(r.to<=i||r.from>i)continue;if(s&&r.from<t)break;let o=r.type.prop(_l);if(o&&(r.to<n.length-50||n.length==e.doc.length||!Wl(r))){let n=o(r,e);n&&n.from<=i&&n.from>=t&&n.to>i&&(s=n)}}return s}(e,t,i)}function Zl(e,t){let i=t.mapPos(e.from,1),n=t.mapPos(e.to,-1);return i>=n?void 0:{from:i,to:n}}const Xl=Ve.define({map:Zl}),Vl=Ve.define({map:Zl});function Rl(e){let t=[];for(let{head:i}of e.state.selection.ranges)t.some((e=>e.from<=i&&e.to>=i))||t.push(e.lineBlockAt(i));return t}const ql=me.define({create:()=>$i.none,update(e,t){e=e.map(t.changes);for(let i of t.effects)i.is(Xl)&&!El(e,i.value.from,i.value.to)?e=e.update({add:[Nl.range(i.value.from,i.value.to)]}):i.is(Vl)&&(e=e.update({filter:(e,t)=>i.value.from!=e||i.value.to!=t,filterFrom:i.value.from,filterTo:i.value.to}));if(t.selection){let i=!1,{head:n}=t.selection.main;e.between(n,n,((e,t)=>{e<n&&t>n&&(i=!0)})),i&&(e=e.update({filterFrom:n,filterTo:n,filter:(e,t)=>t<=n||e>=n}))}return e},provide:e=>Ks.decorations.from(e),toJSON(e,t){let i=[];return e.between(0,t.doc.length,((e,t)=>{i.push(e,t)})),i},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw new RangeError("Invalid JSON for fold state");let t=[];for(let i=0;i<e.length;){let n=e[i++],s=e[i++];if("number"!=typeof n||"number"!=typeof s)throw new RangeError("Invalid JSON for fold state");t.push(Nl.range(n,s))}return $i.set(t,!0)}});function Ml(e,t,i){var n;let s=null;return null===(n=e.field(ql,!1))||void 0===n||n.between(t,i,((e,t)=>{(!s||s.from>e)&&(s={from:e,to:t})})),s}function El(e,t,i){let n=!1;return e.between(t,t,((e,s)=>{e==t&&s==i&&(n=!0)})),n}function Dl(e,t){return e.field(ql,!1)?t:t.concat(Ve.appendConfig.of(Bl()))}function Il(e,t,i=!0){let n=e.state.doc.lineAt(t.from).number,s=e.state.doc.lineAt(t.to).number;return Ks.announce.of(`${e.state.phrase(i?"Folded lines":"Unfolded lines")} ${n} ${e.state.phrase("to")} ${s}.`)}const Ul=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:e=>{for(let t of Rl(e)){let i=Al(e.state,t.from,t.to);if(i)return e.dispatch({effects:Dl(e.state,[Xl.of(i),Il(e,i)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:e=>{if(!e.state.field(ql,!1))return!1;let t=[];for(let i of Rl(e)){let n=Ml(e.state,i.from,i.to);n&&t.push(Vl.of(n),Il(e,n,!1))}return t.length&&e.dispatch({effects:t}),t.length>0}},{key:"Ctrl-Alt-[",run:e=>{let{state:t}=e,i=[];for(let n=0;n<t.doc.length;){let s=e.lineBlockAt(n),r=Al(t,s.from,s.to);r&&i.push(Xl.of(r)),n=(r?e.lineBlockAt(r.to):s).to+1}return i.length&&e.dispatch({effects:Dl(e.state,i)}),!!i.length}},{key:"Ctrl-Alt-]",run:e=>{let t=e.state.field(ql,!1);if(!t||!t.size)return!1;let i=[];return t.between(0,e.state.doc.length,((e,t)=>{i.push(Vl.of({from:e,to:t}))})),e.dispatch({effects:i}),!0}}],Yl={placeholderDOM:null,placeholderText:"…"},jl=he.define({combine:e=>Ge(e,Yl)});function Bl(e){let t=[ql,Ll];return e&&t.push(jl.of(e)),t}const Nl=$i.replace({widget:new class extends wi{toDOM(e){let{state:t}=e,i=t.facet(jl),n=t=>{let i=e.lineBlockAt(e.posAtDOM(t.target)),n=Ml(e.state,i.from,i.to);n&&e.dispatch({effects:Vl.of(n)}),t.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(e,n);let s=document.createElement("span");return s.textContent=i.placeholderText,s.setAttribute("aria-label",t.phrase("folded code")),s.title=t.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=n,s}}}),Gl={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class zl extends po{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}}const Ll=Ks.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Fl{constructor(e,t){let i;function n(e){let t=pt.newName();return(i||(i=Object.create(null)))["."+t]=e,t}this.specs=e;const s="string"==typeof t.all?t.all:t.all?n(t.all):void 0,r=t.scope;this.scope=r instanceof Ka?e=>e.prop(Ja)==r.data:r?e=>e==r:void 0,this.style=Aa(e.map((e=>({tag:e.tag,class:e.class||n(Object.assign({},e,{tag:null}))}))),{all:s}).style,this.module=i?new pt(i):null,this.themeType=t.themeType}static define(e,t){return new Fl(e,t||{})}}const Hl=he.define(),Jl=he.define({combine:e=>e.length?[e[0]]:null});function Kl(e){let t=e.facet(Hl);return t.length?t:e.facet(Jl)}function eh(e,t){let i,n=[ih];return e instanceof Fl&&(e.module&&n.push(Ks.styleModule.of(e.module)),i=e.themeType),(null==t?void 0:t.fallback)?n.push(Jl.of(e)):i?n.push(Hl.computeN([Ks.darkTheme],(t=>t.facet(Ks.darkTheme)==("dark"==i)?[e]:[]))):n.push(Hl.of(e)),n}class th{constructor(e){this.markCache=Object.create(null),this.tree=il(e.state),this.decorations=this.buildDeco(e,Kl(e.state))}update(e){let t=il(e.state),i=Kl(e.state),n=i!=Kl(e.startState);t.length<e.view.viewport.to&&!n&&t.type==this.tree.type?this.decorations=this.decorations.map(e.changes):(t!=this.tree||e.viewportChanged||n)&&(this.tree=t,this.decorations=this.buildDeco(e.view,i))}buildDeco(e,t){if(!t||!this.tree.length)return $i.none;let i=new Ke;for(let{from:n,to:s}of e.visibleRanges)Za(this.tree,t,((e,t,n)=>{i.add(e,t,this.markCache[n]||(this.markCache[n]=$i.mark({class:n})))}),n,s);return i.finish()}}const ih=Qe.high(Fi.fromClass(th,{decorations:e=>e.decorations})),nh=Fl.define([{tag:Fa.meta,color:"#404740"},{tag:Fa.link,textDecoration:"underline"},{tag:Fa.heading,textDecoration:"underline",fontWeight:"bold"},{tag:Fa.emphasis,fontStyle:"italic"},{tag:Fa.strong,fontWeight:"bold"},{tag:Fa.strikethrough,textDecoration:"line-through"},{tag:Fa.keyword,color:"#708"},{tag:[Fa.atom,Fa.bool,Fa.url,Fa.contentSeparator,Fa.labelName],color:"#219"},{tag:[Fa.literal,Fa.inserted],color:"#164"},{tag:[Fa.string,Fa.deleted],color:"#a11"},{tag:[Fa.regexp,Fa.escape,Fa.special(Fa.string)],color:"#e40"},{tag:Fa.definition(Fa.variableName),color:"#00f"},{tag:Fa.local(Fa.variableName),color:"#30a"},{tag:[Fa.typeName,Fa.namespace],color:"#085"},{tag:Fa.className,color:"#167"},{tag:[Fa.special(Fa.variableName),Fa.macroName],color:"#256"},{tag:Fa.definition(Fa.propertyName),color:"#00c"},{tag:Fa.comment,color:"#940"},{tag:Fa.invalid,color:"#f00"}]),sh=Ks.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),rh="()[]{}",oh=he.define({combine:e=>Ge(e,{afterCursor:!0,brackets:rh,maxScanDistance:1e4,renderMatch:hh})}),ah=$i.mark({class:"cm-matchingBracket"}),lh=$i.mark({class:"cm-nonmatchingBracket"});function hh(e){let t=[],i=e.matched?ah:lh;return t.push(i.range(e.start.from,e.start.to)),e.end&&t.push(i.range(e.end.from,e.end.to)),t}const ch=me.define({create:()=>$i.none,update(e,t){if(!t.docChanged&&!t.selection)return e;let i=[],n=t.state.facet(oh);for(let e of t.state.selection.ranges){if(!e.empty)continue;let s=fh(t.state,e.head,-1,n)||e.head>0&&fh(t.state,e.head-1,1,n)||n.afterCursor&&(fh(t.state,e.head,1,n)||e.head<t.state.doc.length&&fh(t.state,e.head+1,-1,n));s&&(i=i.concat(n.renderMatch(s,t.state)))}return $i.set(i,!0)},provide:e=>Ks.decorations.from(e)}),uh=[ch,sh];function dh(e,t,i){let n=e.prop(t<0?Eo.openedBy:Eo.closedBy);if(n)return n;if(1==e.name.length){let n=i.indexOf(e.name);if(n>-1&&n%2==(t<0?1:0))return[i[n+t]]}return null}function fh(e,t,i,n={}){let s=n.maxScanDistance||1e4,r=n.brackets||rh,o=il(e),a=o.resolveInner(t,i);for(let e=a;e;e=e.parent){let t=dh(e.type,i,r);if(t&&e.from<e.to)return Oh(0,0,i,e,t,r)}return function(e,t,i,n,s,r,o){let a=i<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),l=o.indexOf(a);if(l<0||l%2==0!=i>0)return null;let h={from:i<0?t-1:t,to:i>0?t+1:t},c=e.doc.iterRange(t,i>0?e.doc.length:0),u=0;for(let e=0;!c.next().done&&e<=r;){let r=c.value;i<0&&(e+=r.length);let a=t+e*i;for(let e=i>0?0:r.length-1,t=i>0?r.length:-1;e!=t;e+=i){let t=o.indexOf(r[e]);if(!(t<0||n.resolveInner(a+e,1).type!=s))if(t%2==0==i>0)u++;else{if(1==u)return{start:h,end:{from:a+e,to:a+e+1},matched:t>>1==l>>1};u--}}i>0&&(e+=r.length)}return c.done?{start:h,matched:!1}:null}(e,t,i,o,a.type,s,r)}function Oh(e,t,i,n,s,r){let o=n.parent,a={from:n.from,to:n.to},l=0,h=null==o?void 0:o.cursor();if(h&&(i<0?h.childBefore(n.from):h.childAfter(n.to)))do{if(i<0?h.to<=n.from:h.from>=n.to){if(0==l&&s.indexOf(h.type.name)>-1&&h.from<h.to)return{start:a,end:{from:h.from,to:h.to},matched:!0};if(dh(h.type,i,r))l++;else if(dh(h.type,-i,r)){if(0==l)return{start:a,end:h.from==h.to?void 0:{from:h.from,to:h.to},matched:!1};l--}}}while(i<0?h.prevSibling():h.nextSibling());return{start:a,matched:!1}}const ph=Object.create(null),mh=[Uo.none],gh=[],Qh=Object.create(null);for(let[e,t]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"]])Qh[e]=vh(ph,t);function Sh(e,t){gh.indexOf(e)>-1||(gh.push(e),console.warn(t))}function vh(e,t){let i=null;for(let n of t.split(".")){let t=e[n]||Fa[n];t?"function"==typeof t?i?i=t(i):Sh(n,`Modifier ${n} used at start of tag`):i?Sh(n,`Tag ${n} used as modifier`):i=t:Sh(n,`Unknown highlighting tag ${n}`)}if(!i)return 0;let n=t.replace(/ /g,"_"),s=Uo.define({id:mh.length,name:n,props:[_a({[n]:i})]});return mh.push(s),s.id}function bh(e,t){return({state:i,dispatch:n})=>{if(i.readOnly)return!1;let s=e(t,i);return!!s&&(n(i.update(s)),!0)}}const yh=bh(Ph,0),wh=bh(kh,0),xh=bh(((e,t)=>kh(e,t,function(e){let t=[];for(let i of e.selection.ranges){let n=e.doc.lineAt(i.from),s=i.to<=n.to?n:e.doc.lineAt(i.to),r=t.length-1;r>=0&&t[r].to>n.from?t[r].to=s.to:t.push({from:n.from,to:s.to})}return t}(t))),0);function $h(e,t){let i=e.languageDataAt("commentTokens",t);return i.length?i[0]:{}}function kh(e,t,i=t.selection.ranges){let n=i.map((e=>$h(t,e.from).block));if(!n.every((e=>e)))return null;let s=i.map(((e,i)=>function(e,{open:t,close:i},n,s){let r,o,a=e.sliceDoc(n-50,n),l=e.sliceDoc(s,s+50),h=/\s*$/.exec(a)[0].length,c=/^\s*/.exec(l)[0].length,u=a.length-h;if(a.slice(u-t.length,u)==t&&l.slice(c,c+i.length)==i)return{open:{pos:n-h,margin:h&&1},close:{pos:s+c,margin:c&&1}};s-n<=100?r=o=e.sliceDoc(n,s):(r=e.sliceDoc(n,n+50),o=e.sliceDoc(s-50,s));let d=/^\s*/.exec(r)[0].length,f=/\s*$/.exec(o)[0].length,O=o.length-f-i.length;return r.slice(d,d+t.length)==t&&o.slice(O,O+i.length)==i?{open:{pos:n+d+t.length,margin:/\s/.test(r.charAt(d+t.length))?1:0},close:{pos:s-f-i.length,margin:/\s/.test(o.charAt(O-1))?1:0}}:null}(t,n[i],e.from,e.to)));if(2!=e&&!s.every((e=>e)))return{changes:t.changes(i.map(((e,t)=>s[t]?[]:[{from:e.from,insert:n[t].open+" "},{from:e.to,insert:" "+n[t].close}])))};if(1!=e&&s.some((e=>e))){let e=[];for(let t,i=0;i<s.length;i++)if(t=s[i]){let s=n[i],{open:r,close:o}=t;e.push({from:r.pos-s.open.length,to:r.pos+r.margin},{from:o.pos-o.margin,to:o.pos+s.close.length})}return{changes:e}}return null}function Ph(e,t,i=t.selection.ranges){let n=[],s=-1;for(let{from:e,to:r}of i){let i=n.length,o=1e9;for(let i=e;i<=r;){let a=t.doc.lineAt(i);if(a.from>s&&(e==r||r>a.from)){s=a.from;let e=$h(t,a.from).line;if(!e)continue;let i=/^\s*/.exec(a.text)[0].length,r=i==a.length,l=a.text.slice(i,i+e.length)==e?i:-1;i<a.text.length&&i<o&&(o=i),n.push({line:a,comment:l,token:e,indent:i,empty:r,single:!1})}i=a.to+1}if(o<1e9)for(let e=i;e<n.length;e++)n[e].indent<n[e].line.text.length&&(n[e].indent=o);n.length==i+1&&(n[i].single=!0)}if(2!=e&&n.some((e=>e.comment<0&&(!e.empty||e.single)))){let e=[];for(let{line:t,token:i,indent:s,empty:r,single:o}of n)!o&&r||e.push({from:t.from+s,insert:i+" "});let i=t.changes(e);return{changes:i,selection:t.selection.map(i,1)}}if(1!=e&&n.some((e=>e.comment>=0))){let e=[];for(let{line:t,comment:i,token:s}of n)if(i>=0){let n=t.from+i,r=n+s.length;" "==t.text[r-t.from]&&r++,e.push({from:n,to:r})}return{changes:e}}return null}const Th=Ae.define(),_h=Ae.define(),Ch=he.define(),Wh=he.define({combine:e=>Ge(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(i,n)=>e(i,n)||t(i,n)})}),Ah=me.define({create:()=>Gh.empty,update(e,t){let i=t.state.facet(Wh),n=t.annotation(Th);if(n){let s=t.docChanged?oe.single(function(e){let t=0;return e.iterChangedRanges(((e,i)=>t=i)),t}(t.changes)):void 0,r=Mh.fromTransaction(t,s),o=n.side,a=0==o?e.undone:e.done;return a=r?Eh(a,a.length,i.minDepth,r):Uh(a,t.startState.selection),new Gh(0==o?n.rest:a,0==o?a:n.rest)}let s=t.annotation(_h);if("full"!=s&&"before"!=s||(e=e.isolate()),!1===t.annotation(Re.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let r=Mh.fromTransaction(t),o=t.annotation(Re.time),a=t.annotation(Re.userEvent);return r?e=e.addChanges(r,o,a,i,t):t.selection&&(e=e.addSelection(t.startState.selection,o,a,i.newGroupDelay)),"full"!=s&&"after"!=s||(e=e.isolate()),e},toJSON:e=>({done:e.done.map((e=>e.toJSON())),undone:e.undone.map((e=>e.toJSON()))}),fromJSON:e=>new Gh(e.done.map(Mh.fromJSON),e.undone.map(Mh.fromJSON))});function Zh(e,t){return function({state:i,dispatch:n}){if(!t&&i.readOnly)return!1;let s=i.field(Ah,!1);if(!s)return!1;let r=s.pop(e,i,t);return!!r&&(n(r),!0)}}const Xh=Zh(0,!1),Vh=Zh(1,!1),Rh=Zh(0,!0),qh=Zh(1,!0);class Mh{constructor(e,t,i,n,s){this.changes=e,this.effects=t,this.mapped=i,this.startSelection=n,this.selectionsAfter=s}setSelAfter(e){return new Mh(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,i;return{changes:null===(e=this.changes)||void 0===e?void 0:e.toJSON(),mapped:null===(t=this.mapped)||void 0===t?void 0:t.toJSON(),startSelection:null===(i=this.startSelection)||void 0===i?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map((e=>e.toJSON()))}}static fromJSON(e){return new Mh(e.changes&&J.fromJSON(e.changes),[],e.mapped&&H.fromJSON(e.mapped),e.startSelection&&oe.fromJSON(e.startSelection),e.selectionsAfter.map(oe.fromJSON))}static fromTransaction(e,t){let i=Ih;for(let t of e.startState.facet(Ch)){let n=t(e);n.length&&(i=i.concat(n))}return!i.length&&e.changes.empty?null:new Mh(e.changes.invert(e.startState.doc),i,void 0,t||e.startState.selection,Ih)}static selection(e){return new Mh(void 0,Ih,void 0,void 0,e)}}function Eh(e,t,i,n){let s=t+1>i+20?t-i-1:0,r=e.slice(s,t);return r.push(n),r}function Dh(e,t){return e.length?t.length?e.concat(t):e:t}const Ih=[];function Uh(e,t){if(e.length){let i=e[e.length-1],n=i.selectionsAfter.slice(Math.max(0,i.selectionsAfter.length-200));return n.length&&n[n.length-1].eq(t)?e:(n.push(t),Eh(e,e.length-1,1e9,i.setSelAfter(n)))}return[Mh.selection([t])]}function Yh(e){let t=e[e.length-1],i=e.slice();return i[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),i}function jh(e,t){if(!e.length)return e;let i=e.length,n=Ih;for(;i;){let s=Bh(e[i-1],t,n);if(s.changes&&!s.changes.empty||s.effects.length){let t=e.slice(0,i);return t[i-1]=s,t}t=s.mapped,i--,n=s.selectionsAfter}return n.length?[Mh.selection(n)]:Ih}function Bh(e,t,i){let n=Dh(e.selectionsAfter.length?e.selectionsAfter.map((e=>e.map(t))):Ih,i);if(!e.changes)return Mh.selection(n);let s=e.changes.map(t),r=t.mapDesc(e.changes,!0),o=e.mapped?e.mapped.composeDesc(r):r;return new Mh(s,Ve.mapEffects(e.effects,t),o,e.startSelection.map(r),n)}const Nh=/^(input\.type|delete)($|\.)/;class Gh{constructor(e,t,i=0,n){this.done=e,this.undone=t,this.prevTime=i,this.prevUserEvent=n}isolate(){return this.prevTime?new Gh(this.done,this.undone):this}addChanges(e,t,i,n,s){let r=this.done,o=r[r.length-1];return r=o&&o.changes&&!o.changes.empty&&e.changes&&(!i||Nh.test(i))&&(!o.selectionsAfter.length&&t-this.prevTime<n.newGroupDelay&&n.joinToEvent(s,function(e,t){let i=[],n=!1;return e.iterChangedRanges(((e,t)=>i.push(e,t))),t.iterChangedRanges(((e,t,s,r)=>{for(let e=0;e<i.length;){let t=i[e++],o=i[e++];r>=t&&s<=o&&(n=!0)}})),n}(o.changes,e.changes))||"input.type.compose"==i)?Eh(r,r.length-1,n.minDepth,new Mh(e.changes.compose(o.changes),Dh(e.effects,o.effects),o.mapped,o.startSelection,Ih)):Eh(r,r.length,n.minDepth,e),new Gh(r,Ih,t,i)}addSelection(e,t,i,n){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:Ih;return s.length>0&&t-this.prevTime<n&&i==this.prevUserEvent&&i&&/^select($|\.)/.test(i)&&(r=s[s.length-1],o=e,r.ranges.length==o.ranges.length&&0===r.ranges.filter(((e,t)=>e.empty!=o.ranges[t].empty)).length)?this:new Gh(Uh(this.done,e),this.undone,t,i);var r,o}addMapping(e){return new Gh(jh(this.done,e),jh(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,i){let n=0==e?this.done:this.undone;if(0==n.length)return null;let s=n[n.length-1];if(i&&s.selectionsAfter.length)return t.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:Th.of({side:e,rest:Yh(n)}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let i=1==n.length?Ih:n.slice(0,n.length-1);return s.mapped&&(i=jh(i,s.mapped)),t.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:Th.of({side:e,rest:i}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}return null}}Gh.empty=new Gh(Ih,Ih);const zh=[{key:"Mod-z",run:Xh,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Vh,preventDefault:!0},{linux:"Ctrl-Shift-z",run:Vh,preventDefault:!0},{key:"Mod-u",run:Rh,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:qh,preventDefault:!0}];function Lh(e,t){return oe.create(e.ranges.map(t),e.mainIndex)}function Fh(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function Hh({state:e,dispatch:t},i){let n=Lh(e.selection,i);return!n.eq(e.selection)&&(t(Fh(e,n)),!0)}function Jh(e,t){return oe.cursor(t?e.to:e.from)}function Kh(e,t){return Hh(e,(i=>i.empty?e.moveByChar(i,t):Jh(i,t)))}function ec(e){return e.textDirectionAt(e.state.selection.main.head)==an.LTR}const tc=e=>Kh(e,!ec(e)),ic=e=>Kh(e,ec(e));function nc(e,t){return Hh(e,(i=>i.empty?e.moveByGroup(i,t):Jh(i,t)))}function sc(e,t,i){if(t.type.prop(i))return!0;let n=t.to-t.from;return n&&(n>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function rc(e,t,i){let n,s,r=il(e).resolveInner(t.head),o=i?Eo.closedBy:Eo.openedBy;for(let n=t.head;;){let t=i?r.childAfter(n):r.childBefore(n);if(!t)break;sc(e,t,o)?r=t:n=i?t.to:t.from}return s=r.type.prop(o)&&(n=i?fh(e,r.from,1):fh(e,r.to,-1))&&n.matched?i?n.end.to:n.end.from:i?r.to:r.from,oe.cursor(s,i?-1:1)}function oc(e,t){return Hh(e,(i=>{if(!i.empty)return Jh(i,t);let n=e.moveVertically(i,t);return n.head!=i.head?n:e.moveToLineBoundary(i,t)}))}const ac=e=>oc(e,!1),lc=e=>oc(e,!0);function hc(e){let t,i=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,n=0,s=0;if(i){for(let t of e.state.facet(Ks.scrollMargins)){let i=t(e);(null==i?void 0:i.top)&&(n=Math.max(null==i?void 0:i.top,n)),(null==i?void 0:i.bottom)&&(s=Math.max(null==i?void 0:i.bottom,s))}t=e.scrollDOM.clientHeight-n-s}else t=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:s,selfScroll:i,height:Math.max(e.defaultLineHeight,t-5)}}function cc(e,t){let i,n=hc(e),{state:s}=e,r=Lh(s.selection,(i=>i.empty?e.moveVertically(i,t,n.height):Jh(i,t)));if(r.eq(s.selection))return!1;if(n.selfScroll){let t=e.coordsAtPos(s.selection.main.head),o=e.scrollDOM.getBoundingClientRect(),a=o.top+n.marginTop,l=o.bottom-n.marginBottom;t&&t.top>a&&t.bottom<l&&(i=Ks.scrollIntoView(r.main.head,{y:"start",yMargin:t.top-a}))}return e.dispatch(Fh(s,r),{effects:i}),!0}const uc=e=>cc(e,!1),dc=e=>cc(e,!0);function fc(e,t,i){let n=e.lineBlockAt(t.head),s=e.moveToLineBoundary(t,i);if(s.head==t.head&&s.head!=(i?n.to:n.from)&&(s=e.moveToLineBoundary(t,i,!1)),!i&&s.head==n.from&&n.length){let i=/^\s*/.exec(e.state.sliceDoc(n.from,Math.min(n.from+100,n.to)))[0].length;i&&t.head!=n.from+i&&(s=oe.cursor(n.from+i))}return s}function Oc(e,t){let i=Lh(e.state.selection,(e=>{let i=t(e);return oe.range(e.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)}));return!i.eq(e.state.selection)&&(e.dispatch(Fh(e.state,i)),!0)}function pc(e,t){return Oc(e,(i=>e.moveByChar(i,t)))}const mc=e=>pc(e,!ec(e)),gc=e=>pc(e,ec(e));function Qc(e,t){return Oc(e,(i=>e.moveByGroup(i,t)))}function Sc(e,t){return Oc(e,(i=>e.moveVertically(i,t)))}const vc=e=>Sc(e,!1),bc=e=>Sc(e,!0);function yc(e,t){return Oc(e,(i=>e.moveVertically(i,t,hc(e).height)))}const wc=e=>yc(e,!1),xc=e=>yc(e,!0),$c=({state:e,dispatch:t})=>(t(Fh(e,{anchor:0})),!0),kc=({state:e,dispatch:t})=>(t(Fh(e,{anchor:e.doc.length})),!0),Pc=({state:e,dispatch:t})=>(t(Fh(e,{anchor:e.selection.main.anchor,head:0})),!0),Tc=({state:e,dispatch:t})=>(t(Fh(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0);function _c(e,t){if(e.state.readOnly)return!1;let i="delete.selection",{state:n}=e,s=n.changeByRange((n=>{let{from:s,to:r}=n;if(s==r){let n=t(s);n<s?(i="delete.backward",n=Cc(e,n,!1)):n>s&&(i="delete.forward",n=Cc(e,n,!0)),s=Math.min(s,n),r=Math.max(r,n)}else s=Cc(e,s,!1),r=Cc(e,r,!0);return s==r?{range:n}:{changes:{from:s,to:r},range:oe.cursor(s)}}));return!s.changes.empty&&(e.dispatch(n.update(s,{scrollIntoView:!0,userEvent:i,effects:"delete.selection"==i?Ks.announce.of(n.phrase("Selection deleted")):void 0})),!0)}function Cc(e,t,i){if(e instanceof Ks)for(let n of e.state.facet(Ks.atomicRanges).map((t=>t(e))))n.between(t,t,((e,n)=>{e<t&&n>t&&(t=i?n:e)}));return t}const Wc=(e,t)=>_c(e,(i=>{let n,s,{state:r}=e,o=r.doc.lineAt(i);if(!t&&i>o.from&&i<o.from+200&&!/[^ \t]/.test(n=o.text.slice(0,i-o.from))){if("\t"==n[n.length-1])return i-1;let e=ct(n,r.tabSize)%pl(r)||pl(r);for(let t=0;t<e&&" "==n[n.length-1-t];t++)i--;s=i}else s=I(o.text,i-o.from,t,t)+o.from,s==i&&o.number!=(t?r.doc.lines:1)&&(s+=t?1:-1);return s})),Ac=e=>Wc(e,!1),Zc=e=>Wc(e,!0),Xc=(e,t)=>_c(e,(i=>{let n=i,{state:s}=e,r=s.doc.lineAt(n),o=s.charCategorizer(n);for(let e=null;;){if(n==(t?r.to:r.from)){n==i&&r.number!=(t?s.doc.lines:1)&&(n+=t?1:-1);break}let a=I(r.text,n-r.from,t)+r.from,l=r.text.slice(Math.min(n,a)-r.from,Math.max(n,a)-r.from),h=o(l);if(null!=e&&h!=e)break;" "==l&&n==i||(e=h),n=a}return n})),Vc=e=>Xc(e,!1),Rc=e=>_c(e,(t=>{let i=e.lineBlockAt(t).to;return t<i?i:Math.min(e.state.doc.length,t+1)}));function qc(e){let t=[],i=-1;for(let n of e.selection.ranges){let s=e.doc.lineAt(n.from),r=e.doc.lineAt(n.to);if(n.empty||n.to!=r.from||(r=e.doc.lineAt(n.to-1)),i>=s.number){let e=t[t.length-1];e.to=r.to,e.ranges.push(n)}else t.push({from:s.from,to:r.to,ranges:[n]});i=r.number+1}return t}function Mc(e,t,i){if(e.readOnly)return!1;let n=[],s=[];for(let t of qc(e)){if(i?t.to==e.doc.length:0==t.from)continue;let r=e.doc.lineAt(i?t.to+1:t.from-1),o=r.length+1;if(i){n.push({from:t.to,to:r.to},{from:t.from,insert:r.text+e.lineBreak});for(let i of t.ranges)s.push(oe.range(Math.min(e.doc.length,i.anchor+o),Math.min(e.doc.length,i.head+o)))}else{n.push({from:r.from,to:t.from},{from:t.to,insert:e.lineBreak+r.text});for(let e of t.ranges)s.push(oe.range(e.anchor-o,e.head-o))}}return!!n.length&&(t(e.update({changes:n,scrollIntoView:!0,selection:oe.create(s,e.selection.mainIndex),userEvent:"move.line"})),!0)}function Ec(e,t,i){if(e.readOnly)return!1;let n=[];for(let t of qc(e))i?n.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):n.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});return t(e.update({changes:n,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Dc=Ic(!1);function Ic(e){return({state:t,dispatch:i})=>{if(t.readOnly)return!1;let n=t.changeByRange((i=>{let{from:n,to:s}=i,r=t.doc.lineAt(n),o=!e&&n==s&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let i,n=il(e).resolveInner(t),s=n.childBefore(t),r=n.childAfter(t);return s&&r&&s.to<=t&&r.from>=t&&(i=s.type.prop(Eo.closedBy))&&i.indexOf(r.name)>-1&&e.doc.lineAt(s.to).from==e.doc.lineAt(r.from).from?{from:s.to,to:r.from}:null}(t,n);e&&(n=s=(s<=r.to?r:t.doc.lineAt(s)).to);let a=new Ql(t,{simulateBreak:n,simulateDoubleBreak:!!o}),l=gl(a,n);for(null==l&&(l=/^\s*/.exec(t.doc.lineAt(n).text)[0].length);s<r.to&&/\s/.test(r.text[s-r.from]);)s++;o?({from:n,to:s}=o):n>r.from&&n<r.from+100&&!/\S/.test(r.text.slice(0,n))&&(n=r.from);let h=["",ml(t,l)];return o&&h.push(ml(t,a.lineIndent(r.from,-1))),{changes:{from:n,to:s,insert:_.of(h)},range:oe.cursor(n+1+h[1].length)}}));return i(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}}function Uc(e,t){let i=-1;return e.changeByRange((n=>{let s=[];for(let r=n.from;r<=n.to;){let o=e.doc.lineAt(r);o.number>i&&(n.empty||n.to>o.from)&&(t(o,s,n),i=o.number),r=o.to+1}let r=e.changes(s);return{changes:s,range:oe.range(r.mapPos(n.anchor,1),r.mapPos(n.head,1))}}))}const Yc=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(Uc(e,((t,i)=>{i.push({from:t.from,insert:e.facet(Ol)})})),{userEvent:"input.indent"})),!0),jc=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(Uc(e,((t,i)=>{let n=/^\s*/.exec(t.text)[0];if(!n)return;let s=ct(n,e.tabSize),r=0,o=ml(e,Math.max(0,s-pl(e)));for(;r<n.length&&r<o.length&&n.charCodeAt(r)==o.charCodeAt(r);)r++;i.push({from:t.from+r,to:t.from+n.length,insert:o.slice(r)})})),{userEvent:"delete.dedent"})),!0),Bc=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:e=>Hh(e,(t=>rc(e.state,t,!ec(e)))),shift:e=>Oc(e,(t=>rc(e.state,t,!ec(e))))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:e=>Hh(e,(t=>rc(e.state,t,ec(e)))),shift:e=>Oc(e,(t=>rc(e.state,t,ec(e))))},{key:"Alt-ArrowUp",run:({state:e,dispatch:t})=>Mc(e,t,!1)},{key:"Shift-Alt-ArrowUp",run:({state:e,dispatch:t})=>Ec(e,t,!1)},{key:"Alt-ArrowDown",run:({state:e,dispatch:t})=>Mc(e,t,!0)},{key:"Shift-Alt-ArrowDown",run:({state:e,dispatch:t})=>Ec(e,t,!0)},{key:"Escape",run:({state:e,dispatch:t})=>{let i=e.selection,n=null;return i.ranges.length>1?n=oe.create([i.main]):i.main.empty||(n=oe.create([oe.cursor(i.main.head)])),!!n&&(t(Fh(e,n)),!0)}},{key:"Mod-Enter",run:Ic(!0)},{key:"Alt-l",mac:"Ctrl-l",run:({state:e,dispatch:t})=>{let i=qc(e).map((({from:t,to:i})=>oe.range(t,Math.min(i+1,e.doc.length))));return t(e.update({selection:oe.create(i),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:e,dispatch:t})=>{let i=Lh(e.selection,(t=>{var i;let n=il(e).resolveInner(t.head,1);for(;!(n.from<t.from&&n.to>=t.to||n.to>t.to&&n.from<=t.from)&&(null===(i=n.parent)||void 0===i?void 0:i.parent);)n=n.parent;return oe.range(n.to,n.from)}));return t(Fh(e,i)),!0},preventDefault:!0},{key:"Mod-[",run:jc},{key:"Mod-]",run:Yc},{key:"Mod-Alt-\\",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=Object.create(null),n=new Ql(e,{overrideIndentation:e=>{let t=i[e];return null==t?-1:t}}),s=Uc(e,((t,s,r)=>{let o=gl(n,t.from);if(null==o)return;/\S/.test(t.text)||(o=0);let a=/^\s*/.exec(t.text)[0],l=ml(e,o);(a!=l||r.from<t.from+a.length)&&(i[t.from]=o,s.push({from:t.from,to:t.from+a.length,insert:l}))}));return s.changes.empty||t(e.update(s,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:e=>{if(e.state.readOnly)return!1;let{state:t}=e,i=t.changes(qc(t).map((({from:e,to:i})=>(e>0?e--:i<t.doc.length&&i++,{from:e,to:i})))),n=Lh(t.selection,(t=>e.moveVertically(t,!0))).map(i);return e.dispatch({changes:i,selection:n,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:e,dispatch:t})=>function(e,t,i){let n=!1,s=Lh(e.selection,(t=>{let s=fh(e,t.head,-1)||fh(e,t.head,1)||t.head>0&&fh(e,t.head-1,1)||t.head<e.doc.length&&fh(e,t.head+1,-1);if(!s||!s.end)return t;n=!0;let r=s.start.from==t.head?s.end.to:s.end.from;return i?oe.range(t.anchor,r):oe.cursor(r)}));return!!n&&(t(Fh(e,s)),!0)}(e,t,!1)},{key:"Mod-/",run:e=>{let{state:t}=e,i=t.doc.lineAt(t.selection.main.head),n=$h(e.state,i.from);return n.line?yh(e):!!n.block&&xh(e)}},{key:"Alt-A",run:wh}].concat([{key:"ArrowLeft",run:tc,shift:mc,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:e=>nc(e,!ec(e)),shift:e=>Qc(e,!ec(e)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:e=>Hh(e,(t=>fc(e,t,!ec(e)))),shift:e=>Oc(e,(t=>fc(e,t,!ec(e)))),preventDefault:!0},{key:"ArrowRight",run:ic,shift:gc,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:e=>nc(e,ec(e)),shift:e=>Qc(e,ec(e)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:e=>Hh(e,(t=>fc(e,t,ec(e)))),shift:e=>Oc(e,(t=>fc(e,t,ec(e)))),preventDefault:!0},{key:"ArrowUp",run:ac,shift:vc,preventDefault:!0},{mac:"Cmd-ArrowUp",run:$c,shift:Pc},{mac:"Ctrl-ArrowUp",run:uc,shift:wc},{key:"ArrowDown",run:lc,shift:bc,preventDefault:!0},{mac:"Cmd-ArrowDown",run:kc,shift:Tc},{mac:"Ctrl-ArrowDown",run:dc,shift:xc},{key:"PageUp",run:uc,shift:wc},{key:"PageDown",run:dc,shift:xc},{key:"Home",run:e=>Hh(e,(t=>fc(e,t,!1))),shift:e=>Oc(e,(t=>fc(e,t,!1))),preventDefault:!0},{key:"Mod-Home",run:$c,shift:Pc},{key:"End",run:e=>Hh(e,(t=>fc(e,t,!0))),shift:e=>Oc(e,(t=>fc(e,t,!0))),preventDefault:!0},{key:"Mod-End",run:kc,shift:Tc},{key:"Enter",run:Dc},{key:"Mod-a",run:({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:Ac,shift:Ac},{key:"Delete",run:Zc},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Vc},{key:"Mod-Delete",mac:"Alt-Delete",run:e=>Xc(e,!0)},{mac:"Mod-Backspace",run:e=>_c(e,(t=>{let i=e.lineBlockAt(t).from;return t>i?i:Math.max(0,t-1)}))},{mac:"Mod-Delete",run:Rc}].concat([{key:"Ctrl-b",run:tc,shift:mc,preventDefault:!0},{key:"Ctrl-f",run:ic,shift:gc},{key:"Ctrl-p",run:ac,shift:vc},{key:"Ctrl-n",run:lc,shift:bc},{key:"Ctrl-a",run:e=>Hh(e,(t=>oe.cursor(e.lineBlockAt(t.head).from,1))),shift:e=>Oc(e,(t=>oe.cursor(e.lineBlockAt(t.head).from)))},{key:"Ctrl-e",run:e=>Hh(e,(t=>oe.cursor(e.lineBlockAt(t.head).to,-1))),shift:e=>Oc(e,(t=>oe.cursor(e.lineBlockAt(t.head).to)))},{key:"Ctrl-d",run:Zc},{key:"Ctrl-h",run:Ac},{key:"Ctrl-k",run:Rc},{key:"Ctrl-Alt-h",run:Vc},{key:"Ctrl-o",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=e.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:_.of(["",""])},range:oe.cursor(e.from)})));return t(e.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=e.changeByRange((t=>{if(!t.empty||0==t.from||t.from==e.doc.length)return{range:t};let i=t.from,n=e.doc.lineAt(i),s=i==n.from?i-1:I(n.text,i-n.from,!1)+n.from,r=i==n.to?i+1:I(n.text,i-n.from,!0)+n.from;return{changes:{from:s,to:r,insert:e.doc.slice(i,r).append(e.doc.slice(s,i))},range:oe.cursor(r)}}));return!i.changes.empty&&(t(e.update(i,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:dc}].map((e=>({mac:e.key,run:e.run,shift:e.shift}))))),Nc={key:"Tab",run:Yc,shift:jc};function Gc(){var e=arguments[0];"string"==typeof e&&(e=document.createElement(e));var t=1,i=arguments[1];if(i&&"object"==typeof i&&null==i.nodeType&&!Array.isArray(i)){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var s=i[n];"string"==typeof s?e.setAttribute(n,s):null!=s&&(e[n]=s)}t++}for(;t<arguments.length;t++)zc(e,arguments[t]);return e}function zc(e,t){if("string"==typeof t)e.appendChild(document.createTextNode(t));else if(null==t);else if(null!=t.nodeType)e.appendChild(t);else{if(!Array.isArray(t))throw new RangeError("Unsupported child node: "+t);for(var i=0;i<t.length;i++)zc(e,t[i])}}const Lc="function"==typeof String.prototype.normalize?e=>e.normalize("NFKD"):e=>e;class Fc{constructor(e,t,i=0,n=e.length,s,r){this.test=r,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,n),this.bufferStart=i,this.normalize=s?e=>s(Lc(e)):Lc,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return N(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=G(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=z(e);let n=this.normalize(t);for(let e=0,s=i;;e++){let r=n.charCodeAt(e),o=this.match(r,s);if(o)return this.value=o,this;if(e==n.length-1)break;s==i&&e<t.length&&t.charCodeAt(e)==r&&s++}}}match(e,t){let i=null;for(let n=0;n<this.matches.length;n+=2){let s=this.matches[n],r=!1;this.query.charCodeAt(s)==e&&(s==this.query.length-1?i={from:this.matches[n+1],to:t+1}:(this.matches[n]++,r=!0)),r||(this.matches.splice(n,2),n-=2)}return this.query.charCodeAt(0)==e&&(1==this.query.length?i={from:t,to:t+1}:this.matches.push(1,t)),i&&this.test&&!this.test(i.from,i.to,this.buffer,this.bufferPos)&&(i=null),i}}"undefined"!=typeof Symbol&&(Fc.prototype[Symbol.iterator]=function(){return this});const Hc={from:-1,to:-1,match:/.*/.exec("")},Jc="gm"+(null==/x/.unicode?"":"u");class Kc{constructor(e,t,i,n=0,s=e.length){if(this.text=e,this.to=s,this.curLine="",this.done=!1,this.value=Hc,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new iu(e,t,i,n,s);this.re=new RegExp(t,Jc+((null==i?void 0:i.ignoreCase)?"i":"")),this.test=null==i?void 0:i.test,this.iter=e.iter();let r=e.lineAt(n);this.curLineStart=r.from,this.matchPos=nu(e,n),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let i=this.curLineStart+t.index,n=i+t[0].length;if(this.matchPos=nu(this.text,n+(i==n?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(i<n||i>this.value.to)&&(!this.test||this.test(i,n,t)))return this.value={from:i,to:n,match:t},this;e=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length<this.to))return this.done=!0,this;this.nextLine(),e=0}}}}const eu=new WeakMap;class tu{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(e,t,i){let n=eu.get(e);if(!n||n.from>=i||n.to<=t){let n=new tu(t,e.sliceString(t,i));return eu.set(e,n),n}if(n.from==t&&n.to==i)return n;let{text:s,from:r}=n;return r>t&&(s=e.sliceString(t,r)+s,r=t),n.to<i&&(s+=e.sliceString(n.to,i)),eu.set(e,new tu(r,s)),new tu(t,s.slice(t-r,i-r))}}class iu{constructor(e,t,i,n,s){this.text=e,this.to=s,this.done=!1,this.value=Hc,this.matchPos=nu(e,n),this.re=new RegExp(t,Jc+((null==i?void 0:i.ignoreCase)?"i":"")),this.test=null==i?void 0:i.test,this.flat=tu.get(e,n,this.chunkEnd(n+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,i=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,i,t)))return this.value={from:e,to:i,match:t},this.matchPos=nu(this.text,i+(e==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=tu.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function nu(e,t){if(t>=e.length)return t;let i,n=e.lineAt(t);for(;t<n.to&&(i=n.text.charCodeAt(t-n.from))>=56320&&i<57344;)t++;return t}function su(e){let t=Gc("input",{class:"cm-textfield",name:"line"});function i(){let i=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!i)return;let{state:n}=e,s=n.doc.lineAt(n.selection.main.head),[,r,o,a,l]=i,h=a?+a.slice(1):0,c=o?+o:s.number;if(o&&l){let e=c/100;r&&(e=e*("-"==r?-1:1)+s.number/n.doc.lines),c=Math.round(n.doc.lines*e)}else o&&r&&(c=c*("-"==r?-1:1)+s.number);let u=n.doc.line(Math.max(1,Math.min(n.doc.lines,c)));e.dispatch({effects:ru.of(!1),selection:oe.cursor(u.from+Math.max(0,Math.min(h,u.length))),scrollIntoView:!0}),e.focus()}return{dom:Gc("form",{class:"cm-gotoLine",onkeydown:t=>{27==t.keyCode?(t.preventDefault(),e.dispatch({effects:ru.of(!1)}),e.focus()):13==t.keyCode&&(t.preventDefault(),i())},onsubmit:e=>{e.preventDefault(),i()}},Gc("label",e.state.phrase("Go to line"),": ",t)," ",Gc("button",{class:"cm-button",type:"submit"},e.state.phrase("go")))}}"undefined"!=typeof Symbol&&(Kc.prototype[Symbol.iterator]=iu.prototype[Symbol.iterator]=function(){return this});const ru=Ve.define(),ou=me.define({create:()=>!0,update(e,t){for(let i of t.effects)i.is(ru)&&(e=i.value);return e},provide:e=>Oo.from(e,(e=>e?su:null))}),au=Ks.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),lu={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},hu=he.define({combine:e=>Ge(e,lu,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}),cu=$i.mark({class:"cm-selectionMatch"}),uu=$i.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function du(e,t,i,n){return!(0!=i&&e(t.sliceDoc(i-1,i))==Ye.Word||n!=t.doc.length&&e(t.sliceDoc(n,n+1))==Ye.Word)}const fu=Fi.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(hu),{state:i}=e,n=i.selection;if(n.ranges.length>1)return $i.none;let s,r=n.main,o=null;if(r.empty){if(!t.highlightWordAroundCursor)return $i.none;let e=i.wordAt(r.head);if(!e)return $i.none;o=i.charCategorizer(r.head),s=i.sliceDoc(e.from,e.to)}else{let e=r.to-r.from;if(e<t.minSelectionLength||e>200)return $i.none;if(t.wholeWords){if(s=i.sliceDoc(r.from,r.to),o=i.charCategorizer(r.head),!du(o,i,r.from,r.to)||!function(e,t,i,n){return e(t.sliceDoc(i,i+1))==Ye.Word&&e(t.sliceDoc(n-1,n))==Ye.Word}(o,i,r.from,r.to))return $i.none}else if(s=i.sliceDoc(r.from,r.to).trim(),!s)return $i.none}let a=[];for(let n of e.visibleRanges){let e=new Fc(i.doc,s,n.from,n.to);for(;!e.next().done;){let{from:n,to:s}=e.value;if((!o||du(o,i,n,s))&&(r.empty&&n<=r.from&&s>=r.to?a.push(uu.range(n,s)):(n>=r.to||s<=r.from)&&a.push(cu.range(n,s)),a.length>t.maxMatches))return $i.none}}return $i.set(a)}},{decorations:e=>e.decorations}),Ou=Ks.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),pu=he.define({combine:e=>Ge(e,{top:!1,caseSensitive:!1,literal:!1,wholeWord:!1,createPanel:e=>new Uu(e)})});class mu{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,Jc),!0}catch(e){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,((e,t)=>"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\"))}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new wu(this):new Su(this)}getCursor(e,t=0,i){let n=e.doc?e:Ne.create({doc:e});return null==i&&(i=n.doc.length),this.regexp?vu(this,n,t,i):Qu(this,n,t,i)}}class gu{constructor(e){this.spec=e}}function Qu(e,t,i,n){return new Fc(t.doc,e.unquoted,i,n,e.caseSensitive?void 0:e=>e.toLowerCase(),e.wholeWord?function(e,t){return(i,n,s,r)=>((r>i||r+s.length<n)&&(r=Math.max(0,i-2),s=e.sliceString(r,Math.min(e.length,n+2))),!(t(bu(s,i-r))==Ye.Word&&t(yu(s,i-r))==Ye.Word||t(yu(s,n-r))==Ye.Word&&t(bu(s,n-r))==Ye.Word))}(t.doc,t.charCategorizer(t.selection.main.head)):void 0)}class Su extends gu{constructor(e){super(e)}nextMatch(e,t,i){let n=Qu(this.spec,e,i,e.doc.length).nextOverlapping();return n.done&&(n=Qu(this.spec,e,0,t).nextOverlapping()),n.done?null:n.value}prevMatchInRange(e,t,i){for(let n=i;;){let i=Math.max(t,n-1e4-this.spec.unquoted.length),s=Qu(this.spec,e,i,n),r=null;for(;!s.nextOverlapping().done;)r=s.value;if(r)return r;if(i==t)return null;n-=1e4}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let i=Qu(this.spec,e,0,e.doc.length),n=[];for(;!i.next().done;){if(n.length>=t)return null;n.push(i.value)}return n}highlight(e,t,i,n){let s=Qu(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)n(s.value.from,s.value.to)}}function vu(e,t,i,n){return new Kc(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?(s=t.charCategorizer(t.selection.main.head),(e,t,i)=>!i[0].length||(s(bu(i.input,i.index))!=Ye.Word||s(yu(i.input,i.index))!=Ye.Word)&&(s(yu(i.input,i.index+i[0].length))!=Ye.Word||s(bu(i.input,i.index+i[0].length))!=Ye.Word)):void 0},i,n);var s}function bu(e,t){return e.slice(I(e,t,!1),t)}function yu(e,t){return e.slice(t,I(e,t))}class wu extends gu{nextMatch(e,t,i){let n=vu(this.spec,e,i,e.doc.length).next();return n.done&&(n=vu(this.spec,e,0,t).next()),n.done?null:n.value}prevMatchInRange(e,t,i){for(let n=1;;n++){let s=Math.max(t,i-1e4*n),r=vu(this.spec,e,s,i),o=null;for(;!r.next().done;)o=r.value;if(o&&(s==t||o.from>s+10))return o;if(s==t)return null}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,((t,i)=>"$"==i?"$":"&"==i?e.match[0]:"0"!=i&&+i<e.match.length?e.match[i]:t)))}matchAll(e,t){let i=vu(this.spec,e,0,e.doc.length),n=[];for(;!i.next().done;){if(n.length>=t)return null;n.push(i.value)}return n}highlight(e,t,i,n){let s=vu(this.spec,e,Math.max(0,t-250),Math.min(i+250,e.doc.length));for(;!s.next().done;)n(s.value.from,s.value.to)}}const xu=Ve.define(),$u=Ve.define(),ku=me.define({create:e=>new Pu(Mu(e).create(),null),update(e,t){for(let i of t.effects)i.is(xu)?e=new Pu(i.value.create(),e.panel):i.is($u)&&(e=new Pu(e.query,i.value?qu:null));return e},provide:e=>Oo.from(e,(e=>e.panel))});class Pu{constructor(e,t){this.query=e,this.panel=t}}const Tu=$i.mark({class:"cm-searchMatch"}),_u=$i.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Cu=Fi.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(ku))}update(e){let t=e.state.field(ku);(t!=e.startState.field(ku)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return $i.none;let{view:i}=this,n=new Ke;for(let t=0,s=i.visibleRanges,r=s.length;t<r;t++){let{from:o,to:a}=s[t];for(;t<r-1&&a>s[t+1].from-500;)a=s[++t].to;e.highlight(i.state,o,a,((e,t)=>{let s=i.state.selection.ranges.some((i=>i.from==e&&i.to==t));n.add(e,t,s?_u:Tu)}))}return n.finish()}},{decorations:e=>e.decorations});function Wu(e){return t=>{let i=t.state.field(ku,!1);return i&&i.query.spec.valid?e(t,i):Eu(t)}}const Au=Wu(((e,{query:t})=>{let{to:i}=e.state.selection.main,n=t.nextMatch(e.state,i,i);return!!n&&(e.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0,effects:Bu(e,n),userEvent:"select.search"}),!0)})),Zu=Wu(((e,{query:t})=>{let{state:i}=e,{from:n}=i.selection.main,s=t.prevMatch(i,n,n);return!!s&&(e.dispatch({selection:{anchor:s.from,head:s.to},scrollIntoView:!0,effects:Bu(e,s),userEvent:"select.search"}),!0)})),Xu=Wu(((e,{query:t})=>{let i=t.matchAll(e.state,1e3);return!(!i||!i.length||(e.dispatch({selection:oe.create(i.map((e=>oe.range(e.from,e.to)))),userEvent:"select.search.matches"}),0))})),Vu=Wu(((e,{query:t})=>{let{state:i}=e,{from:n,to:s}=i.selection.main;if(i.readOnly)return!1;let r=t.nextMatch(i,n,n);if(!r)return!1;let o,a,l=[],h=[];if(r.from==n&&r.to==s&&(a=i.toText(t.getReplacement(r)),l.push({from:r.from,to:r.to,insert:a}),r=t.nextMatch(i,r.from,r.to),h.push(Ks.announce.of(i.phrase("replaced match on line $",i.doc.lineAt(n).number)+"."))),r){let t=0==l.length||l[0].from>=r.to?0:r.to-r.from-a.length;o={anchor:r.from-t,head:r.to-t},h.push(Bu(e,r))}return e.dispatch({changes:l,selection:o,scrollIntoView:!!o,effects:h,userEvent:"input.replace"}),!0})),Ru=Wu(((e,{query:t})=>{if(e.state.readOnly)return!1;let i=t.matchAll(e.state,1e9).map((e=>{let{from:i,to:n}=e;return{from:i,to:n,insert:t.getReplacement(e)}}));if(!i.length)return!1;let n=e.state.phrase("replaced $ matches",i.length)+".";return e.dispatch({changes:i,effects:Ks.announce.of(n),userEvent:"input.replace.all"}),!0}));function qu(e){return e.state.facet(pu).createPanel(e)}function Mu(e,t){var i,n,s,r;let o=e.selection.main,a=o.empty||o.to>o.from+100?"":e.sliceDoc(o.from,o.to);if(t&&!a)return t;let l=e.facet(pu);return new mu({search:(null!==(i=null==t?void 0:t.literal)&&void 0!==i?i:l.literal)?a:a.replace(/\n/g,"\\n"),caseSensitive:null!==(n=null==t?void 0:t.caseSensitive)&&void 0!==n?n:l.caseSensitive,literal:null!==(s=null==t?void 0:t.literal)&&void 0!==s?s:l.literal,wholeWord:null!==(r=null==t?void 0:t.wholeWord)&&void 0!==r?r:l.wholeWord})}const Eu=e=>{let t=e.state.field(ku,!1);if(t&&t.panel){let i=ho(e,qu);if(!i)return!1;let n=i.dom.querySelector("[main-field]");if(n&&n!=e.root.activeElement){let i=Mu(e.state,t.query.spec);i.valid&&e.dispatch({effects:xu.of(i)}),n.focus(),n.select()}}else e.dispatch({effects:[$u.of(!0),t?xu.of(Mu(e.state,t.query.spec)):Ve.appendConfig.of(Gu)]});return!0},Du=e=>{let t=e.state.field(ku,!1);if(!t||!t.panel)return!1;let i=ho(e,qu);return i&&i.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:$u.of(!1)}),!0},Iu=[{key:"Mod-f",run:Eu,scope:"editor search-panel"},{key:"F3",run:Au,shift:Zu,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Au,shift:Zu,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Du,scope:"editor search-panel"},{key:"Mod-Shift-l",run:({state:e,dispatch:t})=>{let i=e.selection;if(i.ranges.length>1||i.main.empty)return!1;let{from:n,to:s}=i.main,r=[],o=0;for(let t=new Fc(e.doc,e.sliceDoc(n,s));!t.next().done;){if(r.length>1e3)return!1;t.value.from==n&&(o=r.length),r.push(oe.range(t.value.from,t.value.to))}return t(e.update({selection:oe.create(r,o),userEvent:"select.search.matches"})),!0}},{key:"Alt-g",run:e=>{let t=ho(e,su);if(!t){let i=[ru.of(!0)];null==e.state.field(ou,!1)&&i.push(Ve.appendConfig.of([ou,au])),e.dispatch({effects:i}),t=ho(e,su)}return t&&t.dom.querySelector("input").focus(),!0}},{key:"Mod-d",run:({state:e,dispatch:t})=>{let{ranges:i}=e.selection;if(i.some((e=>e.from===e.to)))return(({state:e,dispatch:t})=>{let{selection:i}=e,n=oe.create(i.ranges.map((t=>e.wordAt(t.head)||oe.cursor(t.head))),i.mainIndex);return!n.eq(i)&&(t(e.update({selection:n})),!0)})({state:e,dispatch:t});let n=e.sliceDoc(i[0].from,i[0].to);if(e.selection.ranges.some((t=>e.sliceDoc(t.from,t.to)!=n)))return!1;let s=function(e,t){let{main:i,ranges:n}=e.selection,s=e.wordAt(i.head),r=s&&s.from==i.from&&s.to==i.to;for(let i=!1,s=new Fc(e.doc,t,n[n.length-1].to);;){if(s.next(),!s.done){if(i&&n.some((e=>e.from==s.value.from)))continue;if(r){let t=e.wordAt(s.value.from);if(!t||t.from!=s.value.from||t.to!=s.value.to)continue}return s.value}if(i)return null;s=new Fc(e.doc,t,0,Math.max(0,n[n.length-1].from-1)),i=!0}}(e,n);return!!s&&(t(e.update({selection:e.selection.addRange(oe.range(s.from,s.to),!1),effects:Ks.scrollIntoView(s.to)})),!0)},preventDefault:!0}];class Uu{constructor(e){this.view=e;let t=this.query=e.state.field(ku).query.spec;function i(e,t,i){return Gc("button",{class:"cm-button",name:e,onclick:t,type:"button"},i)}this.commit=this.commit.bind(this),this.searchField=Gc("input",{value:t.search,placeholder:Yu(e,"Find"),"aria-label":Yu(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Gc("input",{value:t.replace,placeholder:Yu(e,"Replace"),"aria-label":Yu(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Gc("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=Gc("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=Gc("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit}),this.dom=Gc("div",{onkeydown:e=>this.keydown(e),class:"cm-search"},[this.searchField,i("next",(()=>Au(e)),[Yu(e,"next")]),i("prev",(()=>Zu(e)),[Yu(e,"previous")]),i("select",(()=>Xu(e)),[Yu(e,"all")]),Gc("label",null,[this.caseField,Yu(e,"match case")]),Gc("label",null,[this.reField,Yu(e,"regexp")]),Gc("label",null,[this.wordField,Yu(e,"by word")]),...e.state.readOnly?[]:[Gc("br"),this.replaceField,i("replace",(()=>Vu(e)),[Yu(e,"replace")]),i("replaceAll",(()=>Ru(e)),[Yu(e,"replace all")])],Gc("button",{name:"close",onclick:()=>Du(e),"aria-label":Yu(e,"close"),type:"button"},["×"])])}commit(){let e=new mu({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:xu.of(e)}))}keydown(e){var t,i;i=e,ur(hr((t=this.view).state),i,t,"search-panel")?e.preventDefault():13==e.keyCode&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Zu:Au)(this.view)):13==e.keyCode&&e.target==this.replaceField&&(e.preventDefault(),Vu(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(xu)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(pu).top}}function Yu(e,t){return e.state.phrase(t)}const ju=/[\s\.,:;?!]/;function Bu(e,{from:t,to:i}){let n=e.state.doc.lineAt(t),s=e.state.doc.lineAt(i).to,r=Math.max(n.from,t-30),o=Math.min(s,i+30),a=e.state.sliceDoc(r,o);if(r!=n.from)for(let e=0;e<30;e++)if(!ju.test(a[e+1])&&ju.test(a[e])){a=a.slice(e);break}if(o!=s)for(let e=a.length-1;e>a.length-30;e--)if(!ju.test(a[e-1])&&ju.test(a[e])){a=a.slice(0,e);break}return Ks.announce.of(`${e.state.phrase("current match")}. ${a} ${e.state.phrase("on line")} ${n.number}.`)}const Nu=Ks.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),Gu=[ku,Qe.lowest(Cu),Nu];class zu{constructor(e,t,i){this.state=e,this.pos=t,this.explicit=i,this.abortListeners=[]}tokenBefore(e){let t=il(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),i=Math.max(t.from,this.pos-250),n=t.text.slice(i-t.from,this.pos-t.from),s=n.search(Ku(e,!1));return s<0?null:{from:i+s,to:this.pos,text:n.slice(s)}}get aborted(){return null==this.abortListeners}addEventListener(e,t){"abort"==e&&this.abortListeners&&this.abortListeners.push(t)}}function Lu(e){let t=Object.keys(e).join(""),i=/\w/.test(t);return i&&(t=t.replace(/\w/g,"")),`[${i?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function Fu(e){let t=e.map((e=>"string"==typeof e?{label:e}:e)),[i,n]=t.every((e=>/^\w+$/.test(e.label)))?[/\w*$/,/\w+$/]:function(e){let t=Object.create(null),i=Object.create(null);for(let{label:n}of e){t[n[0]]=!0;for(let e=1;e<n.length;e++)i[n[e]]=!0}let n=Lu(t)+Lu(i)+"*$";return[new RegExp("^"+n),new RegExp(n)]}(t);return e=>{let s=e.matchBefore(n);return s||e.explicit?{from:s?s.from:e.pos,options:t,validFor:i}:null}}class Hu{constructor(e,t,i){this.completion=e,this.source=t,this.match=i}}function Ju(e){return e.selection.main.head}function Ku(e,t){var i;let{source:n}=e,s=t&&"^"!=n[0],r="$"!=n[n.length-1];return s||r?new RegExp(`${s?"^":""}(?:${n})${r?"$":""}`,null!==(i=e.flags)&&void 0!==i?i:e.ignoreCase?"i":""):e}const ed=Ae.define();function td(e,t){const i=t.completion.apply||t.completion.label;let n=t.source;var s,r,o,a;"string"==typeof i?e.dispatch(Object.assign(Object.assign({},(s=e.state,r=i,o=n.from,a=n.to,Object.assign(Object.assign({},s.changeByRange((e=>{if(e==s.selection.main)return{changes:{from:o,to:a,insert:r},range:oe.cursor(o+r.length)};let t=a-o;return!e.empty||t&&s.sliceDoc(e.from-t,e.from)!=s.sliceDoc(o,a)?{range:e}:{changes:{from:e.from-t,to:e.from,insert:r},range:oe.cursor(e.from-t+r.length)}}))),{userEvent:"input.complete"}))),{annotations:ed.of(t.completion)})):i(e,t.completion,n.from,n.to)}const id=new WeakMap;function nd(e){if(!Array.isArray(e))return e;let t=id.get(e);return t||id.set(e,t=Fu(e)),t}class sd{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[];for(let t=0;t<e.length;){let i=N(e,t),n=z(i);this.chars.push(i);let s=e.slice(t,t+n),r=s.toUpperCase();this.folded.push(N(r==s?s.toLowerCase():r,0)),t+=n}this.astral=e.length!=this.chars.length}match(e){if(0==this.pattern.length)return[0];if(e.length<this.pattern.length)return null;let{chars:t,folded:i,any:n,precise:s,byWord:r}=this;if(1==t.length){let n=N(e,0);return n==t[0]?[0,0,z(n)]:n==i[0]?[-200,0,z(n)]:null}let o=e.indexOf(this.pattern);if(0==o)return[0,0,this.pattern.length];let a=t.length,l=0;if(o<0){for(let s=0,r=Math.min(e.length,200);s<r&&l<a;){let r=N(e,s);r!=t[l]&&r!=i[l]||(n[l++]=s),s+=z(r)}if(l<a)return null}let h=0,c=0,u=!1,d=0,f=-1,O=-1,p=/[a-z]/.test(e),m=!0;for(let n=0,l=Math.min(e.length,200),g=0;n<l&&c<a;){let l=N(e,n);o<0&&(h<a&&l==t[h]&&(s[h++]=n),d<a&&(l==t[d]||l==i[d]?(0==d&&(f=n),O=n+1,d++):d=0));let Q,S=l<255?l>=48&&l<=57||l>=97&&l<=122?2:l>=65&&l<=90?1:0:(Q=G(l))!=Q.toLowerCase()?1:Q!=Q.toUpperCase()?2:0;(!n||1==S&&p||0==g&&0!=S)&&(t[c]==l||i[c]==l&&(u=!0)?r[c++]=n:r.length&&(m=!1)),g=S,n+=z(l)}return c==a&&0==r[0]&&m?this.result((u?-200:0)-100,r,e):d==a&&0==f?[-200-e.length,0,O]:o>-1?[-700-e.length,o,o+this.pattern.length]:d==a?[-900-e.length,f,O]:c==a?this.result((u?-200:0)-100-700+(m?0:-1100),r,e):2==t.length?null:this.result((n[0]?-700:0)-200-1100,n,e)}result(e,t,i){let n=[e-i.length],s=1;for(let e of t){let t=e+(this.astral?z(N(i,e)):1);s>1&&n[s-1]==e?n[s-1]=t:(n[s++]=e,n[s++]=t)}return n}}const rd=he.define({combine:e=>Ge(e,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>i=>od(e(i),t(i)),optionClass:(e,t)=>i=>od(e(i),t(i)),addToOptions:(e,t)=>e.concat(t)})});function od(e,t){return e?t?e+" "+t:e:t}function ad(e,t,i){if(e<=i)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/i);return{from:e*i,to:(e+1)*i}}let n=Math.floor((e-t)/i);return{from:e-(n+1)*i,to:e-n*i}}class ld{constructor(e,t){this.view=e,this.stateField=t,this.info=null,this.placeInfo={read:()=>this.measureInfo(),write:e=>this.positionInfo(e),key:this},this.space=null,this.currentClass="";let i=e.state.field(t),{options:n,selected:s}=i.open,r=e.state.facet(rd);this.optionContent=function(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement("div");return t.classList.add("cm-completionIcon"),e.type&&t.classList.add(...e.type.split(/\s+/g).map((e=>"cm-completionIcon-"+e))),t.setAttribute("aria-hidden","true"),t},position:20}),t.push({render(e,t,i){let n=document.createElement("span");n.className="cm-completionLabel";let{label:s}=e,r=0;for(let e=1;e<i.length;){let t=i[e++],o=i[e++];t>r&&n.appendChild(document.createTextNode(s.slice(r,t)));let a=n.appendChild(document.createElement("span"));a.appendChild(document.createTextNode(s.slice(t,o))),a.className="cm-completionMatchedText",r=o}return r<s.length&&n.appendChild(document.createTextNode(s.slice(r))),n},position:50},{render(e){if(!e.detail)return null;let t=document.createElement("span");return t.className="cm-completionDetail",t.textContent=e.detail,t},position:80}),t.sort(((e,t)=>e.position-t.position)).map((e=>e.render))}(r),this.optionClass=r.optionClass,this.tooltipClass=r.tooltipClass,this.range=ad(n.length,s,r.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",(t=>{for(let i,s=t.target;s&&s!=this.dom;s=s.parentNode)if("LI"==s.nodeName&&(i=/-(\d+)$/.exec(s.id))&&+i[1]<n.length)return td(e,n[+i[1]]),void t.preventDefault()})),this.list=this.dom.appendChild(this.createListBox(n,i.id,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfo)}))}mount(){this.updateSel()}update(e){var t,i,n;let s=e.state.field(this.stateField),r=e.startState.field(this.stateField);this.updateTooltipClass(e.state),s!=r&&(this.updateSel(),(null===(t=s.open)||void 0===t?void 0:t.disabled)!=(null===(i=r.open)||void 0===i?void 0:i.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!(null===(n=s.open)||void 0===n?void 0:n.disabled)))}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(" "))e&&this.dom.classList.remove(e);for(let e of t.split(" "))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfo)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=ad(t.options.length,t.selected,this.view.state.facet(rd).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(t.options,e.id,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfo)}))),this.updateSelectedOption(t.selected)){this.info&&(this.info.remove(),this.info=null);let{completion:i}=t.options[t.selected],{info:n}=i;if(!n)return;let s="string"==typeof n?document.createTextNode(n):n(i);if(!s)return;"then"in s?s.then((t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t)})).catch((e=>Ni(this.view.state,e,"completion info"))):this.addInfoPane(s)}}addInfoPane(e){let t=this.info=document.createElement("div");t.className="cm-tooltip cm-completionInfo",t.appendChild(e),this.dom.appendChild(t),this.view.requestMeasure(this.placeInfo)}updateSelectedOption(e){let t=null;for(let i=this.list.firstChild,n=this.range.from;i;i=i.nextSibling,n++)n==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),t=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return t&&function(e,t){let i=e.getBoundingClientRect(),n=t.getBoundingClientRect();n.top<i.top?e.scrollTop-=i.top-n.top:n.bottom>i.bottom&&(e.scrollTop+=n.bottom-i.bottom)}(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),n=e.getBoundingClientRect(),s=this.space;if(!s){let e=this.dom.ownerDocument.defaultView||window;s={left:0,top:0,right:e.innerWidth,bottom:e.innerHeight}}if(n.top>Math.min(s.bottom,t.bottom)-10||n.bottom<Math.max(s.top,t.top)+10)return null;let r,o=this.view.textDirection==an.RTL,a=o,l=!1,h="",c="",u=t.left-s.left,d=s.right-t.right;if(a&&u<Math.min(i.width,d)?a=!1:!a&&d<Math.min(i.width,u)&&(a=!0),i.width<=(a?u:d))h=Math.max(s.top,Math.min(n.top,s.bottom-i.height))-t.top+"px",r=Math.min(400,a?u:d)+"px";else{l=!0,r=Math.min(400,(o?t.right:s.right-t.left)-30)+"px";let e=s.bottom-t.bottom;e>=i.height||e>t.top?h=n.bottom-t.top+"px":c=t.bottom-n.top+"px"}return{top:h,bottom:c,maxWidth:r,class:l?o?"left-narrow":"right-narrow":a?"left":"right"}}positionInfo(e){this.info&&(e?(this.info.style.top=e.top,this.info.style.bottom=e.bottom,this.info.style.maxWidth=e.maxWidth,this.info.className="cm-tooltip cm-completionInfo cm-completionInfo-"+e.class):this.info.style.top="-1e6px")}createListBox(e,t,i){const n=document.createElement("ul");n.id=t,n.setAttribute("role","listbox"),n.setAttribute("aria-expanded","true"),n.setAttribute("aria-label",this.view.state.phrase("Completions"));for(let s=i.from;s<i.to;s++){let{completion:i,match:r}=e[s];const o=n.appendChild(document.createElement("li"));o.id=t+"-"+s,o.setAttribute("role","option");let a=this.optionClass(i);a&&(o.className=a);for(let e of this.optionContent){let t=e(i,this.view.state,r);t&&o.appendChild(t)}}return i.from&&n.classList.add("cm-completionListIncompleteTop"),i.to<e.length&&n.classList.add("cm-completionListIncompleteBottom"),n}}function hd(e){return 100*(e.boost||0)+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}class cd{constructor(e,t,i,n,s,r){this.options=e,this.attrs=t,this.tooltip=i,this.timestamp=n,this.selected=s,this.disabled=r}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new cd(this.options,fd(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,i,n,s){let r=function(e,t){let i=[],n=0;for(let s of e)if(s.hasResult())if(!1===s.result.filter){let e=s.result.getMatch;for(let t of s.result.options){let r=[1e9-n++];if(e)for(let i of e(t))r.push(i);i.push(new Hu(t,s,r))}}else{let e,n=new sd(t.sliceDoc(s.from,s.to));for(let t of s.result.options)(e=n.match(t.label))&&(null!=t.boost&&(e[0]+=t.boost),i.push(new Hu(t,s,e)))}let s=[],r=null,o=t.facet(rd).compareCompletions;for(let e of i.sort(((e,t)=>t.match[0]-e.match[0]||o(e.completion,t.completion))))!r||r.label!=e.completion.label||r.detail!=e.completion.detail||null!=r.type&&null!=e.completion.type&&r.type!=e.completion.type||r.apply!=e.completion.apply?s.push(e):hd(e.completion)>hd(r)&&(s[s.length-1]=e),r=e.completion;return s}(e,t);if(!r.length)return n&&e.some((e=>1==e.state))?new cd(n.options,n.attrs,n.tooltip,n.timestamp,n.selected,!0):null;let o=t.facet(rd).selectOnOpen?0:-1;if(n&&n.selected!=o&&-1!=n.selected){let e=n.options[n.selected].completion;for(let t=0;t<r.length;t++)if(r[t].completion==e){o=t;break}}return new cd(r,fd(i,o),{pos:e.reduce(((e,t)=>t.hasResult()?Math.min(e,t.from):e),1e8),create:(a=yd,e=>new ld(e,a)),above:s.aboveCursor},n?n.timestamp:Date.now(),o,!1);var a}map(e){return new cd(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class ud{constructor(e,t,i){this.active=e,this.id=t,this.open=i}static start(){return new ud(Od,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(e){let{state:t}=e,i=t.facet(rd),n=(i.override||t.languageDataAt("autocomplete",Ju(t)).map(nd)).map((t=>(this.active.find((e=>e.source==t))||new md(t,this.active.some((e=>0!=e.state))?1:0)).update(e,i)));n.length==this.active.length&&n.every(((e,t)=>e==this.active[t]))&&(n=this.active);let s=this.open;s&&e.docChanged&&(s=s.map(e.changes)),e.selection||n.some((t=>t.hasResult()&&e.changes.touchesRange(t.from,t.to)))||!function(e,t){if(e==t)return!0;for(let i=0,n=0;;){for(;i<e.length&&!e[i].hasResult;)i++;for(;n<t.length&&!t[n].hasResult;)n++;let s=i==e.length,r=n==t.length;if(s||r)return s==r;if(e[i++].result!=t[n++].result)return!1}}(n,this.active)?s=cd.build(n,t,this.id,s,i):s&&s.disabled&&!n.some((e=>1==e.state))&&(s=null),!s&&n.every((e=>1!=e.state))&&n.some((e=>e.hasResult()))&&(n=n.map((e=>e.hasResult()?new md(e.source,0):e)));for(let t of e.effects)t.is(bd)&&(s=s&&s.setSelected(t.value,this.id));return n==this.active&&s==this.open?this:new ud(n,this.id,s)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:dd}}const dd={"aria-autocomplete":"list"};function fd(e,t){let i={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(i["aria-activedescendant"]=e+"-"+t),i}const Od=[];function pd(e){return e.isUserEvent("input.type")?"input":e.isUserEvent("delete.backward")?"delete":null}class md{constructor(e,t,i=-1){this.source=e,this.state=t,this.explicitPos=i}hasResult(){return!1}update(e,t){let i=pd(e),n=this;i?n=n.handleUserEvent(e,i,t):e.docChanged?n=n.handleChange(e):e.selection&&0!=n.state&&(n=new md(n.source,0));for(let t of e.effects)if(t.is(Qd))n=new md(n.source,1,t.value?Ju(e.state):-1);else if(t.is(Sd))n=new md(n.source,0);else if(t.is(vd))for(let e of t.value)e.source==n.source&&(n=e);return n}handleUserEvent(e,t,i){return"delete"!=t&&i.activateOnTyping?new md(this.source,1):this.map(e.changes)}handleChange(e){return e.changes.touchesRange(Ju(e.startState))?new md(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new md(this.source,this.state,e.mapPos(this.explicitPos))}}class gd extends md{constructor(e,t,i,n,s){super(e,2,t),this.result=i,this.from=n,this.to=s}hasResult(){return!0}handleUserEvent(e,t,i){var n;let s=e.changes.mapPos(this.from),r=e.changes.mapPos(this.to,1),o=Ju(e.state);if((this.explicitPos<0?o<=s:o<this.from)||o>r||"delete"==t&&Ju(e.startState)==this.from)return new md(this.source,"input"==t&&i.activateOnTyping?1:0);let a,l=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return function(e,t,i,n){if(!e)return!1;let s=t.sliceDoc(i,n);return"function"==typeof e?e(s,i,n,t):Ku(e,!0).test(s)}(this.result.validFor,e.state,s,r)?new gd(this.source,l,this.result,s,r):this.result.update&&(a=this.result.update(this.result,s,r,new zu(e.state,o,l>=0)))?new gd(this.source,l,a,a.from,null!==(n=a.to)&&void 0!==n?n:Ju(e.state)):new md(this.source,1,l)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new md(this.source,0):this.map(e.changes)}map(e){return e.empty?this:new gd(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1))}}const Qd=Ve.define(),Sd=Ve.define(),vd=Ve.define({map:(e,t)=>e.map((e=>e.map(t)))}),bd=Ve.define(),yd=me.define({create:()=>ud.start(),update:(e,t)=>e.update(t),provide:e=>[eo.from(e,(e=>e.tooltip)),Ks.contentAttributes.from(e,(e=>e.attrs))]});function wd(e,t="option"){return i=>{let n=i.state.field(yd,!1);if(!n||!n.open||n.open.disabled||Date.now()-n.open.timestamp<i.state.facet(rd).interactionDelay)return!1;let s,r=1;"page"==t&&(s=function(e,t){let i=e.plugin(Hr);if(!i)return null;let n=i.manager.tooltips.indexOf(t);return n<0?null:i.manager.tooltipViews[n]}(i,n.open.tooltip))&&(r=Math.max(2,Math.floor(s.dom.offsetHeight/s.dom.querySelector("li").offsetHeight)-1));let{length:o}=n.open.options,a=n.open.selected>-1?n.open.selected+r*(e?1:-1):e?0:o-1;return a<0?a="page"==t?0:o-1:a>=o&&(a="page"==t?o-1:0),i.dispatch({effects:bd.of(a)}),!0}}class xd{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const $d=Fi.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let t of e.state.field(yd).active)1==t.state&&this.startQuery(t)}update(e){let t=e.state.field(yd);if(!e.selectionSet&&!e.docChanged&&e.startState.field(yd)==t)return;let i=e.transactions.some((e=>(e.selection||e.docChanged)&&!pd(e)));for(let t=0;t<this.running.length;t++){let n=this.running[t];if(i||n.updates.length+e.transactions.length>50&&Date.now()-n.time>1e3){for(let e of n.context.abortListeners)try{e()}catch(e){Ni(this.view.state,e)}n.context.abortListeners=null,this.running.splice(t--,1)}else n.updates.push(...e.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=t.active.some((e=>1==e.state&&!this.running.some((t=>t.active.source==e.source))))?setTimeout((()=>this.startUpdate()),50):-1,0!=this.composing)for(let t of e.transactions)"input"==pd(t)?this.composing=2:2==this.composing&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:e}=this.view,t=e.field(yd);for(let e of t.active)1!=e.state||this.running.some((t=>t.active.source==e.source))||this.startQuery(e)}startQuery(e){let{state:t}=this.view,i=Ju(t),n=new zu(t,i,e.explicitPos==i),s=new xd(e,n);this.running.push(s),Promise.resolve(e.source(n)).then((e=>{s.context.aborted||(s.done=e||null,this.scheduleAccept())}),(e=>{this.view.dispatch({effects:Sd.of(null)}),Ni(this.view.state,e)}))}scheduleAccept(){this.running.every((e=>void 0!==e.done))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((()=>this.accept()),50))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],i=this.view.state.facet(rd);for(let n=0;n<this.running.length;n++){let s=this.running[n];if(void 0===s.done)continue;if(this.running.splice(n--,1),s.done){let n=new gd(s.active.source,s.active.explicitPos,s.done,s.done.from,null!==(e=s.done.to)&&void 0!==e?e:Ju(s.updates.length?s.updates[0].startState:this.view.state));for(let e of s.updates)n=n.update(e,i);if(n.hasResult()){t.push(n);continue}}let r=this.view.state.field(yd).active.find((e=>e.source==s.active.source));if(r&&1==r.state)if(null==s.done){let e=new md(s.active.source,0);for(let t of s.updates)e=e.update(t,i);1!=e.state&&t.push(e)}else this.startQuery(r)}t.length&&this.view.dispatch({effects:vd.of(t)})}},{eventHandlers:{blur(){let e=this.view.state.field(yd,!1);e&&e.tooltip&&this.view.state.facet(rd).closeOnBlur&&this.view.dispatch({effects:Sd.of(null)})},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout((()=>this.view.dispatch({effects:Qd.of(!1)})),20),this.composing=0}}}),kd=Ks.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer",padding:"1px 3px",lineHeight:1.2}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class Pd{constructor(e,t,i,n){this.field=e,this.line=t,this.from=i,this.to=n}}class Td{constructor(e,t,i){this.field=e,this.from=t,this.to=i}map(e){let t=e.mapPos(this.from,-1,F.TrackDel),i=e.mapPos(this.to,1,F.TrackDel);return null==t||null==i?null:new Td(this.field,t,i)}}class _d{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let i=[],n=[t],s=e.doc.lineAt(t),r=/^\s*/.exec(s.text)[0];for(let s of this.lines){if(i.length){let i=r,o=/^\t*/.exec(s)[0].length;for(let t=0;t<o;t++)i+=e.facet(Ol);n.push(t+i.length-o),s=i+s.slice(o)}i.push(s),t+=s.length+1}let o=this.fieldPositions.map((e=>new Td(e.field,n[e.line]+e.from,n[e.line]+e.to)));return{text:i,ranges:o}}static parse(e){let t,i=[],n=[],s=[];for(let r of e.split(/\r\n?|\n/)){for(;t=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(r);){let e=t[1]?+t[1]:null,o=t[2]||t[3]||"",a=-1;for(let t=0;t<i.length;t++)(null!=e?i[t].seq==e:o&&i[t].name==o)&&(a=t);if(a<0){let t=0;for(;t<i.length&&(null==e||null!=i[t].seq&&i[t].seq<e);)t++;i.splice(t,0,{seq:e,name:o}),a=t;for(let e of s)e.field>=a&&e.field++}s.push(new Pd(a,n.length,t.index,t.index+o.length)),r=r.slice(0,t.index)+o+r.slice(t.index+t[0].length)}for(let e;e=/\\([{}])/.exec(r);){r=r.slice(0,e.index)+e[1]+r.slice(e.index+e[0].length);for(let t of s)t.line==n.length&&t.from>e.index&&(t.from--,t.to--)}n.push(r)}return new _d(n,s)}}let Cd=$i.widget({widget:new class extends wi{toDOM(){let e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}ignoreEvent(){return!1}}}),Wd=$i.mark({class:"cm-snippetField"});class Ad{constructor(e,t){this.ranges=e,this.active=t,this.deco=$i.set(e.map((e=>(e.from==e.to?Cd:Wd).range(e.from,e.to))))}map(e){let t=[];for(let i of this.ranges){let n=i.map(e);if(!n)return null;t.push(n)}return new Ad(t,this.active)}selectionInsideField(e){return e.ranges.every((e=>this.ranges.some((t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))))}}const Zd=Ve.define({map:(e,t)=>e&&e.map(t)}),Xd=Ve.define(),Vd=me.define({create:()=>null,update(e,t){for(let i of t.effects){if(i.is(Zd))return i.value;if(i.is(Xd)&&e)return new Ad(e.ranges,i.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>Ks.decorations.from(e,(e=>e?e.deco:$i.none))});function Rd(e,t){return oe.create(e.filter((e=>e.field==t)).map((e=>oe.range(e.from,e.to))))}function qd(e){let t=_d.parse(e);return(e,i,n,s)=>{let{text:r,ranges:o}=t.instantiate(e.state,n),a={changes:{from:n,to:s,insert:_.of(r)},scrollIntoView:!0};if(o.length&&(a.selection=Rd(o,0)),o.length>1){let t=new Ad(o,0),i=a.effects=[Zd.of(t)];void 0===e.state.field(Vd,!1)&&i.push(Ve.appendConfig.of([Vd,Id,Yd,kd]))}e.dispatch(e.state.update(a))}}function Md(e){return({state:t,dispatch:i})=>{let n=t.field(Vd,!1);if(!n||e<0&&0==n.active)return!1;let s=n.active+e,r=e>0&&!n.ranges.some((t=>t.field==s+e));return i(t.update({selection:Rd(n.ranges,s),effects:Zd.of(r?null:new Ad(n.ranges,s))})),!0}}const Ed=[{key:"Tab",run:Md(1),shift:Md(-1)},{key:"Escape",run:({state:e,dispatch:t})=>!!e.field(Vd,!1)&&(t(e.update({effects:Zd.of(null)})),!0)}],Dd=he.define({combine:e=>e.length?e[0]:Ed}),Id=Qe.highest(ar.compute([Dd],(e=>e.facet(Dd))));function Ud(e,t){return Object.assign(Object.assign({},t),{apply:qd(e)})}const Yd=Ks.domEventHandlers({mousedown(e,t){let i,n=t.state.field(Vd,!1);if(!n||null==(i=t.posAtCoords({x:e.clientX,y:e.clientY})))return!1;let s=n.ranges.find((e=>e.from<=i&&e.to>=i));return!(!s||s.field==n.active||(t.dispatch({selection:Rd(n.ranges,s.field),effects:Zd.of(n.ranges.some((e=>e.field>s.field))?new Ad(n.ranges,s.field):null)}),0))}}),jd={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Bd=Ve.define({map(e,t){let i=t.mapPos(e,-1,F.TrackAfter);return null==i?void 0:i}}),Nd=Ve.define({map:(e,t)=>t.mapPos(e)}),Gd=new class extends ze{};Gd.startSide=1,Gd.endSide=-1;const zd=me.define({create:()=>Je.empty,update(e,t){if(t.selection){let i=t.state.doc.lineAt(t.selection.main.head).from,n=t.startState.doc.lineAt(t.startState.selection.main.head).from;i!=t.changes.mapPos(n,-1)&&(e=Je.empty)}e=e.map(t.changes);for(let i of t.effects)i.is(Bd)?e=e.update({add:[Gd.range(i.value,i.value+1)]}):i.is(Nd)&&(e=e.update({filter:e=>e!=i.value}));return e}}),Ld="()[]{}<>";function Fd(e){for(let t=0;t<Ld.length;t+=2)if(Ld.charCodeAt(t)==e)return Ld.charAt(t+1);return G(e<128?e:e+1)}function Hd(e,t){return e.languageDataAt("closeBrackets",t)[0]||jd}const Jd="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),Kd=Ks.inputHandler.of(((e,t,i,n)=>{if((Jd?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let s=e.state.selection.main;if(n.length>2||2==n.length&&1==z(N(n,0))||t!=s.from||i!=s.to)return!1;let r=function(e,t){let i=Hd(e,e.selection.main.head),n=i.brackets||jd.brackets;for(let s of n){let r=Fd(N(s,0));if(t==s)return r==s?of(e,s,n.indexOf(s+s+s)>-1,i):sf(e,s,r,i.before||jd.before);if(t==r&&tf(e,e.selection.main.from))return rf(e,0,r)}return null}(e.state,n);return!!r&&(e.dispatch(r),!0)})),ef=[{key:"Backspace",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=Hd(e,e.selection.main.head).brackets||jd.brackets,n=null,s=e.changeByRange((t=>{if(t.empty){let n=function(e,t){let i=e.sliceString(t-2,t);return z(N(i,0))==i.length?i:i.slice(1)}(e.doc,t.head);for(let s of i)if(s==n&&nf(e.doc,t.head)==Fd(N(s,0)))return{changes:{from:t.head-s.length,to:t.head+s.length},range:oe.cursor(t.head-s.length)}}return{range:n=t}}));return n||t(e.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!n}}];function tf(e,t){let i=!1;return e.field(zd).between(0,e.doc.length,(e=>{e==t&&(i=!0)})),i}function nf(e,t){let i=e.sliceString(t,t+2);return i.slice(0,z(N(i,0)))}function sf(e,t,i,n){let s=null,r=e.changeByRange((r=>{if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:i,from:r.to}],effects:Bd.of(r.to+t.length),range:oe.range(r.anchor+t.length,r.head+t.length)};let o=nf(e.doc,r.head);return!o||/\s/.test(o)||n.indexOf(o)>-1?{changes:{insert:t+i,from:r.head},effects:Bd.of(r.head+t.length),range:oe.cursor(r.head+t.length)}:{range:s=r}}));return s?null:e.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function rf(e,t,i){let n=null,s=e.selection.ranges.map((t=>t.empty&&nf(e.doc,t.head)==i?oe.cursor(t.head+i.length):n=t));return n?null:e.update({selection:oe.create(s,e.selection.mainIndex),scrollIntoView:!0,effects:e.selection.ranges.map((({from:e})=>Nd.of(e)))})}function of(e,t,i,n){let s=n.stringPrefixes||jd.stringPrefixes,r=null,o=e.changeByRange((n=>{if(!n.empty)return{changes:[{insert:t,from:n.from},{insert:t,from:n.to}],effects:Bd.of(n.to+t.length),range:oe.range(n.anchor+t.length,n.head+t.length)};let o,a=n.head,l=nf(e.doc,a);if(l==t){if(af(e,a))return{changes:{insert:t+t,from:a},effects:Bd.of(a+t.length),range:oe.cursor(a+t.length)};if(tf(e,a)){let n=i&&e.sliceDoc(a,a+3*t.length)==t+t+t;return{range:oe.cursor(a+t.length*(n?3:1)),effects:Nd.of(a)}}}else{if(i&&e.sliceDoc(a-2*t.length,a)==t+t&&(o=lf(e,a-2*t.length,s))>-1&&af(e,o))return{changes:{insert:t+t+t+t,from:a},effects:Bd.of(a+t.length),range:oe.cursor(a+t.length)};if(e.charCategorizer(a)(l)!=Ye.Word&&lf(e,a,s)>-1&&!function(e,t,i,n){let s=il(e).resolveInner(t,-1),r=n.reduce(((e,t)=>Math.max(e,t.length)),0);for(let o=0;o<5;o++){let o=e.sliceDoc(s.from,Math.min(s.to,s.from+i.length+r)),a=o.indexOf(i);if(!a||a>-1&&n.indexOf(o.slice(0,a))>-1){let t=s.firstChild;for(;t&&t.from==s.from&&t.to-t.from>i.length+a;){if(e.sliceDoc(t.to-i.length,t.to)==i)return!1;t=t.firstChild}return!0}let l=s.to==t&&s.parent;if(!l)break;s=l}return!1}(e,a,t,s))return{changes:{insert:t+t,from:a},effects:Bd.of(a+t.length),range:oe.cursor(a+t.length)}}return{range:r=n}}));return r?null:e.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function af(e,t){let i=il(e).resolveInner(t+1);return i.parent&&i.from==t}function lf(e,t,i){let n=e.charCategorizer(t);if(n(e.sliceDoc(t-1,t))!=Ye.Word)return t;for(let s of i){let i=t-s.length;if(e.sliceDoc(i,t)==s&&n(e.sliceDoc(i-1,i))!=Ye.Word)return i}return-1}const hf=[{key:"Ctrl-Space",run:e=>!!e.state.field(yd,!1)&&(e.dispatch({effects:Qd.of(!0)}),!0)},{key:"Escape",run:e=>{let t=e.state.field(yd,!1);return!(!t||!t.active.some((e=>0!=e.state))||(e.dispatch({effects:Sd.of(null)}),0))}},{key:"ArrowDown",run:wd(!0)},{key:"ArrowUp",run:wd(!1)},{key:"PageDown",run:wd(!0,"page")},{key:"PageUp",run:wd(!1,"page")},{key:"Enter",run:e=>{let t=e.state.field(yd,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||Date.now()-t.open.timestamp<e.state.facet(rd).interactionDelay||(t.open.disabled||td(e,t.open.options[t.open.selected]),0))}}],cf=Qe.highest(ar.computeN([rd],(e=>e.facet(rd).defaultKeymap?[hf]:[])));class uf{constructor(e,t,i){this.from=e,this.to=t,this.diagnostic=i}}class df{constructor(e,t,i){this.diagnostics=e,this.panel=t,this.selected=i}static init(e,t,i){let n=e,s=i.facet(kf).markerFilter;s&&(n=s(n));let r=$i.set(n.map((e=>e.from==e.to||e.from==e.to-1&&i.doc.lineAt(e.from).to==e.from?$i.widget({widget:new _f(e),diagnostic:e}).range(e.from):$i.mark({attributes:{class:"cm-lintRange cm-lintRange-"+e.severity},diagnostic:e}).range(e.from,e.to))),!0);return new df(r,t,ff(r))}}function ff(e,t=null,i=0){let n=null;return e.between(i,1e9,((e,i,{spec:s})=>{if(!t||s.diagnostic==t)return n=new uf(e,i,s.diagnostic),!1})),n}function Of(e,t){return!(!e.effects.some((e=>e.is(mf)))&&!e.changes.touchesRange(t.pos))}function pf(e,t){return e.field(Sf,!1)?t:t.concat(Ve.appendConfig.of([Sf,Ks.decorations.compute([Sf],(e=>{let{selected:t,panel:i}=e.field(Sf);return t&&i&&t.from!=t.to?$i.set([vf.range(t.from,t.to)]):$i.none})),oo(bf,{hideOn:Of}),Zf]))}const mf=Ve.define(),gf=Ve.define(),Qf=Ve.define(),Sf=me.define({create:()=>new df($i.none,null,null),update(e,t){if(t.docChanged){let i=e.diagnostics.map(t.changes),n=null;if(e.selected){let s=t.changes.mapPos(e.selected.from,1);n=ff(i,e.selected.diagnostic,s)||ff(i,null,s)}e=new df(i,e.panel,n)}for(let i of t.effects)i.is(mf)?e=df.init(i.value,e.panel,t.state):i.is(gf)?e=new df(e.diagnostics,i.value?Wf.open:null,e.selected):i.is(Qf)&&(e=new df(e.diagnostics,e.panel,i.value));return e},provide:e=>[Oo.from(e,(e=>e.panel)),Ks.decorations.from(e,(e=>e.diagnostics))]}),vf=$i.mark({class:"cm-lintRange cm-lintRange-active"});function bf(e,t,i){let{diagnostics:n}=e.state.field(Sf),s=[],r=2e8,o=0;n.between(t-(i<0?1:0),t+(i>0?1:0),((e,n,{spec:a})=>{t>=e&&t<=n&&(e==n||(t>e||i>0)&&(t<n||i<0))&&(s.push(a.diagnostic),r=Math.min(e,r),o=Math.max(n,o))}));let a=e.state.facet(kf).tooltipFilter;return a&&(s=a(s)),s.length?{pos:r,end:o,above:e.state.doc.lineAt(r).to<o,create:()=>({dom:yf(e,s)})}:null}function yf(e,t){return Gc("ul",{class:"cm-tooltip-lint"},t.map((t=>Tf(e,t,!1))))}const wf=e=>{let t=e.state.field(Sf,!1);return!(!t||!t.panel||(e.dispatch({effects:gf.of(!1)}),0))},xf=[{key:"Mod-Shift-m",run:e=>{let t=e.state.field(Sf,!1);t&&t.panel||e.dispatch({effects:pf(e.state,[gf.of(!0)])});let i=ho(e,Wf.open);return i&&i.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:e=>{let t=e.state.field(Sf,!1);if(!t)return!1;let i=e.state.selection.main,n=t.diagnostics.iter(i.to+1);return!(!n.value&&(n=t.diagnostics.iter(0),!n.value||n.from==i.from&&n.to==i.to)||(e.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0}),0))}}],$f=Fi.fromClass(class{constructor(e){this.view=e,this.timeout=-1,this.set=!0;let{delay:t}=e.state.facet(kf);this.lintTime=Date.now()+t,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,t)}run(){let e=Date.now();if(e<this.lintTime-10)setTimeout(this.run,this.lintTime-e);else{this.set=!1;let{state:e}=this.view,{sources:t}=e.facet(kf);Promise.all(t.map((e=>Promise.resolve(e(this.view))))).then((t=>{let i=t.reduce(((e,t)=>e.concat(t)));this.view.state.doc==e.doc&&this.view.dispatch(function(e,t){return{effects:pf(e,[mf.of(t)])}}(this.view.state,i))}),(e=>{Ni(this.view.state,e)}))}}update(e){let t=e.state.facet(kf);(e.docChanged||t!=e.startState.facet(kf))&&(this.lintTime=Date.now()+t.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,t.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}}),kf=he.define({combine:e=>Object.assign({sources:e.map((e=>e.source))},Ge(e.map((e=>e.config)),{delay:750,markerFilter:null,tooltipFilter:null})),enables:$f});function Pf(e){let t=[];if(e)e:for(let{name:i}of e){for(let e=0;e<i.length;e++){let n=i[e];if(/[a-zA-Z]/.test(n)&&!t.some((e=>e.toLowerCase()==n.toLowerCase()))){t.push(n);continue e}}t.push("")}return t}function Tf(e,t,i){var n;let s=i?Pf(t.actions):[];return Gc("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},Gc("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage():t.message),null===(n=t.actions)||void 0===n?void 0:n.map(((i,n)=>{let r=n=>{n.preventDefault();let s=ff(e.state.field(Sf).diagnostics,t);s&&i.apply(e,s.from,s.to)},{name:o}=i,a=s[n]?o.indexOf(s[n]):-1,l=a<0?o:[o.slice(0,a),Gc("u",o.slice(a,a+1)),o.slice(a+1)];return Gc("button",{type:"button",class:"cm-diagnosticAction",onclick:r,onmousedown:r,"aria-label":` Action: ${o}${a<0?"":` (access key "${s[n]})"`}.`},l)})),t.source&&Gc("div",{class:"cm-diagnosticSource"},t.source))}class _f extends wi{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return Gc("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class Cf{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=Tf(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Wf{constructor(e){this.view=e,this.items=[],this.list=Gc("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t=>{if(27==t.keyCode)wf(this.view),this.view.focus();else if(38==t.keyCode||33==t.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==t.keyCode||34==t.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==t.keyCode)this.moveSelection(0);else if(35==t.keyCode)this.moveSelection(this.items.length-1);else if(13==t.keyCode)this.view.focus();else{if(!(t.keyCode>=65&&t.keyCode<=90&&this.selectedIndex>=0))return;{let{diagnostic:i}=this.items[this.selectedIndex],n=Pf(i.actions);for(let s=0;s<n.length;s++)if(n[s].toUpperCase().charCodeAt(0)==t.keyCode){let t=ff(this.view.state.field(Sf).diagnostics,i);t&&i.actions[s].apply(e,t.from,t.to)}}}t.preventDefault()},onclick:e=>{for(let t=0;t<this.items.length;t++)this.items[t].dom.contains(e.target)&&this.moveSelection(t)}}),this.dom=Gc("div",{class:"cm-panel-lint"},this.list,Gc("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>wf(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Sf).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field(Sf),i=0,n=!1,s=null;for(e.between(0,this.view.state.doc.length,((e,r,{spec:o})=>{let a,l=-1;for(let e=i;e<this.items.length;e++)if(this.items[e].diagnostic==o.diagnostic){l=e;break}l<0?(a=new Cf(this.view,o.diagnostic),this.items.splice(i,0,a),n=!0):(a=this.items[l],l>i&&(this.items.splice(i,l-i),n=!0)),t&&a.diagnostic==t.diagnostic?a.dom.hasAttribute("aria-selected")||(a.dom.setAttribute("aria-selected","true"),s=a):a.dom.hasAttribute("aria-selected")&&a.dom.removeAttribute("aria-selected"),i++}));i<this.items.length&&!(1==this.items.length&&this.items[0].diagnostic.from<0);)n=!0,this.items.pop();0==this.items.length&&(this.items.push(new Cf(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),n=!0),s?(this.list.setAttribute("aria-activedescendant",s.id),this.view.requestMeasure({key:this,read:()=>({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{e.top<t.top?this.list.scrollTop-=t.top-e.top:e.bottom>t.bottom&&(this.list.scrollTop+=e.bottom-t.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),n&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)t();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=ff(this.view.state.field(Sf).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:Qf.of(t)})}static open(e){return new Wf(e)}}function Af(e){return function(e,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(e)}</svg>')`}(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${e}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const Zf=Ks.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Af("#d11")},".cm-lintRange-warning":{backgroundImage:Af("orange")},".cm-lintRange-info":{backgroundImage:Af("#999")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});var Xf=function(e){void 0===e&&(e={});var t=[];!1!==e.closeBracketsKeymap&&(t=t.concat(ef)),!1!==e.defaultKeymap&&(t=t.concat(Bc)),!1!==e.searchKeymap&&(t=t.concat(Iu)),!1!==e.historyKeymap&&(t=t.concat(zh)),!1!==e.foldKeymap&&(t=t.concat(Ul)),!1!==e.completionKeymap&&(t=t.concat(hf)),!1!==e.lintKeymap&&(t=t.concat(xf));var i=[];return!1!==e.lineNumbers&&i.push(function(e={}){return[_o.of(e),bo(),Ao]}()),!1!==e.highlightActiveLineGutter&&i.push(Vo),!1!==e.highlightSpecialChars&&i.push(function(e={}){return[Rr.of(e),qr||(qr=Fi.fromClass(class{constructor(e){this.view=e,this.decorations=$i.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(e.state.facet(Rr)),this.decorations=this.decorator.createDeco(e)}makeDecorator(e){return new Wr({regexp:e.specialChars,decoration:(t,i,n)=>{let{doc:s}=i.state,r=N(t[0],0);if(9==r){let e=s.lineAt(n),t=i.state.tabSize,r=ct(e.text,t,n-e.from);return $i.replace({widget:new Er((t-r%t)*this.view.defaultCharacterWidth)})}return this.decorationCache[r]||(this.decorationCache[r]=$i.replace({widget:new Mr(e,r)}))},boundary:e.replaceTabs?void 0:/[^]/})}update(e){let t=e.state.facet(Rr);e.startState.facet(Rr)!=t?(this.decorator=this.makeDecorator(t),this.decorations=this.decorator.createDeco(e.view)):this.decorations=this.decorator.updateDeco(e,this.decorations)}},{decorations:e=>e.decorations}))]}()),!1!==e.history&&i.push(function(e={}){return[Ah,Wh.of(e),Ks.domEventHandlers({beforeinput(e,t){let i="historyUndo"==e.inputType?Xh:"historyRedo"==e.inputType?Vh:null;return!!i&&(e.preventDefault(),i(t))}})]}()),!1!==e.foldGutter&&i.push(function(e={}){let t=Object.assign(Object.assign({},Gl),e),i=new zl(t,!0),n=new zl(t,!1),s=Fi.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(ul)!=e.state.facet(ul)||e.startState.field(ql,!1)!=e.state.field(ql,!1)||il(e.startState)!=il(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new Ke;for(let s of e.viewportLineBlocks){let r=Ml(e.state,s.from,s.to)?n:Al(e.state,s.from,s.to)?i:null;r&&t.add(s.from,s.from,r)}return t.finish()}}),{domEventHandlers:r}=t;return[s,So({class:"cm-foldGutter",markers(e){var t;return(null===(t=e.plugin(s))||void 0===t?void 0:t.markers)||Je.empty},initialSpacer:()=>new zl(t,!1),domEventHandlers:Object.assign(Object.assign({},r),{click:(e,t,i)=>{if(r.click&&r.click(e,t,i))return!0;let n=Ml(e.state,t.from,t.to);if(n)return e.dispatch({effects:Vl.of(n)}),!0;let s=Al(e.state,t.from,t.to);return!!s&&(e.dispatch({effects:Xl.of(s)}),!0)}})}),Bl()]}()),!1!==e.drawSelection&&i.push(function(e={}){return[vr.of(e),yr,xr,kr,Yi.of(!0)]}()),!1!==e.dropCursor&&i.push([Tr,_r]),!1!==e.allowMultipleSelections&&i.push(Ne.allowMultipleSelections.of(!0)),!1!==e.indentOnInput&&i.push(Ne.transactionFilter.of((e=>{if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;let t=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!t.length)return e;let i=e.newDoc,{head:n}=e.newSelection.main,s=i.lineAt(n);if(n>s.from+200)return e;let r=i.sliceString(s.from,n);if(!t.some((e=>e.test(r))))return e;let{state:o}=e,a=-1,l=[];for(let{head:e}of o.selection.ranges){let t=o.doc.lineAt(e);if(t.from==a)continue;a=t.from;let i=gl(o,t.from);if(null==i)continue;let n=/^\s*/.exec(t.text)[0],s=ml(o,i);n!=s&&l.push({from:t.from,to:t.from+n.length,insert:s})}return l.length?[e,{changes:l,sequential:!0}]:e}))),!1!==e.syntaxHighlighting&&i.push(eh(nh,{fallback:!0})),!1!==e.bracketMatching&&i.push(function(e={}){return[oh.of(e),uh]}()),!1!==e.closeBrackets&&i.push([Kd,zd]),!1!==e.autocompletion&&i.push(function(e={}){return[yd,rd.of(e),$d,cf,kd]}()),!1!==e.rectangularSelection&&i.push(function(e){let t=e=>e.altKey&&0==e.button;return Ks.mouseSelectionStyle.of(((e,i)=>t(i)?function(e,t){let i=jr(e,t),n=e.state.selection;return i?{update(e){if(e.docChanged){let t=e.changes.mapPos(e.startState.doc.line(i.line).from),s=e.state.doc.lineAt(t);i={line:s.number,col:i.col,off:Math.min(i.off,s.length)},n=n.map(e.changes)}},get(t,s,r){let o=jr(e,t);if(!o)return n;let a=function(e,t,i){let n=Math.min(t.line,i.line),s=Math.max(t.line,i.line),r=[];if(t.off>Yr||i.off>Yr||t.col<0||i.col<0){let o=Math.min(t.off,i.off),a=Math.max(t.off,i.off);for(let t=n;t<=s;t++){let i=e.doc.line(t);i.length<=a&&r.push(oe.range(i.from+o,i.to+a))}}else{let o=Math.min(t.col,i.col),a=Math.max(t.col,i.col);for(let t=n;t<=s;t++){let i=e.doc.line(t),n=ut(i.text,o,e.tabSize,!0);if(n<0)r.push(oe.cursor(i.to));else{let t=ut(i.text,a,e.tabSize);r.push(oe.range(i.from+n,i.from+t))}}}return r}(e.state,i,o);return a.length?r?oe.create(a.concat(n.ranges)):oe.create(a):n}}:null}(e,i):null))}()),!1!==e.crosshairCursor&&i.push(function(e={}){let[t,i]=Br[e.key||"Alt"],n=Fi.fromClass(class{constructor(e){this.view=e,this.isDown=!1}set(e){this.isDown!=e&&(this.isDown=e,this.view.update([]))}},{eventHandlers:{keydown(e){this.set(e.keyCode==t||i(e))},keyup(e){e.keyCode!=t&&i(e)||this.set(!1)},mousemove(e){this.set(i(e))}}});return[n,Ks.contentAttributes.of((e=>{var t;return(null===(t=e.plugin(n))||void 0===t?void 0:t.isDown)?Nr:null}))]}()),!1!==e.highlightActiveLine&&i.push(Ir),!1!==e.highlightSelectionMatches&&i.push(function(e){let t=[Ou,fu];return t}()),e.tabSize&&"number"==typeof e.tabSize&&i.push(Ol.of(" ".repeat(e.tabSize))),i.concat([ar.of(t.flat())]).filter(Boolean)};const Vf="#e06c75",Rf="#abb2bf",qf="#7d8799",Mf="#d19a66",Ef="#2c313a",Df="#282c34",If="#353a42",Uf="#528bff",Yf=[Ks.theme({"&":{color:Rf,backgroundColor:Df},".cm-content":{caretColor:Uf},".cm-cursor, .cm-dropCursor":{borderLeftColor:Uf},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:"#3E4451"},".cm-panels":{backgroundColor:"#21252b",color:Rf},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:Df,color:qf,border:"none"},".cm-activeLineGutter":{backgroundColor:Ef},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:If},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:If,borderBottomColor:If},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Ef,color:Rf}}},{dark:!0}),eh(Fl.define([{tag:Fa.keyword,color:"#c678dd"},{tag:[Fa.name,Fa.deleted,Fa.character,Fa.propertyName,Fa.macroName],color:Vf},{tag:[Fa.function(Fa.variableName),Fa.labelName],color:"#61afef"},{tag:[Fa.color,Fa.constant(Fa.name),Fa.standard(Fa.name)],color:Mf},{tag:[Fa.definition(Fa.name),Fa.separator],color:Rf},{tag:[Fa.typeName,Fa.className,Fa.number,Fa.changed,Fa.annotation,Fa.modifier,Fa.self,Fa.namespace],color:"#e5c07b"},{tag:[Fa.operator,Fa.operatorKeyword,Fa.url,Fa.escape,Fa.regexp,Fa.link,Fa.special(Fa.string)],color:"#56b6c2"},{tag:[Fa.meta,Fa.comment],color:qf},{tag:Fa.strong,fontWeight:"bold"},{tag:Fa.emphasis,fontStyle:"italic"},{tag:Fa.strikethrough,textDecoration:"line-through"},{tag:Fa.link,color:qf,textDecoration:"underline"},{tag:Fa.heading,fontWeight:"bold",color:Vf},{tag:[Fa.atom,Fa.bool,Fa.special(Fa.variableName)],color:Mf},{tag:[Fa.processingInstruction,Fa.string,Fa.inserted],color:"#98c379"},{tag:Fa.invalid,color:"#ffffff"}]))];var jf=Ae.define();function Bf(e){var{value:t,selection:i,onChange:s,onStatistics:r,onCreateEditor:o,onUpdate:a,extensions:l=[],autoFocus:h,theme:c="light",height:u="",minHeight:d="",maxHeight:f="",placeholder:O="",width:p="",minWidth:m="",maxWidth:g="",editable:Q=!0,readOnly:S=!1,indentWithTab:v=!0,basicSetup:b=!0,root:y,initialState:w}=e,[x,$]=(0,n.useState)(),[k,P]=(0,n.useState)(),[T,_]=(0,n.useState)(),C=Ks.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),W=Ks.theme({"&":{height:u,minHeight:d,maxHeight:f,width:p,minWidth:m,maxWidth:g}}),A=Ks.updateListener.of((e=>{if(e.docChanged&&"function"==typeof s&&!e.transactions.some((e=>e.annotation(jf)))){var t=e.state.doc.toString();s(t,e)}r&&r((e=>({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map((t=>e.state.sliceDoc(t.from,t.to))),selectedText:e.state.selection.ranges.some((e=>!e.empty))}))(e))})),Z=[A,W];switch(v&&Z.unshift(ar.of([Nc])),b&&("boolean"==typeof b?Z.unshift(Xf()):Z.unshift(Xf(b))),O&&Z.unshift(function(e){return Fi.fromClass(class{constructor(t){this.view=t,this.placeholder=$i.set([$i.widget({widget:new Ur(e),side:1}).range(0)])}get decorations(){return this.view.state.doc.length?$i.none:this.placeholder}},{decorations:e=>e.decorations})}(O)),c){case"light":Z.push(C);break;case"dark":Z.push(Yf);break;case"none":break;default:Z.push(c)}return!1===Q&&Z.push(Ks.editable.of(!1)),S&&Z.push(Ne.readOnly.of(!0)),a&&"function"==typeof a&&Z.push(Ks.updateListener.of(a)),Z=Z.concat(l),(0,n.useEffect)((()=>{if(x&&!T){var e={doc:t,selection:i,extensions:Z},n=w?Ne.fromJSON(w.json,e,w.fields):Ne.create(e);if(_(n),!k){var s=new Ks({state:n,parent:x,root:y});P(s),o&&o(s,n)}}return()=>{k&&(_(void 0),P(void 0))}}),[x,T]),(0,n.useEffect)((()=>$(e.container)),[e.container]),(0,n.useEffect)((()=>()=>{k&&(k.destroy(),P(void 0))}),[k]),(0,n.useEffect)((()=>{h&&k&&k.focus()}),[h,k]),(0,n.useEffect)((()=>{k&&k.dispatch({effects:Ve.reconfigure.of(Z)})}),[c,l,u,d,f,p,m,g,O,Q,S,v,b,s,a]),(0,n.useEffect)((()=>{if(void 0!==t){var e=k?k.state.doc.toString():"";k&&t!==e&&k.dispatch({changes:{from:0,to:e.length,insert:t||""},annotations:[jf.of(!0)]})}}),[t,k]),{state:T,setState:_,view:k,setView:P,container:x,setContainer:$}}var Nf=i(4246),Gf=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],zf=(0,n.forwardRef)(((e,t)=>{var{className:i,value:s="",selection:r,extensions:o=[],onChange:a,onStatistics:l,onCreateEditor:h,onUpdate:c,autoFocus:u,theme:d="light",height:f,minHeight:O,maxHeight:p,width:m,minWidth:g,maxWidth:Q,basicSetup:S,placeholder:v,indentWithTab:b,editable:y,readOnly:w,root:x,initialState:$}=e,k=function(e,t){if(null==e)return{};var i,n,s={},r=Object.keys(e);for(n=0;n<r.length;n++)i=r[n],t.indexOf(i)>=0||(s[i]=e[i]);return s}(e,Gf),P=(0,n.useRef)(null),{state:_,view:C,container:W,setContainer:A}=Bf({container:P.current,root:x,value:s,autoFocus:u,theme:d,height:f,minHeight:O,maxHeight:p,width:m,minWidth:g,maxWidth:Q,basicSetup:S,placeholder:v,indentWithTab:b,editable:y,readOnly:w,selection:r,onChange:a,onStatistics:l,onCreateEditor:h,onUpdate:c,extensions:o,initialState:$});if((0,n.useImperativeHandle)(t,(()=>({editor:P.current,state:_,view:C})),[P,W,_,C]),"string"!=typeof s)throw new Error("value must be typeof string but got "+typeof s);var Z="string"==typeof d?"cm-theme-"+d:"cm-theme";return(0,Nf.jsx)("div",T({ref:P,className:Z+(i?" "+i:"")},k))}));zf.displayName="CodeMirror";var Lf,Ff=zf;class Hf{constructor(e,t,i,n,s,r,o,a,l,h=0,c){this.p=e,this.stack=t,this.state=i,this.reducePos=n,this.pos=s,this.score=r,this.buffer=o,this.bufferBase=a,this.curContext=l,this.lookAhead=h,this.parent=c}toString(){return`[${this.stack.filter(((e,t)=>t%3==0)).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,i=0){let n=e.parser.context;return new Hf(e,[],t,i,i,0,[],0,n?new Jf(n,n.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){let t=e>>19,i=65535&e,{parser:n}=this.p,s=n.dynamicPrecedence(i);if(s&&(this.score+=s),0==t)return this.pushState(n.getGoto(this.state,i,!0),this.reducePos),i<n.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,4,!0),void this.reduceContext(i,this.reducePos);let r=this.stack.length-3*(t-1)-(262144&e?6:0),o=this.stack[r-2],a=this.stack[r-1],l=this.bufferBase+this.buffer.length-a;if(i<n.minRepeatTerm||131072&e){let e=n.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,o,e,l+4,!0)}if(262144&e)this.state=this.stack[r];else{let e=this.stack[r-3];this.state=n.getGoto(e,i,!0)}for(;this.stack.length>r;)this.stack.pop();this.reduceContext(i,o)}storeNode(e,t,i,n=4,s=!1){if(0==e&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let e=this,n=this.buffer.length;if(0==n&&e.parent&&(n=e.bufferBase-e.parent.bufferBase,e=e.parent),n>0&&0==e.buffer[n-4]&&e.buffer[n-1]>-1){if(t==i)return;if(e.buffer[n-2]>=t)return void(e.buffer[n-2]=i)}}if(s&&this.pos!=i){let s=this.buffer.length;if(s>0&&0!=this.buffer[s-4])for(;s>0&&this.buffer[s-2]>i;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,n>4&&(n-=4);this.buffer[s]=e,this.buffer[s+1]=t,this.buffer[s+2]=i,this.buffer[s+3]=n}else this.buffer.push(e,t,i,n)}shift(e,t,i){let n=this.pos;if(131072&e)this.pushState(65535&e,this.pos);else if(0==(262144&e)){let s=e,{parser:r}=this.p;(i>this.pos||t<=r.maxNode)&&(this.pos=i,r.stateFlag(s,1)||(this.reducePos=i)),this.pushState(s,n),this.shiftContext(t,n),t<=r.maxNode&&this.buffer.push(t,n,i,4)}else this.pos=i,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,i,4)}apply(e,t,i){65536&e?this.reduce(e):this.shift(e,t,i)}useNode(e,t){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let n=this.pos;this.reducePos=this.pos=n+e.length,this.pushState(t,n),this.buffer.push(i,n,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let i=e.buffer.slice(t),n=e.bufferBase+t;for(;e&&n==e.bufferBase;)e=e.parent;return new Hf(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,n,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,i?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new Kf(this);;){let i=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(0==i)return!1;if(0==(65536&i))return!0;t.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let i=[];for(let n,s=0;s<t.length;s+=2)(n=t[s+1])!=this.state&&this.p.parser.hasAction(n,e)&&i.push(t[s],n);if(this.stack.length<120)for(let e=0;i.length<8&&e<t.length;e+=2){let n=t[e+1];i.some(((e,t)=>1&t&&e==n))||i.push(t[e],n)}t=i}let i=[];for(let e=0;e<t.length&&i.length<4;e+=2){let n=t[e+1];if(n==this.state)continue;let s=this.split();s.pushState(n,this.pos),s.storeNode(0,s.pos,s.pos,4,!0),s.shiftContext(t[e],this.pos),s.score-=200,i.push(s)}return i}forceReduce(){let e=this.p.parser.stateSlot(this.state,5);if(0==(65536&e))return!1;let{parser:t}=this.p;if(!t.validAction(this.state,e)){let i=e>>19,n=65535&e,s=this.stack.length-3*i;if(s<0||t.getGoto(this.stack[s],n,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:e}=this.p;return 65535==e.data[e.stateSlot(this.state,1)]&&!e.stateSlot(this.state,4)}restart(){this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||-3!=this.buffer[e])&&this.buffer.push(this.curContext.hash,this.reducePos,this.reducePos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||-4!=this.buffer[e])&&this.buffer.push(this.lookAhead,this.reducePos,this.reducePos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new Jf(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Jf{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}!function(e){e[e.Insert=200]="Insert",e[e.Delete=190]="Delete",e[e.Reduce=100]="Reduce",e[e.MaxNext=4]="MaxNext",e[e.MaxInsertStackDepth=300]="MaxInsertStackDepth",e[e.DampenInsertStackDepth=120]="DampenInsertStackDepth"}(Lf||(Lf={}));class Kf{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=65535&e,i=e>>19;0==i?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(i-1);let n=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=n}}class eO{constructor(e,t,i){this.stack=e,this.pos=t,this.index=i,this.buffer=e.buffer,0==this.index&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new eO(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;null!=e&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}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]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new eO(this.stack,this.pos,this.index)}}class tO{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const iO=new tO;class nO{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=iO,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let i=this.range,n=this.rangeIndex,s=this.pos+e;for(;s<i.from;){if(!n)return null;let e=this.ranges[--n];s-=i.from-e.to,i=e}for(;t<0?s>i.to:s>=i.to;){if(n==this.ranges.length-1)return null;let e=this.ranges[++n];s+=e.from-i.to,i=e}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t,i,n=this.chunkOff+e;if(n>=0&&n<this.chunk.length)t=this.pos+e,i=this.chunk.charCodeAt(n);else{let n=this.resolveOffset(e,1);if(null==n)return-1;if(t=n,t>=this.chunk2Pos&&t<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(t-this.chunk2Pos);else{let e=this.rangeIndex,n=this.range;for(;n.to<=t;)n=this.ranges[++e];this.chunk2=this.input.chunk(this.chunk2Pos=t),t+this.chunk2.length>n.to&&(this.chunk2=this.chunk2.slice(0,n.to-t)),i=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),i}acceptToken(e,t=0){let i=t?this.resolveOffset(t,-1):this.pos;if(null==i||i<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=i}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=iO,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let i="";for(let n of this.ranges){if(n.from>=t)break;n.to>e&&(i+=this.input.read(Math.max(n.from,e),Math.min(n.to,t)))}return i}}class sO{constructor(e,t){this.data=e,this.id=t}token(e,t){!function(e,t,i,n){let s=0,r=1<<n,{parser:o}=i.p,{dialect:a}=o;e:for(;0!=(r&e[s]);){let i=e[s+1];for(let n=s+3;n<i;n+=2)if((e[n+1]&r)>0){let i=e[n];if(a.allows(i)&&(-1==t.token.value||t.token.value==i||o.overrides(i,t.token.value))){t.acceptToken(i);break}}let n=t.next,l=0,h=e[s+2];if(!(t.next<0&&h>l&&65535==e[i+3*h-3]&&65535==e[i+3*h-3])){for(;l<h;){let r=l+h>>1,o=i+r+(r<<1),a=e[o],c=e[o+1]||65536;if(n<a)h=r;else{if(!(n>=c)){s=e[o+2],t.advance();continue e}l=r+1}}break}s=e[i+3*h-1]}}(this.data,e,t,this.id)}}sO.prototype.contextual=sO.prototype.fallback=sO.prototype.extend=!1;class rO{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function oO(e,t=Uint16Array){if("string"!=typeof e)return e;let i=null;for(let n=0,s=0;n<e.length;){let r=0;for(;;){let t=e.charCodeAt(n++),i=!1;if(126==t){r=65535;break}t>=92&&t--,t>=34&&t--;let s=t-32;if(s>=46&&(s-=46,i=!0),r+=s,i)break;r*=46}i?i[s++]=r:i=new t(r)}return i}const aO="undefined"!=typeof process&&process.env&&/\bparse\b/.test(process.env.LOG);let lO=null;var hO,cO;function uO(e,t,i){let n=e.cursor(No.IncludeAnonymous);for(n.moveTo(t);;)if(!(i<0?n.childBefore(t):n.childAfter(t)))for(;;){if((i<0?n.to<t:n.from>t)&&!n.type.isError)return i<0?Math.max(0,Math.min(n.to-1,t-25)):Math.min(e.length,Math.max(n.from+1,t+25));if(i<0?n.prevSibling():n.nextSibling())break;if(!n.parent())return i<0?0:e.length}}!function(e){e[e.Margin=25]="Margin"}(hO||(hO={}));class dO{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?uO(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?uO(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let i=this.trees[t],n=this.index[t];if(n==i.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=i.children[n],r=this.start[t]+i.positions[n];if(r>e)return this.nextStart=r,null;if(s instanceof Go){if(r==e){if(r<this.safeFrom)return null;let e=r+s.length;if(e<=this.safeTo){let t=s.prop(Eo.lookAhead);if(!t||e+t<this.fragment.to)return s}}this.index[t]++,r+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(r),this.index.push(0))}else this.index[t]++,this.nextStart=r+s.length}}}class fO{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map((e=>new tO))}getActions(e){let t=0,i=null,{parser:n}=e.p,{tokenizers:s}=n,r=n.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,a=0;for(let n=0;n<s.length;n++){if(0==(1<<n&r))continue;let l=s[n],h=this.tokens[n];if((!i||l.fallback)&&((l.contextual||h.start!=e.pos||h.mask!=r||h.context!=o)&&(this.updateCachedToken(h,l,e),h.mask=r,h.context=o),h.lookAhead>h.end+25&&(a=Math.max(h.lookAhead,a)),0!=h.value)){let n=t;if(h.extended>-1&&(t=this.addActions(e,h.extended,h.end,t)),t=this.addActions(e,h.value,h.end,t),!l.extend&&(i=h,t>n))break}}for(;this.actions.length>t;)this.actions.pop();return a&&e.setLookAhead(a),i||e.pos!=this.stream.end||(i=new tO,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,t=this.addActions(e,i.value,i.end,t)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new tO,{pos:i,p:n}=e;return t.start=i,t.end=Math.min(i+1,n.stream.end),t.value=i==n.stream.end?n.parser.eofTerm:0,t}updateCachedToken(e,t,i){let n=this.stream.clipPos(i.pos);if(t.token(this.stream.reset(n,e),i),e.value>-1){let{parser:t}=i.p;for(let n=0;n<t.specialized.length;n++)if(t.specialized[n]==e.value){let s=t.specializers[n](this.stream.read(e.start,e.end),i);if(s>=0&&i.p.parser.dialect.allows(s>>1)){0==(1&s)?e.value=s>>1:e.extended=s>>1;break}}}else e.value=0,e.end=this.stream.clipPos(n+1)}putAction(e,t,i,n){for(let t=0;t<n;t+=3)if(this.actions[t]==e)return n;return this.actions[n++]=e,this.actions[n++]=t,this.actions[n++]=i,n}addActions(e,t,i,n){let{state:s}=e,{parser:r}=e.p,{data:o}=r;for(let e=0;e<2;e++)for(let a=r.stateSlot(s,e?2:1);;a+=3){if(65535==o[a]){if(1!=o[a+1]){0==n&&2==o[a+1]&&(n=this.putAction(vO(o,a+2),t,i,n));break}a=vO(o,a+2)}o[a]==t&&(n=this.putAction(vO(o,a+1),t,i,n))}return n}}!function(e){e[e.Distance=5]="Distance",e[e.MaxRemainingPerStep=3]="MaxRemainingPerStep",e[e.MinBufferLengthPrune=500]="MinBufferLengthPrune",e[e.ForceReduceLimit=10]="ForceReduceLimit",e[e.CutDepth=15e3]="CutDepth",e[e.CutTo=9e3]="CutTo"}(cO||(cO={}));class OO{constructor(e,t,i,n){this.parser=e,this.input=t,this.ranges=n,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.stream=new nO(t,n),this.tokens=new fO(e,this.stream),this.topTerm=e.top[1];let{from:s}=n[0];this.stacks=[Hf.start(this,e.top[0],s)],this.fragments=i.length&&this.stream.end-s>4*e.bufferLength?new dO(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e,t,i=this.stacks,n=this.minStackPos,s=this.stacks=[];for(let r=0;r<i.length;r++){let o=i[r];for(;;){if(this.tokens.mainToken=null,o.pos>n)s.push(o);else{if(this.advanceStack(o,s,i))continue;{e||(e=[],t=[]),e.push(o);let i=this.tokens.getMainToken(o);t.push(i.value,i.end)}}break}}if(!s.length){let t=e&&function(e){let t=null;for(let i of e){let e=i.p.stoppedAt;(i.pos==i.p.stream.end||null!=e&&i.pos>e)&&i.p.parser.stateFlag(i.state,2)&&(!t||t.score<i.score)&&(t=i)}return t}(e);if(t)return this.stackToTree(t);if(this.parser.strict)throw aO&&e&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&e){let i=null!=this.stoppedAt&&e[0].pos>this.stoppedAt?e[0]:this.runRecovery(e,t,s);if(i)return this.stackToTree(i.forceAll())}if(this.recovering){let e=1==this.recovering?1:3*this.recovering;if(s.length>e)for(s.sort(((e,t)=>t.score-e.score));s.length>e;)s.pop();s.some((e=>e.reducePos>n))&&this.recovering--}else if(s.length>1)e:for(let e=0;e<s.length-1;e++){let t=s[e];for(let i=e+1;i<s.length;i++){let n=s[i];if(t.sameState(n)||t.buffer.length>500&&n.buffer.length>500){if(!((t.score-n.score||t.buffer.length-n.buffer.length)>0)){s.splice(e--,1);continue e}s.splice(i--,1)}}}this.minStackPos=s[0].pos;for(let e=1;e<s.length;e++)s[e].pos<this.minStackPos&&(this.minStackPos=s[e].pos);return null}stopAt(e){if(null!=this.stoppedAt&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,i){let n=e.pos,{parser:s}=this,r=aO?this.stackID(e)+" -> ":"";if(null!=this.stoppedAt&&n>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,i=t?e.curContext.hash:0;for(let o=this.fragments.nodeAt(n);o;){let n=this.parser.nodeSet.types[o.type.id]==o.type?s.getGoto(e.state,o.type.id):-1;if(n>-1&&o.length&&(!t||(o.prop(Eo.contextHash)||0)==i))return e.useNode(o,n),aO&&console.log(r+this.stackID(e)+` (via reuse of ${s.getName(o.type.id)})`),!0;if(!(o instanceof Go)||0==o.children.length||o.positions[0]>0)break;let a=o.children[0];if(!(a instanceof Go&&0==o.positions[0]))break;o=a}}let o=s.stateSlot(e.state,4);if(o>0)return e.reduce(o),aO&&console.log(r+this.stackID(e)+` (via always-reduce ${s.getName(65535&o)})`),!0;if(e.stack.length>=15e3)for(;e.stack.length>9e3&&e.forceReduce(););let a=this.tokens.getActions(e);for(let o=0;o<a.length;){let l=a[o++],h=a[o++],c=a[o++],u=o==a.length||!i,d=u?e:e.split();if(d.apply(l,h,c),aO&&console.log(r+this.stackID(d)+` (via ${0==(65536&l)?"shift":`reduce of ${s.getName(65535&l)}`} for ${s.getName(h)} @ ${n}${d==e?"":", split"})`),u)return!0;d.pos>n?t.push(d):i.push(d)}return!1}advanceFully(e,t){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return pO(e,t),!0}}runRecovery(e,t,i){let n=null,s=!1;for(let r=0;r<e.length;r++){let o=e[r],a=t[r<<1],l=t[1+(r<<1)],h=aO?this.stackID(o)+" -> ":"";if(o.deadEnd){if(s)continue;if(s=!0,o.restart(),aO&&console.log(h+this.stackID(o)+" (restarted)"),this.advanceFully(o,i))continue}let c=o.split(),u=h;for(let e=0;c.forceReduce()&&e<10&&(aO&&console.log(u+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,i));e++)aO&&(u=this.stackID(c)+" -> ");for(let e of o.recoverByInsert(a))aO&&console.log(h+this.stackID(e)+" (via recover-insert)"),this.advanceFully(e,i);this.stream.end>o.pos?(l==o.pos&&(l++,a=0),o.recoverByDelete(a,l),aO&&console.log(h+this.stackID(o)+` (via recover-delete ${this.parser.getName(a)})`),pO(o,i)):(!n||n.score<o.score)&&(n=o)}return n}stackToTree(e){return e.close(),Go.build({buffer:eO.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(lO||(lO=new WeakMap)).get(e);return t||lO.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function pO(e,t){for(let i=0;i<t.length;i++){let n=t[i];if(n.pos==e.pos&&n.sameState(e))return void(t[i].score<e.score&&(t[i]=e))}t.push(e)}class mO{constructor(e,t,i){this.source=e,this.flags=t,this.disabled=i}allows(e){return!this.disabled||0==this.disabled[e]}}const gO=e=>e;class QO{constructor(e){this.start=e.start,this.shift=e.shift||gO,this.reduce=e.reduce||gO,this.reuse=e.reuse||gO,this.hash=e.hash||(()=>0),this.strict=!1!==e.strict}}class SO extends ua{constructor(e){if(super(),this.wrappers=[],14!=e.version)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let i=0;i<e.repeatNodeCount;i++)t.push("");let i=Object.keys(e.topRules).map((t=>e.topRules[t][1])),n=[];for(let e=0;e<t.length;e++)n.push([]);function s(e,t,i){n[e].push([t,t.deserialize(String(i))])}if(e.nodeProps)for(let t of e.nodeProps){let e=t[0];"string"==typeof e&&(e=Eo[e]);for(let i=1;i<t.length;){let n=t[i++];if(n>=0)s(n,e,t[i++]);else{let r=t[i+-n];for(let o=-n;o>0;o--)s(t[i++],e,r);i++}}}this.nodeSet=new Yo(t.map(((t,s)=>Uo.define({name:s>=this.minRepeatTerm?void 0:t,id:s,props:n[s],top:i.indexOf(s)>-1,error:0==s,skipped:e.skippedNodes&&e.skippedNodes.indexOf(s)>-1})))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Ro;let r=oO(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e<this.specializerSpecs.length;e++)this.specialized[e]=this.specializerSpecs[e].term;this.specializers=this.specializerSpecs.map(yO),this.states=oO(e.states,Uint32Array),this.data=oO(e.stateData),this.goto=oO(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map((e=>"number"==typeof e?new sO(r,e):e)),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,i){let n=new OO(this,e,t,i);for(let s of this.wrappers)n=s(n,e,t,i);return n}getGoto(e,t,i=!1){let n=this.goto;if(t>=n[0])return-1;for(let s=n[t+1];;){let t=n[s++],r=1&t,o=n[s++];if(r&&i)return o;for(let i=s+(t>>1);s<i;s++)if(n[s]==e)return o;if(r)return-1}}hasAction(e,t){let i=this.data;for(let n=0;n<2;n++)for(let s,r=this.stateSlot(e,n?2:1);;r+=3){if(65535==(s=i[r])){if(1!=i[r+1]){if(2==i[r+1])return vO(i,r+2);break}s=i[r=vO(i,r+2)]}if(s==t||0==s)return vO(i,r+1)}return 0}stateSlot(e,t){return this.states[6*e+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){if(t==this.stateSlot(e,4))return!0;for(let i=this.stateSlot(e,1);;i+=3){if(65535==this.data[i]){if(1!=this.data[i+1])return!1;i=vO(this.data,i+2)}if(t==vO(this.data,i+1))return!0}}nextStates(e){let t=[];for(let i=this.stateSlot(e,1);;i+=3){if(65535==this.data[i]){if(1!=this.data[i+1])break;i=vO(this.data,i+2)}if(0==(1&this.data[i+2])){let e=this.data[i+1];t.some(((t,i)=>1&i&&t==e))||t.push(this.data[i],e)}}return t}overrides(e,t){let i=bO(this.data,this.tokenPrecTable,t);return i<0||bO(this.data,this.tokenPrecTable,e)<i}configure(e){let t=Object.assign(Object.create(SO.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=i}return e.tokenizers&&(t.tokenizers=this.tokenizers.map((t=>{let i=e.tokenizers.find((e=>e.from==t));return i?i.to:t}))),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map(((i,n)=>{let s=e.specializers.find((e=>e.from==i.external));if(!s)return i;let r=Object.assign(Object.assign({},i),{external:s.to});return t.specializers[n]=yO(r),r}))),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),null!=e.strict&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),null!=e.bufferLength&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return null==t?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),i=t.map((()=>!1));if(e)for(let n of e.split(" ")){let e=t.indexOf(n);e>=0&&(i[e]=!0)}let n=null;for(let e=0;e<t.length;e++)if(!i[e])for(let i,s=this.dialects[t[e]];65535!=(i=this.data[s++]);)(n||(n=new Uint8Array(this.maxTerm+1)))[i]=1;return new mO(e,i,n)}static deserialize(e){return new SO(e)}}function vO(e,t){return e[t]|e[t+1]<<16}function bO(e,t,i){for(let n,s=t;65535!=(n=e[s]);s++)if(n==i)return s-t;return-1}function yO(e){if(e.external){let t=e.extend?1:0;return(i,n)=>e.external(i,n)<<1|t}return e.get}const wO=295,xO=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],$O=new QO({start:!1,shift:(e,t)=>4==t||5==t||299==t?e:300==t,strict:!1}),kO=new rO(((e,t)=>{let{next:i}=e;(125==i||-1==i||t.context)&&t.canShift(297)&&e.acceptToken(297)}),{contextual:!0,fallback:!0}),PO=new rO(((e,t)=>{let i,{next:n}=e;xO.indexOf(n)>-1||(47!=n||47!=(i=e.peek(1))&&42!=i)&&125!=n&&59!=n&&-1!=n&&!t.context&&t.canShift(294)&&e.acceptToken(294)}),{contextual:!0}),TO=new rO(((e,t)=>{let{next:i}=e;if((43==i||45==i)&&(e.advance(),i==e.next)){e.advance();let i=!t.context&&t.canShift(1);e.acceptToken(i?1:2)}}),{contextual:!0}),_O=new rO((e=>{for(let t=!1,i=0;;i++){let{next:n}=e;if(n<0){i&&e.acceptToken(wO);break}if(96==n){i?e.acceptToken(wO):e.acceptToken(296,1);break}if(123==n&&t){1==i?e.acceptToken(3,1):e.acceptToken(wO,-1);break}if(10==n&&i){e.advance(),e.acceptToken(wO);break}92==n&&e.advance(),t=36==n,e.advance()}})),CO=_a({"get set async static":Fa.modifier,"for while do if else switch try catch finally return throw break continue default case":Fa.controlKeyword,"in of await yield void typeof delete instanceof":Fa.operatorKeyword,"let var const function class extends":Fa.definitionKeyword,"import export from":Fa.moduleKeyword,"with debugger as new":Fa.keyword,TemplateString:Fa.special(Fa.string),super:Fa.atom,BooleanLiteral:Fa.bool,this:Fa.self,null:Fa.null,Star:Fa.modifier,VariableName:Fa.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":Fa.function(Fa.variableName),VariableDefinition:Fa.definition(Fa.variableName),Label:Fa.labelName,PropertyName:Fa.propertyName,PrivatePropertyName:Fa.special(Fa.propertyName),"CallExpression/MemberExpression/PropertyName":Fa.function(Fa.propertyName),"FunctionDeclaration/VariableDefinition":Fa.function(Fa.definition(Fa.variableName)),"ClassDeclaration/VariableDefinition":Fa.definition(Fa.className),PropertyDefinition:Fa.definition(Fa.propertyName),PrivatePropertyDefinition:Fa.definition(Fa.special(Fa.propertyName)),UpdateOp:Fa.updateOperator,LineComment:Fa.lineComment,BlockComment:Fa.blockComment,Number:Fa.number,String:Fa.string,ArithOp:Fa.arithmeticOperator,LogicOp:Fa.logicOperator,BitOp:Fa.bitwiseOperator,CompareOp:Fa.compareOperator,RegExp:Fa.regexp,Equals:Fa.definitionOperator,Arrow:Fa.function(Fa.punctuation),": Spread":Fa.punctuation,"( )":Fa.paren,"[ ]":Fa.squareBracket,"{ }":Fa.brace,"InterpolationStart InterpolationEnd":Fa.special(Fa.brace),".":Fa.derefOperator,", ;":Fa.separator,"@":Fa.meta,TypeName:Fa.typeName,TypeDefinition:Fa.definition(Fa.typeName),"type enum interface implements namespace module declare":Fa.definitionKeyword,"abstract global Privacy readonly override":Fa.modifier,"is keyof unique infer":Fa.operatorKeyword,JSXAttributeValue:Fa.attributeValue,JSXText:Fa.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":Fa.angleBracket,"JSXIdentifier JSXNameSpacedName":Fa.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":Fa.attributeName,"JSXBuiltin/JSXIdentifier":Fa.standard(Fa.tagName)}),WO={__proto__:null,export:16,as:21,from:27,default:30,async:35,function:36,extends:46,this:50,true:58,false:58,null:68,void:72,typeof:76,super:92,new:126,await:143,yield:145,delete:146,class:156,public:211,private:211,protected:211,readonly:213,instanceof:232,satisfies:235,in:236,const:238,import:270,keyof:325,unique:329,infer:335,is:371,abstract:391,implements:393,type:395,let:398,var:400,interface:407,enum:411,namespace:417,module:419,declare:423,global:427,for:448,of:457,while:460,with:464,do:468,if:472,else:474,switch:478,case:484,try:490,catch:494,finally:498,return:502,throw:506,break:510,continue:514,debugger:518},AO={__proto__:null,async:113,get:115,set:117,public:173,private:173,protected:173,static:175,abstract:177,override:179,readonly:185,accessor:187,new:375},ZO={__proto__:null,"<":133},XO=SO.deserialize({version:14,states:"$>lO`QYOOO$}QYOOO&}Q`OOO*_Q$IvO'#CgO*fOSO'#DYO,qQYO'#D_O-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S1t,x,zU1w,{8x8yS1x,|,}S4`0`4eS5m1v1yS5p1z9zQ5q1{S8S5o5rQ8V5sR9h8UR(W#hR(Z#iQ!_QT,g&q,hQ#`YR&z;ST#[W$}S#ZW$}U%jwx+tU'p#W#Y#]S-]'q'rQ-d'vQ0R+RQ1}-^U2Q-b-c-eS5v2R2SR8W5w`!}T!w!z%g'a'j+O-Zt#XWwx#W#Y#]$}'q'r'v+R-^-b-c-e2R2S5wQ0x+tQ1],YQ5^1TQ7x5_T<[&j+PT#QT%gS#PT%gS'b!w'jS'g!z+OS,_&j+PT-U'a-ZT&o!^%hQ$[cR)V$aT(z$[({R2y.UT)k$i)mR)s$lQ/h*eQ2U-kQ4l0bQ5{2YQ7d4oQ8Z5zQ9Q7cQ9j8YQ:Q9SQ:_9lQ:i:RR:p:`lmOUo!S#T%P&T&V&W&Y+v+{0{1OQ%}!OR+k%zV%kwx+tR0[+[R+j%xQ%duR*|%eR*r%_T&R!P&UT&S!P&UT0}+{1O",nodeNames:"⚠ ArithOp ArithOp InterpolationStart LineComment BlockComment Script ExportDeclaration export Star as VariableName String from ; default FunctionDeclaration async function VariableDefinition > TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression await yield delete LogicOp BitOp ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody MethodDeclaration AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:346,context:$O,nodeProps:[["closedBy",3,"InterpolationEnd",43,"]",53,"}",68,")",139,"JSXSelfCloseEndTag JSXEndTag",155,"JSXEndTag"],["group",-26,7,14,16,60,194,198,201,202,204,207,210,221,223,229,231,233,235,238,244,250,252,254,256,258,260,261,"Statement",-30,11,12,25,28,29,34,44,46,47,49,54,62,70,76,77,98,99,108,109,126,129,131,132,133,134,136,137,157,158,160,"Expression",-23,24,26,30,33,35,37,161,163,165,166,168,169,170,172,173,174,176,177,178,188,190,192,193,"Type",-3,80,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T#o#)}#p$g%Z$g;'S#)};'S;=`#,q<%lO#)}h#+fa$_`$TWOt%Ztu#+_u}%Z}!O#+_!O!Q%Z!Q![#+_![!^%Z!_!c%Z!c!}#+_!}#R%Z#R#S#+_#S#T%Z#T#o#+_#p$g%Z$g;'S#+_;'S;=`#,k<%lO#+_h#,nP;=`<%l#+_7Z#,tP;=`<%l#)}~#,|O!V~.n#-TV(V.^$_`O!^%Z!_!`<z!`#o%Z#p#q#&}#q;'S%Z;'S;=`%o<%lO%Z,m#-sT!U,XoS$_`O!^%Z!_#o%Z#p;'S%Z;'S;=`%o<%lO%Za#.ZT!mP$_`O!^%Z!_#o%Z#p;'S%Z;'S;=`%o<%lO%Z7Z#.wt$_`'g6y's&l'j1T$RWOX%ZXY%uYZ%ZZ[%u[p%Zpq%uqt%Ztu9gu}%Z}!O:w!O!Q%Z!Q![9g![!^%Z!_!c%Z!c!}9g!}#R%Z#R#S9g#S#T%Z#T#o9g#p$f%Z$f$g%u$g#BY9g#BY#BZ#.j#BZ$IS9g$IS$I_#.j$I_$JT9g$JT$JU#.j$JU$KV9g$KV$KW#.j$KW&FU9g&FU&FV#.j&FV;'S9g;'S;=`<Z<%l?HT9g?HT?HU#.j?HUO9g7Z#1fa$_`'h6y's&l'j1T$RWOt%Ztu9gu}%Z}!O:w!O!Q%Z!Q![9g![!^%Z!_!c%Z!c!}9g!}#R%Z#R#S9g#S#T%Z#T#o9g#p$g%Z$g;'S9g;'S;=`<Z<%lO9g",tokenizers:[PO,TO,_O,0,1,2,3,4,5,6,7,8,9,kO],topRules:{Script:[0,6],SingleExpression:[1,262],SingleClassItem:[2,263]},dialects:{jsx:12734,ts:12736},dynamicPrecedences:{158:1,186:1},specialized:[{term:302,get:e=>WO[e]||-1},{term:311,get:e=>AO[e]||-1},{term:65,get:e=>ZO[e]||-1}],tokenPrec:12759}),VO=[Ud("function ${name}(${params}) {\n\t${}\n}",{label:"function",detail:"definition",type:"keyword"}),Ud("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n\t${}\n}",{label:"for",detail:"loop",type:"keyword"}),Ud("for (let ${name} of ${collection}) {\n\t${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Ud("do {\n\t${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Ud("while (${}) {\n\t${}\n}",{label:"while",detail:"loop",type:"keyword"}),Ud("try {\n\t${}\n} catch (${error}) {\n\t${}\n}",{label:"try",detail:"/ catch block",type:"keyword"}),Ud("if (${}) {\n\t${}\n}",{label:"if",detail:"block",type:"keyword"}),Ud("if (${}) {\n\t${}\n} else {\n\t${}\n}",{label:"if",detail:"/ else block",type:"keyword"}),Ud("class ${name} {\n\tconstructor(${params}) {\n\t\t${}\n\t}\n}",{label:"class",detail:"definition",type:"keyword"}),Ud('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Ud('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],RO=new ha,qO=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function MO(e){return(t,i)=>{let n=t.node.getChild("VariableDefinition");return n&&i(n,e),!0}}const EO=["FunctionDeclaration"],DO={FunctionDeclaration:MO("function"),ClassDeclaration:MO("class"),ClassExpression:()=>!0,EnumDeclaration:MO("constant"),TypeAliasDeclaration:MO("type"),NamespaceDeclaration:MO("namespace"),VariableDefinition(e,t){e.matchContext(EO)||t(e,"variable")},TypeDefinition(e,t){t(e,"type")},__proto__:null};function IO(e,t){let i=RO.get(t);if(i)return i;let n=[],s=!0;function r(t,i){let s=e.sliceString(t.from,t.to);n.push({label:s,type:i})}return t.cursor(No.IncludeAnonymous).iterate((t=>{if(s)s=!1;else if(t.name){let e=DO[t.name];if(e&&e(t,r)||qO.has(t.name))return!1}else if(t.to-t.from>8192){for(let i of IO(e,t.node))n.push(i);return!1}})),RO.set(t,n),n}const UO=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,YO=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName"];function jO(e){let t=il(e.state).resolveInner(e.pos,-1);if(YO.indexOf(t.name)>-1)return null;let i="VariableName"==t.name||t.to-t.from<20&&UO.test(e.state.sliceDoc(t.from,t.to));if(!i&&!e.explicit)return null;let n=[];for(let i=t;i;i=i.parent)qO.has(i.name)&&(n=n.concat(IO(e.state.doc,i)));return{options:n,from:i?t.from:e.pos,validFor:UO}}const BO=tl.define({name:"javascript",parser:XO.configure({props:[Sl.add({IfStatement:Pl({except:/^\s*({|else\b)/}),TryStatement:Pl({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:e=>e.baseIndent,SwitchBody:e=>{let t=e.textAfter,i=/^\s*\}/.test(t),n=/^\s*(case|default)\b/.test(t);return e.baseIndent+(i?0:n?1:2)*e.unit},Block:$l({closing:"}"}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":Pl({except:/^{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag":e=>e.column(e.node.from)+e.unit}),_l.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression":Cl,BlockComment:e=>({from:e.from+2,to:e.to-2})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),NO=BO.configure({dialect:"ts"},"typescript"),GO=BO.configure({dialect:"jsx"}),zO=BO.configure({dialect:"jsx ts"},"typescript"),LO="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map((e=>({label:e,type:"keyword"})));function FO(e={}){let t=e.jsx?e.typescript?zO:GO:e.typescript?NO:BO;return new dl(t,[BO.data.of({autocomplete:(i=YO,n=Fu(VO.concat(LO)),e=>{for(let t=il(e.state).resolveInner(e.pos,-1);t;t=t.parent)if(i.indexOf(t.name)>-1)return null;return n(e)})}),BO.data.of({autocomplete:jO}),e.jsx?KO:[]]);var i,n}function HO(e,t,i=e.length){for(let n=null==t?void 0:t.firstChild;n;n=n.nextSibling)if("JSXIdentifier"==n.name||"JSXBuiltin"==n.name||"JSXNamespacedName"==n.name||"JSXMemberExpression"==n.name)return e.sliceString(n.from,Math.min(n.to,i));return""}const JO="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),KO=Ks.inputHandler.of(((e,t,i,n)=>{if((JO?e.composing:e.compositionStarted)||e.state.readOnly||t!=i||">"!=n&&"/"!=n||!BO.isActiveAt(e.state,t,-1))return!1;let{state:s}=e,r=s.changeByRange((e=>{var t,i;let r,{head:o}=e,a=il(s).resolveInner(o,-1);if("JSXStartTag"==a.name&&(a=a.parent),">"==n&&"JSXFragmentTag"==a.name)return{range:oe.cursor(o+1),changes:{from:o,insert:"><>"}};if("/"==n&&"JSXFragmentTag"==a.name){let e=a.parent,i=null==e?void 0:e.parent;if(e.from==o-1&&"JSXEndTag"!=(null===(t=i.lastChild)||void 0===t?void 0:t.name)&&(r=HO(s.doc,null==i?void 0:i.firstChild,o))){let e=`/${r}>`;return{range:oe.cursor(o+e.length),changes:{from:o,insert:e}}}}else if(">"==n){let e=function(e){for(;;){if("JSXOpenTag"==e.name||"JSXSelfClosingTag"==e.name||"JSXFragmentTag"==e.name)return e;if(!e.parent)return null;e=e.parent}}(a);if(e&&"JSXEndTag"!=(null===(i=e.lastChild)||void 0===i?void 0:i.name)&&"</"!=s.sliceDoc(o,o+2)&&(r=HO(s.doc,e,o)))return{range:oe.cursor(o+1),changes:{from:o,insert:`></${r}>`}}}return{range:e}}));return!r.changes.empty&&(e.dispatch(r,{userEvent:"input.type",scrollIntoView:!0}),!0)})),ep=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288];function tp(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}const ip=new rO(((e,t)=>{for(let n=!1,s=0,r=0;;r++){let{next:o}=e;if(!(tp(o)||45==o||95==o||n&&(i=o,i>=48&&i<=57))){n&&e.acceptToken(40==o?95:2==s&&t.canShift(2)?2:96);break}!n&&(45!=o||r>0)&&(n=!0),s===r&&45==o&&s++,e.advance()}var i})),np=new rO((e=>{if(ep.includes(e.peek(-1))){let{next:t}=e;(tp(t)||95==t||35==t||46==t||91==t||58==t||45==t)&&e.acceptToken(94)}})),sp=new rO((e=>{if(!ep.includes(e.peek(-1))){let{next:t}=e;if(37==t&&(e.advance(),e.acceptToken(1)),tp(t)){do{e.advance()}while(tp(e.next));e.acceptToken(1)}}})),rp=_a({"AtKeyword import charset namespace keyframes media supports":Fa.definitionKeyword,"from to selector":Fa.keyword,NamespaceName:Fa.namespace,KeyframeName:Fa.labelName,TagName:Fa.tagName,ClassName:Fa.className,PseudoClassName:Fa.constant(Fa.className),IdName:Fa.labelName,"FeatureName PropertyName":Fa.propertyName,AttributeName:Fa.attributeName,NumberLiteral:Fa.number,KeywordQuery:Fa.keyword,UnaryQueryOp:Fa.operatorKeyword,"CallTag ValueName":Fa.atom,VariableName:Fa.variableName,Callee:Fa.operatorKeyword,Unit:Fa.unit,"UniversalSelector NestingSelector":Fa.definitionOperator,MatchOp:Fa.compareOperator,"ChildOp SiblingOp, LogicOp":Fa.logicOperator,BinOp:Fa.arithmeticOperator,Important:Fa.modifier,Comment:Fa.blockComment,ParenthesizedContent:Fa.special(Fa.name),ColorLiteral:Fa.color,StringLiteral:Fa.string,":":Fa.punctuation,"PseudoOp #":Fa.derefOperator,"; ,":Fa.separator,"( )":Fa.paren,"[ ]":Fa.squareBracket,"{ }":Fa.brace}),op={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:134},ap={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},lp={__proto__:null,not:128,only:128,from:158,to:160},hp=SO.deserialize({version:14,states:"7WQYQ[OOO#_Q[OOOOQP'#Cd'#CdOOQP'#Cc'#CcO#fQ[O'#CfO$YQXO'#CaO$aQ[O'#ChO$lQ[O'#DPO$qQ[O'#DTOOQP'#Ed'#EdO$vQdO'#DeO%bQ[O'#DrO$vQdO'#DtO%sQ[O'#DvO&OQ[O'#DyO&TQ[O'#EPO&cQ[O'#EROOQS'#Ec'#EcOOQS'#ET'#ETQYQ[OOO&jQXO'#CdO'_QWO'#DaO'dQWO'#EjO'oQ[O'#EjQOQWOOOOQP'#Cg'#CgOOQP,59Q,59QO#fQ[O,59QO'yQ[O'#EWO(eQWO,58{O(mQ[O,59SO$lQ[O,59kO$qQ[O,59oO'yQ[O,59sO'yQ[O,59uO'yQ[O,59vO(xQ[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO)PQWO,59SO)UQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO)ZQ`O,59oOOQS'#Cp'#CpO$vQdO'#CqO)cQvO'#CsO*pQtO,5:POOQO'#Cx'#CxO)UQWO'#CwO+UQWO'#CyOOQS'#Eg'#EgOOQO'#Dh'#DhO+ZQ[O'#DoO+iQWO'#EkO&TQ[O'#DmO+wQWO'#DpOOQO'#El'#ElO(hQWO,5:^O+|QpO,5:`OOQS'#Dx'#DxO,UQWO,5:bO,ZQ[O,5:bOOQO'#D{'#D{O,cQWO,5:eO,hQWO,5:kO,pQWO,5:mOOQS-E8R-E8RO$vQdO,59{O,xQ[O'#EYO-VQWO,5;UO-VQWO,5;UOOQP1G.l1G.lO-|QXO,5:rOOQO-E8U-E8UOOQS1G.g1G.gOOQP1G.n1G.nO)PQWO1G.nO)UQWO1G.nOOQP1G/V1G/VO.ZQ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^#r$d$mQ$d#yR$m$_Q$`#rR$n$`QmTS!om$[R$[#oQ$W#fR$j$WQ!kfS#i!k#jR#j!lQ#Z!ZR#}#ZQ$S#bR$g$S_bOPcgt!j#h^TOPcgt!j#hQ!nlQ!vqQ!wrQ!xsQ#o!zR$O#]R#s!{Q!SYQ!`[Q#O!QQ#f!i[#q!{#r#y$_$d$mQ#t!}Q#v#QS$U#f$WQ$Z#mR$i$VR#p!zQhPR!ytQ!_ZQ!g`R#R!SU!ZZ`!SQ!f_Q#W!YQ#[![Q#{#XR#|#Y",nodeNames:"⚠ Unit VariableName Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee CallLiteral CallTag ParenthesizedContent , PseudoClassName ArgList IdSelector # IdName ] AttributeSelector [ AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp } { Block Declaration PropertyName Important ; ImportStatement AtKeyword import KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList from to SupportsStatement supports AtRule Styles",maxTerm:108,nodeProps:[["openedBy",17,"(",48,"{"],["closedBy",18,")",49,"}"]],propSources:[rp],skippedNodes:[0,3],repeatNodeCount:8,tokenData:"Lq~R!^OX$}X^%u^p$}pq%uqr)Xrs.Rst/utu6duv$}vw7^wx7oxy9^yz9oz{9t{|:_|}?Q}!O?c!O!P@Q!P!Q@i!Q![Cu![!]Dp!]!^El!^!_$}!_!`E}!`!aF`!a!b$}!b!cG[!c!}$}!}#OHt#O#P$}#P#QIV#Q#R6d#R#T$}#T#UIh#U#c$}#c#dJy#d#o$}#o#pK`#p#q6d#q#rKq#r#sLS#s#y$}#y#z%u#z$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`%o<%lO%^XG_WOy%^z!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHO[!YPoWOy%^z}%^}!OGw!O!Q%^!Q![Gw![!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHySxPOy%^z;'S%^;'S;=`%o<%lO%^^I[SvUOy%^z;'S%^;'S;=`%o<%lO%^XIkUOy%^z#b%^#b#cI}#c;'S%^;'S;=`%o<%lO%^XJSUoWOy%^z#W%^#W#XJf#X;'S%^;'S;=`%o<%lO%^XJmS!`PoWOy%^z;'S%^;'S;=`%o<%lO%^XJ|UOy%^z#f%^#f#gJf#g;'S%^;'S;=`%o<%lO%^XKeS!RPOy%^z;'S%^;'S;=`%o<%lO%^_KvS!QVOy%^z;'S%^;'S;=`%o<%lO%^ZLXU!PPOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^WLnP;=`<%l$}",tokenizers:[np,sp,ip,0,1,2,3],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:95,get:e=>op[e]||-1},{term:56,get:e=>ap[e]||-1},{term:96,get:e=>lp[e]||-1}],tokenPrec:1123});let cp=null;function up(){if(!cp&&"object"==typeof document&&document.body){let e=[];for(let t in document.body.style)/[A-Z]|^-|^(item|length)$/.test(t)||e.push(t);cp=e.sort().map((e=>({type:"property",label:e})))}return cp||[]}const dp=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map((e=>({type:"class",label:e}))),fp=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map((e=>({type:"keyword",label:e}))).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map((e=>({type:"constant",label:e})))),Op=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map((e=>({type:"type",label:e}))),pp=/^[\w-]*/,mp=e=>{let{state:t,pos:i}=e,n=il(t).resolveInner(i,-1);if("PropertyName"==n.name)return{from:n.from,options:up(),validFor:pp};if("ValueName"==n.name)return{from:n.from,options:fp,validFor:pp};if("PseudoClassName"==n.name)return{from:n.from,options:dp,validFor:pp};if("TagName"==n.name){for(let{parent:e}=n;e;e=e.parent)if("Block"==e.name)return{from:n.from,options:up(),validFor:pp};return{from:n.from,options:Op,validFor:pp}}if(!e.explicit)return null;let s=n.resolve(i),r=s.childBefore(i);return r&&":"==r.name&&"PseudoClassSelector"==s.name?{from:i,options:dp,validFor:pp}:r&&":"==r.name&&"Declaration"==s.name||"ArgList"==s.name?{from:i,options:fp,validFor:pp}:"Block"==s.name?{from:i,options:up(),validFor:pp}:null},gp=tl.define({name:"css",parser:hp.configure({props:[Sl.add({Declaration:Pl()}),_l.add({Block:Cl})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function Qp(){return new dl(gp,gp.data.of({autocomplete:mp}))}const Sp={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},vp={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},bp={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function yp(e){return 9==e||10==e||13==e||32==e}let wp=null,xp=null,$p=0;function kp(e,t){let i=e.pos+t;if($p==i&&xp==e)return wp;let n=e.peek(t);for(;yp(n);)n=e.peek(++t);let s="";for(;45==(r=n)||46==r||58==r||r>=65&&r<=90||95==r||r>=97&&r<=122||r>=161;)s+=String.fromCharCode(n),n=e.peek(++t);var r;return xp=e,$p=i,wp=s?s.toLowerCase():n==Pp||n==Tp?void 0:null}const Pp=63,Tp=33;function _p(e,t){this.name=e,this.parent=t,this.hash=t?t.hash:0;for(let t=0;t<e.length;t++)this.hash+=(this.hash<<4)+e.charCodeAt(t)+(e.charCodeAt(t)<<8)}const Cp=[4,8,5,6,7],Wp=new QO({start:null,shift:(e,t,i,n)=>Cp.indexOf(t)>-1?new _p(kp(n,1)||"",e):e,reduce:(e,t)=>18==t&&e?e.parent:e,reuse(e,t,i,n){let s=t.type.id;return 4==s||35==s?new _p(kp(n,1)||"",e):e},hash:e=>e?e.hash:0,strict:!1}),Ap=new rO(((e,t)=>{if(60!=e.next)return void(e.next<0&&t.context&&e.acceptToken(57));e.advance();let i=47==e.next;i&&e.advance();let n=kp(e,0);if(void 0===n)return;if(!n)return e.acceptToken(i?12:4);let s=t.context?t.context.name:null;if(i){if(n==s)return e.acceptToken(9);if(s&&vp[s])return e.acceptToken(57,-2);if(t.dialectEnabled(0))return e.acceptToken(10);for(let e=t.context;e;e=e.parent)if(e.name==n)return;e.acceptToken(11)}else{if("script"==n)return e.acceptToken(5);if("style"==n)return e.acceptToken(6);if("textarea"==n)return e.acceptToken(7);if(Sp.hasOwnProperty(n))return e.acceptToken(8);s&&bp[s]&&bp[s][n]?e.acceptToken(57,-1):e.acceptToken(4)}}),{contextual:!0}),Zp=new rO((e=>{for(let t=0,i=0;;i++){if(e.next<0){i&&e.acceptToken(58);break}if(45==e.next)t++;else{if(62==e.next&&t>=2){i>3&&e.acceptToken(58,-2);break}t=0}e.advance()}}));function Xp(e,t,i){let n=2+e.length;return new rO((s=>{for(let r=0,o=0,a=0;;a++){if(s.next<0){a&&s.acceptToken(t);break}if(0==r&&60==s.next||1==r&&47==s.next||r>=2&&r<n&&s.next==e.charCodeAt(r-2))r++,o++;else if(2!=r&&r!=n||!yp(s.next)){if(r==n&&62==s.next){a>o?s.acceptToken(t,-o):s.acceptToken(i,-(o-2));break}if((10==s.next||13==s.next)&&a){s.acceptToken(t,1);break}r=o=0}else o++;s.advance()}}))}const Vp=Xp("script",54,1),Rp=Xp("style",55,2),qp=Xp("textarea",56,3),Mp=_a({"Text RawText":Fa.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":Fa.angleBracket,TagName:Fa.tagName,"MismatchedCloseTag/TagName":[Fa.tagName,Fa.invalid],AttributeName:Fa.attributeName,"AttributeValue UnquotedAttributeValue":Fa.attributeValue,Is:Fa.definitionOperator,"EntityReference CharacterReference":Fa.character,Comment:Fa.blockComment,ProcessingInst:Fa.processingInstruction,DoctypeDecl:Fa.documentMeta}),Ep=SO.deserialize({version:14,states:",xOVOxOOO!WQ!bO'#CoO!]Q!bO'#CyO!bQ!bO'#C|O!gQ!bO'#DPO!lQ!bO'#DRO!qOXO'#CnO!|OYO'#CnO#XO[O'#CnO$eOxO'#CnOOOW'#Cn'#CnO$lO!rO'#DTO$tQ!bO'#DVO$yQ!bO'#DWOOOW'#Dk'#DkOOOW'#DY'#DYQVOxOOO%OQ#tO,59ZO%WQ#tO,59eO%`Q#tO,59hO%hQ#tO,59kO%sQ#tO,59mOOOX'#D^'#D^O%{OXO'#CwO&WOXO,59YOOOY'#D_'#D_O&`OYO'#CzO&kOYO,59YOOO['#D`'#D`O&sO[O'#C}O'OO[O,59YOOOW'#Da'#DaO'WOxO,59YO'_Q!bO'#DQOOOW,59Y,59YOOO`'#Db'#DbO'dO!rO,59oOOOW,59o,59oO'lQ!bO,59qO'qQ!bO,59rOOOW-E7W-E7WO'vQ#tO'#CqOOQO'#DZ'#DZO(UQ#tO1G.uOOOX1G.u1G.uO(^Q#tO1G/POOOY1G/P1G/PO(fQ#tO1G/SOOO[1G/S1G/SO(nQ#tO1G/VOOOW1G/V1G/VOOOW1G/X1G/XO(yQ#tO1G/XOOOX-E7[-E7[O)RQ!bO'#CxOOOW1G.t1G.tOOOY-E7]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`PPPPPPPPPPPPPPPPPP!a!gP!mPP!yPP!|#P#S#Y#]#`#f#i#l#r#xP!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{}!P!R!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!UeZ!e{}!P!R!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue EndTag ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag SelfClosingEndTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:Wp,nodeProps:[["closedBy",-10,1,2,3,5,6,7,8,9,10,11,"EndTag",4,"EndTag SelfClosingEndTag",-4,19,29,32,35,"CloseTag"],["group",-9,12,15,16,17,18,39,40,41,42,"Entity",14,"Entity TextContent",-3,27,30,33,"TextContent Entity"],["openedBy",26,"StartTag StartCloseTag",-4,28,31,34,36,"OpenTag",38,"StartTag"]],propSources:[Mp],skippedNodes:[0],repeatNodeCount:9,tokenData:"#(r!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs4ysv-_vw5iwxJ^x}-_}!OKP!O!P-_!P!Q!!O!Q![-_![!]!$c!]!^-_!^!_!(k!_!`#'S!`!a#'z!a!c-_!c!}!$c!}#R-_#R#S!$c#S#T3V#T#o!$c#o#s-_#s$f$q$f%W-_%W%o!$c%o%p-_%p&a!$c&a&b-_&b1p!$c1p4U-_4U4d!$c4d4e-_4e$IS!$c$IS$I`-_$I`$Ib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ex;'S*V;'S;=`*s<%lO*V!R#!sP;=`<%l!IrT#!{bfSOq!KTqr#!vrs!KTsw#!vwx!KTx!P#!v!P!Q!KT!Q!_#!v!_!a!KT!a!b#$T!b#s#!v#s$f!KT$f;'S#!v;'S;=`#%b<%l?Ah#!v?Ah?BY!KT?BY?Mn#!v?MnO!KTT#$YbfSOq!KTqr#!vrs!KTsw#!vwx!KTx!P#!v!P!Q!KT!Q!_#!v!_!`!KT!`!a!Ky!a#s#!v#s$f!KT$f;'S#!v;'S;=`#%b<%l?Ah#!v?Ah?BY!KT?BY?Mn#!v?MnO!KTT#%eP;=`<%l#!v!V#%qcfS!a`!cpOq!Irqr!H^rs!Jisv!H^vw#!vwx!MZx!P!H^!P!Q!Ir!Q!_!H^!_!`!Ir!`!a#!Q!a#s!H^#s$f!Ir$f;'S!H^;'S;=`#&|<%l?Ah!H^?Ah?BY!Ir?BY?Mn!H^?MnO!Ir!V#'PP;=`<%l!H^!V#'_XgS^P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!X#(VX^P!a`!cpjUOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[Vp,Rp,qp,Ap,Zp,0,1,2,3,4,5],topRules:{Document:[0,13]},dialects:{noMatch:0,selfClosing:485},tokenPrec:487});function Dp(e,t){let i=Object.create(null);for(let n of e.getChildren(21)){let e=n.getChild(22),s=n.getChild(24)||n.getChild(25);e&&(i[t.read(e.from,e.to)]=s?24==s.type.id?t.read(s.from+1,s.to-1):t.read(s.from,s.to):"")}return i}function Ip(e,t){let i=e.getChild(20);return i?t.read(i.from,i.to):" "}function Up(e,t,i){let n;for(let s of i)if(!s.attrs||s.attrs(n||(n=Dp(e.node.parent.firstChild,t))))return{parser:s.parser};return null}function Yp(e=[],t=[]){let i=[],n=[],s=[],r=[];for(let t of e)("script"==t.tag?i:"style"==t.tag?n:"textarea"==t.tag?s:r).push(t);let o=t.length?Object.create(null):null;for(let e of t)(o[e.name]||(o[e.name]=[])).push(e);return a=(e,t)=>{let a=e.type.id;if(27==a)return Up(e,t,i);if(30==a)return Up(e,t,n);if(33==a)return Up(e,t,s);if(35==a&&r.length){let i,n=e.node,s=Ip(n,t);for(let o of r)if(o.tag==s&&(!o.attrs||o.attrs(i||(i=Dp(n,t))))){let t=n.parent.lastChild;return{parser:o.parser,overlay:[{from:e.to,to:36==t.type.id?t.from:n.parent.to}]}}}if(o&&21==a){let i,n=e.node;if(i=n.firstChild){let e=o[t.read(i.from,i.to)];if(e)for(let i of e){if(i.tagName&&i.tagName!=Ip(n.parent,t))continue;let e=n.lastChild;if(24==e.type.id)return{parser:i.parser,overlay:[{from:e.from+1,to:e.to-1}]};if(25==e.type.id)return{parser:i.parser,overlay:[{from:e.from,to:e.to}]}}}}return null},(e,t,i,n)=>new ma(e,a,t,i,n);var a}const jp=["_blank","_self","_top","_parent"],Bp=["ascii","utf-8","utf-16","latin1","latin1"],Np=["get","post","put","delete"],Gp=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],zp=["true","false"],Lp={},Fp={a:{attrs:{href:null,ping:null,type:null,media:null,target:jp,hreflang:null}},abbr:Lp,address:Lp,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:Lp,aside:Lp,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:Lp,base:{attrs:{href:null,target:jp}},bdi:Lp,bdo:Lp,blockquote:{attrs:{cite:null}},body:Lp,br:Lp,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Gp,formmethod:Np,formnovalidate:["novalidate"],formtarget:jp,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:Lp,center:Lp,cite:Lp,code:Lp,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:Lp,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:Lp,div:Lp,dl:Lp,dt:Lp,em:Lp,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:Lp,figure:Lp,footer:Lp,form:{attrs:{action:null,name:null,"accept-charset":Bp,autocomplete:["on","off"],enctype:Gp,method:Np,novalidate:["novalidate"],target:jp}},h1:Lp,h2:Lp,h3:Lp,h4:Lp,h5:Lp,h6:Lp,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:Lp,hgroup:Lp,hr:Lp,html:{attrs:{manifest:null}},i:Lp,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:Gp,formmethod:Np,formnovalidate:["novalidate"],formtarget:jp,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:Lp,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:Lp,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:Lp,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:Bp,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:Lp,noscript:Lp,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:Lp,param:{attrs:{name:null,value:null}},pre:Lp,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Lp,rt:Lp,ruby:Lp,samp:Lp,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:Bp}},section:Lp,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:Lp,source:{attrs:{src:null,type:null,media:null}},span:Lp,strong:Lp,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:Lp,summary:Lp,sup:Lp,table:Lp,tbody:Lp,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:Lp,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:Lp,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:Lp,time:{attrs:{datetime:null}},title:Lp,tr:Lp,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:Lp,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:Lp},Hp={accesskey:null,class:null,contenteditable:zp,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:zp,autocorrect:zp,autocapitalize:zp,style:null,tabindex:null,title:null,translate:["yes","no"],onclick:null,rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":zp,"aria-autocomplete":["inline","list","both","none"],"aria-busy":zp,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":zp,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":zp,"aria-hidden":zp,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":zp,"aria-multiselectable":zp,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":zp,"aria-relevant":null,"aria-required":zp,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null};class Jp{constructor(e,t){this.tags=Object.assign(Object.assign({},Fp),e),this.globalAttrs=Object.assign(Object.assign({},Hp),t),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}function Kp(e,t,i=e.length){if(!t)return"";let n=t.firstChild,s=n&&n.getChild("TagName");return s?e.sliceString(s.from,Math.min(s.to,i)):""}function em(e,t=!1){for(let i=e.parent;i;i=i.parent)if("Element"==i.name){if(!t)return i;t=!1}return null}function tm(e,t,i){let n=i.tags[Kp(e,em(t,!0))];return(null==n?void 0:n.children)||i.allTags}function im(e,t){let i=[];for(let n=t;n=em(n);){let s=Kp(e,n);if(s&&"CloseTag"==n.lastChild.name)break;s&&i.indexOf(s)<0&&("EndTag"==t.name||t.from>=n.firstChild.to)&&i.push(s)}return i}Jp.default=new Jp;const nm=/^[:\-\.\w\u00b7-\uffff]*$/;function sm(e,t,i,n,s){let r=/\s*>/.test(e.sliceDoc(s,s+5))?"":">";return{from:n,to:s,options:tm(e.doc,i,t).map((e=>({label:e,type:"type"}))).concat(im(e.doc,i).map(((e,t)=>({label:"/"+e,apply:"/"+e+r,type:"type",boost:99-t})))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function rm(e,t,i,n){let s=/\s*>/.test(e.sliceDoc(n,n+5))?"":">";return{from:i,to:n,options:im(e.doc,t).map(((e,t)=>({label:e,apply:e+s,type:"type",boost:99-t}))),validFor:nm}}function om(e){let{extraTags:t,extraGlobalAttributes:i}=e,n=i||t?new Jp(t,i):Jp.default;return e=>function(e,t){let{state:i,pos:n}=t,s=il(i).resolveInner(n),r=s.resolve(n,-1);for(let e,t=n;s==r&&(e=r.childBefore(t));){let i=e.lastChild;if(!i||!i.type.isError||i.from<i.to)break;s=r=e,t=i.from}return"TagName"==r.name?r.parent&&/CloseTag$/.test(r.parent.name)?rm(i,r,r.from,n):sm(i,e,r,r.from,n):"StartTag"==r.name?sm(i,e,r,n,n):"StartCloseTag"==r.name||"IncompleteCloseTag"==r.name?rm(i,r,n,n):t.explicit&&("OpenTag"==r.name||"SelfClosingTag"==r.name)||"AttributeName"==r.name?function(e,t,i,n,s){let r=em(i),o=r?t.tags[Kp(e.doc,r)]:null,a=o&&o.attrs?Object.keys(o.attrs):[];return{from:n,to:s,options:(o&&!1===o.globalAttrs?a:a.length?a.concat(t.globalAttrNames):t.globalAttrNames).map((e=>({label:e,type:"property"}))),validFor:nm}}(i,e,r,"AttributeName"==r.name?r.from:n,n):"Is"==r.name||"AttributeValue"==r.name||"UnquotedAttributeValue"==r.name?function(e,t,i,n,s){var r;let o,a=null===(r=i.parent)||void 0===r?void 0:r.getChild("AttributeName"),l=[];if(a){let r=e.sliceDoc(a.from,a.to),h=t.globalAttrs[r];if(!h){let n=em(i),s=n?t.tags[Kp(e.doc,n)]:null;h=(null==s?void 0:s.attrs)&&s.attrs[r]}if(h){let t=e.sliceDoc(n,s).toLowerCase(),i='"',r='"';/^['"]/.test(t)?(o='"'==t[0]?/^[^"]*$/:/^[^']*$/,i="",r=e.sliceDoc(s,s+1)==t[0]?"":t[0],t=t.slice(1),n++):o=/^[^\s<>='"]*$/;for(let e of h)l.push({label:e,apply:i+e+r,type:"constant"})}}return{from:n,to:s,options:l,validFor:o}}(i,e,r,"Is"==r.name?n:r.from,n):!t.explicit||"Element"!=s.name&&"Text"!=s.name&&"Document"!=s.name?null:function(e,t,i,n){let s=[],r=0;for(let n of tm(e.doc,i,t))s.push({label:"<"+n,type:"type"});for(let t of im(e.doc,i))s.push({label:"</"+t+">",type:"type",boost:99-r++});return{from:n,to:n,options:s,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}(i,e,r,n)}(n,e)}const am=[{tag:"script",attrs:e=>"text/typescript"==e.type||"ts"==e.lang,parser:NO.parser},{tag:"script",attrs:e=>"text/babel"==e.type||"text/jsx"==e.type,parser:GO.parser},{tag:"script",attrs:e=>"text/typescript-jsx"==e.type,parser:zO.parser},{tag:"script",attrs:e=>!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type),parser:BO.parser},{tag:"style",attrs:e=>(!e.lang||"css"==e.lang)&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type)),parser:gp.parser}],lm=[{name:"style",parser:gp.parser.configure({top:"Styles"})}].concat("beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map((e=>({name:"on"+e,parser:BO.parser})))),hm=tl.define({name:"html",parser:Ep.configure({props:[Sl.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag":e=>e.column(e.node.from)+e.unit,Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let t,i=null;for(let t=e.node;;){let e=t.lastChild;if(!e||"Element"!=e.name||e.to!=t.to)break;i=t=e}return i&&(!(t=i.lastChild)||"CloseTag"!=t.name&&"SelfClosingTag"!=t.name)?e.lineIndent(i.from)+e.unit:null}}),_l.add({Element(e){let t=e.firstChild,i=e.lastChild;return t&&"OpenTag"==t.name?{from:t.to,to:"CloseTag"==i.name?i.from:e.to}:null}})],wrap:Yp(am,lm)}),languageData:{commentTokens:{block:{open:"\x3c!--",close:"--\x3e"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}});function cm(e={}){let t,i="";!1===e.matchClosingTags&&(i="noMatch"),!0===e.selfClosingTags&&(i=(i?i+" ":"")+"selfClosing"),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(t=Yp((e.nestedLanguages||[]).concat(am),(e.nestedAttributes||[]).concat(lm)));let n=t||i?hm.configure({dialect:i,wrap:t}):hm;return new dl(n,[hm.data.of({autocomplete:om(e)}),!1!==e.autoCloseTags?um:[],FO().support,Qp().support])}const um=Ks.inputHandler.of(((e,t,i,n)=>{if(e.composing||e.state.readOnly||t!=i||">"!=n&&"/"!=n||!hm.isActiveAt(e.state,t,-1))return!1;let{state:s}=e,r=s.changeByRange((t=>{var i,r,o;let a,{head:l}=t,h=il(s).resolveInner(l,-1);if("TagName"!=h.name&&"StartTag"!=h.name||(h=h.parent),">"==n&&"OpenTag"==h.name){if("CloseTag"!=(null===(r=null===(i=h.parent)||void 0===i?void 0:i.lastChild)||void 0===r?void 0:r.name)&&(a=Kp(s.doc,h.parent,l))){let t=">"===e.state.doc.sliceString(l,l+1),i=`${t?"":">"}</${a}>`;return{range:oe.cursor(l+1),changes:{from:l+(t?1:0),insert:i}}}}else if("/"==n&&"OpenTag"==h.name){let t=h.parent,i=null==t?void 0:t.parent;if(t.from==l-1&&"CloseTag"!=(null===(o=i.lastChild)||void 0===o?void 0:o.name)&&(a=Kp(s.doc,i,l))){let t=">"===e.state.doc.sliceString(l,l+1),i=`/${a}${t?"":">"}`,n=l+i.length+(t?1:0);return{range:oe.cursor(n),changes:{from:l,insert:i}}}}return{range:t}}));return!r.changes.empty&&(e.dispatch(r,{userEvent:"input.type",scrollIntoView:!0}),!0)}));var dm=i(1991),fm=i.n(dm);const Om=()=>{},pm=r.Z.div`
display: flex;
flex-flow: row;
align-items: center;
justify-content: space-between;
margin-bottom: 0.5em;
.components-button {
margin-bottom: 8px;
}
`,mm=r.Z.div`
color: #757575;
font-size: 11px;
`,gm=e=>{const{onChange:t=Om,value:i}=e;return s().createElement(l.Fragment,null,i&&s().createElement(l.Fragment,null,i.map(((n,r)=>s().createElement(Qm,{type:e.type??"js",value:n,onChange:e=>{let n=[...i];n[r]=e,t(n)},onDelete:()=>{let e=[...i];e.splice(r,1),t(e)}})))))},Qm=e=>{const{onChange:t=Om,onDelete:i=Om,value:n={enable:!0}}=e;let r=null,l=[];return"js"==e.type?(l.push(FO({jsx:!1})),r=s().createElement(mm,null,(0,o.__)("JS code is allowed. No script tags needed.","gutenmate"))):"css"==e.type?(l.push(Qp()),r=s().createElement(mm,null,(0,o.__)("CSS code is allowed. No style tags needed.","gutenmate"))):"html"==e.type&&(l.push(cm()),r=s().createElement(mm,null,(0,o.__)("HTML code is allowed","gutenmate"))),s().createElement("div",{className:fm()("gtm-code-edit",{"gtm-code-edit-is-disabled":!n.enable,"gtm-code-edit-is-enabled":n.enable})},s().createElement(pm,null,s().createElement(a.ToggleControl,{label:(0,o.__)("Enable","gutenmate"),checked:n.enable,onChange:e=>{t({...n,enable:e})}}),s().createElement(a.Button,{variant:"tertiary",isSmall:!0,isDestructive:!0,onClick:i},(0,o.__)("Delete","gutenmate"))),s().createElement(Ff,{value:n.code,autoFocus:!1,minHeight:"100px",extensions:l,onChange:e=>{t({...n,code:e})}}),r)},Sm=[{enable:!0,name:"responsive"},{enable:!0,name:"970x250"},{enable:!0,name:"970x90"},{enable:!0,name:"728x90"},{enable:!0,name:"468x60"},{enable:!0,name:"336x280"},{enable:!0,name:"300x1050"},{enable:!0,name:"300x600"},{enable:!0,name:"300x200"},{enable:!0,name:"300x250"},{enable:!0,name:"300x100"},{enable:!0,name:"300x50"},{enable:!0,name:"250x250"},{enable:!0,name:"200x200"},{enable:!0,name:"160x600"}],vm=e=>e.reduce(((e,t)=>(t.enable&&!t.code||e.push(t),e)),[]),bm=(e,t)=>{let i=e;const n=t.findIndex((t=>t.name===e.name));return n>=0&&(i=t[n]),[i,n]},ym=e=>{const{value:t,onChange:i,editOnly:n=!1}=e;return s().createElement(l.Fragment,null,s().createElement(p.Yc,{values:Sm,renderLabel:({item:e,i:i})=>{let[n]=bm(e,t);return s().createElement("span",null,s().createElement(p.m0,null,(0,u.startCase)(n.name)),!n.enable&&s().createElement(p.c4,null,(0,o.__)("Disabled","gutenmate")),n.enable&&n.code&&s().createElement(p.J2,null,(0,o.__)("Added","gutenmate")))},renderBody:({item:e,i:n})=>{let[r,h]=bm(e,t);return s().createElement(l.Fragment,null,s().createElement(a.ToggleControl,{label:(0,o.__)("Enable","gutenmate"),checked:r.enable,onChange:n=>{const s={...e,...t[h],enable:n};h>=0?t[h]=s:t.push(s),i([...vm(t)])}}),s().createElement("div",null,s().createElement(Ff,{value:r.code,autoFocus:!1,minHeight:"100px",extensions:[cm()],onChange:n=>{const s={...e,...t[h],code:n};h>=0?t[h]=s:t.push(s),i([...vm(t)])}}),s().createElement(mm,null,(0,o.__)("HTML code, Script tags and Shortcodes is allowed.","gutenmate"))))}}))};i(4842);const wm=r.Z.div`
display: flex;
min-height: 60px;
align-items: center;
justify-content: space-between;
background: #fff;
border-radius: 8px;
padding: 16px;
margin-bottom: 3.5em;
box-shadow: 0px 0px 1.7px -6px rgba(0, 0, 0, 0.02),
0px 0px 4px -6px rgba(0, 0, 0, 0.028),
0px 0px 7.5px -6px rgba(0, 0, 0, 0.035),
0px 0px 13.4px -6px rgba(0, 0, 0, 0.042),
0px 0px 25.1px -6px rgba(0, 0, 0, 0.05),
0px 0px 60px -6px rgba(0, 0, 0, 0.07);
border-bottom: 4px solid #dfdfdf;
`,xm=r.Z.div`
display: grid;
row-gap: 0.5em;
column-gap: 1.5em;
align-items: center;
grid-template:
"a b" 1fr
"a c" 1fr;
`,$m=r.Z.div``,km=r.Z.a`
padding: 10px 12px;
border-radius: 6px;
text-decoration: none;
outline: 1px solid #ddd;
transition: all 0.3s;
&:hover {
outline: none;
background: var(
--wp-components-color-accent,
var(--wp-admin-theme-color, #3858e9)
);
color: white;
}
`,Pm=r.Z.img`
grid-area: a;
border-radius: 4px;
box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.1);
`,Tm=r.Z.img`
grid-area: b;
max-height: 32px; /* Avoid overflow, can't use percentage */
`,_m=r.Z.div`
grid-area: c;
font-size: 11px;
`,Cm=r.Z.div`
display: inline-block;
padding: 2px 6px;
background-color: #eee;
border-radius: 4px;
`,Wm=r.Z.div`
grid-area: b;
font-size: 18px;
font-weight: bold;
`,Am=e=>{const t=(0,c.useSelect)((e=>e("core").getCurrentTheme()));if(!t?.theme_supports["gutenmate-theme-info"]||!t)return;const i=t?.theme_supports["gutenmate-theme-info"];return s().createElement(wm,null,s().createElement(xm,null,i.thumbnailUrl&&s().createElement(Pm,{src:i.thumbnailUrl}),i.logoUrl&&s().createElement(Tm,{src:i.logoUrl}),!i.logoUrl&&s().createElement(Wm,null,t.name.raw),s().createElement(_m,null,s().createElement(Cm,null,"Version: ",t.version))),s().createElement($m,null,i.docUrl&&s().createElement(km,{href:i.docUrl,target:"_blank"},"Documentation")))},Zm=["standard","aside","audio","chat","gallery","image","link","quote","status","video"],Xm=(0,r.Z)(a.BaseControl)`
margin-top: 2.5em;
margin-bottom: 1.5em;
.components-base-control__label {
margin-bottom: 0;
}
`,Vm=(0,h.compose)((0,c.withSelect)((e=>{const t=e(v.G);return{attributes:t.getSettings(),isDirty:t.isDirty()}})),(0,c.withDispatch)(((e,t)=>{const{setSettings:i}=e(v.G);return{setAttributes(e){i({...t.attributes,...e})}}})),(0,f.pH)())((e=>{const{attributes:t,setAttributes:i,isDirty:n}=e,[r,h]=(0,l.useState)(!1),d=((0,c.useSelect)((e=>(e("core").getThemeSupports(),{}))),(0,c.useSelect)((e=>e("core").getCurrentTheme())));if((0,u.isEmpty)(t))return s().createElement(a.Spinner,null);(0,o.__)("Basic icons","gutenmate"),(0,o.__)("Required icons for gutenmate plugin. We don't recommend to disable it.","gutenmate");const f=t.theme_image_sizes?.length>0;return s().createElement(l.Fragment,null,s().createElement(a.Panel,null,s().createElement(Am,null),s().createElement(a.PanelBody,{title:(0,o.__)("Typography","gutenmate"),initialOpen:!1},s().createElement(k,{label:(0,o.__)("Theme font families","gutenmate"),help:(0,o.sprintf)((0,o.__)("Font families currently used by %s theme.","gutenmate"),(0,u.startCase)(d?.name?.rendered)),value:t.theme_font_families??[],onChange:e=>{i({theme_font_families:e})}}),s().createElement(a.TextControl,{label:(0,o.__)("Default font stacks","gutenmate"),help:(0,o.__)("Enter font families for fallback while webfont is loading.","gutenmate"),value:t.typography_font_stacks,onChange:e=>{i({typography_font_stacks:e})}}),s().createElement("div",{style:{marginTop:"1.75em"}}),s().createElement(a.ToggleControl,{label:(0,o.__)("Serve webfonts from local","gutenmate"),help:(0,o.__)("Host used Google fonts on your server to make more GDPR compliant.","gutenmate"),checked:t.typography_enable_local_fonts,onChange:e=>{i({typography_enable_local_fonts:e})}})),s().createElement(a.PanelBody,{title:(0,o.__)("Image Sizes","gutenmate"),initialOpen:!1},s().createElement("p",{className:"gtm-setting-description"},s().createElement(l.RawHTML,null,(0,o.__)("Add a custom image size for using in this website. After made a change, Please regerate all thumbnails by using <a class='thickbox open-plugin-details-modal' href='plugin-install.php?tab=plugin-information&plugin=regenerate-thumbnails&TB_iframe=true&width=600&height=550' target='_blank' alt='Regenerate Thumbnails'>this plugin</a> or any plugins that capable to regenerate thumbnails.","gutenmate"))),t.theme_original_image_sizes&&s().createElement(l.Fragment,null,s().createElement("h5",{className:"gtm-settings-page--image-size-group-header gtm-has-action-button"},(0,o.__)("Theme image sizes","gutenmate"),f&&s().createElement(a.Button,{isSecondary:!0,variant:"link",onClick:e=>{i({theme_image_sizes:[]})}},(0,o.__)("Reset","gutenmate"))),s().createElement(S,{editOnly:!0,value:f?t.theme_image_sizes:(0,u.cloneDeep)(t.theme_original_image_sizes),onChange:e=>{i({theme_image_sizes:e})}}),s().createElement("h5",{className:"gtm-settings-page--image-size-group-header"},(0,o.__)("Custom image sizes","gutenmate"))),s().createElement(S,{value:t.custom_image_sizes,onChange:e=>{i({custom_image_sizes:e})}})),s().createElement(a.PanelBody,{title:(0,o.__)("Post Sharing","gutenmate"),initialOpen:!1},s().createElement("p",{className:"gtm-setting-description"},(0,o.__)("Site-wide options for Post Share block.","gutenmate")),s().createElement(a.ToggleControl,{label:(0,o.__)("Enable short link","gutenmate"),help:(0,o.__)("Use short link for post url.","gutenmate"),checked:t.share_enable_short_link,onChange:e=>{i({share_enable_short_link:e})}}),s().createElement(a.TextControl,{label:(0,o.__)("Twitter username for referral","gutenmate"),help:(0,o.__)("To be used as part of tweet.","gutenmate"),placeholder:"@your_twitter_username",value:t.share_twitter_username,onChange:e=>{i({share_twitter_username:e})}})),s().createElement(a.PanelBody,{title:(0,o.__)("Post Views","gutenmate"),initialOpen:!1},s().createElement("p",{className:"gtm-setting-description"},(0,o.__)("Site-wide options for Post Views block.","gutenmate")),s().createElement(a.__experimentalNumberControl,{label:(0,o.__)("Post views forgery","gutenmate"),help:(0,o.__)("An additional number for post views counter.","gutenmate"),value:t.post_views_forgery,isShiftStepEnabled:!0,shiftStep:100,min:0,onChange:e=>{i({post_views_forgery:e})}})),s().createElement(a.PanelBody,{className:"gtm-setting-post-format-icons-panel",title:(0,o.__)("Post Format Icons","gutenmate"),initialOpen:!1},s().createElement("p",{className:"gtm-setting-description"},(0,o.__)("Site-wide options for post format icon.","gutenmate")),Zm.map(((e,n)=>s().createElement(P.w,{key:n,label:e,value:t.post_format_icons[e],placeholder:"video"===e?"gtm-basic-icon-play":void 0,defaultIcon:"video"===e?"gtm-basic-icon-play":void 0,showPreview:!0,onChange:n=>{i({post_format_icons:{...t.post_format_icons,[e]:n}})}})))),s().createElement(a.PanelBody,{title:(0,o.__)("Advertisement","gutenmate"),initialOpen:!1},s().createElement("p",{className:"gtm-setting-description"},s().createElement(l.RawHTML,null,(0,o.sprintf)((0,o.__)("You can see all available ad slots in live site <a href='%s' target='_blank' alt='Preview ad slots'>here</a> (only admins have access to this link).","gutenmate"),gtm_asd_preview_url&>m_asd_preview_url.length>0?gtm_asd_preview_url[0]:"#"))),s().createElement(a.ToggleControl,{label:(0,o.__)("Enable Ad-block Detector","gutenmate"),checked:t.asd_enable_detector,onChange:e=>{i({asd_enable_detector:e})}}),s().createElement(Xm,{label:(0,o.__)("Ad Code Preset","gutenmate"),help:(0,o.__)("Enter the ad code for each ad block of that size.","gutenmate")}),s().createElement(ym,{editOnly:!0,value:t.asd_presets,onChange:e=>{i({asd_presets:e})}})),s().createElement(a.PanelBody,{title:(0,o.__)("SEO Optimization","gutenmate"),initialOpen:!1},s().createElement("p",{className:"gtm-setting-description"},(0,o.__)("Basic optimization options for general websites. In case this site has another advanced SEO plugin installed, These options can be disabled.","gutenmate")),s().createElement(a.ToggleControl,{label:(0,o.__)("Enable title meta tags","gutenmate"),help:(0,o.__)("Generate meta tags for Title and Description.","gutenmate"),checked:t.seo_enable_title_meta,onChange:e=>{i({seo_enable_title_meta:e})}}),s().createElement(a.ToggleControl,{label:(0,o.__)("Enable meta tags for Facebook","gutenmate"),help:(0,o.__)("Generate meta tags for previewing on Facebook.","gutenmate"),checked:t.seo_enable_facebook_meta,onChange:e=>{i({seo_enable_facebook_meta:e})}}),s().createElement(a.ToggleControl,{label:(0,o.__)("Enable meta tags for Twitter","gutenmate"),help:(0,o.__)("Generate meta tags for previewing on Twitter.","gutenmate"),checked:t.seo_enable_twitter_meta,onChange:e=>{i({seo_enable_twitter_meta:e})}}),s().createElement(a.ToggleControl,{label:(0,o.__)("Enable rich snippets for posts","gutenmate"),help:(0,o.__)("Generate structured data markup for posts.","gutenmate"),checked:t.seo_enable_post_rich_snippets,onChange:e=>{i({seo_enable_post_rich_snippets:e})}})),s().createElement(a.PanelBody,{title:(0,o.__)("Icon Sets","gutenmate"),className:"gtm-icon-sets-panel",initialOpen:!1},s().createElement("p",{className:"gtm-setting-description"},(0,o.__)("Choose icon sets to be loaded both frontend and backend.","gutenmate")),gtm_available_icon_sets?.map((e=>{const n=e.link?s().createElement("span",null,e.description," ",s().createElement(a.ExternalLink,{href:e.link},(0,o.__)("Available icons","gutenmate"))):e.description;return s().createElement(a.ToggleControl,{label:e.name,help:n,checked:t.icon_sets.includes(e.slug),onChange:n=>{let s=t.icon_sets,r=s.indexOf(e.slug);-1===r?s.push(e.slug):s.splice(r,1),i({icon_sets:s})}})}))),s().createElement(a.PanelBody,{title:(0,o.__)("AMP — Accelerated Mobile Pages","gutenmate"),className:"gtm-amp-panel",initialOpen:!1},s().createElement(a.ToggleControl,{label:(0,o.__)("Enable AMP Templates","gutenmate"),help:(0,o.__)("Serve all AMP pages using AMP templates. Enable if you need a different templates for AMP pages.","gutenmate"),checked:t.amp_enable_templates,onChange:e=>{i({amp_enable_templates:e})}}),s().createElement(a.ToggleControl,{label:(0,o.__)("Compress Gutenmate's styles","gutenmate"),help:(0,o.__)("Reduce the size of Gutenmate styles to keep under the AMP CSS size limit.","gutenmate"),checked:t.amp_enable_compress_gtm_css,onChange:e=>{i({amp_enable_compress_gtm_css:e})}})),s().createElement(a.PanelBody,{title:(0,o.__)("Custom Scripts","gutenmate"),className:"gtm-custom-scripts-panel",initialOpen:!1},s().createElement("p",{className:"gtm-setting-description"},(0,o.__)("Add any JS code into all pages. No script tags needed.","gutenmate")),t.custom_scripts&&s().createElement(gm,{type:"js",value:t.custom_scripts,onChange:e=>{i({custom_scripts:e})}}),s().createElement(a.Button,{variant:"secondary",onClick:()=>{let e=t.custom_scripts??[];e.push({enable:!0}),i({custom_scripts:e})}},t.custom_scripts?.length?(0,o.__)("Add More","gutenmate"):(0,o.__)("Add","gutenmate"))),s().createElement(a.PanelBody,{title:(0,o.__)("Custom Styles","gutenmate"),className:"gtm-custom-styles-panel",initialOpen:!1},s().createElement("p",{className:"gtm-setting-description"},(0,o.__)("Add any CSS code into all pages. No style tags needed.","gutenmate")),t.custom_styles&&s().createElement(gm,{type:"css",value:t.custom_styles,onChange:e=>{i({custom_styles:e})}}),s().createElement(a.Button,{variant:"secondary",onClick:()=>{let e=t.custom_styles??[];e.push({enable:!0}),i({custom_styles:e})}},t.custom_styles?.length?(0,o.__)("Add More","gutenmate"):(0,o.__)("Add","gutenmate"))),s().createElement(a.PanelBody,{title:(0,o.__)("Custom Codes","gutenmate"),className:"gtm-custom-codes-panel",initialOpen:!1},s().createElement("p",{className:"gtm-setting-description"},(0,o.__)("Add any HTML code into the <head> tag of all pages.","gutenmate")),t.custom_codes&&s().createElement(gm,{type:"css",value:t.custom_codes,onChange:e=>{i({custom_codes:e})}}),s().createElement(a.Button,{variant:"secondary",onClick:()=>{let e=t.custom_codes??[];e.push({enable:!0}),i({custom_codes:e})}},t.custom_codes?.length?(0,o.__)("Add More","gutenmate"):(0,o.__)("Add","gutenmate"))),s().createElement(a.PanelBody,null,s().createElement(a.Button,{isPrimary:!0,variant:"primary",onClick:e=>{(0,O.RU)(h)},disabled:r||!n},(0,o.__)("Save Changes","gutenmate")))))})),Rm=e=>{const{removeNotice:t}=(0,c.useDispatch)(d.store),i=(0,c.useSelect)((e=>e(d.store).getNotices()),[]),n=(0,u.filter)(i,{isDismissible:!0,type:"default"});return s().createElement(a.NoticeList,{notices:n,className:"edit-navigation-notices__notice-list",onRemove:t})},qm=document.getElementById("gtm-settings-page-body");qm&&(0,l.render)(s().createElement(Vm,null),qm);const Mm=document.getElementById("gtm-settings-page-notice");Mm&&(0,l.render)(s().createElement(Rm,null),Mm)},1991:function(e,t){var i;!function(){"use strict";var n=function(){function e(){}function t(e,t){for(var i=t.length,n=0;n<i;++n)s(e,t[n])}e.prototype=Object.create(null);var i={}.hasOwnProperty,n=/\s+/;function s(e,s){if(s){var r=typeof s;"string"===r?function(e,t){for(var i=t.split(n),s=i.length,r=0;r<s;++r)e[i[r]]=!0}(e,s):Array.isArray(s)?t(e,s):"object"===r?function(e,t){if(t.toString===Object.prototype.toString||t.toString.toString().includes("[native code]"))for(var n in t)i.call(t,n)&&(e[n]=!!t[n]);else e[t.toString()]=!0}(e,s):"number"===r&&function(e,t){e[t]=!0}(e,s)}}return function(){for(var i=arguments.length,n=Array(i),s=0;s<i;s++)n[s]=arguments[s];var r=new e;t(r,n);var o=[];for(var a in r)r[a]&&o.push(a);return o.join(" ")}}();e.exports?(n.default=n,e.exports=n):void 0===(i=function(){return n}.apply(t,[]))||(e.exports=i)}()},1426:function(e,t,i){"use strict";var n=i(9196),s=Symbol.for("react.element"),r=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),o=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,i){var n,l={},h=null,c=null;for(n in void 0!==i&&(h=""+i),void 0!==t.key&&(h=""+t.key),void 0!==t.ref&&(c=t.ref),t)r.call(t,n)&&!a.hasOwnProperty(n)&&(l[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===l[n]&&(l[n]=t[n]);return{$$typeof:s,type:e,key:h,ref:c,props:l,_owner:o.current}}},4246:function(e,t,i){"use strict";e.exports=i(1426)}},function(e){e.O(0,[3762,6486],(function(){return 8903,e(e.s=8903)})),e.O()}]);