monaco-editor
Version:
A browser based code editor
19 lines (11 loc) • 746 kB
JavaScript
define("vs/language/css/css.worker",["../../initialize-DL0l1TGY","../../index-049xrXrp","../../main-DsK8pnKg"],(function(Sr,d,f){"use strict";var o;(function(r){r[r.Ident=0]="Ident",r[r.AtKeyword=1]="AtKeyword",r[r.String=2]="String",r[r.BadString=3]="BadString",r[r.UnquotedString=4]="UnquotedString",r[r.Hash=5]="Hash",r[r.Num=6]="Num",r[r.Percentage=7]="Percentage",r[r.Dimension=8]="Dimension",r[r.UnicodeRange=9]="UnicodeRange",r[r.CDO=10]="CDO",r[r.CDC=11]="CDC",r[r.Colon=12]="Colon",r[r.SemiColon=13]="SemiColon",r[r.CurlyL=14]="CurlyL",r[r.CurlyR=15]="CurlyR",r[r.ParenthesisL=16]="ParenthesisL",r[r.ParenthesisR=17]="ParenthesisR",r[r.BracketL=18]="BracketL",r[r.BracketR=19]="BracketR",r[r.Whitespace=20]="Whitespace",r[r.Includes=21]="Includes",r[r.Dashmatch=22]="Dashmatch",r[r.SubstringOperator=23]="SubstringOperator",r[r.PrefixOperator=24]="PrefixOperator",r[r.SuffixOperator=25]="SuffixOperator",r[r.Delim=26]="Delim",r[r.EMS=27]="EMS",r[r.EXS=28]="EXS",r[r.Length=29]="Length",r[r.Angle=30]="Angle",r[r.Time=31]="Time",r[r.Freq=32]="Freq",r[r.Exclamation=33]="Exclamation",r[r.Resolution=34]="Resolution",r[r.Comma=35]="Comma",r[r.Charset=36]="Charset",r[r.EscapedJavaScript=37]="EscapedJavaScript",r[r.BadEscapedJavaScript=38]="BadEscapedJavaScript",r[r.Comment=39]="Comment",r[r.SingleLineComment=40]="SingleLineComment",r[r.EOF=41]="EOF",r[r.ContainerQueryLength=42]="ContainerQueryLength",r[r.CustomToken=43]="CustomToken"})(o||(o={}));class Qt{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):!1}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){const t=this.position;for(;this.position<this.len&&e(this.source.charCodeAt(this.position));)this.position++;return this.position-t}}const Ae=97,Zt=102,en=122,Ne=65,tn=70,nn=90,ve=48,ye=57,xr=126,Cr=94,Se=61,kr=124,se=45,rn=95,Fr=37,rt=42,sn=40,on=41,Er=60,_r=62,Ir=64,Dr=35,zr=36,it=92,an=47,le=10,ce=13,xe=12,ln=34,cn=39,st=32,ot=9,Rr=59,Mr=58,Or=123,Pr=125,Tr=91,Ar=93,Nr=44,hn=46,dn=33,Wr=63,Lr=43,G={};G[Rr]=o.SemiColon,G[Mr]=o.Colon,G[Or]=o.CurlyL,G[Pr]=o.CurlyR,G[Ar]=o.BracketR,G[Tr]=o.BracketL,G[sn]=o.ParenthesisL,G[on]=o.ParenthesisR,G[Nr]=o.Comma;const F={};F.em=o.EMS,F.ex=o.EXS,F.px=o.Length,F.cm=o.Length,F.mm=o.Length,F.in=o.Length,F.pt=o.Length,F.pc=o.Length,F.deg=o.Angle,F.rad=o.Angle,F.grad=o.Angle,F.ms=o.Time,F.s=o.Time,F.hz=o.Freq,F.khz=o.Freq,F["%"]=o.Percentage,F.fr=o.Percentage,F.dpi=o.Resolution,F.dpcm=o.Resolution,F.cqw=o.ContainerQueryLength,F.cqh=o.ContainerQueryLength,F.cqi=o.ContainerQueryLength,F.cqb=o.ContainerQueryLength,F.cqmin=o.ContainerQueryLength,F.cqmax=o.ContainerQueryLength;class Ce{constructor(){this.stream=new Qt(""),this.ignoreComment=!0,this.ignoreWhitespace=!0,this.inURL=!1}setSource(e){this.stream=new Qt(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(){const e=this.stream.pos(),t=[];return this._unquotedString(t)?this.finishToken(e,o.UnquotedString,t.join("")):null}scan(){const e=this.trivia();if(e!==null)return e;const t=this.stream.pos();return this.stream.eos()?this.finishToken(t,o.EOF):this.scanNext(t)}tryScanUnicode(){const e=this.stream.pos();if(!this.stream.eos()&&this._unicodeRange())return this.finishToken(e,o.UnicodeRange);this.stream.goBackTo(e)}scanNext(e){if(this.stream.advanceIfChars([Er,dn,se,se]))return this.finishToken(e,o.CDO);if(this.stream.advanceIfChars([se,se,_r]))return this.finishToken(e,o.CDC);let t=[];if(this.ident(t))return this.finishToken(e,o.Ident,t.join(""));if(this.stream.advanceIfChar(Ir))if(t=["@"],this._name(t)){const i=t.join("");return i==="@charset"?this.finishToken(e,o.Charset,i):this.finishToken(e,o.AtKeyword,i)}else return this.finishToken(e,o.Delim);if(this.stream.advanceIfChar(Dr))return t=["#"],this._name(t)?this.finishToken(e,o.Hash,t.join("")):this.finishToken(e,o.Delim);if(this.stream.advanceIfChar(dn))return this.finishToken(e,o.Exclamation);if(this._number()){const i=this.stream.pos();if(t=[this.stream.substring(e,i)],this.stream.advanceIfChar(Fr))return this.finishToken(e,o.Percentage);if(this.ident(t)){const s=this.stream.substring(i).toLowerCase(),a=F[s];return typeof a<"u"?this.finishToken(e,a,t.join("")):this.finishToken(e,o.Dimension,t.join(""))}return this.finishToken(e,o.Num)}t=[];let n=this._string(t);return n!==null?this.finishToken(e,n,t.join("")):(n=G[this.stream.peekChar()],typeof n<"u"?(this.stream.advance(1),this.finishToken(e,n)):this.stream.peekChar(0)===xr&&this.stream.peekChar(1)===Se?(this.stream.advance(2),this.finishToken(e,o.Includes)):this.stream.peekChar(0)===kr&&this.stream.peekChar(1)===Se?(this.stream.advance(2),this.finishToken(e,o.Dashmatch)):this.stream.peekChar(0)===rt&&this.stream.peekChar(1)===Se?(this.stream.advance(2),this.finishToken(e,o.SubstringOperator)):this.stream.peekChar(0)===Cr&&this.stream.peekChar(1)===Se?(this.stream.advance(2),this.finishToken(e,o.PrefixOperator)):this.stream.peekChar(0)===zr&&this.stream.peekChar(1)===Se?(this.stream.advance(2),this.finishToken(e,o.SuffixOperator)):(this.stream.nextChar(),this.finishToken(e,o.Delim)))}trivia(){for(;;){const e=this.stream.pos();if(this._whitespace()){if(!this.ignoreWhitespace)return this.finishToken(e,o.Whitespace)}else if(this.comment()){if(!this.ignoreComment)return this.finishToken(e,o.Comment)}else return null}}comment(){if(this.stream.advanceIfChars([an,rt])){let e=!1,t=!1;return this.stream.advanceWhileChar(n=>t&&n===an?(e=!0,!1):(t=n===rt,!0)),e&&this.stream.advance(1),!0}return!1}_number(){let e=0,t;return this.stream.peekChar()===hn&&(e=1),t=this.stream.peekChar(e),t>=ve&&t<=ye?(this.stream.advance(e+1),this.stream.advanceWhileChar(n=>n>=ve&&n<=ye||e===0&&n===hn),!0):!1}_newline(e){const t=this.stream.peekChar();switch(t){case ce:case xe:case le:return this.stream.advance(1),e.push(String.fromCharCode(t)),t===ce&&this.stream.advanceIfChar(le)&&e.push(`
`),!0}return!1}_escape(e,t){let n=this.stream.peekChar();if(n===it){this.stream.advance(1),n=this.stream.peekChar();let i=0;for(;i<6&&(n>=ve&&n<=ye||n>=Ae&&n<=Zt||n>=Ne&&n<=tn);)this.stream.advance(1),n=this.stream.peekChar(),i++;if(i>0){try{const s=parseInt(this.stream.substring(this.stream.pos()-i),16);s&&e.push(String.fromCharCode(s))}catch{}return n===st||n===ot?this.stream.advance(1):this._newline([]),!0}if(n!==ce&&n!==xe&&n!==le)return this.stream.advance(1),e.push(String.fromCharCode(n)),!0;if(t)return this._newline(e)}return!1}_stringChar(e,t){const n=this.stream.peekChar();return n!==0&&n!==e&&n!==it&&n!==ce&&n!==xe&&n!==le?(this.stream.advance(1),t.push(String.fromCharCode(n)),!0):!1}_string(e){if(this.stream.peekChar()===cn||this.stream.peekChar()===ln){const 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)),o.String):o.BadString}return null}_unquotedChar(e){const t=this.stream.peekChar();return t!==0&&t!==it&&t!==cn&&t!==ln&&t!==sn&&t!==on&&t!==st&&t!==ot&&t!==le&&t!==xe&&t!==ce?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1}_unquotedString(e){let t=!1;for(;this._unquotedChar(e)||this._escape(e);)t=!0;return t}_whitespace(){return this.stream.advanceWhileChar(t=>t===st||t===ot||t===le||t===xe||t===ce)>0}_name(e){let t=!1;for(;this._identChar(e)||this._escape(e);)t=!0;return t}ident(e){const 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){const t=this.stream.peekChar();return t===rn||t>=Ae&&t<=en||t>=Ne&&t<=nn||t>=128&&t<=65535?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1}_minus(e){const t=this.stream.peekChar();return t===se?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1}_identChar(e){const t=this.stream.peekChar();return t===rn||t===se||t>=Ae&&t<=en||t>=Ne&&t<=nn||t>=ve&&t<=ye||t>=128&&t<=65535?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1}_unicodeRange(){if(this.stream.advanceIfChar(Lr)){const e=n=>n>=ve&&n<=ye||n>=Ae&&n<=Zt||n>=Ne&&n<=tn,t=this.stream.advanceWhileChar(e)+this.stream.advanceWhileChar(n=>n===Wr);if(t>=1&&t<=6)if(this.stream.advanceIfChar(se)){const n=this.stream.advanceWhileChar(e);if(n>=1&&n<=6)return!0}else return!0}return!1}}function I(r,e){if(r.length<e.length)return!1;for(let t=0;t<e.length;t++)if(r[t]!==e[t])return!1;return!0}function pn(r,e){let t=r.length-e.length;return t>0?r.lastIndexOf(e)===t:t===0?r===e:!1}function $r(r,e,t=4){let n=Math.abs(r.length-e.length);if(n>t)return 0;let i=[],s=[],a,c;for(a=0;a<e.length+1;++a)s.push(0);for(a=0;a<r.length+1;++a)i.push(s);for(a=1;a<r.length+1;++a)for(c=1;c<e.length+1;++c)r[a-1]===e[c-1]?i[a][c]=i[a-1][c-1]+1:i[a][c]=Math.max(i[a-1][c],i[a][c-1]);return i[r.length][e.length]-Math.sqrt(n)}function mn(r,e=!0){return r?r.length<140?r:r.slice(0,140)+(e?"…":""):""}function Ur(r,e){const t=e.exec(r);return t&&t[0].length?r.substr(0,r.length-t[0].length):r}function un(r,e){let t="";for(;e>0;)(e&1)===1&&(t+=r),r+=r,e=e>>>1;return t}var p;(function(r){r[r.Undefined=0]="Undefined",r[r.Identifier=1]="Identifier",r[r.Stylesheet=2]="Stylesheet",r[r.Ruleset=3]="Ruleset",r[r.Selector=4]="Selector",r[r.SimpleSelector=5]="SimpleSelector",r[r.SelectorInterpolation=6]="SelectorInterpolation",r[r.SelectorCombinator=7]="SelectorCombinator",r[r.SelectorCombinatorParent=8]="SelectorCombinatorParent",r[r.SelectorCombinatorSibling=9]="SelectorCombinatorSibling",r[r.SelectorCombinatorAllSiblings=10]="SelectorCombinatorAllSiblings",r[r.SelectorCombinatorShadowPiercingDescendant=11]="SelectorCombinatorShadowPiercingDescendant",r[r.Page=12]="Page",r[r.PageBoxMarginBox=13]="PageBoxMarginBox",r[r.ClassSelector=14]="ClassSelector",r[r.IdentifierSelector=15]="IdentifierSelector",r[r.ElementNameSelector=16]="ElementNameSelector",r[r.PseudoSelector=17]="PseudoSelector",r[r.AttributeSelector=18]="AttributeSelector",r[r.Declaration=19]="Declaration",r[r.Declarations=20]="Declarations",r[r.Property=21]="Property",r[r.Expression=22]="Expression",r[r.BinaryExpression=23]="BinaryExpression",r[r.Term=24]="Term",r[r.Operator=25]="Operator",r[r.Value=26]="Value",r[r.StringLiteral=27]="StringLiteral",r[r.URILiteral=28]="URILiteral",r[r.EscapedValue=29]="EscapedValue",r[r.Function=30]="Function",r[r.NumericValue=31]="NumericValue",r[r.HexColorValue=32]="HexColorValue",r[r.RatioValue=33]="RatioValue",r[r.MixinDeclaration=34]="MixinDeclaration",r[r.MixinReference=35]="MixinReference",r[r.VariableName=36]="VariableName",r[r.VariableDeclaration=37]="VariableDeclaration",r[r.Prio=38]="Prio",r[r.Interpolation=39]="Interpolation",r[r.NestedProperties=40]="NestedProperties",r[r.ExtendsReference=41]="ExtendsReference",r[r.SelectorPlaceholder=42]="SelectorPlaceholder",r[r.Debug=43]="Debug",r[r.If=44]="If",r[r.Else=45]="Else",r[r.For=46]="For",r[r.Each=47]="Each",r[r.While=48]="While",r[r.MixinContentReference=49]="MixinContentReference",r[r.MixinContentDeclaration=50]="MixinContentDeclaration",r[r.Media=51]="Media",r[r.Keyframe=52]="Keyframe",r[r.FontFace=53]="FontFace",r[r.Import=54]="Import",r[r.Namespace=55]="Namespace",r[r.Invocation=56]="Invocation",r[r.FunctionDeclaration=57]="FunctionDeclaration",r[r.ReturnStatement=58]="ReturnStatement",r[r.MediaQuery=59]="MediaQuery",r[r.MediaCondition=60]="MediaCondition",r[r.MediaFeature=61]="MediaFeature",r[r.FunctionParameter=62]="FunctionParameter",r[r.FunctionArgument=63]="FunctionArgument",r[r.KeyframeSelector=64]="KeyframeSelector",r[r.ViewPort=65]="ViewPort",r[r.Document=66]="Document",r[r.AtApplyRule=67]="AtApplyRule",r[r.CustomPropertyDeclaration=68]="CustomPropertyDeclaration",r[r.CustomPropertySet=69]="CustomPropertySet",r[r.ListEntry=70]="ListEntry",r[r.Supports=71]="Supports",r[r.SupportsCondition=72]="SupportsCondition",r[r.NamespacePrefix=73]="NamespacePrefix",r[r.GridLine=74]="GridLine",r[r.Plugin=75]="Plugin",r[r.UnknownAtRule=76]="UnknownAtRule",r[r.Use=77]="Use",r[r.ModuleConfiguration=78]="ModuleConfiguration",r[r.Forward=79]="Forward",r[r.ForwardVisibility=80]="ForwardVisibility",r[r.Module=81]="Module",r[r.UnicodeRange=82]="UnicodeRange",r[r.Layer=83]="Layer",r[r.LayerNameList=84]="LayerNameList",r[r.LayerName=85]="LayerName",r[r.PropertyAtRule=86]="PropertyAtRule",r[r.Container=87]="Container"})(p||(p={}));var S;(function(r){r[r.Mixin=0]="Mixin",r[r.Rule=1]="Rule",r[r.Variable=2]="Variable",r[r.Function=3]="Function",r[r.Keyframe=4]="Keyframe",r[r.Unknown=5]="Unknown",r[r.Module=6]="Module",r[r.Forward=7]="Forward",r[r.ForwardVisibility=8]="ForwardVisibility",r[r.Property=9]="Property"})(S||(S={}));function at(r,e){let t=null;return!r||e<r.offset||e>r.end?null:(r.accept(n=>n.offset===-1&&n.length===-1?!0:n.offset<=e&&n.end>=e?(t?n.length<=t.length&&(t=n):t=n,!0):!1),t)}function lt(r,e){let t=at(r,e);const n=[];for(;t;)n.unshift(t),t=t.parent;return n}function Vr(r){const e=r.findParent(p.Declaration),t=e&&e.getValue();return t&&t.encloses(r)?e:null}class b{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||p.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(const 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){const i=e.parent.children.indexOf(e);i>=0&&e.parent.children.splice(i,1)}e.parent=this;let n=this.children;return n||(n=this.children=[]),t!==-1?n.splice(t,0,e):n.push(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=[]),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(t=>t.isErroneous(!0))}setNode(e,t,n=-1){return t?(t.attachTo(this,n),this[e]=t,!0):!1}addChild(e){return e?(this.children||(this.children=[]),e.attachTo(this),this.updateOffsetAndLength(e),!0):!1}updateOffsetAndLength(e){(e.offset<this.offset||this.offset===-1)&&(this.offset=e.offset);const 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(const 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){const 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 T;)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(n=>t.type===n);)t=t.parent;return t}setData(e,t){this.options||(this.options={}),this.options[e]=t}getData(e){return!this.options||!this.options.hasOwnProperty(e)?null:this.options[e]}}class T extends b{constructor(e,t=-1){super(-1,-1),this.attachTo(e,t),this.offset=-1,this.length=-1}}class Br extends b{constructor(e,t){super(e,t)}get type(){return p.UnicodeRange}setRangeStart(e){return this.setNode("rangeStart",e)}getRangeStart(){return this.rangeStart}setRangeEnd(e){return this.setNode("rangeEnd",e)}getRangeEnd(){return this.rangeEnd}}class U extends b{constructor(e,t){super(e,t),this.isCustomProperty=!1}get type(){return p.Identifier}containsInterpolation(){return this.hasChildren()}}class Kr extends b{constructor(e,t){super(e,t)}get type(){return p.Stylesheet}}class ct extends b{constructor(e,t){super(e,t)}get type(){return p.Declarations}}class E extends b{constructor(e,t){super(e,t)}getDeclarations(){return this.declarations}setDeclarations(e){return this.setNode("declarations",e)}}class oe extends E{constructor(e,t){super(e,t)}get type(){return p.Ruleset}getSelectors(){return this.selectors||(this.selectors=new T(this)),this.selectors}isNested(){return!!this.parent&&this.parent.findParent(p.Declarations)!==null}}class ke extends b{constructor(e,t){super(e,t)}get type(){return p.Selector}}class he extends b{constructor(e,t){super(e,t)}get type(){return p.SimpleSelector}}class ht extends b{constructor(e,t){super(e,t)}}class jr extends E{constructor(e,t){super(e,t)}get type(){return p.CustomPropertySet}}class V extends ht{constructor(e,t){super(e,t),this.property=null}get type(){return p.Declaration}setProperty(e){return this.setNode("property",e)}getProperty(){return this.property}getFullPropertyName(){const e=this.property?this.property.getName():"unknown";if(this.parent instanceof ct&&this.parent.getParent()instanceof gn){const t=this.parent.getParent().getParent();if(t instanceof V)return t.getFullPropertyName()+e}return e}getNonPrefixedPropertyName(){const e=this.getFullPropertyName();if(e&&e.charAt(0)==="-"){const 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}}class qr extends V{constructor(e,t){super(e,t)}get type(){return p.CustomPropertyDeclaration}setPropertySet(e){return this.setNode("propertySet",e)}getPropertySet(){return this.propertySet}}class dt extends b{constructor(e,t){super(e,t)}get type(){return p.Property}setIdentifier(e){return this.setNode("identifier",e)}getIdentifier(){return this.identifier}getName(){return Ur(this.getText(),/[_\+]+$/)}isCustomProperty(){return!!this.identifier&&this.identifier.isCustomProperty}}class Gr extends b{constructor(e,t){super(e,t)}get type(){return p.Invocation}getArguments(){return this.arguments||(this.arguments=new T(this)),this.arguments}}class Fe extends Gr{constructor(e,t){super(e,t)}get type(){return p.Function}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}}class We extends b{constructor(e,t){super(e,t)}get type(){return p.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}}class de extends b{constructor(e,t){super(e,t)}get type(){return p.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}}class Hr extends E{constructor(e,t){super(e,t)}get type(){return p.If}setExpression(e){return this.setNode("expression",e,0)}setElseClause(e){return this.setNode("elseClause",e)}}class Jr extends E{constructor(e,t){super(e,t)}get type(){return p.For}setVariable(e){return this.setNode("variable",e,0)}}class Yr extends E{constructor(e,t){super(e,t)}get type(){return p.Each}getVariables(){return this.variables||(this.variables=new T(this)),this.variables}}class Xr extends E{constructor(e,t){super(e,t)}get type(){return p.While}}class Qr extends E{constructor(e,t){super(e,t)}get type(){return p.Else}}class Le extends E{constructor(e,t){super(e,t)}get type(){return p.FunctionDeclaration}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}getParameters(){return this.parameters||(this.parameters=new T(this)),this.parameters}}class Zr extends E{constructor(e,t){super(e,t)}get type(){return p.ViewPort}}class fn extends E{constructor(e,t){super(e,t)}get type(){return p.FontFace}}class gn extends E{constructor(e,t){super(e,t)}get type(){return p.NestedProperties}}class bn extends E{constructor(e,t){super(e,t)}get type(){return p.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():""}}class wn extends E{constructor(e,t){super(e,t)}get type(){return p.KeyframeSelector}}class pt extends b{constructor(e,t){super(e,t)}get type(){return p.Import}setMedialist(e){return e?(e.attachTo(this),!0):!1}}class ei extends b{get type(){return p.Use}getParameters(){return this.parameters||(this.parameters=new T(this)),this.parameters}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}}class ti extends b{get type(){return p.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}}class ni extends b{get type(){return p.Forward}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getMembers(){return this.members||(this.members=new T(this)),this.members}getParameters(){return this.parameters||(this.parameters=new T(this)),this.parameters}}class ri extends b{get type(){return p.ForwardVisibility}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}}class ii extends b{constructor(e,t){super(e,t)}get type(){return p.Namespace}}class mt extends E{constructor(e,t){super(e,t)}get type(){return p.Media}}class ut extends E{constructor(e,t){super(e,t)}get type(){return p.Supports}}class si extends E{constructor(e,t){super(e,t)}get type(){return p.Layer}setNames(e){return this.setNode("names",e)}getNames(){return this.names}}class oi extends E{constructor(e,t){super(e,t)}get type(){return p.PropertyAtRule}setName(e){return e?(e.attachTo(this),this.name=e,!0):!1}getName(){return this.name}}class ai extends E{constructor(e,t){super(e,t)}get type(){return p.Document}}class li extends E{constructor(e,t){super(e,t)}get type(){return p.Container}}class vn extends b{constructor(e,t){super(e,t)}}class yn extends b{constructor(e,t){super(e,t)}get type(){return p.MediaQuery}}class ci extends b{constructor(e,t){super(e,t)}get type(){return p.MediaCondition}}class hi extends b{constructor(e,t){super(e,t)}get type(){return p.MediaFeature}}class Ee extends b{constructor(e,t){super(e,t)}get type(){return p.SupportsCondition}}class di extends E{constructor(e,t){super(e,t)}get type(){return p.Page}}class pi extends E{constructor(e,t){super(e,t)}get type(){return p.PageBoxMarginBox}}class Sn extends b{constructor(e,t){super(e,t)}get type(){return p.Expression}}class ft extends b{constructor(e,t){super(e,t)}get type(){return p.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}}class mi extends b{constructor(e,t){super(e,t)}get type(){return p.Term}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}setExpression(e){return this.setNode("expression",e)}getExpression(){return this.expression}}class ui extends b{constructor(e,t){super(e,t)}get type(){return p.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}}class gt extends b{constructor(e,t){super(e,t)}get type(){return p.HexColorValue}}class fi extends b{constructor(e,t){super(e,t)}get type(){return p.RatioValue}}const gi=46,bi=48,wi=57;class bt extends b{constructor(e,t){super(e,t)}get type(){return p.NumericValue}getValue(){const e=this.getText();let t=0,n;for(let i=0,s=e.length;i<s&&(n=e.charCodeAt(i),bi<=n&&n<=wi||n===gi);i++)t+=1;return{value:e.substring(0,t),unit:t<e.length?e.substring(t):void 0}}}class $e extends ht{constructor(e,t){super(e,t),this.needsSemicolon=!0}get type(){return p.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}}class wt extends b{constructor(e,t){super(e,t)}get type(){return p.Interpolation}}class vt extends b{constructor(e,t){super(e,t)}get type(){return p.VariableName}getName(){return this.getText()}}class _e extends b{constructor(e,t){super(e,t)}get type(){return p.ExtendsReference}getSelectors(){return this.selectors||(this.selectors=new T(this)),this.selectors}}class vi extends b{constructor(e,t){super(e,t)}get type(){return p.MixinContentReference}getArguments(){return this.arguments||(this.arguments=new T(this)),this.arguments}}class yi extends E{constructor(e,t){super(e,t)}get type(){return p.MixinContentDeclaration}getParameters(){return this.parameters||(this.parameters=new T(this)),this.parameters}}class Ue extends b{constructor(e,t){super(e,t)}get type(){return p.MixinReference}getNamespaces(){return this.namespaces||(this.namespaces=new T(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||(this.arguments=new T(this)),this.arguments}setContent(e){return this.setNode("content",e)}getContent(){return this.content}}class Ie extends E{constructor(e,t){super(e,t)}get type(){return p.MixinDeclaration}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}getParameters(){return this.parameters||(this.parameters=new T(this)),this.parameters}setGuard(e){return e&&(e.attachTo(this),this.guard=e),!1}}class xn extends E{constructor(e,t){super(e,t)}get type(){return p.UnknownAtRule}setAtRuleName(e){this.atRuleName=e}getAtRuleName(){return this.atRuleName}}class Si extends b{get type(){return p.ListEntry}setKey(e){return this.setNode("key",e,0)}setValue(e){return this.setNode("value",e,1)}}class xi extends b{getConditions(){return this.conditions||(this.conditions=new T(this)),this.conditions}}class Ci extends b{setVariable(e){return this.setNode("variable",e)}}class Cn extends b{get type(){return p.Module}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}}var L;(function(r){r[r.Ignore=1]="Ignore",r[r.Warning=2]="Warning",r[r.Error=4]="Error"})(L||(L={}));class kn{constructor(e,t,n,i,s=e.offset,a=e.length){this.node=e,this.rule=t,this.level=n,this.message=i||t.message,this.offset=s,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}}class yt{static entries(e){const t=new yt;return e.acceptVisitor(t),t.entries}constructor(){this.entries=[]}visitNode(e){return e.isErroneous()&&e.collectIssues(this.entries),!0}}class x{constructor(e,t){this.id=e,this.message=t}}const u={NumberExpected:new x("css-numberexpected",d.t("number expected")),ConditionExpected:new x("css-conditionexpected",d.t("condition expected")),RuleOrSelectorExpected:new x("css-ruleorselectorexpected",d.t("at-rule or selector expected")),DotExpected:new x("css-dotexpected",d.t("dot expected")),ColonExpected:new x("css-colonexpected",d.t("colon expected")),SemiColonExpected:new x("css-semicolonexpected",d.t("semi-colon expected")),TermExpected:new x("css-termexpected",d.t("term expected")),ExpressionExpected:new x("css-expressionexpected",d.t("expression expected")),OperatorExpected:new x("css-operatorexpected",d.t("operator expected")),IdentifierExpected:new x("css-identifierexpected",d.t("identifier expected")),PercentageExpected:new x("css-percentageexpected",d.t("percentage expected")),URIOrStringExpected:new x("css-uriorstringexpected",d.t("uri or string expected")),URIExpected:new x("css-uriexpected",d.t("URI expected")),VariableNameExpected:new x("css-varnameexpected",d.t("variable name expected")),VariableValueExpected:new x("css-varvalueexpected",d.t("variable value expected")),PropertyValueExpected:new x("css-propertyvalueexpected",d.t("property value expected")),LeftCurlyExpected:new x("css-lcurlyexpected",d.t("{ expected")),RightCurlyExpected:new x("css-rcurlyexpected",d.t("} expected")),LeftSquareBracketExpected:new x("css-rbracketexpected",d.t("[ expected")),RightSquareBracketExpected:new x("css-lbracketexpected",d.t("] expected")),LeftParenthesisExpected:new x("css-lparentexpected",d.t("( expected")),RightParenthesisExpected:new x("css-rparentexpected",d.t(") expected")),CommaExpected:new x("css-commaexpected",d.t("comma expected")),PageDirectiveOrDeclarationExpected:new x("css-pagedirordeclexpected",d.t("page directive or declaraton expected")),UnknownAtRule:new x("css-unknownatrule",d.t("at-rule unknown")),UnknownKeyword:new x("css-unknownkeyword",d.t("unknown keyword")),SelectorExpected:new x("css-selectorexpected",d.t("selector expected")),StringLiteralExpected:new x("css-stringliteralexpected",d.t("string literal expected")),WhitespaceExpected:new x("css-whitespaceexpected",d.t("whitespace expected")),MediaQueryExpected:new x("css-mediaqueryexpected",d.t("media query expected")),IdentifierOrWildcardExpected:new x("css-idorwildcardexpected",d.t("identifier or wildcard expected")),WildcardExpected:new x("css-wildcardexpected",d.t("wildcard expected")),IdentifierOrVariableExpected:new x("css-idorvarexpected",d.t("identifier or variable expected"))};var Fn;(function(r){r.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[f.MarkupKind.Markdown,f.MarkupKind.PlainText]}},hover:{contentFormat:[f.MarkupKind.Markdown,f.MarkupKind.PlainText]}}}})(Fn||(Fn={}));var De;(function(r){r[r.Unknown=0]="Unknown",r[r.File=1]="File",r[r.Directory=2]="Directory",r[r.SymbolicLink=64]="SymbolicLink"})(De||(De={}));const En={E:"Edge",FF:"Firefox",S:"Safari",C:"Chrome",IE:"IE",O:"Opera"};function _n(r){switch(r){case"experimental":return`⚠️ Property is experimental. Be cautious when using it.️
`;case"nonstandard":return`🚨️ Property is nonstandard. Avoid using it.
`;case"obsolete":return`🚨️️️ Property is obsolete. Avoid using it.
`;default:return""}}function ne(r,e,t){let n;if(e?n={kind:"markdown",value:Fi(r,t)}:n={kind:"plaintext",value:ki(r,t)},n.value!=="")return n}function Ve(r){return r=r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&"),r.replace(/</g,"<").replace(/>/g,">")}function ki(r,e){if(!r.description||r.description==="")return"";if(typeof r.description!="string")return r.description.value;let t="";if(e?.documentation!==!1){r.status&&(t+=_n(r.status)),t+=r.description;const n=In(r.browsers);n&&(t+=`
(`+n+")"),"syntax"in r&&(t+=`
Syntax: ${r.syntax}`)}return r.references&&r.references.length>0&&e?.references!==!1&&(t.length>0&&(t+=`
`),t+=r.references.map(n=>`${n.name}: ${n.url}`).join(" | ")),t}function Fi(r,e){if(!r.description||r.description==="")return"";let t="";if(e?.documentation!==!1){r.status&&(t+=_n(r.status)),typeof r.description=="string"?t+=Ve(r.description):t+=r.description.kind===f.MarkupKind.Markdown?r.description.value:Ve(r.description.value);const n=In(r.browsers);n&&(t+=`
(`+Ve(n)+")"),"syntax"in r&&r.syntax&&(t+=`
Syntax: ${Ve(r.syntax)}`)}return r.references&&r.references.length>0&&e?.references!==!1&&(t.length>0&&(t+=`
`),t+=r.references.map(n=>`[${n.name}](${n.url})`).join(" | ")),t}function In(r=[]){return r.length===0?null:r.map(e=>{let t="";const n=e.match(/([A-Z]+)(\d+)?/),i=n[1],s=n[2];return i in En&&(t+=En[i]),s&&(t+=" "+s),t}).join(", ")}const Ei=/(^#([0-9A-F]{3}){1,2}$)|(^#([0-9A-F]{4}){1,2}$)/i,_i=[{label:"rgb",func:"rgb($red, $green, $blue)",insertText:"rgb(${1:red}, ${2:green}, ${3:blue})",desc:d.t("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:d.t("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:d.t("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:d.t("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:d.t("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:d.t("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:d.t("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:d.t("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:d.t("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:d.t("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:d.t("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:d.t("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:d.t("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:d.t("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:d.t("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:d.t("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:d.t("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:d.t("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:d.t("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:d.t("Mix two colors together in a polar color space.")}],Ii=/^(rgb|rgba|hsl|hsla|hwb)$/i,Be={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"},Di=new RegExp(`^(${Object.keys(Be).join("|")})$`,"i"),St={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."},zi=new RegExp(`^(${Object.keys(St).join("|")})$`,"i");function re(r,e){const n=r.getText().match(/^([-+]?[0-9]*\.?[0-9]+)(%?)$/);if(n){n[2]&&(e=100);const i=parseFloat(n[1])/e;if(i>=0&&i<=1)return i}throw new Error}function Dn(r){const e=r.getText(),t=e.match(/^([-+]?[0-9]*\.?[0-9]+)(deg|rad|grad|turn)?$/);if(t)switch(t[2]){case"deg":return parseFloat(e)%360;case"rad":return parseFloat(e)*180/Math.PI%360;case"grad":return parseFloat(e)*.9%360;case"turn":return parseFloat(e)*360%360;default:if(typeof t[2]>"u")return parseFloat(e)%360}throw new Error}function Ri(r){const e=r.getName();return e?Ii.test(e):!1}function zn(r){return Ei.test(r)||Di.test(r)||zi.test(r)}const Rn=48,Mi=57,Oi=65,Ke=97,Pi=102;function _(r){return r<Rn?0:r<=Mi?r-Rn:(r<Ke&&(r+=Ke-Oi),r>=Ke&&r<=Pi?r-Ke+10:0)}function Mn(r){if(r[0]!=="#")return null;switch(r.length){case 4:return{red:_(r.charCodeAt(1))*17/255,green:_(r.charCodeAt(2))*17/255,blue:_(r.charCodeAt(3))*17/255,alpha:1};case 5:return{red:_(r.charCodeAt(1))*17/255,green:_(r.charCodeAt(2))*17/255,blue:_(r.charCodeAt(3))*17/255,alpha:_(r.charCodeAt(4))*17/255};case 7:return{red:(_(r.charCodeAt(1))*16+_(r.charCodeAt(2)))/255,green:(_(r.charCodeAt(3))*16+_(r.charCodeAt(4)))/255,blue:(_(r.charCodeAt(5))*16+_(r.charCodeAt(6)))/255,alpha:1};case 9:return{red:(_(r.charCodeAt(1))*16+_(r.charCodeAt(2)))/255,green:(_(r.charCodeAt(3))*16+_(r.charCodeAt(4)))/255,blue:(_(r.charCodeAt(5))*16+_(r.charCodeAt(6)))/255,alpha:(_(r.charCodeAt(7))*16+_(r.charCodeAt(8)))/255}}return null}function On(r,e,t,n=1){if(r=r/60,e===0)return{red:t,green:t,blue:t,alpha:n};{const i=(c,l,h)=>{for(;h<0;)h+=6;for(;h>=6;)h-=6;return h<1?(l-c)*h+c:h<3?l:h<4?(l-c)*(4-h)+c:c},s=t<=.5?t*(e+1):t+e-t*e,a=t*2-s;return{red:i(a,s,r+2),green:i(a,s,r),blue:i(a,s,r-2),alpha:n}}}function Pn(r){const e=r.red,t=r.green,n=r.blue,i=r.alpha,s=Math.max(e,t,n),a=Math.min(e,t,n);let c=0,l=0;const h=(a+s)/2,m=s-a;if(m>0){switch(l=Math.min(h<=.5?m/(2*h):m/(2-2*h),1),s){case e:c=(t-n)/m+(t<n?6:0);break;case t:c=(n-e)/m+2;break;case n:c=(e-t)/m+4;break}c*=60,c=Math.round(c)}return{h:c,s:l,l:h,a:i}}function Ti(r,e,t,n=1){if(e+t>=1){const l=e/(e+t);return{red:l,green:l,blue:l,alpha:n}}const i=On(r,1,.5,n);let s=i.red;s*=1-e-t,s+=e;let a=i.green;a*=1-e-t,a+=e;let c=i.blue;return c*=1-e-t,c+=e,{red:s,green:a,blue:c,alpha:n}}function Ai(r){const e=Pn(r),t=Math.min(r.red,r.green,r.blue),n=1-Math.max(r.red,r.green,r.blue);return{h:e.h,w:t,b:n,a:e.a}}function Ni(r){if(r.type===p.HexColorValue){const e=r.getText();return Mn(e)}else if(r.type===p.Function){const e=r,t=e.getName();let n=e.getArguments().getChildren();if(n.length===1){const i=n[0].getChildren();if(i.length===1&&i[0].type===p.Expression&&(n=i[0].getChildren(),n.length===3)){const s=n[2];if(s instanceof ft){const a=s.getLeft(),c=s.getRight(),l=s.getOperator();a&&c&&l&&l.matches("/")&&(n=[n[0],n[1],a,c])}}}if(!t||n.length<3||n.length>4)return null;try{const i=n.length===4?re(n[3],1):1;if(t==="rgb"||t==="rgba")return{red:re(n[0],255),green:re(n[1],255),blue:re(n[2],255),alpha:i};if(t==="hsl"||t==="hsla"){const s=Dn(n[0]),a=re(n[1],100),c=re(n[2],100);return On(s,a,c,i)}else if(t==="hwb"){const s=Dn(n[0]),a=re(n[1],100),c=re(n[2],100);return Ti(s,a,c,i)}}catch{return null}}else if(r.type===p.Identifier){if(r.parent&&r.parent.type!==p.Term)return null;const e=r.parent;if(e&&e.parent&&e.parent.type===p.BinaryExpression){const i=e.parent;if(i.parent&&i.parent.type===p.ListEntry&&i.parent.key===i)return null}const t=r.getText().toLowerCase();if(t==="none")return null;const n=Be[t];if(n)return Mn(n)}return null}const Tn={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."},An={"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."},Nn={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."},Wi=["medium","thick","thin"],Wn={"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."},Ln={"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."},$n={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."},Un={"var()":"Evaluates the value of a custom variable.","calc()":"Evaluates an mathematical expression. The following operators can be used: + - * /."},Vn={"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()":"Repeat