@weapp-vite/dashboard 6.23.0 → 6.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{css.worker-DRH2OcAG.js → css.worker-B3ciXF_0.js} +1 -1
- package/dist/assets/echarts.js +1 -1
- package/dist/assets/{editor.worker-D9zwrD0f.js → editor.worker-q-txB4vs.js} +1 -1
- package/dist/assets/{html.worker-DQLddT9h.js → html.worker-C93Ht9o9.js} +1 -1
- package/dist/assets/{json.worker-D_Dqrls5.js → json.worker-B2V3pomh.js} +1 -1
- package/dist/assets/monaco.js +5 -5
- package/dist/assets/{ts.worker-DkYoA6bF.js → ts.worker-D7T1-Ig5.js} +2 -2
- package/dist/assets/vue.js +2 -2
- package/package.json +4 -4
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
`)),a=this._computer.computeDiff(r.value,i.value,{ignoreTrimWhitespace:!0,computeMoves:n.computeMoves,extendToSubwords:n.extendToSubwords}),o=r.getTransformer(),s=i.getTransformer(),c=[],l=0;for(let e of a.edits.replacements){let t=e.range.start+l,n=t+e.newText.length,r=o.getRange(new M(e.range.start,e.range.endExclusive)),i=s.getRange(new M(t,n));c.push(new sa(r,i)),l+=e.newText.length-(e.range.endExclusive-e.range.start)}let u=ca(c,r,i),d=[];if(n.computeMoves)for(let e of a.moves){let t=o.getPosition(e.range.original.start),n=o.getPosition(e.range.original.endExclusive),r=s.getPosition(e.range.modified.start),i=s.getPosition(e.range.modified.endExclusive),a=new N(t.lineNumber,n.lineNumber),c=new N(r.lineNumber,i.lineNumber);d.push(new ki(new ra(a,c),[]))}return new Oi(u,d,a.hitTimeout)}};let To={getLegacy:()=>new ua,getDefault:()=>new io,getAdvancedExternal:()=>Co(!1),getAdvancedWasm:()=>Co(!0)};function Eo(e,t){let n=10**t;return Math.round(e*n)/n}var P=class{constructor(e,t,n,r=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,t))|0,this.b=Math.min(255,Math.max(0,n))|0,this.a=Eo(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}},Do=class e{constructor(e,t,n,r){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=Eo(Math.max(Math.min(1,t),0),3),this.l=Eo(Math.max(Math.min(1,n),0),3),this.a=Eo(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(t){let n=t.r/255,r=t.g/255,i=t.b/255,a=t.a,o=Math.max(n,r,i),s=Math.min(n,r,i),c=0,l=0,u=(s+o)/2,d=o-s;if(d>0){switch(l=Math.min(u<=.5?d/(2*u):d/(2-2*u),1),o){case n:c=(r-i)/d+(r<i?6:0);break;case r:c=(i-n)/d+2;break;case i:c=(n-r)/d+4}c*=60,c=Math.round(c)}return new e(c,l,u,a)}static _hue2rgb(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}static toRGBA(t){let n=t.h/360,{s:r,l:i,a}=t,o,s,c;if(r===0)o=s=c=i;else{let t=i<.5?i*(1+r):i+r-i*r,a=2*i-t;o=e._hue2rgb(a,t,n+1/3),s=e._hue2rgb(a,t,n),c=e._hue2rgb(a,t,n-1/3)}return new P(Math.round(o*255),Math.round(s*255),Math.round(c*255),a)}},Oo=class e{constructor(e,t,n,r){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=Eo(Math.max(Math.min(1,t),0),3),this.v=Eo(Math.max(Math.min(1,n),0),3),this.a=Eo(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(t){let n=t.r/255,r=t.g/255,i=t.b/255,a=Math.max(n,r,i),o=a-Math.min(n,r,i),s=a===0?0:o/a,c;return c=o===0?0:a===n?((r-i)/o%6+6)%6:a===r?(i-n)/o+2:(n-r)/o+4,new e(Math.round(c*60),s,a,t.a)}static toRGBA(e){let{h:t,s:n,v:r,a:i}=e,a=r*n,o=a*(1-Math.abs(t/60%2-1)),s=r-a,[c,l,u]=[0,0,0];return t<60?(c=a,l=o):t<120?(c=o,l=a):t<180?(l=a,u=o):t<240?(l=o,u=a):t<300?(c=o,u=a):t<=360&&(c=a,u=o),c=Math.round((c+s)*255),l=Math.round((l+s)*255),u=Math.round((u+s)*255),new P(c,l,u,i)}},ko=class e{static fromHex(t){return e.Format.CSS.parseHex(t)||e.red}static equals(e,t){return!e&&!t?!0:!e||!t?!1:e.equals(t)}get hsla(){return this._hsla?this._hsla:Do.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:Oo.fromRGBA(this.rgba)}constructor(e){if(!e)throw Error(`Color needs a value`);if(e instanceof P)this.rgba=e;else if(e instanceof Do)this._hsla=e,this.rgba=Do.toRGBA(e);else if(e instanceof Oo)this._hsva=e,this.rgba=Oo.toRGBA(e);else throw Error(`Invalid color ctor argument`)}equals(e){return!!e&&P.equals(this.rgba,e.rgba)&&Do.equals(this.hsla,e.hsla)&&Oo.equals(this.hsva,e.hsva)}getRelativeLuminance(){let t=e._relativeLuminanceForComponent(this.rgba.r),n=e._relativeLuminanceForComponent(this.rgba.g),r=e._relativeLuminanceForComponent(this.rgba.b);return Eo(.2126*t+.7152*n+.0722*r,4)}static _relativeLuminanceForComponent(e){let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(e){return this.getRelativeLuminance()>e.getRelativeLuminance()}isDarkerThan(e){return this.getRelativeLuminance()<e.getRelativeLuminance()}lighten(t){return new e(new Do(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*t,this.hsla.a))}darken(t){return new e(new Do(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*t,this.hsla.a))}transparent(t){let{r:n,g:r,b:i,a}=this.rgba;return new e(new P(n,r,i,a*t))}isTransparent(){return this.rgba.a===0}isOpaque(){return this.rgba.a===1}opposite(){return new e(new P(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}mix(t,n=.5){let r=Math.min(Math.max(n,0),1),i=this.rgba,a=t.rgba,o=i.r+(a.r-i.r)*r,s=i.g+(a.g-i.g)*r,c=i.b+(a.b-i.b)*r,l=i.a+(a.a-i.a)*r;return new e(new P(o,s,c,l))}makeOpaque(t){if(this.isOpaque()||t.rgba.a!==1)return this;let{r:n,g:r,b:i,a}=this.rgba;return new e(new P(t.rgba.r-a*(t.rgba.r-n),t.rgba.g-a*(t.rgba.g-r),t.rgba.b-a*(t.rgba.b-i),1))}toString(){return this._toString||=e.Format.CSS.format(this),this._toString}toNumber32Bit(){return this._toNumber32Bit||=(this.rgba.r<<24|this.rgba.g<<16|this.rgba.b<<8|this.rgba.a*255<<0)>>>0,this._toNumber32Bit}static getLighterColor(e,t,n){if(e.isLighterThan(t))return e;n||=.5;let r=e.getRelativeLuminance(),i=t.getRelativeLuminance();return n=n*(i-r)/i,e.lighten(n)}static getDarkerColor(e,t,n){if(e.isDarkerThan(t))return e;n||=.5;let r=e.getRelativeLuminance(),i=t.getRelativeLuminance();return n=n*(r-i)/r,e.darken(n)}static{this.white=new e(new P(255,255,255,1))}static{this.black=new e(new P(0,0,0,1))}static{this.red=new e(new P(255,0,0,1))}static{this.blue=new e(new P(0,0,255,1))}static{this.green=new e(new P(0,255,0,1))}static{this.cyan=new e(new P(0,255,255,1))}static{this.lightgrey=new e(new P(211,211,211,1))}static{this.transparent=new e(new P(0,0,0,0))}};(function(e){(function(t){(function(t){function n(t){return t.rgba.a===1?`rgb(${t.rgba.r}, ${t.rgba.g}, ${t.rgba.b})`:e.Format.CSS.formatRGBA(t)}t.formatRGB=n;function r(e){return`rgba(${e.rgba.r}, ${e.rgba.g}, ${e.rgba.b}, ${+e.rgba.a.toFixed(2)})`}t.formatRGBA=r;function i(t){return t.hsla.a===1?`hsl(${t.hsla.h}, ${Math.round(t.hsla.s*100)}%, ${Math.round(t.hsla.l*100)}%)`:e.Format.CSS.formatHSLA(t)}t.formatHSL=i;function a(e){return`hsla(${e.hsla.h}, ${Math.round(e.hsla.s*100)}%, ${Math.round(e.hsla.l*100)}%, ${e.hsla.a.toFixed(2)})`}t.formatHSLA=a;function o(e){let t=e.toString(16);return t.length===2?t:`0`+t}function s(e){return`#${o(e.rgba.r)}${o(e.rgba.g)}${o(e.rgba.b)}`}t.formatHex=s;function c(t,n=!1){return n&&t.rgba.a===1?e.Format.CSS.formatHex(t):`#${o(t.rgba.r)}${o(t.rgba.g)}${o(t.rgba.b)}${o(Math.round(t.rgba.a*255))}`}t.formatHexA=c;function l(t){return t.isOpaque()?e.Format.CSS.formatHex(t):e.Format.CSS.formatRGBA(t)}t.format=l;function u(t){if(t===`transparent`)return e.transparent;if(t.startsWith(`#`))return f(t);if(t.startsWith(`rgba(`)){let n=t.match(/rgba\((?<r>(?:\+|-)?\d+), *(?<g>(?:\+|-)?\d+), *(?<b>(?:\+|-)?\d+), *(?<a>(?:\+|-)?\d+(\.\d+)?)\)/);if(!n)throw Error(`Invalid color format `+t);return new e(new P(parseInt(n.groups?.r??`0`),parseInt(n.groups?.g??`0`),parseInt(n.groups?.b??`0`),parseFloat(n.groups?.a??`0`)))}if(t.startsWith(`rgb(`)){let n=t.match(/rgb\((?<r>(?:\+|-)?\d+), *(?<g>(?:\+|-)?\d+), *(?<b>(?:\+|-)?\d+)\)/);if(!n)throw Error(`Invalid color format `+t);return new e(new P(parseInt(n.groups?.r??`0`),parseInt(n.groups?.g??`0`),parseInt(n.groups?.b??`0`)))}return d(t)}t.parse=u;function d(t){switch(t){case`aliceblue`:return new e(new P(240,248,255,1));case`antiquewhite`:return new e(new P(250,235,215,1));case`aqua`:return new e(new P(0,255,255,1));case`aquamarine`:return new e(new P(127,255,212,1));case`azure`:return new e(new P(240,255,255,1));case`beige`:return new e(new P(245,245,220,1));case`bisque`:return new e(new P(255,228,196,1));case`black`:return new e(new P(0,0,0,1));case`blanchedalmond`:return new e(new P(255,235,205,1));case`blue`:return new e(new P(0,0,255,1));case`blueviolet`:return new e(new P(138,43,226,1));case`brown`:return new e(new P(165,42,42,1));case`burlywood`:return new e(new P(222,184,135,1));case`cadetblue`:return new e(new P(95,158,160,1));case`chartreuse`:return new e(new P(127,255,0,1));case`chocolate`:return new e(new P(210,105,30,1));case`coral`:return new e(new P(255,127,80,1));case`cornflowerblue`:return new e(new P(100,149,237,1));case`cornsilk`:return new e(new P(255,248,220,1));case`crimson`:return new e(new P(220,20,60,1));case`cyan`:return new e(new P(0,255,255,1));case`darkblue`:return new e(new P(0,0,139,1));case`darkcyan`:return new e(new P(0,139,139,1));case`darkgoldenrod`:return new e(new P(184,134,11,1));case`darkgray`:return new e(new P(169,169,169,1));case`darkgreen`:return new e(new P(0,100,0,1));case`darkgrey`:return new e(new P(169,169,169,1));case`darkkhaki`:return new e(new P(189,183,107,1));case`darkmagenta`:return new e(new P(139,0,139,1));case`darkolivegreen`:return new e(new P(85,107,47,1));case`darkorange`:return new e(new P(255,140,0,1));case`darkorchid`:return new e(new P(153,50,204,1));case`darkred`:return new e(new P(139,0,0,1));case`darksalmon`:return new e(new P(233,150,122,1));case`darkseagreen`:return new e(new P(143,188,143,1));case`darkslateblue`:return new e(new P(72,61,139,1));case`darkslategray`:return new e(new P(47,79,79,1));case`darkslategrey`:return new e(new P(47,79,79,1));case`darkturquoise`:return new e(new P(0,206,209,1));case`darkviolet`:return new e(new P(148,0,211,1));case`deeppink`:return new e(new P(255,20,147,1));case`deepskyblue`:return new e(new P(0,191,255,1));case`dimgray`:return new e(new P(105,105,105,1));case`dimgrey`:return new e(new P(105,105,105,1));case`dodgerblue`:return new e(new P(30,144,255,1));case`firebrick`:return new e(new P(178,34,34,1));case`floralwhite`:return new e(new P(255,250,240,1));case`forestgreen`:return new e(new P(34,139,34,1));case`fuchsia`:return new e(new P(255,0,255,1));case`gainsboro`:return new e(new P(220,220,220,1));case`ghostwhite`:return new e(new P(248,248,255,1));case`gold`:return new e(new P(255,215,0,1));case`goldenrod`:return new e(new P(218,165,32,1));case`gray`:return new e(new P(128,128,128,1));case`green`:return new e(new P(0,128,0,1));case`greenyellow`:return new e(new P(173,255,47,1));case`grey`:return new e(new P(128,128,128,1));case`honeydew`:return new e(new P(240,255,240,1));case`hotpink`:return new e(new P(255,105,180,1));case`indianred`:return new e(new P(205,92,92,1));case`indigo`:return new e(new P(75,0,130,1));case`ivory`:return new e(new P(255,255,240,1));case`khaki`:return new e(new P(240,230,140,1));case`lavender`:return new e(new P(230,230,250,1));case`lavenderblush`:return new e(new P(255,240,245,1));case`lawngreen`:return new e(new P(124,252,0,1));case`lemonchiffon`:return new e(new P(255,250,205,1));case`lightblue`:return new e(new P(173,216,230,1));case`lightcoral`:return new e(new P(240,128,128,1));case`lightcyan`:return new e(new P(224,255,255,1));case`lightgoldenrodyellow`:return new e(new P(250,250,210,1));case`lightgray`:return new e(new P(211,211,211,1));case`lightgreen`:return new e(new P(144,238,144,1));case`lightgrey`:return new e(new P(211,211,211,1));case`lightpink`:return new e(new P(255,182,193,1));case`lightsalmon`:return new e(new P(255,160,122,1));case`lightseagreen`:return new e(new P(32,178,170,1));case`lightskyblue`:return new e(new P(135,206,250,1));case`lightslategray`:return new e(new P(119,136,153,1));case`lightslategrey`:return new e(new P(119,136,153,1));case`lightsteelblue`:return new e(new P(176,196,222,1));case`lightyellow`:return new e(new P(255,255,224,1));case`lime`:return new e(new P(0,255,0,1));case`limegreen`:return new e(new P(50,205,50,1));case`linen`:return new e(new P(250,240,230,1));case`magenta`:return new e(new P(255,0,255,1));case`maroon`:return new e(new P(128,0,0,1));case`mediumaquamarine`:return new e(new P(102,205,170,1));case`mediumblue`:return new e(new P(0,0,205,1));case`mediumorchid`:return new e(new P(186,85,211,1));case`mediumpurple`:return new e(new P(147,112,219,1));case`mediumseagreen`:return new e(new P(60,179,113,1));case`mediumslateblue`:return new e(new P(123,104,238,1));case`mediumspringgreen`:return new e(new P(0,250,154,1));case`mediumturquoise`:return new e(new P(72,209,204,1));case`mediumvioletred`:return new e(new P(199,21,133,1));case`midnightblue`:return new e(new P(25,25,112,1));case`mintcream`:return new e(new P(245,255,250,1));case`mistyrose`:return new e(new P(255,228,225,1));case`moccasin`:return new e(new P(255,228,181,1));case`navajowhite`:return new e(new P(255,222,173,1));case`navy`:return new e(new P(0,0,128,1));case`oldlace`:return new e(new P(253,245,230,1));case`olive`:return new e(new P(128,128,0,1));case`olivedrab`:return new e(new P(107,142,35,1));case`orange`:return new e(new P(255,165,0,1));case`orangered`:return new e(new P(255,69,0,1));case`orchid`:return new e(new P(218,112,214,1));case`palegoldenrod`:return new e(new P(238,232,170,1));case`palegreen`:return new e(new P(152,251,152,1));case`paleturquoise`:return new e(new P(175,238,238,1));case`palevioletred`:return new e(new P(219,112,147,1));case`papayawhip`:return new e(new P(255,239,213,1));case`peachpuff`:return new e(new P(255,218,185,1));case`peru`:return new e(new P(205,133,63,1));case`pink`:return new e(new P(255,192,203,1));case`plum`:return new e(new P(221,160,221,1));case`powderblue`:return new e(new P(176,224,230,1));case`purple`:return new e(new P(128,0,128,1));case`rebeccapurple`:return new e(new P(102,51,153,1));case`red`:return new e(new P(255,0,0,1));case`rosybrown`:return new e(new P(188,143,143,1));case`royalblue`:return new e(new P(65,105,225,1));case`saddlebrown`:return new e(new P(139,69,19,1));case`salmon`:return new e(new P(250,128,114,1));case`sandybrown`:return new e(new P(244,164,96,1));case`seagreen`:return new e(new P(46,139,87,1));case`seashell`:return new e(new P(255,245,238,1));case`sienna`:return new e(new P(160,82,45,1));case`silver`:return new e(new P(192,192,192,1));case`skyblue`:return new e(new P(135,206,235,1));case`slateblue`:return new e(new P(106,90,205,1));case`slategray`:return new e(new P(112,128,144,1));case`slategrey`:return new e(new P(112,128,144,1));case`snow`:return new e(new P(255,250,250,1));case`springgreen`:return new e(new P(0,255,127,1));case`steelblue`:return new e(new P(70,130,180,1));case`tan`:return new e(new P(210,180,140,1));case`teal`:return new e(new P(0,128,128,1));case`thistle`:return new e(new P(216,191,216,1));case`tomato`:return new e(new P(255,99,71,1));case`turquoise`:return new e(new P(64,224,208,1));case`violet`:return new e(new P(238,130,238,1));case`wheat`:return new e(new P(245,222,179,1));case`white`:return new e(new P(255,255,255,1));case`whitesmoke`:return new e(new P(245,245,245,1));case`yellow`:return new e(new P(255,255,0,1));case`yellowgreen`:return new e(new P(154,205,50,1));default:return null}}function f(t){let n=t.length;if(n===0||t.charCodeAt(0)!==35)return null;if(n===7)return new e(new P(16*p(t.charCodeAt(1))+p(t.charCodeAt(2)),16*p(t.charCodeAt(3))+p(t.charCodeAt(4)),16*p(t.charCodeAt(5))+p(t.charCodeAt(6)),1));if(n===9)return new e(new P(16*p(t.charCodeAt(1))+p(t.charCodeAt(2)),16*p(t.charCodeAt(3))+p(t.charCodeAt(4)),16*p(t.charCodeAt(5))+p(t.charCodeAt(6)),(16*p(t.charCodeAt(7))+p(t.charCodeAt(8)))/255));if(n===4){let n=p(t.charCodeAt(1)),r=p(t.charCodeAt(2)),i=p(t.charCodeAt(3));return new e(new P(16*n+n,16*r+r,16*i+i))}if(n===5){let n=p(t.charCodeAt(1)),r=p(t.charCodeAt(2)),i=p(t.charCodeAt(3)),a=p(t.charCodeAt(4));return new e(new P(16*n+n,16*r+r,16*i+i,(16*a+a)/255))}return null}t.parseHex=f;function p(e){switch(e){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}})(t.CSS||={})})(e.Format||={})})(ko||={});function Ao(e){let t=[];for(let n of e){let e=Number(n);(e||e===0&&n.replace(/\s/g,``)!==``)&&t.push(e)}return t}function jo(e,t,n,r){return{red:e/255,blue:n/255,green:t/255,alpha:r}}function Mo(e,t){let n=t.index,r=t[0].length;if(n===void 0)return;let i=e.positionAt(n);return{startLineNumber:i.lineNumber,startColumn:i.column,endLineNumber:i.lineNumber,endColumn:i.column+r}}function No(e,t){if(!e)return;let n=ko.Format.CSS.parseHex(t);if(n)return{range:e,color:jo(n.rgba.r,n.rgba.g,n.rgba.b,n.rgba.a)}}function Po(e,t,n){if(!e||t.length!==1)return;let r=Ao(t[0].values());return{range:e,color:jo(r[0],r[1],r[2],n?r[3]:1)}}function Fo(e,t,n){if(!e||t.length!==1)return;let r=Ao(t[0].values()),i=new ko(new Do(r[0],r[1]/100,r[2]/100,n?r[3]:1));return{range:e,color:jo(i.rgba.r,i.rgba.g,i.rgba.b,i.rgba.a)}}function Io(e,t){return typeof e==`string`?[...e.matchAll(t)]:e.findMatches(t)}function Lo(e){let t=[],n=Io(e,/\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%\/]*\))|^(#)([A-Fa-f0-9]{3})\b|^(#)([A-Fa-f0-9]{4})\b|^(#)([A-Fa-f0-9]{6})\b|^(#)([A-Fa-f0-9]{8})\b|(?<=['"\s])(#)([A-Fa-f0-9]{3})\b|(?<=['"\s])(#)([A-Fa-f0-9]{4})\b|(?<=['"\s])(#)([A-Fa-f0-9]{6})\b|(?<=['"\s])(#)([A-Fa-f0-9]{8})\b/gm);if(n.length>0)for(let r of n){let n=r.filter(e=>e!==void 0),i=n[1],a=n[2];if(!a)continue;let o;i===`rgb`?o=Po(Mo(e,r),Io(a,/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*[\s,]\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*[\s,]\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm),!1):i===`rgba`?o=Po(Mo(e,r),Io(a,/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*[\s,]\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*[\s,]\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*(?:[\s,]|[\s]*\/)\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm),!0):i===`hsl`?o=Fo(Mo(e,r),Io(a,/^\(\s*((?:360(?:\.0+)?|(?:36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])(?:\.\d+)?))\s*[\s,]\s*(100(?:\.0+)?|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(100(?:\.0+)?|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm),!1):i===`hsla`?o=Fo(Mo(e,r),Io(a,/^\(\s*((?:360(?:\.0+)?|(?:36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])(?:\.\d+)?))\s*[\s,]\s*(100(?:\.0+)?|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(100(?:\.0+)?|\d{1,2}[.]\d*|\d{1,2})%\s*(?:[\s,]|[\s]*\/)\s*(0[.][0-9]+|[.][0-9]+|[01][.]0*|[01])\s*\)$/gm),!0):i===`#`&&(o=No(Mo(e,r),i+a)),o&&t.push(o)}return t}function Ro(e){return!e||typeof e.getValue!=`function`||typeof e.positionAt!=`function`?[]:Lo(e)}let zo=/^-+|-+$/g;function Bo(e,t){let n=[];if(t.findRegionSectionHeaders&&t.foldingRules?.markers){let r=Vo(e,t);n=n.concat(r)}if(t.findMarkSectionHeaders){let r=Ho(e,t);n=n.concat(r)}return n}function Vo(e,t){let n=[],r=e.getLineCount();for(let i=1;i<=r;i++){let r=e.getLineContent(i),a=r.match(t.foldingRules.markers.start);if(a){let e={startLineNumber:i,startColumn:a[0].length+1,endLineNumber:i,endColumn:r.length+1};if(e.endColumn>e.startColumn){let t={range:e,...Uo(r.substring(a[0].length)),shouldBeInComments:!1};(t.text||t.hasSeparatorLine)&&n.push(t)}}}return n}function Ho(e,t){let n=[],r=e.getLineCount();if(!t.markSectionHeaderRegex||t.markSectionHeaderRegex.trim()===``)return n;let i=pi(t.markSectionHeaderRegex),a=new RegExp(t.markSectionHeaderRegex,`gdm${i?`s`:``}`);if(Ke(a))return n;for(let t=1;t<=r;t+=95){let i=Math.min(t+100-1,r),o=[];for(let n=t;n<=i;n++)o.push(e.getLineContent(n));let s=o.join(`
|
|
28
28
|
`);a.lastIndex=0;let c;for(;(c=a.exec(s))!==null;){let e=s.substring(0,c.index),r=(e.match(/\n/g)||[]).length,i=t+r,o=c[0].split(`
|
|
29
29
|
`),l=o.length,u=i+l-1,d=e.lastIndexOf(`
|
|
30
|
-
`)+1,f=c.index-d+1,p=o[o.length-1],m={range:{startLineNumber:i,startColumn:f,endLineNumber:u,endColumn:l===1?f+c[0].length:p.length+1},text:(c.groups??{}).label??``,hasSeparatorLine:((c.groups??{}).separator??``)!==``,shouldBeInComments:!0};(m.text||m.hasSeparatorLine)&&(n.length===0||n[n.length-1].range.endLineNumber<m.range.startLineNumber)&&n.push(m),a.lastIndex=c.index+c[0].length}}return n}function Uo(e){e=e.trim();let t=e.startsWith(`-`);return e=e.replace(zo,``),{text:e,hasSeparatorLine:t}}(function(){let e=globalThis;typeof e.requestIdleCallback!=`function`||e.cancelIdleCallback})();var Wo=class{get isRejected(){return this.outcome?.outcome===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((e,t)=>{this.completeCallback=e,this.errorCallback=t})}complete(e){return this.isSettled?Promise.resolve():new Promise(t=>{this.completeCallback(e),this.outcome={outcome:0,value:e},t()})}error(e){return this.isSettled?Promise.resolve():new Promise(t=>{this.errorCallback(e),this.outcome={outcome:1,value:e},t()})}cancel(){return this.error(new a)}},Go;(function(e){async function t(e){let t,n=await Promise.all(e.map(e=>e.then(e=>e,e=>{t||=e})));if(t!==void 0)throw t;return n}e.settled=t;function n(e){return new Promise(async(t,n)=>{try{await e(t,n)}catch(e){n(e)}})}e.withAsyncBody=n})(Go||={});var Ko=class{constructor(){this._unsatisfiedConsumers=[],this._unconsumedValues=[]}get hasFinalValue(){return!!this._finalValue}produce(e){if(this._ensureNoFinalValue(),this._unsatisfiedConsumers.length>0){let t=this._unsatisfiedConsumers.shift();this._resolveOrRejectDeferred(t,e)}else this._unconsumedValues.push(e)}produceFinal(e){this._ensureNoFinalValue(),this._finalValue=e;for(let t of this._unsatisfiedConsumers)this._resolveOrRejectDeferred(t,e);this._unsatisfiedConsumers.length=0}_ensureNoFinalValue(){if(this._finalValue)throw new s(`ProducerConsumer: cannot produce after final value has been set`)}_resolveOrRejectDeferred(e,t){t.ok?e.complete(t.value):e.error(t.error)}consume(){if(this._unconsumedValues.length>0||this._finalValue){let e=this._unconsumedValues.length>0?this._unconsumedValues.shift():this._finalValue;return e.ok?Promise.resolve(e.value):Promise.reject(e.error)}{let e=new Wo;return this._unsatisfiedConsumers.push(e),e.p}}};(class e{constructor(e,t){this._onReturn=t,this._producerConsumer=new Ko,this._iterator={next:()=>this._producerConsumer.consume(),return:()=>(this._onReturn?.(),Promise.resolve({done:!0,value:void 0})),throw:async e=>(this._finishError(e),{done:!0,value:void 0})},queueMicrotask(async()=>{let t=e({emitOne:e=>this._producerConsumer.produce({ok:!0,value:{done:!1,value:e}}),emitMany:e=>{for(let t of e)this._producerConsumer.produce({ok:!0,value:{done:!1,value:t}})},reject:e=>this._finishError(e)});if(!this._producerConsumer.hasFinalValue)try{await t,this._finishOk()}catch(e){this._finishError(e)}})}static fromArray(t){return new e(e=>{e.emitMany(t)})}static fromPromise(t){return new e(async e=>{e.emitMany(await t)})}static fromPromisesResolveOrder(t){return new e(async e=>{await Promise.all(t.map(async t=>e.emitOne(await t)))})}static merge(t){return new e(async e=>{await Promise.all(t.map(async t=>{for await(let n of t)e.emitOne(n)}))})}static{this.EMPTY=e.fromArray([])}static map(t,n){return new e(async e=>{for await(let r of t)e.emitOne(n(r))})}static tee(t){let n,r,i=new Wo,a=async()=>{if(!(!n||!r))try{for await(let e of t)n.emitOne(e),r.emitOne(e)}catch(e){n.reject(e),r.reject(e)}finally{i.complete()}};return[new e(async e=>(n=e,a(),i.p)),new e(async e=>(r=e,a(),i.p))]}map(t){return e.map(this,t)}static coalesce(t){return e.filter(t,e=>!!e)}coalesce(){return e.coalesce(this)}static filter(t,n){return new e(async e=>{for await(let r of t)n(r)&&e.emitOne(r)})}filter(t){return e.filter(this,t)}_finishOk(){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!0,value:{done:!0,value:void 0}})}_finishError(e){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!1,error:e})}[Symbol.asyncIterator](){return this._iterator}});var qo=class{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=Lt(e);let n=this.values,r=this.prefixSum,i=t.length;return i!==0&&(this.values=new Uint32Array(n.length+i),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+i),this.values.set(t,e),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=Lt(e),t=Lt(t),this.values[e]!==t&&(this.values[e]=t,e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),!0)}removeValues(e,t){e=Lt(e),t=Lt(t);let n=this.values,r=this.prefixSum;if(e>=n.length)return!1;let i=n.length-e;return t>=i&&(t=i),t!==0&&(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=Lt(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;t===0&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,n=this.values.length-1,r=0,i=0,a=0;for(;t<=n;)if(r=t+(n-t)/2|0,i=this.prefixSum[r],a=i-this.values[r],e<a)n=r-1;else if(e>=i)t=r+1;else break;return new Jo(r,e-a)}},Jo=class{constructor(e,t){this.index=e,this.remainder=t,this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=t}},Yo=class{constructor(e,t,n,r){this._uri=e,this._lines=t,this._eol=n,this._versionId=r,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);let t=e.changes;for(let e of t)this._acceptDeleteRange(e.range),this._acceptInsertText(new T(e.range.startLineNumber,e.range.startColumn),e.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){let e=this._eol.length,t=this._lines.length,n=new Uint32Array(t);for(let r=0;r<t;r++)n[r]=this._lines[r].length+e;this._lineStarts=new qo(n)}}_setLineText(e,t){this._lines[e]=t,this._lineStarts&&this._lineStarts.setValue(e,this._lines[e].length+this._eol.length)}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.startLineNumber-1].substring(e.endColumn-1));return}this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.endLineNumber-1].substring(e.endColumn-1)),this._lines.splice(e.startLineNumber,e.endLineNumber-e.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,t){if(t.length===0)return;let n=qe(t);if(n.length===1){this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+n[0]+this._lines[e.lineNumber-1].substring(e.column-1));return}n[n.length-1]+=this._lines[e.lineNumber-1].substring(e.column-1),this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+n[0]);let r=new Uint32Array(n.length-1);for(let t=1;t<n.length;t++)this._lines.splice(e.lineNumber+t-1,0,n[t]),r[t-1]=n[t].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(e.lineNumber,r)}},Xo=class{constructor(){this._models=Object.create(null)}getModel(e){return this._models[e]}getModels(){let e=[];return Object.keys(this._models).forEach(t=>e.push(this._models[t])),e}$acceptNewModel(e){this._models[e.url]=new Zo(On.parse(e.url),e.lines,e.EOL,e.versionId)}$acceptModelChanged(e,t){this._models[e]&&this._models[e].onEvents(t)}$acceptRemovedModel(e){this._models[e]&&delete this._models[e]}},Zo=class extends Yo{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){let t=[];for(let n=0;n<this._lines.length;n++){let r=this._lines[n],i=this.offsetAt(new T(n+1,1)),a=r.matchAll(e);for(let e of a)(e.index||e.index===0)&&(e.index+=i),t.push(e)}return t}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(e){return this._lines[e-1]}getWordAtPosition(e,t){let n=Si(e.column,bi(t),this._lines[e.lineNumber-1],0);return n?new E(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn):null}words(e){let t=this._lines,n=this._wordenize.bind(this),r=0,i=``,a=0,o=[];return{*[Symbol.iterator](){for(;;)if(a<o.length){let e=i.substring(o[a].start,o[a].end);a+=1,yield e}else if(r<t.length)i=t[r],o=n(i,e),a=0,r+=1;else break}}}getLineWords(e,t){let n=this._lines[e-1],r=this._wordenize(n,t),i=[];for(let e of r)i.push({word:n.substring(e.start,e.end),startColumn:e.start+1,endColumn:e.end+1});return i}_wordenize(e,t){let n=[],r;for(t.lastIndex=0;(r=t.exec(e))&&r[0].length!==0;)n.push({start:r.index,end:r.index+r[0].length});return n}getValueInRange(e){if(e=this._validateRange(e),e.startLineNumber===e.endLineNumber)return this._lines[e.startLineNumber-1].substring(e.startColumn-1,e.endColumn-1);let t=this._eol,n=e.startLineNumber-1,r=e.endLineNumber-1,i=[];i.push(this._lines[n].substring(e.startColumn-1));for(let e=n+1;e<r;e++)i.push(this._lines[e]);return i.push(this._lines[r].substring(0,e.endColumn-1)),i.join(t)}offsetAt(e){return e=this._validatePosition(e),this._ensureLineStarts(),this._lineStarts.getPrefixSum(e.lineNumber-2)+(e.column-1)}positionAt(e){e=Math.floor(e),e=Math.max(0,e),this._ensureLineStarts();let t=this._lineStarts.getIndexOf(e),n=this._lines[t.index].length;return{lineNumber:1+t.index,column:1+Math.min(t.remainder,n)}}_validateRange(e){let t=this._validatePosition({lineNumber:e.startLineNumber,column:e.startColumn}),n=this._validatePosition({lineNumber:e.endLineNumber,column:e.endColumn});return t.lineNumber!==e.startLineNumber||t.column!==e.startColumn||n.lineNumber!==e.endLineNumber||n.column!==e.endColumn?{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:n.lineNumber,endColumn:n.column}:e}_validatePosition(e){if(!T.isIPosition(e))throw Error(`bad position`);let{lineNumber:t,column:n}=e,r=!1;if(t<1)t=1,n=1,r=!0;else if(t>this._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,r=!0;else{let e=this._lines[t-1].length+1;n<1?(n=1,r=!0):n>e&&(n=e,r=!0)}return r?{lineNumber:t,column:n}:e}},Qo=class e{constructor(e=null){this._foreignModule=e,this._requestHandlerBrand=void 0,this._workerTextModelSyncServer=new Xo}dispose(){}async $ping(){return`pong`}_getModel(e){return this._workerTextModelSyncServer.getModel(e)}getModels(){return this._workerTextModelSyncServer.getModels()}$acceptNewModel(e){this._workerTextModelSyncServer.$acceptNewModel(e)}$acceptModelChanged(e,t){this._workerTextModelSyncServer.$acceptModelChanged(e,t)}$acceptRemovedModel(e){this._workerTextModelSyncServer.$acceptRemovedModel(e)}async $computeUnicodeHighlights(e,t,n){let r=this._getModel(e);return r?wi.computeUnicodeHighlights(r,t,n):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async $findSectionHeaders(e,t){let n=this._getModel(e);return n?Bo(n,t):[]}async $computeDiff(t,n,r,i){let a=this._getModel(t),o=this._getModel(n);if(!a||!o)return null;let s=await $o(i);return e.computeDiff(a,o,r,s)}static computeDiff(e,t,n,r){let i=e.getLinesContent(),a=t.getLinesContent(),o=r.computeDiff(i,a,n),s=o.changes.length>0?!1:this._modelsAreIdentical(e,t);function c(e){return e.map(e=>[e.original.startLineNumber,e.original.endLineNumberExclusive,e.modified.startLineNumber,e.modified.endLineNumberExclusive,e.innerChanges?.map(e=>[e.originalRange.startLineNumber,e.originalRange.startColumn,e.originalRange.endLineNumber,e.originalRange.endColumn,e.modifiedRange.startLineNumber,e.modifiedRange.startColumn,e.modifiedRange.endLineNumber,e.modifiedRange.endColumn])])}return{identical:s,quitEarly:o.hitTimeout,changes:c(o.changes),moves:o.moves.map(e=>[e.lineRangeMapping.original.startLineNumber,e.lineRangeMapping.original.endLineNumberExclusive,e.lineRangeMapping.modified.startLineNumber,e.lineRangeMapping.modified.endLineNumberExclusive,c(e.changes)])}}static _modelsAreIdentical(e,t){let n=e.getLineCount();if(n!==t.getLineCount())return!1;for(let r=1;r<=n;r++)if(e.getLineContent(r)!==t.getLineContent(r))return!1;return!0}static{this._diffLimit=1e5}async $computeMoreMinimalEdits(t,n,r){let i=this._getModel(t);if(!i)return n;let a=[],o;n=n.slice(0).sort((e,t)=>e.range&&t.range?E.compareRangesUsingStarts(e.range,t.range):!e.range-+!t.range);let s=0;for(let e=1;e<n.length;e++)E.getEndPosition(n[s].range).equals(E.getStartPosition(n[e].range))?(n[s].range=E.fromPositions(E.getStartPosition(n[s].range),E.getEndPosition(n[e].range)),n[s].text+=n[e].text):(s++,n[s]=n[e]);n.length=s+1;for(let{range:t,text:s,eol:c}of n){if(typeof c==`number`&&(o=c),E.isEmpty(t)&&!s)continue;let n=i.getValueInRange(t);if(s=s.replace(/\r\n|\n|\r/g,i.eol),n===s)continue;if(Math.max(s.length,n.length)>e._diffLimit){a.push({range:t,text:s});continue}let l=jt(n,s,r),u=i.offsetAt(E.lift(t).getStartPosition());for(let e of l){let t=i.positionAt(u+e.originalStart),n=i.positionAt(u+e.originalStart+e.originalLength),r={text:s.substr(e.modifiedStart,e.modifiedLength),range:{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:n.lineNumber,endColumn:n.column}};i.getValueInRange(r.range)!==r.text&&a.push(r)}}return typeof o==`number`&&a.push({eol:o,text:``,range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),a}async $computeLinks(e){let t=this._getModel(e);return t?Kt(t):null}async $computeDefaultDocumentColors(e){let t=this._getModel(e);return t?Ro(t):null}static{this._suggestionsLimit=1e4}async $textualSuggest(t,n,r,i){let a=new De,o=new RegExp(r,i),s=new Set;outer:for(let r of t){let t=this._getModel(r);if(t){for(let r of t.words(o))if(!(r===n||!isNaN(Number(r)))&&(s.add(r),s.size>e._suggestionsLimit))break outer}}return{words:Array.from(s),duration:a.elapsed()}}async $computeWordRanges(e,t,n,r){let i=this._getModel(e);if(!i)return Object.create(null);let a=new RegExp(n,r),o=Object.create(null);for(let e=t.startLineNumber;e<t.endLineNumber;e++){let t=i.getLineWords(e,a);for(let n of t){if(!isNaN(Number(n.word)))continue;let t=o[n.word];t||(t=[],o[n.word]=t),t.push({startLineNumber:e,startColumn:n.startColumn,endLineNumber:e,endColumn:n.endColumn})}}return o}async $navigateValueSet(e,t,n,r,i){let a=this._getModel(e);if(!a)return null;let o=new RegExp(r,i);t.startColumn===t.endColumn&&(t={startLineNumber:t.startLineNumber,startColumn:t.startColumn,endLineNumber:t.endLineNumber,endColumn:t.endColumn+1});let s=a.getValueInRange(t),c=a.getWordAtPosition({lineNumber:t.startLineNumber,column:t.startColumn},o);if(!c)return null;let l=a.getValueInRange(c);return qt.INSTANCE.navigateValueSet(t,s,c,l,n)}$fmr(e,t){if(!this._foreignModule||typeof this._foreignModule[e]!=`function`)return Promise.reject(Error(`Missing requestHandler or method: `+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(e){return Promise.reject(e)}}};typeof importScripts==`function`&&(globalThis.monaco=ei());function $o(e){switch(e){case`legacy`:return To.getLegacy();case`advanced`:return To.getDefault();case`advanced-external`:return To.getAdvancedExternal();case`advanced-wasm`:return To.getAdvancedWasm()}}var es=class e{static{this.CHANNEL_NAME=`editorWorkerHost`}static getChannel(t){return t.getChannel(e.CHANNEL_NAME)}static setChannel(t,n){t.setChannel(e.CHANNEL_NAME,n)}};function ts(e){let t,n=yt(r=>{let i=es.getChannel(r);return t=e({host:new Proxy({},{get(e,t,n){if(t!==`then`){if(typeof t!=`string`)throw Error(`Not supported`);return(...e)=>i.$fhr(t,e)}}}),getMirrorModels:()=>n.requestHandler.getModels()}),new Qo(t)});return t}function ns(e){self.onmessage=t=>{ts(n=>e(n,t.data))}}var F;(function(e){e[e.Ident=0]=`Ident`,e[e.AtKeyword=1]=`AtKeyword`,e[e.String=2]=`String`,e[e.BadString=3]=`BadString`,e[e.UnquotedString=4]=`UnquotedString`,e[e.Hash=5]=`Hash`,e[e.Num=6]=`Num`,e[e.Percentage=7]=`Percentage`,e[e.Dimension=8]=`Dimension`,e[e.UnicodeRange=9]=`UnicodeRange`,e[e.CDO=10]=`CDO`,e[e.CDC=11]=`CDC`,e[e.Colon=12]=`Colon`,e[e.SemiColon=13]=`SemiColon`,e[e.CurlyL=14]=`CurlyL`,e[e.CurlyR=15]=`CurlyR`,e[e.ParenthesisL=16]=`ParenthesisL`,e[e.ParenthesisR=17]=`ParenthesisR`,e[e.BracketL=18]=`BracketL`,e[e.BracketR=19]=`BracketR`,e[e.Whitespace=20]=`Whitespace`,e[e.Includes=21]=`Includes`,e[e.Dashmatch=22]=`Dashmatch`,e[e.SubstringOperator=23]=`SubstringOperator`,e[e.PrefixOperator=24]=`PrefixOperator`,e[e.SuffixOperator=25]=`SuffixOperator`,e[e.Delim=26]=`Delim`,e[e.EMS=27]=`EMS`,e[e.EXS=28]=`EXS`,e[e.Length=29]=`Length`,e[e.Angle=30]=`Angle`,e[e.Time=31]=`Time`,e[e.Freq=32]=`Freq`,e[e.Exclamation=33]=`Exclamation`,e[e.Resolution=34]=`Resolution`,e[e.Comma=35]=`Comma`,e[e.Charset=36]=`Charset`,e[e.EscapedJavaScript=37]=`EscapedJavaScript`,e[e.BadEscapedJavaScript=38]=`BadEscapedJavaScript`,e[e.Comment=39]=`Comment`,e[e.SingleLineComment=40]=`SingleLineComment`,e[e.EOF=41]=`EOF`,e[e.ContainerQueryLength=42]=`ContainerQueryLength`,e[e.CustomToken=43]=`CustomToken`})(F||={});var rs=class{constructor(e){this.source=e,this.len=e.length,this.position=0}substring(e,t=this.position){return this.source.substring(e,t)}eos(){return this.len<=this.position}pos(){return this.position}goBackTo(e){this.position=e}goBack(e){this.position-=e}advance(e){this.position+=e}nextChar(){return this.source.charCodeAt(this.position++)||0}peekChar(e=0){return this.source.charCodeAt(this.position+e)||0}lookbackChar(e=0){return this.source.charCodeAt(this.position-e)||0}advanceIfChar(e){return e===this.source.charCodeAt(this.position)&&(this.position++,!0)}advanceIfChars(e){if(this.position+e.length>this.source.length)return!1;let t=0;for(;t<e.length;t++)if(this.source.charCodeAt(this.position+t)!==e[t])return!1;return this.advance(t),!0}advanceWhileChar(e){let t=this.position;for(;this.position<this.len&&e(this.source.charCodeAt(this.position));)this.position++;return this.position-t}};let is={};is[59]=F.SemiColon,is[58]=F.Colon,is[123]=F.CurlyL,is[125]=F.CurlyR,is[93]=F.BracketR,is[91]=F.BracketL,is[40]=F.ParenthesisL,is[41]=F.ParenthesisR,is[44]=F.Comma;let I={};I.em=F.EMS,I.ex=F.EXS,I.px=F.Length,I.cm=F.Length,I.mm=F.Length,I.in=F.Length,I.pt=F.Length,I.pc=F.Length,I.deg=F.Angle,I.rad=F.Angle,I.grad=F.Angle,I.ms=F.Time,I.s=F.Time,I.hz=F.Freq,I.khz=F.Freq,I[`%`]=F.Percentage,I.fr=F.Percentage,I.dpi=F.Resolution,I.dpcm=F.Resolution,I.cqw=F.ContainerQueryLength,I.cqh=F.ContainerQueryLength,I.cqi=F.ContainerQueryLength,I.cqb=F.ContainerQueryLength,I.cqmin=F.ContainerQueryLength,I.cqmax=F.ContainerQueryLength;var as=class{constructor(){this.stream=new rs(``),this.ignoreComment=!0,this.ignoreWhitespace=!0,this.inURL=!1}setSource(e){this.stream=new rs(e)}finishToken(e,t,n){return{offset:e,len:this.stream.pos()-e,type:t,text:n||this.stream.substring(e)}}substring(e,t){return this.stream.substring(e,e+t)}pos(){return this.stream.pos()}goBackTo(e){this.stream.goBackTo(e)}scanUnquotedString(){let e=this.stream.pos(),t=[];return this._unquotedString(t)?this.finishToken(e,F.UnquotedString,t.join(``)):null}scan(){let e=this.trivia();if(e!==null)return e;let t=this.stream.pos();return this.stream.eos()?this.finishToken(t,F.EOF):this.scanNext(t)}tryScanUnicode(){let e=this.stream.pos();if(!this.stream.eos()&&this._unicodeRange())return this.finishToken(e,F.UnicodeRange);this.stream.goBackTo(e)}scanNext(e){if(this.stream.advanceIfChars([60,33,45,45]))return this.finishToken(e,F.CDO);if(this.stream.advanceIfChars([45,45,62]))return this.finishToken(e,F.CDC);let t=[];if(this.ident(t))return this.finishToken(e,F.Ident,t.join(``));if(this.stream.advanceIfChar(64)){if(t=[`@`],this._name(t)){let n=t.join(``);return n===`@charset`?this.finishToken(e,F.Charset,n):this.finishToken(e,F.AtKeyword,n)}return this.finishToken(e,F.Delim)}if(this.stream.advanceIfChar(35))return t=[`#`],this._name(t)?this.finishToken(e,F.Hash,t.join(``)):this.finishToken(e,F.Delim);if(this.stream.advanceIfChar(33))return this.finishToken(e,F.Exclamation);if(this._number()){let n=this.stream.pos();if(t=[this.stream.substring(e,n)],this.stream.advanceIfChar(37))return this.finishToken(e,F.Percentage);if(this.ident(t)){let r=this.stream.substring(n).toLowerCase(),i=I[r];return i===void 0?this.finishToken(e,F.Dimension,t.join(``)):this.finishToken(e,i,t.join(``))}return this.finishToken(e,F.Num)}t=[];let n=this._string(t);return n===null?(n=is[this.stream.peekChar()],n===void 0?this.stream.peekChar(0)===126&&this.stream.peekChar(1)===61?(this.stream.advance(2),this.finishToken(e,F.Includes)):this.stream.peekChar(0)===124&&this.stream.peekChar(1)===61?(this.stream.advance(2),this.finishToken(e,F.Dashmatch)):this.stream.peekChar(0)===42&&this.stream.peekChar(1)===61?(this.stream.advance(2),this.finishToken(e,F.SubstringOperator)):this.stream.peekChar(0)===94&&this.stream.peekChar(1)===61?(this.stream.advance(2),this.finishToken(e,F.PrefixOperator)):this.stream.peekChar(0)===36&&this.stream.peekChar(1)===61?(this.stream.advance(2),this.finishToken(e,F.SuffixOperator)):(this.stream.nextChar(),this.finishToken(e,F.Delim)):(this.stream.advance(1),this.finishToken(e,n))):this.finishToken(e,n,t.join(``))}trivia(){for(;;){let e=this.stream.pos();if(this._whitespace()){if(!this.ignoreWhitespace)return this.finishToken(e,F.Whitespace)}else if(this.comment()){if(!this.ignoreComment)return this.finishToken(e,F.Comment)}else return null}}comment(){if(this.stream.advanceIfChars([47,42])){let e=!1,t=!1;return this.stream.advanceWhileChar(n=>t&&n===47?(e=!0,!1):(t=n===42,!0)),e&&this.stream.advance(1),!0}return!1}_number(){let e=0,t;return this.stream.peekChar()===46&&(e=1),t=this.stream.peekChar(e),t>=48&&t<=57&&(this.stream.advance(e+1),this.stream.advanceWhileChar(t=>t>=48&&t<=57||e===0&&t===46),!0)}_newline(e){let t=this.stream.peekChar();switch(t){case 13:case 12:case 10:return this.stream.advance(1),e.push(String.fromCharCode(t)),t===13&&this.stream.advanceIfChar(10)&&e.push(`
|
|
30
|
+
`)+1,f=c.index-d+1,p=o[o.length-1],m={range:{startLineNumber:i,startColumn:f,endLineNumber:u,endColumn:l===1?f+c[0].length:p.length+1},text:(c.groups??{}).label??``,hasSeparatorLine:((c.groups??{}).separator??``)!==``,shouldBeInComments:!0};(m.text||m.hasSeparatorLine)&&(n.length===0||n[n.length-1].range.endLineNumber<m.range.startLineNumber)&&n.push(m),a.lastIndex=c.index+c[0].length}}return n}function Uo(e){e=e.trim();let t=e.startsWith(`-`);return e=e.replace(zo,``),{text:e,hasSeparatorLine:t}}(function(){let e=globalThis;typeof e.requestIdleCallback!=`function`||e.cancelIdleCallback})();var Wo=class{get isRejected(){return this.outcome?.outcome===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((e,t)=>{this.completeCallback=e,this.errorCallback=t})}complete(e){return this.isSettled?Promise.resolve():new Promise(t=>{this.completeCallback(e),this.outcome={outcome:0,value:e},t()})}error(e){return this.isSettled?Promise.resolve():new Promise(t=>{this.errorCallback(e),this.outcome={outcome:1,value:e},t()})}cancel(){return this.error(new a)}},Go;(function(e){async function t(e){let t,n=await Promise.all(e.map(e=>e.then(e=>e,e=>{t||=e})));if(t!==void 0)throw t;return n}e.settled=t;function n(e){return new Promise(async(t,n)=>{try{await e(t,n)}catch(e){n(e)}})}e.withAsyncBody=n})(Go||={});var Ko=class{constructor(){this._unsatisfiedConsumers=[],this._unconsumedValues=[]}get hasFinalValue(){return!!this._finalValue}produce(e){if(this._ensureNoFinalValue(),this._unsatisfiedConsumers.length>0){let t=this._unsatisfiedConsumers.shift();this._resolveOrRejectDeferred(t,e)}else this._unconsumedValues.push(e)}produceFinal(e){this._ensureNoFinalValue(),this._finalValue=e;for(let t of this._unsatisfiedConsumers)this._resolveOrRejectDeferred(t,e);this._unsatisfiedConsumers.length=0}_ensureNoFinalValue(){if(this._finalValue)throw new s(`ProducerConsumer: cannot produce after final value has been set`)}_resolveOrRejectDeferred(e,t){t.ok?e.complete(t.value):e.error(t.error)}consume(){if(this._unconsumedValues.length>0||this._finalValue){let e=this._unconsumedValues.length>0?this._unconsumedValues.shift():this._finalValue;return e.ok?Promise.resolve(e.value):Promise.reject(e.error)}{let e=new Wo;return this._unsatisfiedConsumers.push(e),e.p}}};(class e{constructor(e,t){this._onReturn=t,this._producerConsumer=new Ko,this._iterator={next:()=>this._producerConsumer.consume(),return:()=>(this._onReturn?.(),Promise.resolve({done:!0,value:void 0})),throw:async e=>(this._finishError(e),{done:!0,value:void 0})},queueMicrotask(async()=>{let t=e({emitOne:e=>this._producerConsumer.produce({ok:!0,value:{done:!1,value:e}}),emitMany:e=>{for(let t of e)this._producerConsumer.produce({ok:!0,value:{done:!1,value:t}})},reject:e=>this._finishError(e)});if(!this._producerConsumer.hasFinalValue)try{await t,this._finishOk()}catch(e){this._finishError(e)}})}static fromArray(t){return new e(e=>{e.emitMany(t)})}static fromPromise(t){return new e(async e=>{e.emitMany(await t)})}static fromPromisesResolveOrder(t){return new e(async e=>{await Promise.all(t.map(async t=>e.emitOne(await t)))})}static merge(t){return new e(async e=>{await Promise.all(t.map(async t=>{for await(let n of t)e.emitOne(n)}))})}static{this.EMPTY=e.fromArray([])}static map(t,n){return new e(async e=>{for await(let r of t)e.emitOne(n(r))})}static tee(t){let n,r,i=new Wo,a=async()=>{if(!(!n||!r))try{for await(let e of t)n.emitOne(e),r.emitOne(e)}catch(e){n.reject(e),r.reject(e)}finally{i.complete()}};return[new e(async e=>(n=e,a(),i.p)),new e(async e=>(r=e,a(),i.p))]}map(t){return e.map(this,t)}static coalesce(t){return e.filter(t,e=>!!e)}coalesce(){return e.coalesce(this)}static filter(t,n){return new e(async e=>{for await(let r of t)n(r)&&e.emitOne(r)})}filter(t){return e.filter(this,t)}_finishOk(){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!0,value:{done:!0,value:void 0}})}_finishError(e){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!1,error:e})}[Symbol.asyncIterator](){return this._iterator}});var qo=class{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=Lt(e);let n=this.values,r=this.prefixSum,i=t.length;return i!==0&&(this.values=new Uint32Array(n.length+i),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+i),this.values.set(t,e),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=Lt(e),t=Lt(t),this.values[e]!==t&&(this.values[e]=t,e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),!0)}removeValues(e,t){e=Lt(e),t=Lt(t);let n=this.values,r=this.prefixSum;if(e>=n.length)return!1;let i=n.length-e;return t>=i&&(t=i),t!==0&&(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=Lt(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;t===0&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,n=this.values.length-1,r=0,i=0,a=0;for(;t<=n;)if(r=t+(n-t)/2|0,i=this.prefixSum[r],a=i-this.values[r],e<a)n=r-1;else if(e>=i)t=r+1;else break;return new Jo(r,e-a)}},Jo=class{constructor(e,t){this.index=e,this.remainder=t,this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=t}},Yo=class{constructor(e,t,n,r){this._uri=e,this._lines=t,this._eol=n,this._versionId=r,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);let t=e.changes;for(let e of t)this._acceptDeleteRange(e.range),this._acceptInsertText(new T(e.range.startLineNumber,e.range.startColumn),e.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){let e=this._eol.length,t=this._lines.length,n=new Uint32Array(t);for(let r=0;r<t;r++)n[r]=this._lines[r].length+e;this._lineStarts=new qo(n)}}_setLineText(e,t){this._lines[e]=t,this._lineStarts&&this._lineStarts.setValue(e,this._lines[e].length+this._eol.length)}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.startLineNumber-1].substring(e.endColumn-1));return}this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.endLineNumber-1].substring(e.endColumn-1)),this._lines.splice(e.startLineNumber,e.endLineNumber-e.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,t){if(t.length===0)return;let n=qe(t);if(n.length===1){this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+n[0]+this._lines[e.lineNumber-1].substring(e.column-1));return}n[n.length-1]+=this._lines[e.lineNumber-1].substring(e.column-1),this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+n[0]);let r=new Uint32Array(n.length-1);for(let t=1;t<n.length;t++)this._lines.splice(e.lineNumber+t-1,0,n[t]),r[t-1]=n[t].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(e.lineNumber,r)}},Xo=class{constructor(){this._models=Object.create(null)}getModel(e){return this._models[e]}getModels(){let e=[];return Object.keys(this._models).forEach(t=>e.push(this._models[t])),e}$acceptNewModel(e){this._models[e.url]=new Zo(On.parse(e.url),e.lines,e.EOL,e.versionId)}$acceptModelChanged(e,t){this._models[e]&&this._models[e].onEvents(t)}$acceptRemovedModel(e){this._models[e]&&delete this._models[e]}},Zo=class extends Yo{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){let t=[];for(let n=0;n<this._lines.length;n++){let r=this._lines[n],i=this.offsetAt(new T(n+1,1)),a=r.matchAll(e);for(let e of a)(e.index||e.index===0)&&(e.index+=i),t.push(e)}return t}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(e){return this._lines[e-1]}getWordAtPosition(e,t){let n=Si(e.column,bi(t),this._lines[e.lineNumber-1],0);return n?new E(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn):null}words(e){let t=this._lines,n=this._wordenize.bind(this),r=0,i=``,a=0,o=[];return{*[Symbol.iterator](){for(;;)if(a<o.length){let e=i.substring(o[a].start,o[a].end);a+=1,yield e}else if(r<t.length)i=t[r],o=n(i,e),a=0,r+=1;else break}}}getLineWords(e,t){let n=this._lines[e-1],r=this._wordenize(n,t),i=[];for(let e of r)i.push({word:n.substring(e.start,e.end),startColumn:e.start+1,endColumn:e.end+1});return i}_wordenize(e,t){let n=[],r;for(t.lastIndex=0;(r=t.exec(e))&&r[0].length!==0;)n.push({start:r.index,end:r.index+r[0].length});return n}getValueInRange(e){if(e=this._validateRange(e),e.startLineNumber===e.endLineNumber)return this._lines[e.startLineNumber-1].substring(e.startColumn-1,e.endColumn-1);let t=this._eol,n=e.startLineNumber-1,r=e.endLineNumber-1,i=[];i.push(this._lines[n].substring(e.startColumn-1));for(let e=n+1;e<r;e++)i.push(this._lines[e]);return i.push(this._lines[r].substring(0,e.endColumn-1)),i.join(t)}offsetAt(e){return e=this._validatePosition(e),this._ensureLineStarts(),this._lineStarts.getPrefixSum(e.lineNumber-2)+(e.column-1)}positionAt(e){e=Math.floor(e),e=Math.max(0,e),this._ensureLineStarts();let t=this._lineStarts.getIndexOf(e),n=this._lines[t.index].length;return{lineNumber:1+t.index,column:1+Math.min(t.remainder,n)}}_validateRange(e){let t=this._validatePosition({lineNumber:e.startLineNumber,column:e.startColumn}),n=this._validatePosition({lineNumber:e.endLineNumber,column:e.endColumn});return t.lineNumber!==e.startLineNumber||t.column!==e.startColumn||n.lineNumber!==e.endLineNumber||n.column!==e.endColumn?{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:n.lineNumber,endColumn:n.column}:e}_validatePosition(e){if(!T.isIPosition(e))throw Error(`bad position`);let{lineNumber:t,column:n}=e,r=!1;if(t<1)t=1,n=1,r=!0;else if(t>this._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,r=!0;else{let e=this._lines[t-1].length+1;n<1?(n=1,r=!0):n>e&&(n=e,r=!0)}return r?{lineNumber:t,column:n}:e}},Qo=class e{constructor(e=null){this._foreignModule=e,this._requestHandlerBrand=void 0,this._workerTextModelSyncServer=new Xo}dispose(){}async $ping(){return`pong`}_getModel(e){return this._workerTextModelSyncServer.getModel(e)}getModels(){return this._workerTextModelSyncServer.getModels()}$acceptNewModel(e){this._workerTextModelSyncServer.$acceptNewModel(e)}$acceptModelChanged(e,t){this._workerTextModelSyncServer.$acceptModelChanged(e,t)}$acceptRemovedModel(e){this._workerTextModelSyncServer.$acceptRemovedModel(e)}async $computeUnicodeHighlights(e,t,n){let r=this._getModel(e);return r?wi.computeUnicodeHighlights(r,t,n):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async $findSectionHeaders(e,t){let n=this._getModel(e);return n?Bo(n,t):[]}async $computeDiff(t,n,r,i){let a=this._getModel(t),o=this._getModel(n);if(!a||!o)return null;let s=await $o(i);return e.computeDiff(a,o,r,s)}static computeDiff(e,t,n,r){let i=e.getLinesContent(),a=t.getLinesContent(),o=r.computeDiff(i,a,n),s=o.changes.length>0?!1:this._modelsAreIdentical(e,t);function c(e){return e.map(e=>[e.original.startLineNumber,e.original.endLineNumberExclusive,e.modified.startLineNumber,e.modified.endLineNumberExclusive,e.innerChanges?.map(e=>[e.originalRange.startLineNumber,e.originalRange.startColumn,e.originalRange.endLineNumber,e.originalRange.endColumn,e.modifiedRange.startLineNumber,e.modifiedRange.startColumn,e.modifiedRange.endLineNumber,e.modifiedRange.endColumn])])}return{identical:s,quitEarly:o.hitTimeout,changes:c(o.changes),moves:o.moves.map(e=>[e.lineRangeMapping.original.startLineNumber,e.lineRangeMapping.original.endLineNumberExclusive,e.lineRangeMapping.modified.startLineNumber,e.lineRangeMapping.modified.endLineNumberExclusive,c(e.changes)])}}static _modelsAreIdentical(e,t){let n=e.getLineCount();if(n!==t.getLineCount())return!1;for(let r=1;r<=n;r++)if(e.getLineContent(r)!==t.getLineContent(r))return!1;return!0}static{this._diffLimit=1e5}async $computeMoreMinimalEdits(t,n,r){let i=this._getModel(t);if(!i)return n;let a=[],o;n=n.slice(0).sort((e,t)=>e.range&&t.range?E.compareRangesUsingStarts(e.range,t.range):+!e.range-!t.range);let s=0;for(let e=1;e<n.length;e++)E.getEndPosition(n[s].range).equals(E.getStartPosition(n[e].range))?(n[s].range=E.fromPositions(E.getStartPosition(n[s].range),E.getEndPosition(n[e].range)),n[s].text+=n[e].text):(s++,n[s]=n[e]);n.length=s+1;for(let{range:t,text:s,eol:c}of n){if(typeof c==`number`&&(o=c),E.isEmpty(t)&&!s)continue;let n=i.getValueInRange(t);if(s=s.replace(/\r\n|\n|\r/g,i.eol),n===s)continue;if(Math.max(s.length,n.length)>e._diffLimit){a.push({range:t,text:s});continue}let l=jt(n,s,r),u=i.offsetAt(E.lift(t).getStartPosition());for(let e of l){let t=i.positionAt(u+e.originalStart),n=i.positionAt(u+e.originalStart+e.originalLength),r={text:s.substr(e.modifiedStart,e.modifiedLength),range:{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:n.lineNumber,endColumn:n.column}};i.getValueInRange(r.range)!==r.text&&a.push(r)}}return typeof o==`number`&&a.push({eol:o,text:``,range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),a}async $computeLinks(e){let t=this._getModel(e);return t?Kt(t):null}async $computeDefaultDocumentColors(e){let t=this._getModel(e);return t?Ro(t):null}static{this._suggestionsLimit=1e4}async $textualSuggest(t,n,r,i){let a=new De,o=new RegExp(r,i),s=new Set;outer:for(let r of t){let t=this._getModel(r);if(t){for(let r of t.words(o))if(!(r===n||!isNaN(Number(r)))&&(s.add(r),s.size>e._suggestionsLimit))break outer}}return{words:Array.from(s),duration:a.elapsed()}}async $computeWordRanges(e,t,n,r){let i=this._getModel(e);if(!i)return Object.create(null);let a=new RegExp(n,r),o=Object.create(null);for(let e=t.startLineNumber;e<t.endLineNumber;e++){let t=i.getLineWords(e,a);for(let n of t){if(!isNaN(Number(n.word)))continue;let t=o[n.word];t||(t=[],o[n.word]=t),t.push({startLineNumber:e,startColumn:n.startColumn,endLineNumber:e,endColumn:n.endColumn})}}return o}async $navigateValueSet(e,t,n,r,i){let a=this._getModel(e);if(!a)return null;let o=new RegExp(r,i);t.startColumn===t.endColumn&&(t={startLineNumber:t.startLineNumber,startColumn:t.startColumn,endLineNumber:t.endLineNumber,endColumn:t.endColumn+1});let s=a.getValueInRange(t),c=a.getWordAtPosition({lineNumber:t.startLineNumber,column:t.startColumn},o);if(!c)return null;let l=a.getValueInRange(c);return qt.INSTANCE.navigateValueSet(t,s,c,l,n)}$fmr(e,t){if(!this._foreignModule||typeof this._foreignModule[e]!=`function`)return Promise.reject(Error(`Missing requestHandler or method: `+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(e){return Promise.reject(e)}}};typeof importScripts==`function`&&(globalThis.monaco=ei());function $o(e){switch(e){case`legacy`:return To.getLegacy();case`advanced`:return To.getDefault();case`advanced-external`:return To.getAdvancedExternal();case`advanced-wasm`:return To.getAdvancedWasm()}}var es=class e{static{this.CHANNEL_NAME=`editorWorkerHost`}static getChannel(t){return t.getChannel(e.CHANNEL_NAME)}static setChannel(t,n){t.setChannel(e.CHANNEL_NAME,n)}};function ts(e){let t,n=yt(r=>{let i=es.getChannel(r);return t=e({host:new Proxy({},{get(e,t,n){if(t!==`then`){if(typeof t!=`string`)throw Error(`Not supported`);return(...e)=>i.$fhr(t,e)}}}),getMirrorModels:()=>n.requestHandler.getModels()}),new Qo(t)});return t}function ns(e){self.onmessage=t=>{ts(n=>e(n,t.data))}}var F;(function(e){e[e.Ident=0]=`Ident`,e[e.AtKeyword=1]=`AtKeyword`,e[e.String=2]=`String`,e[e.BadString=3]=`BadString`,e[e.UnquotedString=4]=`UnquotedString`,e[e.Hash=5]=`Hash`,e[e.Num=6]=`Num`,e[e.Percentage=7]=`Percentage`,e[e.Dimension=8]=`Dimension`,e[e.UnicodeRange=9]=`UnicodeRange`,e[e.CDO=10]=`CDO`,e[e.CDC=11]=`CDC`,e[e.Colon=12]=`Colon`,e[e.SemiColon=13]=`SemiColon`,e[e.CurlyL=14]=`CurlyL`,e[e.CurlyR=15]=`CurlyR`,e[e.ParenthesisL=16]=`ParenthesisL`,e[e.ParenthesisR=17]=`ParenthesisR`,e[e.BracketL=18]=`BracketL`,e[e.BracketR=19]=`BracketR`,e[e.Whitespace=20]=`Whitespace`,e[e.Includes=21]=`Includes`,e[e.Dashmatch=22]=`Dashmatch`,e[e.SubstringOperator=23]=`SubstringOperator`,e[e.PrefixOperator=24]=`PrefixOperator`,e[e.SuffixOperator=25]=`SuffixOperator`,e[e.Delim=26]=`Delim`,e[e.EMS=27]=`EMS`,e[e.EXS=28]=`EXS`,e[e.Length=29]=`Length`,e[e.Angle=30]=`Angle`,e[e.Time=31]=`Time`,e[e.Freq=32]=`Freq`,e[e.Exclamation=33]=`Exclamation`,e[e.Resolution=34]=`Resolution`,e[e.Comma=35]=`Comma`,e[e.Charset=36]=`Charset`,e[e.EscapedJavaScript=37]=`EscapedJavaScript`,e[e.BadEscapedJavaScript=38]=`BadEscapedJavaScript`,e[e.Comment=39]=`Comment`,e[e.SingleLineComment=40]=`SingleLineComment`,e[e.EOF=41]=`EOF`,e[e.ContainerQueryLength=42]=`ContainerQueryLength`,e[e.CustomToken=43]=`CustomToken`})(F||={});var rs=class{constructor(e){this.source=e,this.len=e.length,this.position=0}substring(e,t=this.position){return this.source.substring(e,t)}eos(){return this.len<=this.position}pos(){return this.position}goBackTo(e){this.position=e}goBack(e){this.position-=e}advance(e){this.position+=e}nextChar(){return this.source.charCodeAt(this.position++)||0}peekChar(e=0){return this.source.charCodeAt(this.position+e)||0}lookbackChar(e=0){return this.source.charCodeAt(this.position-e)||0}advanceIfChar(e){return e===this.source.charCodeAt(this.position)&&(this.position++,!0)}advanceIfChars(e){if(this.position+e.length>this.source.length)return!1;let t=0;for(;t<e.length;t++)if(this.source.charCodeAt(this.position+t)!==e[t])return!1;return this.advance(t),!0}advanceWhileChar(e){let t=this.position;for(;this.position<this.len&&e(this.source.charCodeAt(this.position));)this.position++;return this.position-t}};let is={};is[59]=F.SemiColon,is[58]=F.Colon,is[123]=F.CurlyL,is[125]=F.CurlyR,is[93]=F.BracketR,is[91]=F.BracketL,is[40]=F.ParenthesisL,is[41]=F.ParenthesisR,is[44]=F.Comma;let I={};I.em=F.EMS,I.ex=F.EXS,I.px=F.Length,I.cm=F.Length,I.mm=F.Length,I.in=F.Length,I.pt=F.Length,I.pc=F.Length,I.deg=F.Angle,I.rad=F.Angle,I.grad=F.Angle,I.ms=F.Time,I.s=F.Time,I.hz=F.Freq,I.khz=F.Freq,I[`%`]=F.Percentage,I.fr=F.Percentage,I.dpi=F.Resolution,I.dpcm=F.Resolution,I.cqw=F.ContainerQueryLength,I.cqh=F.ContainerQueryLength,I.cqi=F.ContainerQueryLength,I.cqb=F.ContainerQueryLength,I.cqmin=F.ContainerQueryLength,I.cqmax=F.ContainerQueryLength;var as=class{constructor(){this.stream=new rs(``),this.ignoreComment=!0,this.ignoreWhitespace=!0,this.inURL=!1}setSource(e){this.stream=new rs(e)}finishToken(e,t,n){return{offset:e,len:this.stream.pos()-e,type:t,text:n||this.stream.substring(e)}}substring(e,t){return this.stream.substring(e,e+t)}pos(){return this.stream.pos()}goBackTo(e){this.stream.goBackTo(e)}scanUnquotedString(){let e=this.stream.pos(),t=[];return this._unquotedString(t)?this.finishToken(e,F.UnquotedString,t.join(``)):null}scan(){let e=this.trivia();if(e!==null)return e;let t=this.stream.pos();return this.stream.eos()?this.finishToken(t,F.EOF):this.scanNext(t)}tryScanUnicode(){let e=this.stream.pos();if(!this.stream.eos()&&this._unicodeRange())return this.finishToken(e,F.UnicodeRange);this.stream.goBackTo(e)}scanNext(e){if(this.stream.advanceIfChars([60,33,45,45]))return this.finishToken(e,F.CDO);if(this.stream.advanceIfChars([45,45,62]))return this.finishToken(e,F.CDC);let t=[];if(this.ident(t))return this.finishToken(e,F.Ident,t.join(``));if(this.stream.advanceIfChar(64)){if(t=[`@`],this._name(t)){let n=t.join(``);return n===`@charset`?this.finishToken(e,F.Charset,n):this.finishToken(e,F.AtKeyword,n)}return this.finishToken(e,F.Delim)}if(this.stream.advanceIfChar(35))return t=[`#`],this._name(t)?this.finishToken(e,F.Hash,t.join(``)):this.finishToken(e,F.Delim);if(this.stream.advanceIfChar(33))return this.finishToken(e,F.Exclamation);if(this._number()){let n=this.stream.pos();if(t=[this.stream.substring(e,n)],this.stream.advanceIfChar(37))return this.finishToken(e,F.Percentage);if(this.ident(t)){let r=this.stream.substring(n).toLowerCase(),i=I[r];return i===void 0?this.finishToken(e,F.Dimension,t.join(``)):this.finishToken(e,i,t.join(``))}return this.finishToken(e,F.Num)}t=[];let n=this._string(t);return n===null?(n=is[this.stream.peekChar()],n===void 0?this.stream.peekChar(0)===126&&this.stream.peekChar(1)===61?(this.stream.advance(2),this.finishToken(e,F.Includes)):this.stream.peekChar(0)===124&&this.stream.peekChar(1)===61?(this.stream.advance(2),this.finishToken(e,F.Dashmatch)):this.stream.peekChar(0)===42&&this.stream.peekChar(1)===61?(this.stream.advance(2),this.finishToken(e,F.SubstringOperator)):this.stream.peekChar(0)===94&&this.stream.peekChar(1)===61?(this.stream.advance(2),this.finishToken(e,F.PrefixOperator)):this.stream.peekChar(0)===36&&this.stream.peekChar(1)===61?(this.stream.advance(2),this.finishToken(e,F.SuffixOperator)):(this.stream.nextChar(),this.finishToken(e,F.Delim)):(this.stream.advance(1),this.finishToken(e,n))):this.finishToken(e,n,t.join(``))}trivia(){for(;;){let e=this.stream.pos();if(this._whitespace()){if(!this.ignoreWhitespace)return this.finishToken(e,F.Whitespace)}else if(this.comment()){if(!this.ignoreComment)return this.finishToken(e,F.Comment)}else return null}}comment(){if(this.stream.advanceIfChars([47,42])){let e=!1,t=!1;return this.stream.advanceWhileChar(n=>t&&n===47?(e=!0,!1):(t=n===42,!0)),e&&this.stream.advance(1),!0}return!1}_number(){let e=0,t;return this.stream.peekChar()===46&&(e=1),t=this.stream.peekChar(e),t>=48&&t<=57&&(this.stream.advance(e+1),this.stream.advanceWhileChar(t=>t>=48&&t<=57||e===0&&t===46),!0)}_newline(e){let t=this.stream.peekChar();switch(t){case 13:case 12:case 10:return this.stream.advance(1),e.push(String.fromCharCode(t)),t===13&&this.stream.advanceIfChar(10)&&e.push(`
|
|
31
31
|
`),!0}return!1}_escape(e,t){let n=this.stream.peekChar();if(n===92){this.stream.advance(1),n=this.stream.peekChar();let r=0;for(;r<6&&(n>=48&&n<=57||n>=97&&n<=102||n>=65&&n<=70);)this.stream.advance(1),n=this.stream.peekChar(),r++;if(r>0){try{let t=parseInt(this.stream.substring(this.stream.pos()-r),16);t&&e.push(String.fromCharCode(t))}catch{}return n===32||n===9?this.stream.advance(1):this._newline([]),!0}if(n!==13&&n!==12&&n!==10)return this.stream.advance(1),e.push(String.fromCharCode(n)),!0;if(t)return this._newline(e)}return!1}_stringChar(e,t){let n=this.stream.peekChar();return n!==0&&n!==e&&n!==92&&n!==13&&n!==12&&n!==10&&(this.stream.advance(1),t.push(String.fromCharCode(n)),!0)}_string(e){if(this.stream.peekChar()===39||this.stream.peekChar()===34){let t=this.stream.nextChar();for(e.push(String.fromCharCode(t));this._stringChar(t,e)||this._escape(e,!0););return this.stream.peekChar()===t?(this.stream.nextChar(),e.push(String.fromCharCode(t)),F.String):F.BadString}return null}_unquotedChar(e){let t=this.stream.peekChar();return t!==0&&t!==92&&t!==39&&t!==34&&t!==40&&t!==41&&t!==32&&t!==9&&t!==10&&t!==12&&t!==13&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)}_unquotedString(e){let t=!1;for(;this._unquotedChar(e)||this._escape(e);)t=!0;return t}_whitespace(){return this.stream.advanceWhileChar(e=>e===32||e===9||e===10||e===12||e===13)>0}_name(e){let t=!1;for(;this._identChar(e)||this._escape(e);)t=!0;return t}ident(e){let t=this.stream.pos();if(this._minus(e)){if(this._minus(e)||this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}}else if(this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}return this.stream.goBackTo(t),!1}_identFirstChar(e){let t=this.stream.peekChar();return t===95||t>=97&&t<=122||t>=65&&t<=90||t>=128&&t<=65535?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1}_minus(e){let t=this.stream.peekChar();return t===45&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)}_identChar(e){let t=this.stream.peekChar();return t===95||t===45||t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||t>=128&&t<=65535?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1}_unicodeRange(){if(this.stream.advanceIfChar(43)){let e=e=>e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70,t=this.stream.advanceWhileChar(e)+this.stream.advanceWhileChar(e=>e===63);if(t>=1&&t<=6){if(this.stream.advanceIfChar(45)){let t=this.stream.advanceWhileChar(e);if(t>=1&&t<=6)return!0}else return!0}}return!1}};function L(e,t){if(e.length<t.length)return!1;for(let n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0}function os(e,t){let n=e.length-t.length;return n>0?e.lastIndexOf(t)===n:n===0&&e===t}function ss(e,t,n=4){let r=Math.abs(e.length-t.length);if(r>n)return 0;let i=[],a=[],o,s;for(o=0;o<t.length+1;++o)a.push(0);for(o=0;o<e.length+1;++o)i.push(a);for(o=1;o<e.length+1;++o)for(s=1;s<t.length+1;++s)e[o-1]===t[s-1]?i[o][s]=i[o-1][s-1]+1:i[o][s]=Math.max(i[o-1][s],i[o][s-1]);return i[e.length][t.length]-Math.sqrt(r)}function cs(e,t=!0){return e?e.length<140?e:e.slice(0,140)+(t?`…`:``):``}function ls(e,t){let n=t.exec(e);return n&&n[0].length?e.substr(0,e.length-n[0].length):e}function us(e,t){let n=``;for(;t>0;)(t&1)==1&&(n+=e),e+=e,t>>>=1;return n}var R;(function(e){e[e.Undefined=0]=`Undefined`,e[e.Identifier=1]=`Identifier`,e[e.Stylesheet=2]=`Stylesheet`,e[e.Ruleset=3]=`Ruleset`,e[e.Selector=4]=`Selector`,e[e.SimpleSelector=5]=`SimpleSelector`,e[e.SelectorInterpolation=6]=`SelectorInterpolation`,e[e.SelectorCombinator=7]=`SelectorCombinator`,e[e.SelectorCombinatorParent=8]=`SelectorCombinatorParent`,e[e.SelectorCombinatorSibling=9]=`SelectorCombinatorSibling`,e[e.SelectorCombinatorAllSiblings=10]=`SelectorCombinatorAllSiblings`,e[e.SelectorCombinatorShadowPiercingDescendant=11]=`SelectorCombinatorShadowPiercingDescendant`,e[e.Page=12]=`Page`,e[e.PageBoxMarginBox=13]=`PageBoxMarginBox`,e[e.ClassSelector=14]=`ClassSelector`,e[e.IdentifierSelector=15]=`IdentifierSelector`,e[e.ElementNameSelector=16]=`ElementNameSelector`,e[e.PseudoSelector=17]=`PseudoSelector`,e[e.AttributeSelector=18]=`AttributeSelector`,e[e.Declaration=19]=`Declaration`,e[e.Declarations=20]=`Declarations`,e[e.Property=21]=`Property`,e[e.Expression=22]=`Expression`,e[e.BinaryExpression=23]=`BinaryExpression`,e[e.Term=24]=`Term`,e[e.Operator=25]=`Operator`,e[e.Value=26]=`Value`,e[e.StringLiteral=27]=`StringLiteral`,e[e.URILiteral=28]=`URILiteral`,e[e.EscapedValue=29]=`EscapedValue`,e[e.Function=30]=`Function`,e[e.NumericValue=31]=`NumericValue`,e[e.HexColorValue=32]=`HexColorValue`,e[e.RatioValue=33]=`RatioValue`,e[e.MixinDeclaration=34]=`MixinDeclaration`,e[e.MixinReference=35]=`MixinReference`,e[e.VariableName=36]=`VariableName`,e[e.VariableDeclaration=37]=`VariableDeclaration`,e[e.Prio=38]=`Prio`,e[e.Interpolation=39]=`Interpolation`,e[e.NestedProperties=40]=`NestedProperties`,e[e.ExtendsReference=41]=`ExtendsReference`,e[e.SelectorPlaceholder=42]=`SelectorPlaceholder`,e[e.Debug=43]=`Debug`,e[e.If=44]=`If`,e[e.Else=45]=`Else`,e[e.For=46]=`For`,e[e.Each=47]=`Each`,e[e.While=48]=`While`,e[e.MixinContentReference=49]=`MixinContentReference`,e[e.MixinContentDeclaration=50]=`MixinContentDeclaration`,e[e.Media=51]=`Media`,e[e.Keyframe=52]=`Keyframe`,e[e.FontFace=53]=`FontFace`,e[e.Import=54]=`Import`,e[e.Namespace=55]=`Namespace`,e[e.Invocation=56]=`Invocation`,e[e.FunctionDeclaration=57]=`FunctionDeclaration`,e[e.ReturnStatement=58]=`ReturnStatement`,e[e.MediaQuery=59]=`MediaQuery`,e[e.MediaCondition=60]=`MediaCondition`,e[e.MediaFeature=61]=`MediaFeature`,e[e.FunctionParameter=62]=`FunctionParameter`,e[e.FunctionArgument=63]=`FunctionArgument`,e[e.KeyframeSelector=64]=`KeyframeSelector`,e[e.ViewPort=65]=`ViewPort`,e[e.Document=66]=`Document`,e[e.AtApplyRule=67]=`AtApplyRule`,e[e.CustomPropertyDeclaration=68]=`CustomPropertyDeclaration`,e[e.CustomPropertySet=69]=`CustomPropertySet`,e[e.ListEntry=70]=`ListEntry`,e[e.Supports=71]=`Supports`,e[e.SupportsCondition=72]=`SupportsCondition`,e[e.NamespacePrefix=73]=`NamespacePrefix`,e[e.GridLine=74]=`GridLine`,e[e.Plugin=75]=`Plugin`,e[e.UnknownAtRule=76]=`UnknownAtRule`,e[e.Use=77]=`Use`,e[e.ModuleConfiguration=78]=`ModuleConfiguration`,e[e.Forward=79]=`Forward`,e[e.ForwardVisibility=80]=`ForwardVisibility`,e[e.Module=81]=`Module`,e[e.UnicodeRange=82]=`UnicodeRange`,e[e.Layer=83]=`Layer`,e[e.LayerNameList=84]=`LayerNameList`,e[e.LayerName=85]=`LayerName`,e[e.PropertyAtRule=86]=`PropertyAtRule`,e[e.Container=87]=`Container`})(R||={});var z;(function(e){e[e.Mixin=0]=`Mixin`,e[e.Rule=1]=`Rule`,e[e.Variable=2]=`Variable`,e[e.Function=3]=`Function`,e[e.Keyframe=4]=`Keyframe`,e[e.Unknown=5]=`Unknown`,e[e.Module=6]=`Module`,e[e.Forward=7]=`Forward`,e[e.ForwardVisibility=8]=`ForwardVisibility`,e[e.Property=9]=`Property`})(z||={});function ds(e,t){let n=null;return!e||t<e.offset||t>e.end?null:(e.accept(e=>e.offset===-1&&e.length===-1||e.offset<=t&&e.end>=t&&(n?e.length<=n.length&&(n=e):n=e,!0)),n)}function fs(e,t){let n=ds(e,t),r=[];for(;n;)r.unshift(n),n=n.parent;return r}function ps(e){let t=e.findParent(R.Declaration),n=t&&t.getValue();return n&&n.encloses(e)?t:null}var B=class{get end(){return this.offset+this.length}constructor(e=-1,t=-1,n){this.parent=null,this.offset=e,this.length=t,n&&(this.nodeType=n)}set type(e){this.nodeType=e}get type(){return this.nodeType||R.Undefined}getTextProvider(){let e=this;for(;e&&!e.textProvider;)e=e.parent;return e?e.textProvider:()=>`unknown`}getText(){return this.getTextProvider()(this.offset,this.length)}matches(e){return this.length===e.length&&this.getTextProvider()(this.offset,this.length)===e}startsWith(e){return this.length>=e.length&&this.getTextProvider()(this.offset,e.length)===e}endsWith(e){return this.length>=e.length&&this.getTextProvider()(this.end-e.length,e.length)===e}accept(e){if(e(this)&&this.children)for(let t of this.children)t.accept(e)}acceptVisitor(e){this.accept(e.visitNode.bind(e))}adoptChild(e,t=-1){if(e.parent&&e.parent.children){let t=e.parent.children.indexOf(e);t>=0&&e.parent.children.splice(t,1)}e.parent=this;let n=this.children;return n||=this.children=[],t===-1?n.push(e):n.splice(t,0,e),e}attachTo(e,t=-1){return e&&e.adoptChild(this,t),this}collectIssues(e){this.issues&&e.push.apply(e,this.issues)}addIssue(e){this.issues||=[],this.issues.push(e)}hasIssue(e){return Array.isArray(this.issues)&&this.issues.some(t=>t.getRule()===e)}isErroneous(e=!1){return this.issues&&this.issues.length>0?!0:e&&Array.isArray(this.children)&&this.children.some(e=>e.isErroneous(!0))}setNode(e,t,n=-1){return t?(t.attachTo(this,n),this[e]=t,!0):!1}addChild(e){return e?(this.children||=[],e.attachTo(this),this.updateOffsetAndLength(e),!0):!1}updateOffsetAndLength(e){(e.offset<this.offset||this.offset===-1)&&(this.offset=e.offset);let t=e.end;(t>this.end||this.length===-1)&&(this.length=t-this.offset)}hasChildren(){return!!this.children&&this.children.length>0}getChildren(){return this.children?this.children.slice(0):[]}getChild(e){return this.children&&e<this.children.length?this.children[e]:null}addChildren(e){for(let t of e)this.addChild(t)}findFirstChildBeforeOffset(e){if(this.children){let t=null;for(let n=this.children.length-1;n>=0;n--)if(t=this.children[n],t.offset<=e)return t}return null}findChildAtOffset(e,t){let n=this.findFirstChildBeforeOffset(e);return n&&n.end>=e?t&&n.findChildAtOffset(e,!0)||n:null}encloses(e){return this.offset<=e.offset&&this.offset+this.length>=e.offset+e.length}getParent(){let e=this.parent;for(;e instanceof V;)e=e.parent;return e}findParent(e){let t=this;for(;t&&t.type!==e;)t=t.parent;return t}findAParent(...e){let t=this;for(;t&&!e.some(e=>t.type===e);)t=t.parent;return t}setData(e,t){this.options||={},this.options[e]=t}getData(e){return!this.options||!this.options.hasOwnProperty(e)?null:this.options[e]}},V=class extends B{constructor(e,t=-1){super(-1,-1),this.attachTo(e,t),this.offset=-1,this.length=-1}},ms=class extends B{constructor(e,t){super(e,t)}get type(){return R.UnicodeRange}setRangeStart(e){return this.setNode(`rangeStart`,e)}getRangeStart(){return this.rangeStart}setRangeEnd(e){return this.setNode(`rangeEnd`,e)}getRangeEnd(){return this.rangeEnd}},hs=class extends B{constructor(e,t){super(e,t),this.isCustomProperty=!1}get type(){return R.Identifier}containsInterpolation(){return this.hasChildren()}},gs=class extends B{constructor(e,t){super(e,t)}get type(){return R.Stylesheet}},_s=class extends B{constructor(e,t){super(e,t)}get type(){return R.Declarations}},H=class extends B{constructor(e,t){super(e,t)}getDeclarations(){return this.declarations}setDeclarations(e){return this.setNode(`declarations`,e)}},vs=class extends H{constructor(e,t){super(e,t)}get type(){return R.Ruleset}getSelectors(){return this.selectors||=new V(this),this.selectors}isNested(){return!!this.parent&&this.parent.findParent(R.Declarations)!==null}},ys=class extends B{constructor(e,t){super(e,t)}get type(){return R.Selector}},bs=class extends B{constructor(e,t){super(e,t)}get type(){return R.SimpleSelector}},xs=class extends B{constructor(e,t){super(e,t)}},Ss=class extends H{constructor(e,t){super(e,t)}get type(){return R.CustomPropertySet}},Cs=class e extends xs{constructor(e,t){super(e,t),this.property=null}get type(){return R.Declaration}setProperty(e){return this.setNode(`property`,e)}getProperty(){return this.property}getFullPropertyName(){let t=this.property?this.property.getName():`unknown`;if(this.parent instanceof _s&&this.parent.getParent()instanceof Rs){let n=this.parent.getParent().getParent();if(n instanceof e)return n.getFullPropertyName()+t}return t}getNonPrefixedPropertyName(){let e=this.getFullPropertyName();if(e&&e.charAt(0)===`-`){let t=e.indexOf(`-`,1);if(t!==-1)return e.substring(t+1)}return e}setValue(e){return this.setNode(`value`,e)}getValue(){return this.value}setNestedProperties(e){return this.setNode(`nestedProperties`,e)}getNestedProperties(){return this.nestedProperties}},ws=class extends Cs{constructor(e,t){super(e,t)}get type(){return R.CustomPropertyDeclaration}setPropertySet(e){return this.setNode(`propertySet`,e)}getPropertySet(){return this.propertySet}},Ts=class extends B{constructor(e,t){super(e,t)}get type(){return R.Property}setIdentifier(e){return this.setNode(`identifier`,e)}getIdentifier(){return this.identifier}getName(){return ls(this.getText(),/[_\+]+$/)}isCustomProperty(){return!!this.identifier&&this.identifier.isCustomProperty}},Es=class extends B{constructor(e,t){super(e,t)}get type(){return R.Invocation}getArguments(){return this.arguments||=new V(this),this.arguments}},Ds=class extends Es{constructor(e,t){super(e,t)}get type(){return R.Function}setIdentifier(e){return this.setNode(`identifier`,e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():``}},Os=class extends B{constructor(e,t){super(e,t)}get type(){return R.FunctionParameter}setIdentifier(e){return this.setNode(`identifier`,e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():``}setDefaultValue(e){return this.setNode(`defaultValue`,e,0)}getDefaultValue(){return this.defaultValue}},ks=class extends B{constructor(e,t){super(e,t)}get type(){return R.FunctionArgument}setIdentifier(e){return this.setNode(`identifier`,e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():``}setValue(e){return this.setNode(`value`,e,0)}getValue(){return this.value}},As=class extends H{constructor(e,t){super(e,t)}get type(){return R.If}setExpression(e){return this.setNode(`expression`,e,0)}setElseClause(e){return this.setNode(`elseClause`,e)}},js=class extends H{constructor(e,t){super(e,t)}get type(){return R.For}setVariable(e){return this.setNode(`variable`,e,0)}},Ms=class extends H{constructor(e,t){super(e,t)}get type(){return R.Each}getVariables(){return this.variables||=new V(this),this.variables}},Ns=class extends H{constructor(e,t){super(e,t)}get type(){return R.While}},Ps=class extends H{constructor(e,t){super(e,t)}get type(){return R.Else}},Fs=class extends H{constructor(e,t){super(e,t)}get type(){return R.FunctionDeclaration}setIdentifier(e){return this.setNode(`identifier`,e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():``}getParameters(){return this.parameters||=new V(this),this.parameters}},Is=class extends H{constructor(e,t){super(e,t)}get type(){return R.ViewPort}},Ls=class extends H{constructor(e,t){super(e,t)}get type(){return R.FontFace}},Rs=class extends H{constructor(e,t){super(e,t)}get type(){return R.NestedProperties}},zs=class extends H{constructor(e,t){super(e,t)}get type(){return R.Keyframe}setKeyword(e){return this.setNode(`keyword`,e,0)}getKeyword(){return this.keyword}setIdentifier(e){return this.setNode(`identifier`,e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():``}},Bs=class extends H{constructor(e,t){super(e,t)}get type(){return R.KeyframeSelector}},Vs=class extends B{constructor(e,t){super(e,t)}get type(){return R.Import}setMedialist(e){return e?(e.attachTo(this),!0):!1}},Hs=class extends B{get type(){return R.Use}getParameters(){return this.parameters||=new V(this),this.parameters}setIdentifier(e){return this.setNode(`identifier`,e,0)}getIdentifier(){return this.identifier}},Us=class extends B{get type(){return R.ModuleConfiguration}setIdentifier(e){return this.setNode(`identifier`,e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():``}setValue(e){return this.setNode(`value`,e,0)}getValue(){return this.value}},Ws=class extends B{get type(){return R.Forward}setIdentifier(e){return this.setNode(`identifier`,e,0)}getIdentifier(){return this.identifier}getMembers(){return this.members||=new V(this),this.members}getParameters(){return this.parameters||=new V(this),this.parameters}},Gs=class extends B{get type(){return R.ForwardVisibility}setIdentifier(e){return this.setNode(`identifier`,e,0)}getIdentifier(){return this.identifier}},Ks=class extends B{constructor(e,t){super(e,t)}get type(){return R.Namespace}},qs=class extends H{constructor(e,t){super(e,t)}get type(){return R.Media}},Js=class extends H{constructor(e,t){super(e,t)}get type(){return R.Supports}},Ys=class extends H{constructor(e,t){super(e,t)}get type(){return R.Layer}setNames(e){return this.setNode(`names`,e)}getNames(){return this.names}},Xs=class extends H{constructor(e,t){super(e,t)}get type(){return R.PropertyAtRule}setName(e){return e?(e.attachTo(this),this.name=e,!0):!1}getName(){return this.name}},Zs=class extends H{constructor(e,t){super(e,t)}get type(){return R.Document}},Qs=class extends H{constructor(e,t){super(e,t)}get type(){return R.Container}},$s=class extends B{constructor(e,t){super(e,t)}},ec=class extends B{constructor(e,t){super(e,t)}get type(){return R.MediaQuery}},tc=class extends B{constructor(e,t){super(e,t)}get type(){return R.MediaCondition}},nc=class extends B{constructor(e,t){super(e,t)}get type(){return R.MediaFeature}},rc=class extends B{constructor(e,t){super(e,t)}get type(){return R.SupportsCondition}},ic=class extends H{constructor(e,t){super(e,t)}get type(){return R.Page}},ac=class extends H{constructor(e,t){super(e,t)}get type(){return R.PageBoxMarginBox}},oc=class extends B{constructor(e,t){super(e,t)}get type(){return R.Expression}},sc=class extends B{constructor(e,t){super(e,t)}get type(){return R.BinaryExpression}setLeft(e){return this.setNode(`left`,e)}getLeft(){return this.left}setRight(e){return this.setNode(`right`,e)}getRight(){return this.right}setOperator(e){return this.setNode(`operator`,e)}getOperator(){return this.operator}},cc=class extends B{constructor(e,t){super(e,t)}get type(){return R.Term}setOperator(e){return this.setNode(`operator`,e)}getOperator(){return this.operator}setExpression(e){return this.setNode(`expression`,e)}getExpression(){return this.expression}},lc=class extends B{constructor(e,t){super(e,t)}get type(){return R.AttributeSelector}setNamespacePrefix(e){return this.setNode(`namespacePrefix`,e)}getNamespacePrefix(){return this.namespacePrefix}setIdentifier(e){return this.setNode(`identifier`,e)}getIdentifier(){return this.identifier}setOperator(e){return this.setNode(`operator`,e)}getOperator(){return this.operator}setValue(e){return this.setNode(`value`,e)}getValue(){return this.value}},uc=class extends B{constructor(e,t){super(e,t)}get type(){return R.HexColorValue}},dc=class extends B{constructor(e,t){super(e,t)}get type(){return R.RatioValue}},fc=class extends B{constructor(e,t){super(e,t)}get type(){return R.NumericValue}getValue(){let e=this.getText(),t=0,n;for(let r=0,i=e.length;r<i&&(n=e.charCodeAt(r),48<=n&&n<=57||n===46);r++)t+=1;return{value:e.substring(0,t),unit:t<e.length?e.substring(t):void 0}}},pc=class extends xs{constructor(e,t){super(e,t),this.needsSemicolon=!0}get type(){return R.VariableDeclaration}setVariable(e){return e?(e.attachTo(this),this.variable=e,!0):!1}getVariable(){return this.variable}getName(){return this.variable?this.variable.getName():``}setValue(e){return e?(e.attachTo(this),this.value=e,!0):!1}getValue(){return this.value}},mc=class extends B{constructor(e,t){super(e,t)}get type(){return R.Interpolation}},hc=class extends B{constructor(e,t){super(e,t)}get type(){return R.VariableName}getName(){return this.getText()}},gc=class extends B{constructor(e,t){super(e,t)}get type(){return R.ExtendsReference}getSelectors(){return this.selectors||=new V(this),this.selectors}},_c=class extends B{constructor(e,t){super(e,t)}get type(){return R.MixinContentReference}getArguments(){return this.arguments||=new V(this),this.arguments}},vc=class extends H{constructor(e,t){super(e,t)}get type(){return R.MixinContentDeclaration}getParameters(){return this.parameters||=new V(this),this.parameters}},yc=class extends B{constructor(e,t){super(e,t)}get type(){return R.MixinReference}getNamespaces(){return this.namespaces||=new V(this),this.namespaces}setIdentifier(e){return this.setNode(`identifier`,e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():``}getArguments(){return this.arguments||=new V(this),this.arguments}setContent(e){return this.setNode(`content`,e)}getContent(){return this.content}},bc=class extends H{constructor(e,t){super(e,t)}get type(){return R.MixinDeclaration}setIdentifier(e){return this.setNode(`identifier`,e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():``}getParameters(){return this.parameters||=new V(this),this.parameters}setGuard(e){return e&&(e.attachTo(this),this.guard=e),!1}},xc=class extends H{constructor(e,t){super(e,t)}get type(){return R.UnknownAtRule}setAtRuleName(e){this.atRuleName=e}getAtRuleName(){return this.atRuleName}},Sc=class extends B{get type(){return R.ListEntry}setKey(e){return this.setNode(`key`,e,0)}setValue(e){return this.setNode(`value`,e,1)}},Cc=class extends B{getConditions(){return this.conditions||=new V(this),this.conditions}},wc=class extends B{setVariable(e){return this.setNode(`variable`,e)}},Tc=class extends B{get type(){return R.Module}setIdentifier(e){return this.setNode(`identifier`,e,0)}getIdentifier(){return this.identifier}},Ec;(function(e){e[e.Ignore=1]=`Ignore`,e[e.Warning=2]=`Warning`,e[e.Error=4]=`Error`})(Ec||={});var Dc=class{constructor(e,t,n,r,i=e.offset,a=e.length){this.node=e,this.rule=t,this.level=n,this.message=r||t.message,this.offset=i,this.length=a}getRule(){return this.rule}getLevel(){return this.level}getOffset(){return this.offset}getLength(){return this.length}getNode(){return this.node}getMessage(){return this.message}},Oc=class e{static entries(t){let n=new e;return t.acceptVisitor(n),n.entries}constructor(){this.entries=[]}visitNode(e){return e.isErroneous()&&e.collectIssues(this.entries),!0}};function U(...e){let t=e[0],n,r,i;if(typeof t==`string`)n=t,r=t,e.splice(0,1),i=!e||typeof e[0]!=`object`?e:e[0];else if(t instanceof Array){let n=e.slice(1);if(t.length!==n.length+1)throw Error(`expected a string as the first argument to l10n.t`);let r=t[0];for(let e=1;e<t.length;e++)r+=`{${e-1}}`+t[e];return U(r,...n)}else r=t.message,n=r,t.comment&&t.comment.length>0&&(n+=`/${Array.isArray(t.comment)?t.comment.join(``):t.comment}`),i=t.args??{};return Ac(r,i)}var kc=/{([^}]+)}/g;function Ac(e,t){return Object.keys(t).length===0?e:e.replace(kc,(e,n)=>t[n]??e)}var W=class{constructor(e,t){this.id=e,this.message=t}};let G={NumberExpected:new W(`css-numberexpected`,U(`number expected`)),ConditionExpected:new W(`css-conditionexpected`,U(`condition expected`)),RuleOrSelectorExpected:new W(`css-ruleorselectorexpected`,U(`at-rule or selector expected`)),DotExpected:new W(`css-dotexpected`,U(`dot expected`)),ColonExpected:new W(`css-colonexpected`,U(`colon expected`)),SemiColonExpected:new W(`css-semicolonexpected`,U(`semi-colon expected`)),TermExpected:new W(`css-termexpected`,U(`term expected`)),ExpressionExpected:new W(`css-expressionexpected`,U(`expression expected`)),OperatorExpected:new W(`css-operatorexpected`,U(`operator expected`)),IdentifierExpected:new W(`css-identifierexpected`,U(`identifier expected`)),PercentageExpected:new W(`css-percentageexpected`,U(`percentage expected`)),URIOrStringExpected:new W(`css-uriorstringexpected`,U(`uri or string expected`)),URIExpected:new W(`css-uriexpected`,U(`URI expected`)),VariableNameExpected:new W(`css-varnameexpected`,U(`variable name expected`)),VariableValueExpected:new W(`css-varvalueexpected`,U(`variable value expected`)),PropertyValueExpected:new W(`css-propertyvalueexpected`,U(`property value expected`)),LeftCurlyExpected:new W(`css-lcurlyexpected`,U(`{ expected`)),RightCurlyExpected:new W(`css-rcurlyexpected`,U(`} expected`)),LeftSquareBracketExpected:new W(`css-rbracketexpected`,U(`[ expected`)),RightSquareBracketExpected:new W(`css-lbracketexpected`,U(`] expected`)),LeftParenthesisExpected:new W(`css-lparentexpected`,U(`( expected`)),RightParenthesisExpected:new W(`css-rparentexpected`,U(`) expected`)),CommaExpected:new W(`css-commaexpected`,U(`comma expected`)),PageDirectiveOrDeclarationExpected:new W(`css-pagedirordeclexpected`,U(`page directive or declaraton expected`)),UnknownAtRule:new W(`css-unknownatrule`,U(`at-rule unknown`)),UnknownKeyword:new W(`css-unknownkeyword`,U(`unknown keyword`)),SelectorExpected:new W(`css-selectorexpected`,U(`selector expected`)),StringLiteralExpected:new W(`css-stringliteralexpected`,U(`string literal expected`)),WhitespaceExpected:new W(`css-whitespaceexpected`,U(`whitespace expected`)),MediaQueryExpected:new W(`css-mediaqueryexpected`,U(`media query expected`)),IdentifierOrWildcardExpected:new W(`css-idorwildcardexpected`,U(`identifier or wildcard expected`)),WildcardExpected:new W(`css-wildcardexpected`,U(`wildcard expected`)),IdentifierOrVariableExpected:new W(`css-idorvarexpected`,U(`identifier or variable expected`))};var jc;(function(e){function t(e){return typeof e==`string`}e.is=t})(jc||={});var Mc;(function(e){function t(e){return typeof e==`string`}e.is=t})(Mc||={});var Nc;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(t){return typeof t==`number`&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.is=t})(Nc||={});var Pc;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(t){return typeof t==`number`&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.is=t})(Pc||={});var Fc;(function(e){function t(e,t){return e===Number.MAX_VALUE&&(e=Pc.MAX_VALUE),t===Number.MAX_VALUE&&(t=Pc.MAX_VALUE),{line:e,character:t}}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&Y.uinteger(t.line)&&Y.uinteger(t.character)}e.is=n})(Fc||={});var K;(function(e){function t(e,t,n,r){if(Y.uinteger(e)&&Y.uinteger(t)&&Y.uinteger(n)&&Y.uinteger(r))return{start:Fc.create(e,t),end:Fc.create(n,r)};if(Fc.is(e)&&Fc.is(t))return{start:e,end:t};throw Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&Fc.is(t.start)&&Fc.is(t.end)}e.is=n})(K||={});var Ic;(function(e){function t(e,t){return{uri:e,range:t}}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&K.is(t.range)&&(Y.string(t.uri)||Y.undefined(t.uri))}e.is=n})(Ic||={});var Lc;(function(e){function t(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&K.is(t.targetRange)&&Y.string(t.targetUri)&&K.is(t.targetSelectionRange)&&(K.is(t.originSelectionRange)||Y.undefined(t.originSelectionRange))}e.is=n})(Lc||={});var Rc;(function(e){function t(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&Y.numberRange(t.red,0,1)&&Y.numberRange(t.green,0,1)&&Y.numberRange(t.blue,0,1)&&Y.numberRange(t.alpha,0,1)}e.is=n})(Rc||={});var zc;(function(e){function t(e,t){return{range:e,color:t}}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&K.is(t.range)&&Rc.is(t.color)}e.is=n})(zc||={});var Bc;(function(e){function t(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&Y.string(t.label)&&(Y.undefined(t.textEdit)||q.is(t))&&(Y.undefined(t.additionalTextEdits)||Y.typedArray(t.additionalTextEdits,q.is))}e.is=n})(Bc||={});var Vc;(function(e){e.Comment=`comment`,e.Imports=`imports`,e.Region=`region`})(Vc||={});var Hc;(function(e){function t(e,t,n,r,i,a){let o={startLine:e,endLine:t};return Y.defined(n)&&(o.startCharacter=n),Y.defined(r)&&(o.endCharacter=r),Y.defined(i)&&(o.kind=i),Y.defined(a)&&(o.collapsedText=a),o}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&Y.uinteger(t.startLine)&&Y.uinteger(t.startLine)&&(Y.undefined(t.startCharacter)||Y.uinteger(t.startCharacter))&&(Y.undefined(t.endCharacter)||Y.uinteger(t.endCharacter))&&(Y.undefined(t.kind)||Y.string(t.kind))}e.is=n})(Hc||={});var Uc;(function(e){function t(e,t){return{location:e,message:t}}e.create=t;function n(e){let t=e;return Y.defined(t)&&Ic.is(t.location)&&Y.string(t.message)}e.is=n})(Uc||={});var Wc;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Wc||={});var Gc;(function(e){e.Unnecessary=1,e.Deprecated=2})(Gc||={});var Kc;(function(e){function t(e){let t=e;return Y.objectLiteral(t)&&Y.string(t.href)}e.is=t})(Kc||={});var qc;(function(e){function t(e,t,n,r,i,a){let o={range:e,message:t};return Y.defined(n)&&(o.severity=n),Y.defined(r)&&(o.code=r),Y.defined(i)&&(o.source=i),Y.defined(a)&&(o.relatedInformation=a),o}e.create=t;function n(e){let t=e;return Y.defined(t)&&K.is(t.range)&&Y.string(t.message)&&(Y.number(t.severity)||Y.undefined(t.severity))&&(Y.integer(t.code)||Y.string(t.code)||Y.undefined(t.code))&&(Y.undefined(t.codeDescription)||Y.string(t.codeDescription?.href))&&(Y.string(t.source)||Y.undefined(t.source))&&(Y.undefined(t.relatedInformation)||Y.typedArray(t.relatedInformation,Uc.is))}e.is=n})(qc||={});var Jc;(function(e){function t(e,t,...n){let r={title:e,command:t};return Y.defined(n)&&n.length>0&&(r.arguments=n),r}e.create=t;function n(e){let t=e;return Y.defined(t)&&Y.string(t.title)&&Y.string(t.command)}e.is=n})(Jc||={});var q;(function(e){function t(e,t){return{range:e,newText:t}}e.replace=t;function n(e,t){return{range:{start:e,end:e},newText:t}}e.insert=n;function r(e){return{range:e,newText:``}}e.del=r;function i(e){let t=e;return Y.objectLiteral(t)&&Y.string(t.newText)&&K.is(t.range)}e.is=i})(q||={});var Yc;(function(e){function t(e,t,n){let r={label:e};return t!==void 0&&(r.needsConfirmation=t),n!==void 0&&(r.description=n),r}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&Y.string(t.label)&&(Y.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(Y.string(t.description)||t.description===void 0)}e.is=n})(Yc||={});var Xc;(function(e){function t(e){let t=e;return Y.string(t)}e.is=t})(Xc||={});var Zc;(function(e){function t(e,t,n){return{range:e,newText:t,annotationId:n}}e.replace=t;function n(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}}e.insert=n;function r(e,t){return{range:e,newText:``,annotationId:t}}e.del=r;function i(e){let t=e;return q.is(t)&&(Yc.is(t.annotationId)||Xc.is(t.annotationId))}e.is=i})(Zc||={});var Qc;(function(e){function t(e,t){return{textDocument:e,edits:t}}e.create=t;function n(e){let t=e;return Y.defined(t)&&al.is(t.textDocument)&&Array.isArray(t.edits)}e.is=n})(Qc||={});var $c;(function(e){function t(e,t,n){let r={kind:`create`,uri:e};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(r.options=t),n!==void 0&&(r.annotationId=n),r}e.create=t;function n(e){let t=e;return t&&t.kind===`create`&&Y.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||Y.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||Y.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||Xc.is(t.annotationId))}e.is=n})($c||={});var el;(function(e){function t(e,t,n,r){let i={kind:`rename`,oldUri:e,newUri:t};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(i.options=n),r!==void 0&&(i.annotationId=r),i}e.create=t;function n(e){let t=e;return t&&t.kind===`rename`&&Y.string(t.oldUri)&&Y.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||Y.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||Y.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||Xc.is(t.annotationId))}e.is=n})(el||={});var tl;(function(e){function t(e,t,n){let r={kind:`delete`,uri:e};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(r.options=t),n!==void 0&&(r.annotationId=n),r}e.create=t;function n(e){let t=e;return t&&t.kind===`delete`&&Y.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||Y.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||Y.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||Xc.is(t.annotationId))}e.is=n})(tl||={});var nl;(function(e){function t(e){let t=e;return t&&(t.changes!==void 0||t.documentChanges!==void 0)&&(t.documentChanges===void 0||t.documentChanges.every(e=>Y.string(e.kind)?$c.is(e)||el.is(e)||tl.is(e):Qc.is(e)))}e.is=t})(nl||={});var rl;(function(e){function t(e){return{uri:e}}e.create=t;function n(e){let t=e;return Y.defined(t)&&Y.string(t.uri)}e.is=n})(rl||={});var il;(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){let t=e;return Y.defined(t)&&Y.string(t.uri)&&Y.integer(t.version)}e.is=n})(il||={});var al;(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){let t=e;return Y.defined(t)&&Y.string(t.uri)&&(t.version===null||Y.integer(t.version))}e.is=n})(al||={});var ol;(function(e){function t(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}}e.create=t;function n(e){let t=e;return Y.defined(t)&&Y.string(t.uri)&&Y.string(t.languageId)&&Y.integer(t.version)&&Y.string(t.text)}e.is=n})(ol||={});var sl;(function(e){e.PlainText=`plaintext`,e.Markdown=`markdown`;function t(t){let n=t;return n===e.PlainText||n===e.Markdown}e.is=t})(sl||={});var cl;(function(e){function t(e){let t=e;return Y.objectLiteral(e)&&sl.is(t.kind)&&Y.string(t.value)}e.is=t})(cl||={});var J;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(J||={});var ll;(function(e){e.PlainText=1,e.Snippet=2})(ll||={});var ul;(function(e){e.Deprecated=1})(ul||={});var dl;(function(e){function t(e,t,n){return{newText:e,insert:t,replace:n}}e.create=t;function n(e){let t=e;return t&&Y.string(t.newText)&&K.is(t.insert)&&K.is(t.replace)}e.is=n})(dl||={});var fl;(function(e){e.asIs=1,e.adjustIndentation=2})(fl||={});var pl;(function(e){function t(e){let t=e;return t&&(Y.string(t.detail)||t.detail===void 0)&&(Y.string(t.description)||t.description===void 0)}e.is=t})(pl||={});var ml;(function(e){function t(e){return{label:e}}e.create=t})(ml||={});var hl;(function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}e.create=t})(hl||={});var gl;(function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,`\\$&`)}e.fromPlainText=t;function n(e){let t=e;return Y.string(t)||Y.objectLiteral(t)&&Y.string(t.language)&&Y.string(t.value)}e.is=n})(gl||={});var _l;(function(e){function t(e){let t=e;return!!t&&Y.objectLiteral(t)&&(cl.is(t.contents)||gl.is(t.contents)||Y.typedArray(t.contents,gl.is))&&(e.range===void 0||K.is(e.range))}e.is=t})(_l||={});var vl;(function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}e.create=t})(vl||={});var yl;(function(e){function t(e,t,...n){let r={label:e};return Y.defined(t)&&(r.documentation=t),r.parameters=Y.defined(n)?n:[],r}e.create=t})(yl||={});var bl;(function(e){e.Text=1,e.Read=2,e.Write=3})(bl||={});var xl;(function(e){function t(e,t){let n={range:e};return Y.number(t)&&(n.kind=t),n}e.create=t})(xl||={});var Sl;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(Sl||={});var Cl;(function(e){e.Deprecated=1})(Cl||={});var wl;(function(e){function t(e,t,n,r,i){let a={name:e,kind:t,location:{uri:r,range:n}};return i&&(a.containerName=i),a}e.create=t})(wl||={});var Tl;(function(e){function t(e,t,n,r){return r===void 0?{name:e,kind:t,location:{uri:n}}:{name:e,kind:t,location:{uri:n,range:r}}}e.create=t})(Tl||={});var El;(function(e){function t(e,t,n,r,i,a){let o={name:e,detail:t,kind:n,range:r,selectionRange:i};return a!==void 0&&(o.children=a),o}e.create=t;function n(e){let t=e;return t&&Y.string(t.name)&&Y.number(t.kind)&&K.is(t.range)&&K.is(t.selectionRange)&&(t.detail===void 0||Y.string(t.detail))&&(t.deprecated===void 0||Y.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}e.is=n})(El||={});var Dl;(function(e){e.Empty=``,e.QuickFix=`quickfix`,e.Refactor=`refactor`,e.RefactorExtract=`refactor.extract`,e.RefactorInline=`refactor.inline`,e.RefactorRewrite=`refactor.rewrite`,e.Source=`source`,e.SourceOrganizeImports=`source.organizeImports`,e.SourceFixAll=`source.fixAll`})(Dl||={});var Ol;(function(e){e.Invoked=1,e.Automatic=2})(Ol||={});var kl;(function(e){function t(e,t,n){let r={diagnostics:e};return t!=null&&(r.only=t),n!=null&&(r.triggerKind=n),r}e.create=t;function n(e){let t=e;return Y.defined(t)&&Y.typedArray(t.diagnostics,qc.is)&&(t.only===void 0||Y.typedArray(t.only,Y.string))&&(t.triggerKind===void 0||t.triggerKind===Ol.Invoked||t.triggerKind===Ol.Automatic)}e.is=n})(kl||={});var Al;(function(e){function t(e,t,n){let r={title:e},i=!0;return typeof t==`string`?(i=!1,r.kind=t):Jc.is(t)?r.command=t:r.edit=t,i&&n!==void 0&&(r.kind=n),r}e.create=t;function n(e){let t=e;return t&&Y.string(t.title)&&(t.diagnostics===void 0||Y.typedArray(t.diagnostics,qc.is))&&(t.kind===void 0||Y.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||Jc.is(t.command))&&(t.isPreferred===void 0||Y.boolean(t.isPreferred))&&(t.edit===void 0||nl.is(t.edit))}e.is=n})(Al||={});var jl;(function(e){function t(e,t){let n={range:e};return Y.defined(t)&&(n.data=t),n}e.create=t;function n(e){let t=e;return Y.defined(t)&&K.is(t.range)&&(Y.undefined(t.command)||Jc.is(t.command))}e.is=n})(jl||={});var Ml;(function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}e.create=t;function n(e){let t=e;return Y.defined(t)&&Y.uinteger(t.tabSize)&&Y.boolean(t.insertSpaces)}e.is=n})(Ml||={});var Nl;(function(e){function t(e,t,n){return{range:e,target:t,data:n}}e.create=t;function n(e){let t=e;return Y.defined(t)&&K.is(t.range)&&(Y.undefined(t.target)||Y.string(t.target))}e.is=n})(Nl||={});var Pl;(function(e){function t(e,t){return{range:e,parent:t}}e.create=t;function n(t){let n=t;return Y.objectLiteral(n)&&K.is(n.range)&&(n.parent===void 0||e.is(n.parent))}e.is=n})(Pl||={});var Fl;(function(e){e.namespace=`namespace`,e.type=`type`,e.class=`class`,e.enum=`enum`,e.interface=`interface`,e.struct=`struct`,e.typeParameter=`typeParameter`,e.parameter=`parameter`,e.variable=`variable`,e.property=`property`,e.enumMember=`enumMember`,e.event=`event`,e.function=`function`,e.method=`method`,e.macro=`macro`,e.keyword=`keyword`,e.modifier=`modifier`,e.comment=`comment`,e.string=`string`,e.number=`number`,e.regexp=`regexp`,e.operator=`operator`,e.decorator=`decorator`})(Fl||={});var Il;(function(e){e.declaration=`declaration`,e.definition=`definition`,e.readonly=`readonly`,e.static=`static`,e.deprecated=`deprecated`,e.abstract=`abstract`,e.async=`async`,e.modification=`modification`,e.documentation=`documentation`,e.defaultLibrary=`defaultLibrary`})(Il||={});var Ll;(function(e){function t(e){let t=e;return Y.objectLiteral(t)&&(t.resultId===void 0||typeof t.resultId==`string`)&&Array.isArray(t.data)&&(t.data.length===0||typeof t.data[0]==`number`)}e.is=t})(Ll||={});var Rl;(function(e){function t(e,t){return{range:e,text:t}}e.create=t;function n(e){let t=e;return t!=null&&K.is(t.range)&&Y.string(t.text)}e.is=n})(Rl||={});var zl;(function(e){function t(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}}e.create=t;function n(e){let t=e;return t!=null&&K.is(t.range)&&Y.boolean(t.caseSensitiveLookup)&&(Y.string(t.variableName)||t.variableName===void 0)}e.is=n})(zl||={});var Bl;(function(e){function t(e,t){return{range:e,expression:t}}e.create=t;function n(e){let t=e;return t!=null&&K.is(t.range)&&(Y.string(t.expression)||t.expression===void 0)}e.is=n})(Bl||={});var Vl;(function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}e.create=t;function n(e){let t=e;return Y.defined(t)&&K.is(e.stoppedLocation)}e.is=n})(Vl||={});var Hl;(function(e){e.Type=1,e.Parameter=2;function t(e){return e===1||e===2}e.is=t})(Hl||={});var Ul;(function(e){function t(e){return{value:e}}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&(t.tooltip===void 0||Y.string(t.tooltip)||cl.is(t.tooltip))&&(t.location===void 0||Ic.is(t.location))&&(t.command===void 0||Jc.is(t.command))}e.is=n})(Ul||={});var Wl;(function(e){function t(e,t,n){let r={position:e,label:t};return n!==void 0&&(r.kind=n),r}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&Fc.is(t.position)&&(Y.string(t.label)||Y.typedArray(t.label,Ul.is))&&(t.kind===void 0||Hl.is(t.kind))&&t.textEdits===void 0||Y.typedArray(t.textEdits,q.is)&&(t.tooltip===void 0||Y.string(t.tooltip)||cl.is(t.tooltip))&&(t.paddingLeft===void 0||Y.boolean(t.paddingLeft))&&(t.paddingRight===void 0||Y.boolean(t.paddingRight))}e.is=n})(Wl||={});var Gl;(function(e){function t(e){return{kind:`snippet`,value:e}}e.createSnippet=t})(Gl||={});var Kl;(function(e){function t(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}e.create=t})(Kl||={});var ql;(function(e){function t(e){return{items:e}}e.create=t})(ql||={});var Jl;(function(e){e.Invoked=0,e.Automatic=1})(Jl||={});var Yl;(function(e){function t(e,t){return{range:e,text:t}}e.create=t})(Yl||={});var Xl;(function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}e.create=t})(Xl||={});var Zl;(function(e){function t(e){let t=e;return Y.objectLiteral(t)&&Mc.is(t.uri)&&Y.string(t.name)}e.is=t})(Zl||={});var Ql;(function(e){function t(e,t,n,r){return new $l(e,t,n,r)}e.create=t;function n(e){let t=e;return!!(Y.defined(t)&&Y.string(t.uri)&&(Y.undefined(t.languageId)||Y.string(t.languageId))&&Y.uinteger(t.lineCount)&&Y.func(t.getText)&&Y.func(t.positionAt)&&Y.func(t.offsetAt))}e.is=n;function r(e,t){let n=e.getText(),r=i(t,(e,t)=>{let n=e.range.start.line-t.range.start.line;return n===0?e.range.start.character-t.range.start.character:n}),a=n.length;for(let t=r.length-1;t>=0;t--){let i=r[t],o=e.offsetAt(i.range.start),s=e.offsetAt(i.range.end);if(s<=a)n=n.substring(0,o)+i.newText+n.substring(s,n.length);else throw Error(`Overlapping edit`);a=o}return n}e.applyEdits=r;function i(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),a=e.slice(n);i(r,t),i(a,t);let o=0,s=0,c=0;for(;o<r.length&&s<a.length;)t(r[o],a[s])<=0?e[c++]=r[o++]:e[c++]=a[s++];for(;o<r.length;)e[c++]=r[o++];for(;s<a.length;)e[c++]=a[s++];return e}})(Ql||={});var $l=class{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],t=this._content,n=!0;for(let r=0;r<t.length;r++){n&&=(e.push(r),!1);let i=t.charAt(r);n=i===`\r`||i===`
|
|
32
32
|
`,i===`\r`&&r+1<t.length&&t.charAt(r+1)===`
|
|
33
33
|
`&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(r===0)return Fc.create(0,e);for(;n<r;){let i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}let i=n-1;return Fc.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)}get lineCount(){return this.getLineOffsets().length}},Y;(function(e){let t=Object.prototype.toString;function n(e){return e!==void 0}e.defined=n;function r(e){return e===void 0}e.undefined=r;function i(e){return e===!0||e===!1}e.boolean=i;function a(e){return t.call(e)===`[object String]`}e.string=a;function o(e){return t.call(e)===`[object Number]`}e.number=o;function s(e,n,r){return t.call(e)===`[object Number]`&&n<=e&&e<=r}e.numberRange=s;function c(e){return t.call(e)===`[object Number]`&&-2147483648<=e&&e<=2147483647}e.integer=c;function l(e){return t.call(e)===`[object Number]`&&0<=e&&e<=2147483647}e.uinteger=l;function u(e){return t.call(e)===`[object Function]`}e.func=u;function d(e){return typeof e==`object`&&!!e}e.objectLiteral=d;function f(e,t){return Array.isArray(e)&&e.every(t)}e.typedArray=f})(Y||={});var eu=class e{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(t,n){for(let n of t)if(e.isIncremental(n)){let e=iu(n.range),t=this.offsetAt(e.start),r=this.offsetAt(e.end);this._content=this._content.substring(0,t)+n.text+this._content.substring(r,this._content.length);let i=Math.max(e.start.line,0),a=Math.max(e.end.line,0),o=this._lineOffsets,s=ru(n.text,!1,t);if(a-i===s.length)for(let e=0,t=s.length;e<t;e++)o[e+i+1]=s[e];else s.length<1e4?o.splice(i+1,a-i,...s):this._lineOffsets=o=o.slice(0,i+1).concat(s,o.slice(a+1));let c=n.text.length-(r-t);if(c!==0)for(let e=i+1+s.length,t=o.length;e<t;e++)o[e]=o[e]+c}else if(e.isFull(n))this._content=n.text,this._lineOffsets=void 0;else throw Error(`Unknown change event received`);this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=ru(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(r===0)return{line:0,character:e};for(;n<r;){let i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}let i=n-1;return{line:i,character:e-t[i]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range!==void 0&&(t.rangeLength===void 0||typeof t.rangeLength==`number`)}static isFull(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range===void 0&&t.rangeLength===void 0}},tu;(function(e){function t(e,t,n,r){return new eu(e,t,n,r)}e.create=t;function n(e,t,n){if(e instanceof eu)return e.update(t,n),e;throw Error(`TextDocument.update: document must be created by TextDocument.create`)}e.update=n;function r(e,t){let n=e.getText(),r=nu(t.map(au),(e,t)=>{let n=e.range.start.line-t.range.start.line;return n===0?e.range.start.character-t.range.start.character:n}),i=0,a=[];for(let t of r){let r=e.offsetAt(t.range.start);if(r<i)throw Error(`Overlapping edit`);r>i&&a.push(n.substring(i,r)),t.newText.length&&a.push(t.newText),i=e.offsetAt(t.range.end)}return a.push(n.substr(i)),a.join(``)}e.applyEdits=r})(tu||={});function nu(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);nu(r,t),nu(i,t);let a=0,o=0,s=0;for(;a<r.length&&o<i.length;)t(r[a],i[o])<=0?e[s++]=r[a++]:e[s++]=i[o++];for(;a<r.length;)e[s++]=r[a++];for(;o<i.length;)e[s++]=i[o++];return e}function ru(e,t,n=0){let r=t?[n]:[];for(let t=0;t<e.length;t++){let i=e.charCodeAt(t);(i===13||i===10)&&(i===13&&t+1<e.length&&e.charCodeAt(t+1)===10&&t++,r.push(n+t+1))}return r}function iu(e){let t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function au(e){let t=iu(e.range);return t===e.range?e:{newText:e.newText,range:t}}var ou;(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[sl.Markdown,sl.PlainText]}},hover:{contentFormat:[sl.Markdown,sl.PlainText]}}}})(ou||={});var su;(function(e){e[e.Unknown=0]=`Unknown`,e[e.File=1]=`File`,e[e.Directory=2]=`Directory`,e[e.SymbolicLink=64]=`SymbolicLink`})(su||={});let cu=/(^#([0-9A-F]{3}){1,2}$)|(^#([0-9A-F]{4}){1,2}$)/i,lu=[{label:`rgb`,func:`rgb($red, $green, $blue)`,insertText:"rgb(${1:red}, ${2:green}, ${3:blue})",desc:U(`Creates a Color from red, green, and blue values.`)},{label:`rgba`,func:`rgba($red, $green, $blue, $alpha)`,insertText:"rgba(${1:red}, ${2:green}, ${3:blue}, ${4:alpha})",desc:U(`Creates a Color from red, green, blue, and alpha values.`)},{label:`rgb relative`,func:`rgb(from $color $red $green $blue)`,insertText:"rgb(from ${1:color} ${2:r} ${3:g} ${4:b})",desc:U(`Creates a Color from the red, green, and blue values of another Color.`)},{label:`hsl`,func:`hsl($hue, $saturation, $lightness)`,insertText:"hsl(${1:hue}, ${2:saturation}, ${3:lightness})",desc:U(`Creates a Color from hue, saturation, and lightness values.`)},{label:`hsla`,func:`hsla($hue, $saturation, $lightness, $alpha)`,insertText:"hsla(${1:hue}, ${2:saturation}, ${3:lightness}, ${4:alpha})",desc:U(`Creates a Color from hue, saturation, lightness, and alpha values.`)},{label:`hsl relative`,func:`hsl(from $color $hue $saturation $lightness)`,insertText:"hsl(from ${1:color} ${2:h} ${3:s} ${4:l})",desc:U(`Creates a Color from the hue, saturation, and lightness values of another Color.`)},{label:`hwb`,func:`hwb($hue $white $black)`,insertText:"hwb(${1:hue} ${2:white} ${3:black})",desc:U(`Creates a Color from hue, white, and black values.`)},{label:`hwb relative`,func:`hwb(from $color $hue $white $black)`,insertText:"hwb(from ${1:color} ${2:h} ${3:w} ${4:b})",desc:U(`Creates a Color from the hue, white, and black values of another Color.`)},{label:`lab`,func:`lab($lightness $a $b)`,insertText:"lab(${1:lightness} ${2:a} ${3:b})",desc:U(`Creates a Color from lightness, a, and b values.`)},{label:`lab relative`,func:`lab(from $color $lightness $a $b)`,insertText:"lab(from ${1:color} ${2:l} ${3:a} ${4:b})",desc:U(`Creates a Color from the lightness, a, and b values of another Color.`)},{label:`oklab`,func:`oklab($lightness $a $b)`,insertText:"oklab(${1:lightness} ${2:a} ${3:b})",desc:U(`Creates a Color from lightness, a, and b values.`)},{label:`oklab relative`,func:`oklab(from $color $lightness $a $b)`,insertText:"oklab(from ${1:color} ${2:l} ${3:a} ${4:b})",desc:U(`Creates a Color from the lightness, a, and b values of another Color.`)},{label:`lch`,func:`lch($lightness $chroma $hue)`,insertText:"lch(${1:lightness} ${2:chroma} ${3:hue})",desc:U(`Creates a Color from lightness, chroma, and hue values.`)},{label:`lch relative`,func:`lch(from $color $lightness $chroma $hue)`,insertText:"lch(from ${1:color} ${2:l} ${3:c} ${4:h})",desc:U(`Creates a Color from the lightness, chroma, and hue values of another Color.`)},{label:`oklch`,func:`oklch($lightness $chroma $hue)`,insertText:"oklch(${1:lightness} ${2:chroma} ${3:hue})",desc:U(`Creates a Color from lightness, chroma, and hue values.`)},{label:`oklch relative`,func:`oklch(from $color $lightness $chroma $hue)`,insertText:"oklch(from ${1:color} ${2:l} ${3:c} ${4:h})",desc:U(`Creates a Color from the lightness, chroma, and hue values of another Color.`)},{label:`color`,func:`color($color-space $red $green $blue)`,insertText:"color(${1|srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyx,xyz-d50,xyz-d65|} ${2:red} ${3:green} ${4:blue})",desc:U(`Creates a Color in a specific color space from red, green, and blue values.`)},{label:`color relative`,func:`color(from $color $color-space $red $green $blue)`,insertText:"color(from ${1:color} ${2|srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyx,xyz-d50,xyz-d65|} ${3:r} ${4:g} ${5:b})",desc:U(`Creates a Color in a specific color space from the red, green, and blue values of another Color.`)},{label:`color-mix`,func:`color-mix(in $color-space, $color $percentage, $color $percentage)`,insertText:"color-mix(in ${1|srgb,srgb-linear,lab,oklab,xyz,xyz-d50,xyz-d65|}, ${3:color} ${4:percentage}, ${5:color} ${6:percentage})",desc:U(`Mix two colors together in a rectangular color space.`)},{label:`color-mix hue`,func:`color-mix(in $color-space $interpolation-method hue, $color $percentage, $color $percentage)`,insertText:"color-mix(in ${1|hsl,hwb,lch,oklch|} ${2|shorter hue,longer hue,increasing hue,decreasing hue|}, ${3:color} ${4:percentage}, ${5:color} ${6:percentage})",desc:U(`Mix two colors together in a polar color space.`)}],uu=/^(rgb|rgba|hsl|hsla|hwb)$/i,du={aliceblue:`#f0f8ff`,antiquewhite:`#faebd7`,aqua:`#00ffff`,aquamarine:`#7fffd4`,azure:`#f0ffff`,beige:`#f5f5dc`,bisque:`#ffe4c4`,black:`#000000`,blanchedalmond:`#ffebcd`,blue:`#0000ff`,blueviolet:`#8a2be2`,brown:`#a52a2a`,burlywood:`#deb887`,cadetblue:`#5f9ea0`,chartreuse:`#7fff00`,chocolate:`#d2691e`,coral:`#ff7f50`,cornflowerblue:`#6495ed`,cornsilk:`#fff8dc`,crimson:`#dc143c`,cyan:`#00ffff`,darkblue:`#00008b`,darkcyan:`#008b8b`,darkgoldenrod:`#b8860b`,darkgray:`#a9a9a9`,darkgrey:`#a9a9a9`,darkgreen:`#006400`,darkkhaki:`#bdb76b`,darkmagenta:`#8b008b`,darkolivegreen:`#556b2f`,darkorange:`#ff8c00`,darkorchid:`#9932cc`,darkred:`#8b0000`,darksalmon:`#e9967a`,darkseagreen:`#8fbc8f`,darkslateblue:`#483d8b`,darkslategray:`#2f4f4f`,darkslategrey:`#2f4f4f`,darkturquoise:`#00ced1`,darkviolet:`#9400d3`,deeppink:`#ff1493`,deepskyblue:`#00bfff`,dimgray:`#696969`,dimgrey:`#696969`,dodgerblue:`#1e90ff`,firebrick:`#b22222`,floralwhite:`#fffaf0`,forestgreen:`#228b22`,fuchsia:`#ff00ff`,gainsboro:`#dcdcdc`,ghostwhite:`#f8f8ff`,gold:`#ffd700`,goldenrod:`#daa520`,gray:`#808080`,grey:`#808080`,green:`#008000`,greenyellow:`#adff2f`,honeydew:`#f0fff0`,hotpink:`#ff69b4`,indianred:`#cd5c5c`,indigo:`#4b0082`,ivory:`#fffff0`,khaki:`#f0e68c`,lavender:`#e6e6fa`,lavenderblush:`#fff0f5`,lawngreen:`#7cfc00`,lemonchiffon:`#fffacd`,lightblue:`#add8e6`,lightcoral:`#f08080`,lightcyan:`#e0ffff`,lightgoldenrodyellow:`#fafad2`,lightgray:`#d3d3d3`,lightgrey:`#d3d3d3`,lightgreen:`#90ee90`,lightpink:`#ffb6c1`,lightsalmon:`#ffa07a`,lightseagreen:`#20b2aa`,lightskyblue:`#87cefa`,lightslategray:`#778899`,lightslategrey:`#778899`,lightsteelblue:`#b0c4de`,lightyellow:`#ffffe0`,lime:`#00ff00`,limegreen:`#32cd32`,linen:`#faf0e6`,magenta:`#ff00ff`,maroon:`#800000`,mediumaquamarine:`#66cdaa`,mediumblue:`#0000cd`,mediumorchid:`#ba55d3`,mediumpurple:`#9370d8`,mediumseagreen:`#3cb371`,mediumslateblue:`#7b68ee`,mediumspringgreen:`#00fa9a`,mediumturquoise:`#48d1cc`,mediumvioletred:`#c71585`,midnightblue:`#191970`,mintcream:`#f5fffa`,mistyrose:`#ffe4e1`,moccasin:`#ffe4b5`,navajowhite:`#ffdead`,navy:`#000080`,oldlace:`#fdf5e6`,olive:`#808000`,olivedrab:`#6b8e23`,orange:`#ffa500`,orangered:`#ff4500`,orchid:`#da70d6`,palegoldenrod:`#eee8aa`,palegreen:`#98fb98`,paleturquoise:`#afeeee`,palevioletred:`#d87093`,papayawhip:`#ffefd5`,peachpuff:`#ffdab9`,peru:`#cd853f`,pink:`#ffc0cb`,plum:`#dda0dd`,powderblue:`#b0e0e6`,purple:`#800080`,red:`#ff0000`,rebeccapurple:`#663399`,rosybrown:`#bc8f8f`,royalblue:`#4169e1`,saddlebrown:`#8b4513`,salmon:`#fa8072`,sandybrown:`#f4a460`,seagreen:`#2e8b57`,seashell:`#fff5ee`,sienna:`#a0522d`,silver:`#c0c0c0`,skyblue:`#87ceeb`,slateblue:`#6a5acd`,slategray:`#708090`,slategrey:`#708090`,snow:`#fffafa`,springgreen:`#00ff7f`,steelblue:`#4682b4`,tan:`#d2b48c`,teal:`#008080`,thistle:`#d8bfd8`,tomato:`#ff6347`,turquoise:`#40e0d0`,violet:`#ee82ee`,wheat:`#f5deb3`,white:`#ffffff`,whitesmoke:`#f5f5f5`,yellow:`#ffff00`,yellowgreen:`#9acd32`},fu=RegExp(`^(${Object.keys(du).join(`|`)})$`,`i`),pu={currentColor:`The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time.`,transparent:`Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value.`},mu=RegExp(`^(${Object.keys(pu).join(`|`)})$`,`i`);function hu(e,t){let n=e.getText().match(/^([-+]?[0-9]*\.?[0-9]+)(%?)$/);if(n){n[2]&&(t=100);let e=parseFloat(n[1])/t;if(e>=0&&e<=1)return e}throw Error()}function gu(e){let t=e.getText(),n=t.match(/^([-+]?[0-9]*\.?[0-9]+)(deg|rad|grad|turn)?$/);if(n)switch(n[2]){case`deg`:return parseFloat(t)%360;case`rad`:return parseFloat(t)*180/Math.PI%360;case`grad`:return parseFloat(t)*.9%360;case`turn`:return parseFloat(t)*360%360;default:if(n[2]===void 0)return parseFloat(t)%360}throw Error()}function _u(e){let t=e.getName();return t?uu.test(t):!1}function vu(e){return cu.test(e)||fu.test(e)||mu.test(e)}function X(e){return e<48?0:e<=57?e-48:(e<97&&(e+=32),e>=97&&e<=102?e-97+10:0)}function yu(e){if(e[0]!==`#`)return null;switch(e.length){case 4:return{red:X(e.charCodeAt(1))*17/255,green:X(e.charCodeAt(2))*17/255,blue:X(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:X(e.charCodeAt(1))*17/255,green:X(e.charCodeAt(2))*17/255,blue:X(e.charCodeAt(3))*17/255,alpha:X(e.charCodeAt(4))*17/255};case 7:return{red:(X(e.charCodeAt(1))*16+X(e.charCodeAt(2)))/255,green:(X(e.charCodeAt(3))*16+X(e.charCodeAt(4)))/255,blue:(X(e.charCodeAt(5))*16+X(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(X(e.charCodeAt(1))*16+X(e.charCodeAt(2)))/255,green:(X(e.charCodeAt(3))*16+X(e.charCodeAt(4)))/255,blue:(X(e.charCodeAt(5))*16+X(e.charCodeAt(6)))/255,alpha:(X(e.charCodeAt(7))*16+X(e.charCodeAt(8)))/255}}return null}function bu(e,t,n,r=1){if(e/=60,t===0)return{red:n,green:n,blue:n,alpha:r};{let i=(e,t,n)=>{for(;n<0;)n+=6;for(;n>=6;)n-=6;return n<1?(t-e)*n+e:n<3?t:n<4?(t-e)*(4-n)+e:e},a=n<=.5?n*(t+1):n+t-n*t,o=n*2-a;return{red:i(o,a,e+2),green:i(o,a,e),blue:i(o,a,e-2),alpha:r}}}function xu(e){let t=e.red,n=e.green,r=e.blue,i=e.alpha,a=Math.max(t,n,r),o=Math.min(t,n,r),s=0,c=0,l=(o+a)/2,u=a-o;if(u>0){switch(c=Math.min(l<=.5?u/(2*l):u/(2-2*l),1),a){case t:s=(n-r)/u+(n<r?6:0);break;case n:s=(r-t)/u+2;break;case r:s=(t-n)/u+4}s*=60,s=Math.round(s)}return{h:s,s:c,l,a:i}}function Su(e,t,n,r=1){if(t+n>=1){let e=t/(t+n);return{red:e,green:e,blue:e,alpha:r}}let i=bu(e,1,.5,r),a=i.red;a*=1-t-n,a+=t;let o=i.green;o*=1-t-n,o+=t;let s=i.blue;return s*=1-t-n,s+=t,{red:a,green:o,blue:s,alpha:r}}function Cu(e){let t=xu(e),n=Math.min(e.red,e.green,e.blue),r=1-Math.max(e.red,e.green,e.blue);return{h:t.h,w:n,b:r,a:t.a}}function wu(e){if(e.type===R.HexColorValue)return yu(e.getText());if(e.type===R.Function){let t=e,n=t.getName(),r=t.getArguments().getChildren();if(r.length===1){let e=r[0].getChildren();if(e.length===1&&e[0].type===R.Expression&&(r=e[0].getChildren(),r.length===3)){let e=r[2];if(e instanceof sc){let t=e.getLeft(),n=e.getRight(),i=e.getOperator();t&&n&&i&&i.matches(`/`)&&(r=[r[0],r[1],t,n])}}}if(!n||r.length<3||r.length>4)return null;try{let e=r.length===4?hu(r[3],1):1;if(n===`rgb`||n===`rgba`)return{red:hu(r[0],255),green:hu(r[1],255),blue:hu(r[2],255),alpha:e};if(n===`hsl`||n===`hsla`)return bu(gu(r[0]),hu(r[1],100),hu(r[2],100),e);if(n===`hwb`)return Su(gu(r[0]),hu(r[1],100),hu(r[2],100),e)}catch{return null}}else if(e.type===R.Identifier){if(e.parent&&e.parent.type!==R.Term)return null;let t=e.parent;if(t&&t.parent&&t.parent.type===R.BinaryExpression){let e=t.parent;if(e.parent&&e.parent.type===R.ListEntry&&e.parent.key===e)return null}let n=e.getText().toLowerCase();if(n===`none`)return null;let r=du[n];if(r)return yu(r)}return null}let Tu={bottom:`Computes to ‘100%’ for the vertical position if one or two values are given, otherwise specifies the bottom edge as the origin for the next offset.`,center:`Computes to ‘50%’ (‘left 50%’) for the horizontal position if the horizontal position is not otherwise specified, or ‘50%’ (‘top 50%’) for the vertical position if it is.`,left:`Computes to ‘0%’ for the horizontal position if one or two values are given, otherwise specifies the left edge as the origin for the next offset.`,right:`Computes to ‘100%’ for the horizontal position if one or two values are given, otherwise specifies the right edge as the origin for the next offset.`,top:`Computes to ‘0%’ for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset.`},Eu={"no-repeat":`Placed once and not repeated in this direction.`,repeat:`Repeated in this direction as often as needed to cover the background painting area.`,"repeat-x":`Computes to ‘repeat no-repeat’.`,"repeat-y":`Computes to ‘no-repeat repeat’.`,round:`Repeated as often as will fit within the background positioning area. If it doesn’t fit a whole number of times, it is rescaled so that it does.`,space:`Repeated as often as will fit within the background positioning area without being clipped and then the images are spaced out to fill the area.`},Du={dashed:`A series of square-ended dashes.`,dotted:`A series of round dots.`,double:`Two parallel solid lines with some space between them.`,groove:`Looks as if it were carved in the canvas.`,hidden:`Same as ‘none’, but has different behavior in the border conflict resolution rules for border-collapsed tables.`,inset:`Looks as if the content on the inside of the border is sunken into the canvas.`,none:`No border. Color and width are ignored.`,outset:`Looks as if the content on the inside of the border is coming out of the canvas.`,ridge:`Looks as if it were coming out of the canvas.`,solid:`A single line segment.`},Ou=[`medium`,`thick`,`thin`],ku={"border-box":`The background is painted within (clipped to) the border box.`,"content-box":`The background is painted within (clipped to) the content box.`,"padding-box":`The background is painted within (clipped to) the padding box.`},Au={"margin-box":`Uses the margin box as reference box.`,"fill-box":`Uses the object bounding box as reference box.`,"stroke-box":`Uses the stroke bounding box as reference box.`,"view-box":`Uses the nearest SVG viewport as reference box.`},ju={initial:`Represents the value specified as the property’s initial value.`,inherit:`Represents the computed value of the property on the element’s parent.`,unset:"Acts as either `inherit` or `initial`, depending on whether the property is inherited or not."},Mu={"var()":`Evaluates the value of a custom variable.`,"calc()":`Evaluates an mathematical expression. The following operators can be used: + - * /.`},Nu={"url()":`Reference an image file by URL`,"image()":`Provide image fallbacks and annotations.`,"-webkit-image-set()":`Provide multiple resolutions. Remember to use unprefixed image-set() in addition.`,"image-set()":`Provide multiple resolutions of an image and const the UA decide which is most appropriate in a given situation.`,"-moz-element()":`Use an element in the document as an image. Remember to use unprefixed element() in addition.`,"element()":`Use an element in the document as an image.`,"cross-fade()":`Indicates the two images to be combined and how far along in the transition the combination is.`,"-webkit-gradient()":`Deprecated. Use modern linear-gradient() or radial-gradient() instead.`,"-webkit-linear-gradient()":`Linear gradient. Remember to use unprefixed version in addition.`,"-moz-linear-gradient()":`Linear gradient. Remember to use unprefixed version in addition.`,"-o-linear-gradient()":`Linear gradient. Remember to use unprefixed version in addition.`,"linear-gradient()":`A linear gradient is created by specifying a straight gradient line, and then several colors placed along that line.`,"-webkit-repeating-linear-gradient()":`Repeating Linear gradient. Remember to use unprefixed version in addition.`,"-moz-repeating-linear-gradient()":`Repeating Linear gradient. Remember to use unprefixed version in addition.`,"-o-repeating-linear-gradient()":`Repeating Linear gradient. Remember to use unprefixed version in addition.`,"repeating-linear-gradient()":`Same as linear-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop’s position and the first specified color-stop’s position.`,"-webkit-radial-gradient()":`Radial gradient. Remember to use unprefixed version in addition.`,"-moz-radial-gradient()":`Radial gradient. Remember to use unprefixed version in addition.`,"radial-gradient()":`Colors emerge from a single point and smoothly spread outward in a circular or elliptical shape.`,"-webkit-repeating-radial-gradient()":`Repeating radial gradient. Remember to use unprefixed version in addition.`,"-moz-repeating-radial-gradient()":`Repeating radial gradient. Remember to use unprefixed version in addition.`,"repeating-radial-gradient()":`Same as radial-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop’s position and the first specified color-stop’s position.`},Pu={ease:`Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0).`,"ease-in":`Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0).`,"ease-in-out":`Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0).`,"ease-out":`Equivalent to cubic-bezier(0, 0, 0.58, 1.0).`,linear:`Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0).`,"step-end":`Equivalent to steps(1, end).`,"step-start":`Equivalent to steps(1, start).`,"steps()":`The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value “start” or “end”.`,"cubic-bezier()":`Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2).`,"cubic-bezier(0.6, -0.28, 0.735, 0.045)":`Ease-in Back. Overshoots.`,"cubic-bezier(0.68, -0.55, 0.265, 1.55)":`Ease-in-out Back. Overshoots.`,"cubic-bezier(0.175, 0.885, 0.32, 1.275)":`Ease-out Back. Overshoots.`,"cubic-bezier(0.6, 0.04, 0.98, 0.335)":`Ease-in Circular. Based on half circle.`,"cubic-bezier(0.785, 0.135, 0.15, 0.86)":`Ease-in-out Circular. Based on half circle.`,"cubic-bezier(0.075, 0.82, 0.165, 1)":`Ease-out Circular. Based on half circle.`,"cubic-bezier(0.55, 0.055, 0.675, 0.19)":`Ease-in Cubic. Based on power of three.`,"cubic-bezier(0.645, 0.045, 0.355, 1)":`Ease-in-out Cubic. Based on power of three.`,"cubic-bezier(0.215, 0.610, 0.355, 1)":`Ease-out Cubic. Based on power of three.`,"cubic-bezier(0.95, 0.05, 0.795, 0.035)":`Ease-in Exponential. Based on two to the power ten.`,"cubic-bezier(1, 0, 0, 1)":`Ease-in-out Exponential. Based on two to the power ten.`,"cubic-bezier(0.19, 1, 0.22, 1)":`Ease-out Exponential. Based on two to the power ten.`,"cubic-bezier(0.47, 0, 0.745, 0.715)":`Ease-in Sine.`,"cubic-bezier(0.445, 0.05, 0.55, 0.95)":`Ease-in-out Sine.`,"cubic-bezier(0.39, 0.575, 0.565, 1)":`Ease-out Sine.`,"cubic-bezier(0.55, 0.085, 0.68, 0.53)":`Ease-in Quadratic. Based on power of two.`,"cubic-bezier(0.455, 0.03, 0.515, 0.955)":`Ease-in-out Quadratic. Based on power of two.`,"cubic-bezier(0.25, 0.46, 0.45, 0.94)":`Ease-out Quadratic. Based on power of two.`,"cubic-bezier(0.895, 0.03, 0.685, 0.22)":`Ease-in Quartic. Based on power of four.`,"cubic-bezier(0.77, 0, 0.175, 1)":`Ease-in-out Quartic. Based on power of four.`,"cubic-bezier(0.165, 0.84, 0.44, 1)":`Ease-out Quartic. Based on power of four.`,"cubic-bezier(0.755, 0.05, 0.855, 0.06)":`Ease-in Quintic. Based on power of five.`,"cubic-bezier(0.86, 0, 0.07, 1)":`Ease-in-out Quintic. Based on power of five.`,"cubic-bezier(0.23, 1, 0.320, 1)":`Ease-out Quintic. Based on power of five.`},Fu={"circle()":`Defines a circle.`,"ellipse()":`Defines an ellipse.`,"inset()":`Defines an inset rectangle.`,"polygon()":`Defines a polygon.`},Iu={length:`cap.ch.cm.cqb.cqh.cqi.cqmax.cqmin.cqw.dvb.dvh.dvi.dvw.em.ex.ic.in.lh.lvb.lvh.lvi.lvw.mm.pc.pt.px.q.rcap.rch.rem.rex.ric.rlh.svb.svh.svi.svw.vb.vh.vi.vmax.vmin.vw`.split(`.`),angle:[`deg`,`rad`,`grad`,`turn`],time:[`ms`,`s`],frequency:[`Hz`,`kHz`],resolution:[`dpi`,`dpcm`,`dppx`],percentage:[`%`,`fr`]},Lu=`a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.keygen.label.legend.li.link.main.map.mark.menu.menuitem.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.param.picture.pre.progress.q.rb.rp.rt.rtc.ruby.s.samp.script.section.select.small.source.span.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.title.tr.track.u.ul.const.video.wbr`.split(`.`),Ru=`circle.clipPath.cursor.defs.desc.ellipse.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.filter.foreignObject.g.hatch.hatchpath.image.line.linearGradient.marker.mask.mesh.meshpatch.meshrow.metadata.mpath.path.pattern.polygon.polyline.radialGradient.rect.set.solidcolor.stop.svg.switch.symbol.text.textPath.tspan.use.view`.split(`.`),zu=[`@bottom-center`,`@bottom-left`,`@bottom-left-corner`,`@bottom-right`,`@bottom-right-corner`,`@left-bottom`,`@left-middle`,`@left-top`,`@right-bottom`,`@right-middle`,`@right-top`,`@top-center`,`@top-left`,`@top-left-corner`,`@top-right`,`@top-right-corner`];function Bu(e){return Object.keys(e).map(t=>e[t])}function Vu(e){return e!==void 0}var Hu=class{constructor(e=new as){this.keyframeRegex=/^@(\-(webkit|ms|moz|o)\-)?keyframes$/i,this.scanner=e,this.token={type:F.EOF,offset:-1,len:0,text:``},this.prevToken=void 0}peekIdent(e){return F.Ident===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()}peekKeyword(e){return F.AtKeyword===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()}peekDelim(e){return F.Delim===this.token.type&&e===this.token.text}peek(e){return e===this.token.type}peekOne(...e){return e.indexOf(this.token.type)!==-1}peekRegExp(e,t){return e===this.token.type&&t.test(this.token.text)}hasWhitespace(){return!!this.prevToken&&this.prevToken.offset+this.prevToken.len!==this.token.offset}consumeToken(){this.prevToken=this.token,this.token=this.scanner.scan()}acceptUnicodeRange(){let e=this.scanner.tryScanUnicode();return e?(this.prevToken=e,this.token=this.scanner.scan(),!0):!1}mark(){return{prev:this.prevToken,curr:this.token,pos:this.scanner.pos()}}restoreAtMark(e){this.prevToken=e.prev,this.token=e.curr,this.scanner.goBackTo(e.pos)}try(e){let t=this.mark();return e()||(this.restoreAtMark(t),null)}acceptOneKeyword(e){if(F.AtKeyword===this.token.type){for(let t of e)if(t.length===this.token.text.length&&t===this.token.text.toLowerCase())return this.consumeToken(),!0}return!1}accept(e){return e===this.token.type&&(this.consumeToken(),!0)}acceptIdent(e){return this.peekIdent(e)?(this.consumeToken(),!0):!1}acceptKeyword(e){return this.peekKeyword(e)?(this.consumeToken(),!0):!1}acceptDelim(e){return this.peekDelim(e)?(this.consumeToken(),!0):!1}acceptRegexp(e){return e.test(this.token.text)?(this.consumeToken(),!0):!1}_parseRegexp(e){let t=this.createNode(R.Identifier);do;while(this.acceptRegexp(e));return this.finish(t)}acceptUnquotedString(){let e=this.scanner.pos();this.scanner.goBackTo(this.token.offset);let t=this.scanner.scanUnquotedString();return t?(this.token=t,this.consumeToken(),!0):(this.scanner.goBackTo(e),!1)}resync(e,t){for(;;)if(e&&e.indexOf(this.token.type)!==-1)return this.consumeToken(),!0;else if(t&&t.indexOf(this.token.type)!==-1)return!0;else{if(this.token.type===F.EOF)return!1;this.token=this.scanner.scan()}}createNode(e){return new B(this.token.offset,this.token.len,e)}create(e){return new e(this.token.offset,this.token.len)}finish(e,t,n,r){if(!(e instanceof V)&&(t&&this.markError(e,t,n,r),this.prevToken)){let t=this.prevToken.offset+this.prevToken.len;e.length=t>e.offset?t-e.offset:0}return e}markError(e,t,n,r){this.token!==this.lastErrorToken&&(e.addIssue(new Dc(e,t,Ec.Error,void 0,this.token.offset,this.token.len)),this.lastErrorToken=this.token),(n||r)&&this.resync(n,r)}parseStylesheet(e){let t=e.version,n=e.getText();return this.internalParse(n,this._parseStylesheet,(r,i)=>{if(e.version!==t)throw Error(`Underlying model has changed, AST is no longer valid`);return n.substr(r,i)})}internalParse(e,t,n){this.scanner.setSource(e),this.token=this.scanner.scan();let r=t.bind(this)();return r&&(r.textProvider=n||((t,n)=>e.substr(t,n))),r}_parseStylesheet(){let e=this.create(gs);for(;e.addChild(this._parseStylesheetStart()););let t=!1;do{let n=!1;do{n=!1;let r=this._parseStylesheetStatement();for(r&&(e.addChild(r),n=!0,t=!1,!this.peek(F.EOF)&&this._needsSemicolonAfter(r)&&!this.accept(F.SemiColon)&&this.markError(e,G.SemiColonExpected));this.accept(F.SemiColon)||this.accept(F.CDO)||this.accept(F.CDC);)n=!0,t=!1}while(n);if(this.peek(F.EOF))break;t||=(this.peek(F.AtKeyword)?this.markError(e,G.UnknownAtRule):this.markError(e,G.RuleOrSelectorExpected),!0),this.consumeToken()}while(!this.peek(F.EOF));return this.finish(e)}_parseStylesheetStart(){return this._parseCharset()}_parseStylesheetStatement(e=!1){return this.peek(F.AtKeyword)?this._parseStylesheetAtStatement(e):this._parseRuleset(e)}_parseStylesheetAtStatement(e=!1){return this._parseImport()||this._parseMedia(e)||this._parsePage()||this._parseFontFace()||this._parseKeyframe()||this._parseSupports(e)||this._parseLayer(e)||this._parsePropertyAtRule()||this._parseViewPort()||this._parseNamespace()||this._parseDocument()||this._parseContainer(e)||this._parseUnknownAtRule()}_tryParseRuleset(e){let t=this.mark();if(this._parseSelector(e)){for(;this.accept(F.Comma)&&this._parseSelector(e););if(this.accept(F.CurlyL))return this.restoreAtMark(t),this._parseRuleset(e)}return this.restoreAtMark(t),null}_parseRuleset(e=!1){let t=this.create(vs),n=t.getSelectors();if(!n.addChild(this._parseSelector(e)))return null;for(;this.accept(F.Comma);)if(!n.addChild(this._parseSelector(e)))return this.finish(t,G.SelectorExpected);return this._parseBody(t,this._parseRuleSetDeclaration.bind(this))}_parseRuleSetDeclarationAtStatement(){return this._parseMedia(!0)||this._parseSupports(!0)||this._parseLayer(!0)||this._parseContainer(!0)||this._parseUnknownAtRule()}_parseRuleSetDeclaration(){return this.peek(F.AtKeyword)?this._parseRuleSetDeclarationAtStatement():this.peek(F.Ident)?this._tryParseRuleset(!0)||this._parseDeclaration():this._parseRuleset(!0)}_needsSemicolonAfter(e){switch(e.type){case R.Keyframe:case R.ViewPort:case R.Media:case R.Ruleset:case R.Namespace:case R.If:case R.For:case R.Each:case R.While:case R.MixinDeclaration:case R.FunctionDeclaration:case R.MixinContentDeclaration:return!1;case R.ExtendsReference:case R.MixinContentReference:case R.ReturnStatement:case R.MediaQuery:case R.Debug:case R.Import:case R.AtApplyRule:case R.CustomPropertyDeclaration:return!0;case R.VariableDeclaration:return e.needsSemicolon;case R.MixinReference:return!e.getContent();case R.Declaration:return!e.getNestedProperties()}return!1}_parseDeclarations(e){let t=this.create(_s);if(!this.accept(F.CurlyL))return null;let n=e();for(;t.addChild(n)&&!this.peek(F.CurlyR);){if(this._needsSemicolonAfter(n)&&!this.accept(F.SemiColon))return this.finish(t,G.SemiColonExpected,[F.SemiColon,F.CurlyR]);for(n&&this.prevToken&&this.prevToken.type===F.SemiColon&&(n.semicolonPosition=this.prevToken.offset);this.accept(F.SemiColon););n=e()}return this.accept(F.CurlyR)?this.finish(t):this.finish(t,G.RightCurlyExpected,[F.CurlyR,F.SemiColon])}_parseBody(e,t){return e.setDeclarations(this._parseDeclarations(t))?this.finish(e):this.finish(e,G.LeftCurlyExpected,[F.CurlyR,F.SemiColon])}_parseSelector(e){let t=this.create(ys),n=!1;for(e&&(n=t.addChild(this._parseCombinator()));t.addChild(this._parseSimpleSelector());)n=!0,t.addChild(this._parseCombinator());return n?this.finish(t):null}_parseDeclaration(e){let t=this._tryParseCustomPropertyDeclaration(e);if(t)return t;let n=this.create(Cs);return n.setProperty(this._parseProperty())?this.accept(F.Colon)?(this.prevToken&&(n.colonPosition=this.prevToken.offset),n.setValue(this._parseExpr())?(n.addChild(this._parsePrio()),this.peek(F.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)):this.finish(n,G.PropertyValueExpected)):this.finish(n,G.ColonExpected,[F.Colon],e||[F.SemiColon]):null}_tryParseCustomPropertyDeclaration(e){if(!this.peekRegExp(F.Ident,/^--/))return null;let t=this.create(ws);if(!t.setProperty(this._parseProperty()))return null;if(!this.accept(F.Colon))return this.finish(t,G.ColonExpected,[F.Colon]);this.prevToken&&(t.colonPosition=this.prevToken.offset);let n=this.mark();if(this.peek(F.CurlyL)){let e=this.create(Ss),r=this._parseDeclarations(this._parseRuleSetDeclaration.bind(this));if(e.setDeclarations(r)&&!r.isErroneous(!0)&&(e.addChild(this._parsePrio()),this.peek(F.SemiColon)))return this.finish(e),t.setPropertySet(e),t.semicolonPosition=this.token.offset,this.finish(t);this.restoreAtMark(n)}let r=this._parseExpr();return r&&!r.isErroneous(!0)&&(this._parsePrio(),this.peekOne(...e||[],F.SemiColon,F.EOF))?(t.setValue(r),this.peek(F.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)):(this.restoreAtMark(n),t.addChild(this._parseCustomPropertyValue(e)),t.addChild(this._parsePrio()),Vu(t.colonPosition)&&this.token.offset===t.colonPosition+1?this.finish(t,G.PropertyValueExpected):this.finish(t))}_parseCustomPropertyValue(e=[F.CurlyR]){let t=this.create(B),n=()=>i===0&&a===0&&o===0,r=()=>e.indexOf(this.token.type)!==-1,i=0,a=0,o=0;done:for(;;){switch(this.token.type){case F.SemiColon:if(n())break done;break;case F.Exclamation:if(n())break done;break;case F.CurlyL:i++;break;case F.CurlyR:if(i--,i<0){if(r()&&a===0&&o===0)break done;return this.finish(t,G.LeftCurlyExpected)}break;case F.ParenthesisL:a++;break;case F.ParenthesisR:if(a--,a<0){if(r()&&o===0&&i===0)break done;return this.finish(t,G.LeftParenthesisExpected)}break;case F.BracketL:o++;break;case F.BracketR:if(o--,o<0)return this.finish(t,G.LeftSquareBracketExpected);break;case F.BadString:break done;case F.EOF:let e=G.RightCurlyExpected;return o>0?e=G.RightSquareBracketExpected:a>0&&(e=G.RightParenthesisExpected),this.finish(t,e)}this.consumeToken()}return this.finish(t)}_tryToParseDeclaration(e){let t=this.mark();return this._parseProperty()&&this.accept(F.Colon)?(this.restoreAtMark(t),this._parseDeclaration(e)):(this.restoreAtMark(t),null)}_parseProperty(){let e=this.create(Ts),t=this.mark();return(this.acceptDelim(`*`)||this.acceptDelim(`_`))&&this.hasWhitespace()?(this.restoreAtMark(t),null):e.setIdentifier(this._parsePropertyIdentifier())?this.finish(e):null}_parsePropertyIdentifier(){return this._parseIdent()}_parseCharset(){if(!this.peek(F.Charset))return null;let e=this.create(B);return this.consumeToken(),this.accept(F.String)?this.accept(F.SemiColon)?this.finish(e):this.finish(e,G.SemiColonExpected):this.finish(e,G.IdentifierExpected)}_parseImport(){if(!this.peekKeyword(`@import`))return null;let e=this.create(Vs);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral())?this.finish(e,G.URIOrStringExpected):this._completeParseImport(e)}_completeParseImport(e){if(this.acceptIdent(`layer`)&&this.accept(F.ParenthesisL)){if(!e.addChild(this._parseLayerName()))return this.finish(e,G.IdentifierExpected,[F.SemiColon]);if(!this.accept(F.ParenthesisR))return this.finish(e,G.RightParenthesisExpected,[F.ParenthesisR],[])}return this.acceptIdent(`supports`)&&this.accept(F.ParenthesisL)&&(e.addChild(this._tryToParseDeclaration()||this._parseSupportsCondition()),!this.accept(F.ParenthesisR))?this.finish(e,G.RightParenthesisExpected,[F.ParenthesisR],[]):(!this.peek(F.SemiColon)&&!this.peek(F.EOF)&&e.setMedialist(this._parseMediaQueryList()),this.finish(e))}_parseNamespace(){if(!this.peekKeyword(`@namespace`))return null;let e=this.create(Ks);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&(e.addChild(this._parseIdent()),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))?this.finish(e,G.URIExpected,[F.SemiColon]):this.accept(F.SemiColon)?this.finish(e):this.finish(e,G.SemiColonExpected)}_parseFontFace(){if(!this.peekKeyword(`@font-face`))return null;let e=this.create(Ls);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseViewPort(){if(!this.peekKeyword(`@-ms-viewport`)&&!this.peekKeyword(`@-o-viewport`)&&!this.peekKeyword(`@viewport`))return null;let e=this.create(Is);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseKeyframe(){if(!this.peekRegExp(F.AtKeyword,this.keyframeRegex))return null;let e=this.create(zs),t=this.create(B);return this.consumeToken(),e.setKeyword(this.finish(t)),t.matches(`@-ms-keyframes`)&&this.markError(t,G.UnknownKeyword),e.setIdentifier(this._parseKeyframeIdent())?this._parseBody(e,this._parseKeyframeSelector.bind(this)):this.finish(e,G.IdentifierExpected,[F.CurlyR])}_parseKeyframeIdent(){return this._parseIdent([z.Keyframe])}_parseKeyframeSelector(){let e=this.create(Bs),t=!1;if(e.addChild(this._parseIdent())&&(t=!0),this.accept(F.Percentage)&&(t=!0),!t)return null;for(;this.accept(F.Comma);)if(t=!1,e.addChild(this._parseIdent())&&(t=!0),this.accept(F.Percentage)&&(t=!0),!t)return this.finish(e,G.PercentageExpected);return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_tryParseKeyframeSelector(){let e=this.create(Bs),t=this.mark(),n=!1;if(e.addChild(this._parseIdent())&&(n=!0),this.accept(F.Percentage)&&(n=!0),!n)return null;for(;this.accept(F.Comma);)if(n=!1,e.addChild(this._parseIdent())&&(n=!0),this.accept(F.Percentage)&&(n=!0),!n)return this.restoreAtMark(t),null;return this.peek(F.CurlyL)?this._parseBody(e,this._parseRuleSetDeclaration.bind(this)):(this.restoreAtMark(t),null)}_parsePropertyAtRule(){if(!this.peekKeyword(`@property`))return null;let e=this.create(Xs);return this.consumeToken(),!this.peekRegExp(F.Ident,/^--/)||!e.setName(this._parseIdent([z.Property]))?this.finish(e,G.IdentifierExpected):this._parseBody(e,this._parseDeclaration.bind(this))}_parseLayer(e=!1){if(!this.peekKeyword(`@layer`))return null;let t=this.create(Ys);this.consumeToken();let n=this._parseLayerNameList();return n&&t.setNames(n),(!n||n.getChildren().length===1)&&this.peek(F.CurlyL)?this._parseBody(t,this._parseLayerDeclaration.bind(this,e)):this.accept(F.SemiColon)?this.finish(t):this.finish(t,G.SemiColonExpected)}_parseLayerDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseLayerNameList(){let e=this.createNode(R.LayerNameList);if(!e.addChild(this._parseLayerName()))return null;for(;this.accept(F.Comma);)if(!e.addChild(this._parseLayerName()))return this.finish(e,G.IdentifierExpected);return this.finish(e)}_parseLayerName(){let e=this.createNode(R.LayerName);if(!e.addChild(this._parseIdent()))return null;for(;!this.hasWhitespace()&&this.acceptDelim(`.`);)if(this.hasWhitespace()||!e.addChild(this._parseIdent()))return this.finish(e,G.IdentifierExpected);return this.finish(e)}_parseSupports(e=!1){if(!this.peekKeyword(`@supports`))return null;let t=this.create(Js);return this.consumeToken(),t.addChild(this._parseSupportsCondition()),this._parseBody(t,this._parseSupportsDeclaration.bind(this,e))}_parseSupportsDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseSupportsCondition(){let e=this.create(rc);if(this.acceptIdent(`not`))e.addChild(this._parseSupportsConditionInParens());else if(e.addChild(this._parseSupportsConditionInParens()),this.peekRegExp(F.Ident,/^(and|or)$/i)){let t=this.token.text.toLowerCase();for(;this.acceptIdent(t);)e.addChild(this._parseSupportsConditionInParens())}return this.finish(e)}_parseSupportsConditionInParens(){let e=this.create(rc);if(this.accept(F.ParenthesisL))return this.prevToken&&(e.lParent=this.prevToken.offset),!e.addChild(this._tryToParseDeclaration([F.ParenthesisR]))&&!this._parseSupportsCondition()?this.finish(e,G.ConditionExpected):this.accept(F.ParenthesisR)?(this.prevToken&&(e.rParent=this.prevToken.offset),this.finish(e)):this.finish(e,G.RightParenthesisExpected,[F.ParenthesisR],[]);if(this.peek(F.Ident)){let t=this.mark();if(this.consumeToken(),!this.hasWhitespace()&&this.accept(F.ParenthesisL)){let t=1;for(;this.token.type!==F.EOF&&t!==0;)this.token.type===F.ParenthesisL?t++:this.token.type===F.ParenthesisR&&t--,this.consumeToken();return this.finish(e)}this.restoreAtMark(t)}return this.finish(e,G.LeftParenthesisExpected,[],[F.ParenthesisL])}_parseMediaDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseMedia(e=!1){if(!this.peekKeyword(`@media`))return null;let t=this.create(qs);return this.consumeToken(),t.addChild(this._parseMediaQueryList())?this._parseBody(t,this._parseMediaDeclaration.bind(this,e)):this.finish(t,G.MediaQueryExpected)}_parseMediaQueryList(){let e=this.create($s);if(!e.addChild(this._parseMediaQuery()))return this.finish(e,G.MediaQueryExpected);for(;this.accept(F.Comma);)if(!e.addChild(this._parseMediaQuery()))return this.finish(e,G.MediaQueryExpected);return this.finish(e)}_parseMediaQuery(){let e=this.create(ec),t=this.mark();if(this.acceptIdent(`not`),this.peek(F.ParenthesisL))this.restoreAtMark(t),e.addChild(this._parseMediaCondition());else{if(this.acceptIdent(`only`),!e.addChild(this._parseIdent()))return null;this.acceptIdent(`and`)&&e.addChild(this._parseMediaCondition())}return this.finish(e)}_parseRatio(){let e=this.mark(),t=this.create(dc);return this._parseNumeric()?this.acceptDelim(`/`)?this._parseNumeric()?this.finish(t):this.finish(t,G.NumberExpected):(this.restoreAtMark(e),null):null}_parseMediaCondition(){let e=this.create(tc);this.acceptIdent(`not`);let t=!0;for(;t;){if(!this.accept(F.ParenthesisL))return this.finish(e,G.LeftParenthesisExpected,[],[F.CurlyL]);if(this.peek(F.ParenthesisL)||this.peekIdent(`not`)?e.addChild(this._parseMediaCondition()):e.addChild(this._parseMediaFeature()),!this.accept(F.ParenthesisR))return this.finish(e,G.RightParenthesisExpected,[],[F.CurlyL]);t=this.acceptIdent(`and`)||this.acceptIdent(`or`)}return this.finish(e)}_parseMediaFeature(){let e=[F.ParenthesisR],t=this.create(nc);if(t.addChild(this._parseMediaFeatureName())){if(this.accept(F.Colon)){if(!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,G.TermExpected,[],e)}else if(this._parseMediaFeatureRangeOperator()&&(!t.addChild(this._parseMediaFeatureValue())||this._parseMediaFeatureRangeOperator()&&!t.addChild(this._parseMediaFeatureValue())))return this.finish(t,G.TermExpected,[],e)}else if(t.addChild(this._parseMediaFeatureValue())){if(!this._parseMediaFeatureRangeOperator())return this.finish(t,G.OperatorExpected,[],e);if(!t.addChild(this._parseMediaFeatureName()))return this.finish(t,G.IdentifierExpected,[],e);if(this._parseMediaFeatureRangeOperator()&&!t.addChild(this._parseMediaFeatureValue()))return this.finish(t,G.TermExpected,[],e)}else return this.finish(t,G.IdentifierExpected,[],e);return this.finish(t)}_parseMediaFeatureRangeOperator(){return this.acceptDelim(`<`)||this.acceptDelim(`>`)?(this.hasWhitespace()||this.acceptDelim(`=`),!0):!!this.acceptDelim(`=`)}_parseMediaFeatureName(){return this._parseIdent()}_parseMediaFeatureValue(){return this._parseRatio()||this._parseTermExpression()}_parseMedium(){let e=this.create(B);return e.addChild(this._parseIdent())?this.finish(e):null}_parsePageDeclaration(){return this._parsePageMarginBox()||this._parseRuleSetDeclaration()}_parsePage(){if(!this.peekKeyword(`@page`))return null;let e=this.create(ic);if(this.consumeToken(),e.addChild(this._parsePageSelector())){for(;this.accept(F.Comma);)if(!e.addChild(this._parsePageSelector()))return this.finish(e,G.IdentifierExpected)}return this._parseBody(e,this._parsePageDeclaration.bind(this))}_parsePageMarginBox(){if(!this.peek(F.AtKeyword))return null;let e=this.create(ac);return this.acceptOneKeyword(zu)||this.markError(e,G.UnknownAtRule,[],[F.CurlyL]),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parsePageSelector(){if(!this.peek(F.Ident)&&!this.peek(F.Colon))return null;let e=this.create(B);return e.addChild(this._parseIdent()),this.accept(F.Colon)&&!e.addChild(this._parseIdent())?this.finish(e,G.IdentifierExpected):this.finish(e)}_parseDocument(){if(!this.peekKeyword(`@-moz-document`))return null;let e=this.create(Zs);return this.consumeToken(),this.resync([],[F.CurlyL]),this._parseBody(e,this._parseStylesheetStatement.bind(this))}_parseContainerDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseContainer(e=!1){if(!this.peekKeyword(`@container`))return null;let t=this.create(Qs);return this.consumeToken(),t.addChild(this._parseIdent()),t.addChild(this._parseContainerQuery()),this._parseBody(t,this._parseContainerDeclaration.bind(this,e))}_parseContainerQuery(){let e=this.create(B);if(this.acceptIdent(`not`))e.addChild(this._parseContainerQueryInParens());else if(e.addChild(this._parseContainerQueryInParens()),this.peekIdent(`and`))for(;this.acceptIdent(`and`);)e.addChild(this._parseContainerQueryInParens());else if(this.peekIdent(`or`))for(;this.acceptIdent(`or`);)e.addChild(this._parseContainerQueryInParens());return this.finish(e)}_parseContainerQueryInParens(){let e=this.create(B);if(this.accept(F.ParenthesisL)){if(this.peekIdent(`not`)||this.peek(F.ParenthesisL)?e.addChild(this._parseContainerQuery()):e.addChild(this._parseMediaFeature()),!this.accept(F.ParenthesisR))return this.finish(e,G.RightParenthesisExpected,[],[F.CurlyL])}else if(this.acceptIdent(`style`)){if(this.hasWhitespace()||!this.accept(F.ParenthesisL))return this.finish(e,G.LeftParenthesisExpected,[],[F.CurlyL]);if(e.addChild(this._parseStyleQuery()),!this.accept(F.ParenthesisR))return this.finish(e,G.RightParenthesisExpected,[],[F.CurlyL])}else return this.finish(e,G.LeftParenthesisExpected,[],[F.CurlyL]);return this.finish(e)}_parseStyleQuery(){let e=this.create(B);if(this.acceptIdent(`not`))e.addChild(this._parseStyleInParens());else if(this.peek(F.ParenthesisL)){if(e.addChild(this._parseStyleInParens()),this.peekIdent(`and`))for(;this.acceptIdent(`and`);)e.addChild(this._parseStyleInParens());else if(this.peekIdent(`or`))for(;this.acceptIdent(`or`);)e.addChild(this._parseStyleInParens())}else e.addChild(this._parseDeclaration([F.ParenthesisR]));return this.finish(e)}_parseStyleInParens(){let e=this.create(B);if(this.accept(F.ParenthesisL)){if(e.addChild(this._parseStyleQuery()),!this.accept(F.ParenthesisR))return this.finish(e,G.RightParenthesisExpected,[],[F.CurlyL])}else return this.finish(e,G.LeftParenthesisExpected,[],[F.CurlyL]);return this.finish(e)}_parseUnknownAtRule(){if(!this.peek(F.AtKeyword))return null;let e=this.create(xc);e.addChild(this._parseUnknownAtRuleName());let t=()=>r===0&&i===0&&a===0,n=0,r=0,i=0,a=0;done:for(;;){switch(this.token.type){case F.SemiColon:if(t())break done;break;case F.EOF:return r>0?this.finish(e,G.RightCurlyExpected):a>0?this.finish(e,G.RightSquareBracketExpected):i>0?this.finish(e,G.RightParenthesisExpected):this.finish(e);case F.CurlyL:n++,r++;break;case F.CurlyR:if(r--,n>0&&r===0){if(this.consumeToken(),a>0)return this.finish(e,G.RightSquareBracketExpected);if(i>0)return this.finish(e,G.RightParenthesisExpected);break done}if(r<0){if(i===0&&a===0)break done;return this.finish(e,G.LeftCurlyExpected)}break;case F.ParenthesisL:i++;break;case F.ParenthesisR:if(i--,i<0)return this.finish(e,G.LeftParenthesisExpected);break;case F.BracketL:a++;break;case F.BracketR:if(a--,a<0)return this.finish(e,G.LeftSquareBracketExpected)}this.consumeToken()}return e}_parseUnknownAtRuleName(){let e=this.create(B);return this.accept(F.AtKeyword)?this.finish(e):e}_parseOperator(){if(this.peekDelim(`/`)||this.peekDelim(`*`)||this.peekDelim(`+`)||this.peekDelim(`-`)||this.peek(F.Dashmatch)||this.peek(F.Includes)||this.peek(F.SubstringOperator)||this.peek(F.PrefixOperator)||this.peek(F.SuffixOperator)||this.peekDelim(`=`)){let e=this.createNode(R.Operator);return this.consumeToken(),this.finish(e)}return null}_parseUnaryOperator(){if(!this.peekDelim(`+`)&&!this.peekDelim(`-`))return null;let e=this.create(B);return this.consumeToken(),this.finish(e)}_parseCombinator(){if(this.peekDelim(`>`)){let e=this.create(B);this.consumeToken();let t=this.mark();if(!this.hasWhitespace()&&this.acceptDelim(`>`)){if(!this.hasWhitespace()&&this.acceptDelim(`>`))return e.type=R.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(t)}return e.type=R.SelectorCombinatorParent,this.finish(e)}if(this.peekDelim(`+`)){let e=this.create(B);return this.consumeToken(),e.type=R.SelectorCombinatorSibling,this.finish(e)}if(this.peekDelim(`~`)){let e=this.create(B);return this.consumeToken(),e.type=R.SelectorCombinatorAllSiblings,this.finish(e)}if(this.peekDelim(`/`)){let e=this.create(B);this.consumeToken();let t=this.mark();if(!this.hasWhitespace()&&this.acceptIdent(`deep`)&&!this.hasWhitespace()&&this.acceptDelim(`/`))return e.type=R.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(t)}return null}_parseSimpleSelector(){let e=this.create(bs),t=0;for(e.addChild(this._parseElementName()||this._parseNestingSelector())&&t++;(t===0||!this.hasWhitespace())&&e.addChild(this._parseSimpleSelectorBody());)t++;return t>0?this.finish(e):null}_parseNestingSelector(){if(this.peekDelim(`&`)){let e=this.createNode(R.SelectorCombinator);return this.consumeToken(),this.finish(e)}return null}_parseSimpleSelectorBody(){return this._parsePseudo()||this._parseHash()||this._parseClass()||this._parseAttrib()}_parseSelectorIdent(){return this._parseIdent()}_parseHash(){if(!this.peek(F.Hash)&&!this.peekDelim(`#`))return null;let e=this.createNode(R.IdentifierSelector);if(this.acceptDelim(`#`)){if(this.hasWhitespace()||!e.addChild(this._parseSelectorIdent()))return this.finish(e,G.IdentifierExpected)}else this.consumeToken();return this.finish(e)}_parseClass(){if(!this.peekDelim(`.`))return null;let e=this.createNode(R.ClassSelector);return this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseSelectorIdent())?this.finish(e,G.IdentifierExpected):this.finish(e)}_parseElementName(){let e=this.mark(),t=this.createNode(R.ElementNameSelector);return t.addChild(this._parseNamespacePrefix()),!t.addChild(this._parseSelectorIdent())&&!this.acceptDelim(`*`)?(this.restoreAtMark(e),null):this.finish(t)}_parseNamespacePrefix(){let e=this.mark(),t=this.createNode(R.NamespacePrefix);return!t.addChild(this._parseIdent())&&this.acceptDelim(`*`),this.acceptDelim(`|`)?this.finish(t):(this.restoreAtMark(e),null)}_parseAttrib(){if(!this.peek(F.BracketL))return null;let e=this.create(lc);return this.consumeToken(),e.setNamespacePrefix(this._parseNamespacePrefix()),e.setIdentifier(this._parseIdent())?(e.setOperator(this._parseOperator())&&(e.setValue(this._parseBinaryExpr()),this.acceptIdent(`i`),this.acceptIdent(`s`)),this.accept(F.BracketR)?this.finish(e):this.finish(e,G.RightSquareBracketExpected)):this.finish(e,G.IdentifierExpected)}_parsePseudo(){let e=this._tryParsePseudoIdentifier();if(e){if(!this.hasWhitespace()&&this.accept(F.ParenthesisL)){let t=()=>{let e=this.create(B);if(!e.addChild(this._parseSelector(!0)))return null;for(;this.accept(F.Comma)&&e.addChild(this._parseSelector(!0)););return this.peek(F.ParenthesisR)?this.finish(e):null};if(!e.addChild(this.try(t))&&e.addChild(this._parseBinaryExpr())&&this.acceptIdent(`of`)&&!e.addChild(this.try(t)))return this.finish(e,G.SelectorExpected);if(!this.accept(F.ParenthesisR))return this.finish(e,G.RightParenthesisExpected)}return this.finish(e)}return null}_tryParsePseudoIdentifier(){if(!this.peek(F.Colon))return null;let e=this.mark(),t=this.createNode(R.PseudoSelector);return this.consumeToken(),this.hasWhitespace()?(this.restoreAtMark(e),null):(this.accept(F.Colon),this.hasWhitespace()||!t.addChild(this._parseIdent())?this.finish(t,G.IdentifierExpected):this.finish(t))}_tryParsePrio(){let e=this.mark();return this._parsePrio()||(this.restoreAtMark(e),null)}_parsePrio(){if(!this.peek(F.Exclamation))return null;let e=this.createNode(R.Prio);return this.accept(F.Exclamation)&&this.acceptIdent(`important`)?this.finish(e):null}_parseExpr(e=!1){let t=this.create(oc);if(!t.addChild(this._parseBinaryExpr()))return null;for(;;){if(this.peek(F.Comma)){if(e)return this.finish(t);this.consumeToken()}if(!t.addChild(this._parseBinaryExpr()))break}return this.finish(t)}_parseUnicodeRange(){if(!this.peekIdent(`u`))return null;let e=this.create(ms);return this.acceptUnicodeRange()?this.finish(e):null}_parseNamedLine(){if(!this.peek(F.BracketL))return null;let e=this.createNode(R.GridLine);for(this.consumeToken();e.addChild(this._parseIdent()););return this.accept(F.BracketR)?this.finish(e):this.finish(e,G.RightSquareBracketExpected)}_parseBinaryExpr(e,t){let n=this.create(sc);if(!n.setLeft(e||this._parseTerm()))return null;if(!n.setOperator(t||this._parseOperator()))return this.finish(n);if(!n.setRight(this._parseTerm()))return this.finish(n,G.TermExpected);n=this.finish(n);let r=this._parseOperator();return r&&(n=this._parseBinaryExpr(n,r)),this.finish(n)}_parseTerm(){let e=this.create(cc);return e.setOperator(this._parseUnaryOperator()),e.setExpression(this._parseTermExpression())?this.finish(e):null}_parseTermExpression(){return this._parseURILiteral()||this._parseUnicodeRange()||this._parseFunction()||this._parseIdent()||this._parseStringLiteral()||this._parseNumeric()||this._parseHexColor()||this._parseOperation()||this._parseNamedLine()}_parseOperation(){if(!this.peek(F.ParenthesisL))return null;let e=this.create(B);return this.consumeToken(),e.addChild(this._parseExpr()),this.accept(F.ParenthesisR)?this.finish(e):this.finish(e,G.RightParenthesisExpected)}_parseNumeric(){if(this.peek(F.Num)||this.peek(F.Percentage)||this.peek(F.Resolution)||this.peek(F.Length)||this.peek(F.EMS)||this.peek(F.EXS)||this.peek(F.Angle)||this.peek(F.Time)||this.peek(F.Dimension)||this.peek(F.ContainerQueryLength)||this.peek(F.Freq)){let e=this.create(fc);return this.consumeToken(),this.finish(e)}return null}_parseStringLiteral(){if(!this.peek(F.String)&&!this.peek(F.BadString))return null;let e=this.createNode(R.StringLiteral);return this.consumeToken(),this.finish(e)}_parseURILiteral(){if(!this.peekRegExp(F.Ident,/^url(-prefix)?$/i))return null;let e=this.mark(),t=this.createNode(R.URILiteral);return this.accept(F.Ident),this.hasWhitespace()||!this.peek(F.ParenthesisL)?(this.restoreAtMark(e),null):(this.scanner.inURL=!0,this.consumeToken(),t.addChild(this._parseURLArgument()),this.scanner.inURL=!1,this.accept(F.ParenthesisR)?this.finish(t):this.finish(t,G.RightParenthesisExpected))}_parseURLArgument(){let e=this.create(B);return!this.accept(F.String)&&!this.accept(F.BadString)&&!this.acceptUnquotedString()?null:this.finish(e)}_parseIdent(e){if(!this.peek(F.Ident))return null;let t=this.create(hs);return e&&(t.referenceTypes=e),t.isCustomProperty=this.peekRegExp(F.Ident,/^--/),this.consumeToken(),this.finish(t)}_parseFunction(){let e=this.mark(),t=this.create(Ds);if(!t.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(F.ParenthesisL))return this.restoreAtMark(e),null;if(t.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(F.Comma)&&!this.peek(F.ParenthesisR);)t.getArguments().addChild(this._parseFunctionArgument())||this.markError(t,G.ExpressionExpected);return this.accept(F.ParenthesisR)?this.finish(t):this.finish(t,G.RightParenthesisExpected)}_parseFunctionIdentifier(){if(!this.peek(F.Ident))return null;let e=this.create(hs);if(e.referenceTypes=[z.Function],this.acceptIdent(`progid`)){if(this.accept(F.Colon))for(;this.accept(F.Ident)&&this.acceptDelim(`.`););return this.finish(e)}return this.consumeToken(),this.finish(e)}_parseFunctionArgument(){let e=this.create(ks);return e.setValue(this._parseExpr(!0))?this.finish(e):null}_parseHexColor(){if(this.peekRegExp(F.Hash,/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/g)){let e=this.create(uc);return this.consumeToken(),this.finish(e)}return null}};function Uu(e,t){let n=0,r=e.length;if(r===0)return 0;for(;n<r;){let i=Math.floor((n+r)/2);t(e[i])?r=i:n=i+1}return n}function Wu(e,t){return e.indexOf(t)!==-1}function Gu(...e){let t=[];for(let n of e)for(let e of n)Wu(t,e)||t.push(e);return t}var Ku=class{constructor(e,t){this.offset=e,this.length=t,this.symbols=[],this.parent=null,this.children=[]}addChild(e){this.children.push(e),e.setParent(this)}setParent(e){this.parent=e}findScope(e,t=0){return this.offset<=e&&this.offset+this.length>e+t||this.offset===e&&this.length===t?this.findInScope(e,t):null}findInScope(e,t=0){let n=e+t,r=Uu(this.children,e=>e.offset>n);if(r===0)return this;let i=this.children[r-1];return i.offset<=e&&i.offset+i.length>=e+t?i.findInScope(e,t):this}addSymbol(e){this.symbols.push(e)}getSymbol(e,t){for(let n=0;n<this.symbols.length;n++){let r=this.symbols[n];if(r.name===e&&r.type===t)return r}return null}getSymbols(){return this.symbols}},qu=class extends Ku{constructor(){super(0,Number.MAX_VALUE)}},Ju=class{constructor(e,t,n,r){this.name=e,this.value=t,this.node=n,this.type=r}},Yu=class{constructor(e){this.scope=e}addSymbol(e,t,n,r){if(e.offset!==-1){let i=this.scope.findScope(e.offset,e.length);i&&i.addSymbol(new Ju(t,n,e,r))}}addScope(e){if(e.offset!==-1){let t=this.scope.findScope(e.offset,e.length);if(t&&(t.offset!==e.offset||t.length!==e.length)){let n=new Ku(e.offset,e.length);return t.addChild(n),n}return t}return null}addSymbolToChildScope(e,t,n,r,i){if(e&&e.offset!==-1){let a=this.addScope(e);a&&a.addSymbol(new Ju(n,r,t,i))}}visitNode(e){switch(e.type){case R.Keyframe:return this.addSymbol(e,e.getName(),void 0,z.Keyframe),!0;case R.CustomPropertyDeclaration:return this.visitCustomPropertyDeclarationNode(e);case R.VariableDeclaration:return this.visitVariableDeclarationNode(e);case R.Ruleset:return this.visitRuleSet(e);case R.MixinDeclaration:return this.addSymbol(e,e.getName(),void 0,z.Mixin),!0;case R.FunctionDeclaration:return this.addSymbol(e,e.getName(),void 0,z.Function),!0;case R.FunctionParameter:return this.visitFunctionParameterNode(e);case R.Declarations:return this.addScope(e),!0;case R.For:let t=e,n=t.getDeclarations();return n&&t.variable&&this.addSymbolToChildScope(n,t.variable,t.variable.getName(),void 0,z.Variable),!0;case R.Each:{let t=e,n=t.getDeclarations();if(n){let e=t.getVariables().getChildren();for(let t of e)this.addSymbolToChildScope(n,t,t.getName(),void 0,z.Variable)}return!0}}return!0}visitRuleSet(e){let t=this.scope.findScope(e.offset,e.length);if(t)for(let n of e.getSelectors().getChildren())n instanceof ys&&n.getChildren().length===1&&t.addSymbol(new Ju(n.getChild(0).getText(),void 0,n,z.Rule));return!0}visitVariableDeclarationNode(e){let t=e.getValue()?e.getValue().getText():void 0;return this.addSymbol(e,e.getName(),t,z.Variable),!0}visitFunctionParameterNode(e){let t=e.getParent().getDeclarations();if(t){let n=e.getDefaultValue(),r=n?n.getText():void 0;this.addSymbolToChildScope(t,e,e.getName(),r,z.Variable)}return!0}visitCustomPropertyDeclarationNode(e){let t=e.getValue()?e.getValue().getText():``;return this.addCSSVariable(e.getProperty(),e.getProperty().getName(),t,z.Variable),!0}addCSSVariable(e,t,n,r){e.offset!==-1&&this.scope.addSymbol(new Ju(t,n,e,r))}},Xu=class{constructor(e){this.global=new qu,e.acceptVisitor(new Yu(this.global))}findSymbolsAtOffset(e,t){let n=this.global.findScope(e,0),r=[],i={};for(;n;){let e=n.getSymbols();for(let n=0;n<e.length;n++){let a=e[n];a.type===t&&!i[a.name]&&(r.push(a),i[a.name]=!0)}n=n.parent}return r}internalFindSymbol(e,t){let n=e;if(e.parent instanceof Os&&e.parent.getParent()instanceof H&&(n=e.parent.getParent().getDeclarations()),e.parent instanceof ks&&e.parent.getParent()instanceof Ds){let t=e.parent.getParent().getIdentifier();if(t){let e=this.internalFindSymbol(t,[z.Function]);e&&(n=e.node.getDeclarations())}}if(!n)return null;let r=e.getText(),i=this.global.findScope(n.offset,n.length);for(;i;){for(let e=0;e<t.length;e++){let n=t[e],a=i.getSymbol(r,n);if(a)return a}i=i.parent}return null}evaluateReferenceTypes(e){if(e instanceof hs){let t=e.referenceTypes;if(t)return t;{if(e.isCustomProperty)return[z.Variable];let t=ps(e);if(t){let n=t.getNonPrefixedPropertyName();if((n===`animation`||n===`animation-name`)&&t.getValue()&&t.getValue().offset===e.offset)return[z.Keyframe]}}}else if(e instanceof hc)return[z.Variable];return e.findAParent(R.Selector,R.ExtendsReference)?[z.Rule]:null}findSymbolFromNode(e){if(!e)return null;for(;e.type===R.Interpolation;)e=e.getParent();let t=this.evaluateReferenceTypes(e);return t?this.internalFindSymbol(e,t):null}matchesSymbol(e,t){if(!e)return!1;for(;e.type===R.Interpolation;)e=e.getParent();if(!e.matches(t.name))return!1;let n=this.evaluateReferenceTypes(e);return!n||n.indexOf(t.type)===-1?!1:this.internalFindSymbol(e,n)===t}findSymbol(e,t,n){let r=this.global.findScope(n);for(;r;){let n=r.getSymbol(e,t);if(n)return n;r=r.parent}return null}};let Zu={E:`Edge`,FF:`Firefox`,S:`Safari`,C:`Chrome`,IE:`IE`,O:`Opera`};function Qu(e){switch(e){case`experimental`:return`⚠️ Property is experimental. Be cautious when using it.️
|