UNPKG

oimp

Version:

A CLI tool for generating OI problem and packages

10 lines 777 kB
"use strict";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ define("vs/language/css/cssWorker", ["require","require"],(require)=>{ var moduleExports=(()=>{var $n=Object.defineProperty;var ds=Object.getOwnPropertyDescriptor;var hs=Object.getOwnPropertyNames;var ps=Object.prototype.hasOwnProperty;var us=(n,e)=>{for(var t in e)$n(n,t,{get:e[t],enumerable:!0})},ms=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of hs(e))!ps.call(n,i)&&i!==t&&$n(n,i,{get:()=>e[i],enumerable:!(r=ds(e,i))||r.enumerable});return n};var fs=n=>ms($n({},"__esModule",{value:!0}),n);var sl={};us(sl,{CSSWorker:()=>Vn,create:()=>ol});var d;(function(n){n[n.Ident=0]="Ident",n[n.AtKeyword=1]="AtKeyword",n[n.String=2]="String",n[n.BadString=3]="BadString",n[n.UnquotedString=4]="UnquotedString",n[n.Hash=5]="Hash",n[n.Num=6]="Num",n[n.Percentage=7]="Percentage",n[n.Dimension=8]="Dimension",n[n.UnicodeRange=9]="UnicodeRange",n[n.CDO=10]="CDO",n[n.CDC=11]="CDC",n[n.Colon=12]="Colon",n[n.SemiColon=13]="SemiColon",n[n.CurlyL=14]="CurlyL",n[n.CurlyR=15]="CurlyR",n[n.ParenthesisL=16]="ParenthesisL",n[n.ParenthesisR=17]="ParenthesisR",n[n.BracketL=18]="BracketL",n[n.BracketR=19]="BracketR",n[n.Whitespace=20]="Whitespace",n[n.Includes=21]="Includes",n[n.Dashmatch=22]="Dashmatch",n[n.SubstringOperator=23]="SubstringOperator",n[n.PrefixOperator=24]="PrefixOperator",n[n.SuffixOperator=25]="SuffixOperator",n[n.Delim=26]="Delim",n[n.EMS=27]="EMS",n[n.EXS=28]="EXS",n[n.Length=29]="Length",n[n.Angle=30]="Angle",n[n.Time=31]="Time",n[n.Freq=32]="Freq",n[n.Exclamation=33]="Exclamation",n[n.Resolution=34]="Resolution",n[n.Comma=35]="Comma",n[n.Charset=36]="Charset",n[n.EscapedJavaScript=37]="EscapedJavaScript",n[n.BadEscapedJavaScript=38]="BadEscapedJavaScript",n[n.Comment=39]="Comment",n[n.SingleLineComment=40]="SingleLineComment",n[n.EOF=41]="EOF",n[n.CustomToken=42]="CustomToken"})(d||(d={}));var Kr=function(){function n(e){this.source=e,this.len=e.length,this.position=0}return n.prototype.substring=function(e,t){return t===void 0&&(t=this.position),this.source.substring(e,t)},n.prototype.eos=function(){return this.len<=this.position},n.prototype.pos=function(){return this.position},n.prototype.goBackTo=function(e){this.position=e},n.prototype.goBack=function(e){this.position-=e},n.prototype.advance=function(e){this.position+=e},n.prototype.nextChar=function(){return this.source.charCodeAt(this.position++)||0},n.prototype.peekChar=function(e){return e===void 0&&(e=0),this.source.charCodeAt(this.position+e)||0},n.prototype.lookbackChar=function(e){return e===void 0&&(e=0),this.source.charCodeAt(this.position-e)||0},n.prototype.advanceIfChar=function(e){return e===this.source.charCodeAt(this.position)?(this.position++,!0):!1},n.prototype.advanceIfChars=function(e){if(this.position+e.length>this.source.length)return!1;for(var t=0;t<e.length;t++)if(this.source.charCodeAt(this.position+t)!==e[t])return!1;return this.advance(t),!0},n.prototype.advanceWhileChar=function(e){for(var t=this.position;this.position<this.len&&e(this.source.charCodeAt(this.position));)this.position++;return this.position-t},n}();var nn="a".charCodeAt(0),Gr="f".charCodeAt(0),Hr="z".charCodeAt(0),ll="u".charCodeAt(0),rn="A".charCodeAt(0),Jr="F".charCodeAt(0),Xr="Z".charCodeAt(0),kt="0".charCodeAt(0),Ct="9".charCodeAt(0),gs="~".charCodeAt(0),bs="^".charCodeAt(0),_t="=".charCodeAt(0),vs="|".charCodeAt(0),Ye="-".charCodeAt(0),Yr="_".charCodeAt(0),ys="%".charCodeAt(0),qn="*".charCodeAt(0),ri="(".charCodeAt(0),ii=")".charCodeAt(0),ws="<".charCodeAt(0),xs=">".charCodeAt(0),Ss="@".charCodeAt(0),ks="#".charCodeAt(0),Cs="$".charCodeAt(0),Kn="\\".charCodeAt(0),Qr="/".charCodeAt(0),at=` `.charCodeAt(0),lt="\r".charCodeAt(0),Ft="\f".charCodeAt(0),Zr='"'.charCodeAt(0),ei="'".charCodeAt(0),Gn=" ".charCodeAt(0),Hn=" ".charCodeAt(0),_s=";".charCodeAt(0),Fs=":".charCodeAt(0),Es="{".charCodeAt(0),Ds="}".charCodeAt(0),zs="[".charCodeAt(0),Rs="]".charCodeAt(0),Is=",".charCodeAt(0),ti=".".charCodeAt(0),ni="!".charCodeAt(0),Ms="?".charCodeAt(0),Ts="+".charCodeAt(0),_e={};_e[_s]=d.SemiColon;_e[Fs]=d.Colon;_e[Es]=d.CurlyL;_e[Ds]=d.CurlyR;_e[Rs]=d.BracketR;_e[zs]=d.BracketL;_e[ri]=d.ParenthesisL;_e[ii]=d.ParenthesisR;_e[Is]=d.Comma;var X={};X.em=d.EMS;X.ex=d.EXS;X.px=d.Length;X.cm=d.Length;X.mm=d.Length;X.in=d.Length;X.pt=d.Length;X.pc=d.Length;X.deg=d.Angle;X.rad=d.Angle;X.grad=d.Angle;X.ms=d.Time;X.s=d.Time;X.hz=d.Freq;X.khz=d.Freq;X["%"]=d.Percentage;X.fr=d.Percentage;X.dpi=d.Resolution;X.dpcm=d.Resolution;var Fe=function(){function n(){this.stream=new Kr(""),this.ignoreComment=!0,this.ignoreWhitespace=!0,this.inURL=!1}return n.prototype.setSource=function(e){this.stream=new Kr(e)},n.prototype.finishToken=function(e,t,r){return{offset:e,len:this.stream.pos()-e,type:t,text:r||this.stream.substring(e)}},n.prototype.substring=function(e,t){return this.stream.substring(e,e+t)},n.prototype.pos=function(){return this.stream.pos()},n.prototype.goBackTo=function(e){this.stream.goBackTo(e)},n.prototype.scanUnquotedString=function(){var e=this.stream.pos(),t=[];return this._unquotedString(t)?this.finishToken(e,d.UnquotedString,t.join("")):null},n.prototype.scan=function(){var e=this.trivia();if(e!==null)return e;var t=this.stream.pos();return this.stream.eos()?this.finishToken(t,d.EOF):this.scanNext(t)},n.prototype.tryScanUnicode=function(){var e=this.stream.pos();if(!this.stream.eos()&&this._unicodeRange())return this.finishToken(e,d.UnicodeRange);this.stream.goBackTo(e)},n.prototype.scanNext=function(e){if(this.stream.advanceIfChars([ws,ni,Ye,Ye]))return this.finishToken(e,d.CDO);if(this.stream.advanceIfChars([Ye,Ye,xs]))return this.finishToken(e,d.CDC);var t=[];if(this.ident(t))return this.finishToken(e,d.Ident,t.join(""));if(this.stream.advanceIfChar(Ss))if(t=["@"],this._name(t)){var r=t.join("");return r==="@charset"?this.finishToken(e,d.Charset,r):this.finishToken(e,d.AtKeyword,r)}else return this.finishToken(e,d.Delim);if(this.stream.advanceIfChar(ks))return t=["#"],this._name(t)?this.finishToken(e,d.Hash,t.join("")):this.finishToken(e,d.Delim);if(this.stream.advanceIfChar(ni))return this.finishToken(e,d.Exclamation);if(this._number()){var i=this.stream.pos();if(t=[this.stream.substring(e,i)],this.stream.advanceIfChar(ys))return this.finishToken(e,d.Percentage);if(this.ident(t)){var o=this.stream.substring(i).toLowerCase(),s=X[o];return typeof s<"u"?this.finishToken(e,s,t.join("")):this.finishToken(e,d.Dimension,t.join(""))}return this.finishToken(e,d.Num)}t=[];var a=this._string(t);return a!==null?this.finishToken(e,a,t.join("")):(a=_e[this.stream.peekChar()],typeof a<"u"?(this.stream.advance(1),this.finishToken(e,a)):this.stream.peekChar(0)===gs&&this.stream.peekChar(1)===_t?(this.stream.advance(2),this.finishToken(e,d.Includes)):this.stream.peekChar(0)===vs&&this.stream.peekChar(1)===_t?(this.stream.advance(2),this.finishToken(e,d.Dashmatch)):this.stream.peekChar(0)===qn&&this.stream.peekChar(1)===_t?(this.stream.advance(2),this.finishToken(e,d.SubstringOperator)):this.stream.peekChar(0)===bs&&this.stream.peekChar(1)===_t?(this.stream.advance(2),this.finishToken(e,d.PrefixOperator)):this.stream.peekChar(0)===Cs&&this.stream.peekChar(1)===_t?(this.stream.advance(2),this.finishToken(e,d.SuffixOperator)):(this.stream.nextChar(),this.finishToken(e,d.Delim)))},n.prototype.trivia=function(){for(;;){var e=this.stream.pos();if(this._whitespace()){if(!this.ignoreWhitespace)return this.finishToken(e,d.Whitespace)}else if(this.comment()){if(!this.ignoreComment)return this.finishToken(e,d.Comment)}else return null}},n.prototype.comment=function(){if(this.stream.advanceIfChars([Qr,qn])){var e=!1,t=!1;return this.stream.advanceWhileChar(function(r){return t&&r===Qr?(e=!0,!1):(t=r===qn,!0)}),e&&this.stream.advance(1),!0}return!1},n.prototype._number=function(){var e=0,t;return this.stream.peekChar()===ti&&(e=1),t=this.stream.peekChar(e),t>=kt&&t<=Ct?(this.stream.advance(e+1),this.stream.advanceWhileChar(function(r){return r>=kt&&r<=Ct||e===0&&r===ti}),!0):!1},n.prototype._newline=function(e){var t=this.stream.peekChar();switch(t){case lt:case Ft:case at:return this.stream.advance(1),e.push(String.fromCharCode(t)),t===lt&&this.stream.advanceIfChar(at)&&e.push(` `),!0}return!1},n.prototype._escape=function(e,t){var r=this.stream.peekChar();if(r===Kn){this.stream.advance(1),r=this.stream.peekChar();for(var i=0;i<6&&(r>=kt&&r<=Ct||r>=nn&&r<=Gr||r>=rn&&r<=Jr);)this.stream.advance(1),r=this.stream.peekChar(),i++;if(i>0){try{var o=parseInt(this.stream.substring(this.stream.pos()-i),16);o&&e.push(String.fromCharCode(o))}catch{}return r===Gn||r===Hn?this.stream.advance(1):this._newline([]),!0}if(r!==lt&&r!==Ft&&r!==at)return this.stream.advance(1),e.push(String.fromCharCode(r)),!0;if(t)return this._newline(e)}return!1},n.prototype._stringChar=function(e,t){var r=this.stream.peekChar();return r!==0&&r!==e&&r!==Kn&&r!==lt&&r!==Ft&&r!==at?(this.stream.advance(1),t.push(String.fromCharCode(r)),!0):!1},n.prototype._string=function(e){if(this.stream.peekChar()===ei||this.stream.peekChar()===Zr){var 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)),d.String):d.BadString}return null},n.prototype._unquotedChar=function(e){var t=this.stream.peekChar();return t!==0&&t!==Kn&&t!==ei&&t!==Zr&&t!==ri&&t!==ii&&t!==Gn&&t!==Hn&&t!==at&&t!==Ft&&t!==lt?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1},n.prototype._unquotedString=function(e){for(var t=!1;this._unquotedChar(e)||this._escape(e);)t=!0;return t},n.prototype._whitespace=function(){var e=this.stream.advanceWhileChar(function(t){return t===Gn||t===Hn||t===at||t===Ft||t===lt});return e>0},n.prototype._name=function(e){for(var t=!1;this._identChar(e)||this._escape(e);)t=!0;return t},n.prototype.ident=function(e){var t=this.stream.pos(),r=this._minus(e);if(r){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},n.prototype._identFirstChar=function(e){var t=this.stream.peekChar();return t===Yr||t>=nn&&t<=Hr||t>=rn&&t<=Xr||t>=128&&t<=65535?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1},n.prototype._minus=function(e){var t=this.stream.peekChar();return t===Ye?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1},n.prototype._identChar=function(e){var t=this.stream.peekChar();return t===Yr||t===Ye||t>=nn&&t<=Hr||t>=rn&&t<=Xr||t>=kt&&t<=Ct||t>=128&&t<=65535?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1},n.prototype._unicodeRange=function(){if(this.stream.advanceIfChar(Ts)){var e=function(i){return i>=kt&&i<=Ct||i>=nn&&i<=Gr||i>=rn&&i<=Jr},t=this.stream.advanceWhileChar(e)+this.stream.advanceWhileChar(function(i){return i===Ms});if(t>=1&&t<=6)if(this.stream.advanceIfChar(Ye)){var r=this.stream.advanceWhileChar(e);if(r>=1&&r<=6)return!0}else return!0}return!1},n}();function q(n,e){if(n.length<e.length)return!1;for(var t=0;t<e.length;t++)if(n[t]!==e[t])return!1;return!0}function on(n,e){var t=n.length-e.length;return t>0?n.lastIndexOf(e)===t:t===0?n===e:!1}function oi(n,e,t){t===void 0&&(t=4);var r=Math.abs(n.length-e.length);if(r>t)return 0;var i=[],o=[],s,a;for(s=0;s<e.length+1;++s)o.push(0);for(s=0;s<n.length+1;++s)i.push(o);for(s=1;s<n.length+1;++s)for(a=1;a<e.length+1;++a)n[s-1]===e[a-1]?i[s][a]=i[s-1][a-1]+1:i[s][a]=Math.max(i[s-1][a],i[s][a-1]);return i[n.length][e.length]-Math.sqrt(r)}function Jn(n,e){return e===void 0&&(e=!0),n?n.length<140?n:n.slice(0,140)+(e?"\u2026":""):""}function si(n,e){var t=e.exec(n);return t&&t[0].length?n.substr(0,n.length-t[0].length):n}function Xn(n,e){for(var t="";e>0;)(e&1)===1&&(t+=n),n+=n,e=e>>>1;return t}var E=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),u;(function(n){n[n.Undefined=0]="Undefined",n[n.Identifier=1]="Identifier",n[n.Stylesheet=2]="Stylesheet",n[n.Ruleset=3]="Ruleset",n[n.Selector=4]="Selector",n[n.SimpleSelector=5]="SimpleSelector",n[n.SelectorInterpolation=6]="SelectorInterpolation",n[n.SelectorCombinator=7]="SelectorCombinator",n[n.SelectorCombinatorParent=8]="SelectorCombinatorParent",n[n.SelectorCombinatorSibling=9]="SelectorCombinatorSibling",n[n.SelectorCombinatorAllSiblings=10]="SelectorCombinatorAllSiblings",n[n.SelectorCombinatorShadowPiercingDescendant=11]="SelectorCombinatorShadowPiercingDescendant",n[n.Page=12]="Page",n[n.PageBoxMarginBox=13]="PageBoxMarginBox",n[n.ClassSelector=14]="ClassSelector",n[n.IdentifierSelector=15]="IdentifierSelector",n[n.ElementNameSelector=16]="ElementNameSelector",n[n.PseudoSelector=17]="PseudoSelector",n[n.AttributeSelector=18]="AttributeSelector",n[n.Declaration=19]="Declaration",n[n.Declarations=20]="Declarations",n[n.Property=21]="Property",n[n.Expression=22]="Expression",n[n.BinaryExpression=23]="BinaryExpression",n[n.Term=24]="Term",n[n.Operator=25]="Operator",n[n.Value=26]="Value",n[n.StringLiteral=27]="StringLiteral",n[n.URILiteral=28]="URILiteral",n[n.EscapedValue=29]="EscapedValue",n[n.Function=30]="Function",n[n.NumericValue=31]="NumericValue",n[n.HexColorValue=32]="HexColorValue",n[n.RatioValue=33]="RatioValue",n[n.MixinDeclaration=34]="MixinDeclaration",n[n.MixinReference=35]="MixinReference",n[n.VariableName=36]="VariableName",n[n.VariableDeclaration=37]="VariableDeclaration",n[n.Prio=38]="Prio",n[n.Interpolation=39]="Interpolation",n[n.NestedProperties=40]="NestedProperties",n[n.ExtendsReference=41]="ExtendsReference",n[n.SelectorPlaceholder=42]="SelectorPlaceholder",n[n.Debug=43]="Debug",n[n.If=44]="If",n[n.Else=45]="Else",n[n.For=46]="For",n[n.Each=47]="Each",n[n.While=48]="While",n[n.MixinContentReference=49]="MixinContentReference",n[n.MixinContentDeclaration=50]="MixinContentDeclaration",n[n.Media=51]="Media",n[n.Keyframe=52]="Keyframe",n[n.FontFace=53]="FontFace",n[n.Import=54]="Import",n[n.Namespace=55]="Namespace",n[n.Invocation=56]="Invocation",n[n.FunctionDeclaration=57]="FunctionDeclaration",n[n.ReturnStatement=58]="ReturnStatement",n[n.MediaQuery=59]="MediaQuery",n[n.MediaCondition=60]="MediaCondition",n[n.MediaFeature=61]="MediaFeature",n[n.FunctionParameter=62]="FunctionParameter",n[n.FunctionArgument=63]="FunctionArgument",n[n.KeyframeSelector=64]="KeyframeSelector",n[n.ViewPort=65]="ViewPort",n[n.Document=66]="Document",n[n.AtApplyRule=67]="AtApplyRule",n[n.CustomPropertyDeclaration=68]="CustomPropertyDeclaration",n[n.CustomPropertySet=69]="CustomPropertySet",n[n.ListEntry=70]="ListEntry",n[n.Supports=71]="Supports",n[n.SupportsCondition=72]="SupportsCondition",n[n.NamespacePrefix=73]="NamespacePrefix",n[n.GridLine=74]="GridLine",n[n.Plugin=75]="Plugin",n[n.UnknownAtRule=76]="UnknownAtRule",n[n.Use=77]="Use",n[n.ModuleConfiguration=78]="ModuleConfiguration",n[n.Forward=79]="Forward",n[n.ForwardVisibility=80]="ForwardVisibility",n[n.Module=81]="Module",n[n.UnicodeRange=82]="UnicodeRange"})(u||(u={}));var A;(function(n){n[n.Mixin=0]="Mixin",n[n.Rule=1]="Rule",n[n.Variable=2]="Variable",n[n.Function=3]="Function",n[n.Keyframe=4]="Keyframe",n[n.Unknown=5]="Unknown",n[n.Module=6]="Module",n[n.Forward=7]="Forward",n[n.ForwardVisibility=8]="ForwardVisibility"})(A||(A={}));function sn(n,e){var t=null;return!n||e<n.offset||e>n.end?null:(n.accept(function(r){return r.offset===-1&&r.length===-1?!0:r.offset<=e&&r.end>=e?(t?r.length<=t.length&&(t=r):t=r,!0):!1}),t)}function ct(n,e){for(var t=sn(n,e),r=[];t;)r.unshift(t),t=t.parent;return r}function ai(n){var e=n.findParent(u.Declaration),t=e&&e.getValue();return t&&t.encloses(n)?e:null}var F=function(){function n(e,t,r){e===void 0&&(e=-1),t===void 0&&(t=-1),this.parent=null,this.offset=e,this.length=t,r&&(this.nodeType=r)}return Object.defineProperty(n.prototype,"end",{get:function(){return this.offset+this.length},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"type",{get:function(){return this.nodeType||u.Undefined},set:function(e){this.nodeType=e},enumerable:!1,configurable:!0}),n.prototype.getTextProvider=function(){for(var e=this;e&&!e.textProvider;)e=e.parent;return e?e.textProvider:function(){return"unknown"}},n.prototype.getText=function(){return this.getTextProvider()(this.offset,this.length)},n.prototype.matches=function(e){return this.length===e.length&&this.getTextProvider()(this.offset,this.length)===e},n.prototype.startsWith=function(e){return this.length>=e.length&&this.getTextProvider()(this.offset,e.length)===e},n.prototype.endsWith=function(e){return this.length>=e.length&&this.getTextProvider()(this.end-e.length,e.length)===e},n.prototype.accept=function(e){if(e(this)&&this.children)for(var t=0,r=this.children;t<r.length;t++){var i=r[t];i.accept(e)}},n.prototype.acceptVisitor=function(e){this.accept(e.visitNode.bind(e))},n.prototype.adoptChild=function(e,t){if(t===void 0&&(t=-1),e.parent&&e.parent.children){var r=e.parent.children.indexOf(e);r>=0&&e.parent.children.splice(r,1)}e.parent=this;var i=this.children;return i||(i=this.children=[]),t!==-1?i.splice(t,0,e):i.push(e),e},n.prototype.attachTo=function(e,t){return t===void 0&&(t=-1),e&&e.adoptChild(this,t),this},n.prototype.collectIssues=function(e){this.issues&&e.push.apply(e,this.issues)},n.prototype.addIssue=function(e){this.issues||(this.issues=[]),this.issues.push(e)},n.prototype.hasIssue=function(e){return Array.isArray(this.issues)&&this.issues.some(function(t){return t.getRule()===e})},n.prototype.isErroneous=function(e){return e===void 0&&(e=!1),this.issues&&this.issues.length>0?!0:e&&Array.isArray(this.children)&&this.children.some(function(t){return t.isErroneous(!0)})},n.prototype.setNode=function(e,t,r){return r===void 0&&(r=-1),t?(t.attachTo(this,r),this[e]=t,!0):!1},n.prototype.addChild=function(e){return e?(this.children||(this.children=[]),e.attachTo(this),this.updateOffsetAndLength(e),!0):!1},n.prototype.updateOffsetAndLength=function(e){(e.offset<this.offset||this.offset===-1)&&(this.offset=e.offset);var t=e.end;(t>this.end||this.length===-1)&&(this.length=t-this.offset)},n.prototype.hasChildren=function(){return!!this.children&&this.children.length>0},n.prototype.getChildren=function(){return this.children?this.children.slice(0):[]},n.prototype.getChild=function(e){return this.children&&e<this.children.length?this.children[e]:null},n.prototype.addChildren=function(e){for(var t=0,r=e;t<r.length;t++){var i=r[t];this.addChild(i)}},n.prototype.findFirstChildBeforeOffset=function(e){if(this.children){for(var t=null,r=this.children.length-1;r>=0;r--)if(t=this.children[r],t.offset<=e)return t}return null},n.prototype.findChildAtOffset=function(e,t){var r=this.findFirstChildBeforeOffset(e);return r&&r.end>=e?t&&r.findChildAtOffset(e,!0)||r:null},n.prototype.encloses=function(e){return this.offset<=e.offset&&this.offset+this.length>=e.offset+e.length},n.prototype.getParent=function(){for(var e=this.parent;e instanceof ee;)e=e.parent;return e},n.prototype.findParent=function(e){for(var t=this;t&&t.type!==e;)t=t.parent;return t},n.prototype.findAParent=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=this;r&&!e.some(function(i){return r.type===i});)r=r.parent;return r},n.prototype.setData=function(e,t){this.options||(this.options={}),this.options[e]=t},n.prototype.getData=function(e){return!this.options||!this.options.hasOwnProperty(e)?null:this.options[e]},n}();var ee=function(n){E(e,n);function e(t,r){r===void 0&&(r=-1);var i=n.call(this,-1,-1)||this;return i.attachTo(t,r),i.offset=-1,i.length=-1,i}return e}(F);var li=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.UnicodeRange},enumerable:!1,configurable:!0}),e.prototype.setRangeStart=function(t){return this.setNode("rangeStart",t)},e.prototype.getRangeStart=function(){return this.rangeStart},e.prototype.setRangeEnd=function(t){return this.setNode("rangeEnd",t)},e.prototype.getRangeEnd=function(){return this.rangeEnd},e}(F);var te=function(n){E(e,n);function e(t,r){var i=n.call(this,t,r)||this;return i.isCustomProperty=!1,i}return Object.defineProperty(e.prototype,"type",{get:function(){return u.Identifier},enumerable:!1,configurable:!0}),e.prototype.containsInterpolation=function(){return this.hasChildren()},e}(F);var ci=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.Stylesheet},enumerable:!1,configurable:!0}),e}(F);var Et=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.Declarations},enumerable:!1,configurable:!0}),e}(F);var K=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return e.prototype.getDeclarations=function(){return this.declarations},e.prototype.setDeclarations=function(t){return this.setNode("declarations",t)},e}(F);var Te=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.Ruleset},enumerable:!1,configurable:!0}),e.prototype.getSelectors=function(){return this.selectors||(this.selectors=new ee(this)),this.selectors},e.prototype.isNested=function(){return!!this.parent&&this.parent.findParent(u.Declarations)!==null},e}(K);var Ee=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.Selector},enumerable:!1,configurable:!0}),e}(F);var De=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.SimpleSelector},enumerable:!1,configurable:!0}),e}(F);var dl=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.AtApplyRule},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e}(F);var an=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return e}(F);var di=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.CustomPropertySet},enumerable:!1,configurable:!0}),e}(K);var ae=function(n){E(e,n);function e(t,r){var i=n.call(this,t,r)||this;return i.property=null,i}return Object.defineProperty(e.prototype,"type",{get:function(){return u.Declaration},enumerable:!1,configurable:!0}),e.prototype.setProperty=function(t){return this.setNode("property",t)},e.prototype.getProperty=function(){return this.property},e.prototype.getFullPropertyName=function(){var t=this.property?this.property.getName():"unknown";if(this.parent instanceof Et&&this.parent.getParent()instanceof Yn){var r=this.parent.getParent().getParent();if(r instanceof e)return r.getFullPropertyName()+t}return t},e.prototype.getNonPrefixedPropertyName=function(){var t=this.getFullPropertyName();if(t&&t.charAt(0)==="-"){var r=t.indexOf("-",1);if(r!==-1)return t.substring(r+1)}return t},e.prototype.setValue=function(t){return this.setNode("value",t)},e.prototype.getValue=function(){return this.value},e.prototype.setNestedProperties=function(t){return this.setNode("nestedProperties",t)},e.prototype.getNestedProperties=function(){return this.nestedProperties},e}(an);var hi=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.CustomPropertyDeclaration},enumerable:!1,configurable:!0}),e.prototype.setPropertySet=function(t){return this.setNode("propertySet",t)},e.prototype.getPropertySet=function(){return this.propertySet},e}(ae);var dt=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.Property},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return si(this.getText(),/[_\+]+$/)},e.prototype.isCustomProperty=function(){return!!this.identifier&&this.identifier.isCustomProperty},e}(F);var Ns=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.Invocation},enumerable:!1,configurable:!0}),e.prototype.getArguments=function(){return this.arguments||(this.arguments=new ee(this)),this.arguments},e}(F);var Pe=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.Function},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e}(Ns);var Be=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.FunctionParameter},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e.prototype.setDefaultValue=function(t){return this.setNode("defaultValue",t,0)},e.prototype.getDefaultValue=function(){return this.defaultValue},e}(F);var we=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.FunctionArgument},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e.prototype.setValue=function(t){return this.setNode("value",t,0)},e.prototype.getValue=function(){return this.value},e}(F);var pi=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.If},enumerable:!1,configurable:!0}),e.prototype.setExpression=function(t){return this.setNode("expression",t,0)},e.prototype.setElseClause=function(t){return this.setNode("elseClause",t)},e}(K);var ui=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.For},enumerable:!1,configurable:!0}),e.prototype.setVariable=function(t){return this.setNode("variable",t,0)},e}(K);var mi=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.Each},enumerable:!1,configurable:!0}),e.prototype.getVariables=function(){return this.variables||(this.variables=new ee(this)),this.variables},e}(K);var fi=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.While},enumerable:!1,configurable:!0}),e}(K);var gi=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.Else},enumerable:!1,configurable:!0}),e}(K);var Qe=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.FunctionDeclaration},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e.prototype.getParameters=function(){return this.parameters||(this.parameters=new ee(this)),this.parameters},e}(K);var bi=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.ViewPort},enumerable:!1,configurable:!0}),e}(K);var ln=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.FontFace},enumerable:!1,configurable:!0}),e}(K);var Yn=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.NestedProperties},enumerable:!1,configurable:!0}),e}(K);var cn=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.Keyframe},enumerable:!1,configurable:!0}),e.prototype.setKeyword=function(t){return this.setNode("keyword",t,0)},e.prototype.getKeyword=function(){return this.keyword},e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e}(K);var Qn=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.KeyframeSelector},enumerable:!1,configurable:!0}),e}(K);var ht=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.Import},enumerable:!1,configurable:!0}),e.prototype.setMedialist=function(t){return t?(t.attachTo(this),!0):!1},e}(F);var vi=function(n){E(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.Use},enumerable:!1,configurable:!0}),e.prototype.getParameters=function(){return this.parameters||(this.parameters=new ee(this)),this.parameters},e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e}(F);var yi=function(n){E(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.ModuleConfiguration},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e.prototype.setValue=function(t){return this.setNode("value",t,0)},e.prototype.getValue=function(){return this.value},e}(F);var wi=function(n){E(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.Forward},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getMembers=function(){return this.members||(this.members=new ee(this)),this.members},e.prototype.getParameters=function(){return this.parameters||(this.parameters=new ee(this)),this.parameters},e}(F);var xi=function(n){E(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.ForwardVisibility},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e}(F);var Si=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.Namespace},enumerable:!1,configurable:!0}),e}(F);var dn=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.Media},enumerable:!1,configurable:!0}),e}(K);var Dt=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.Supports},enumerable:!1,configurable:!0}),e}(K);var ki=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.Document},enumerable:!1,configurable:!0}),e}(K);var hn=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return e.prototype.getMediums=function(){return this.mediums||(this.mediums=new ee(this)),this.mediums},e}(F);var pn=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.MediaQuery},enumerable:!1,configurable:!0}),e}(F);var Ci=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.MediaCondition},enumerable:!1,configurable:!0}),e}(F);var _i=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.MediaFeature},enumerable:!1,configurable:!0}),e}(F);var Ze=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.SupportsCondition},enumerable:!1,configurable:!0}),e}(F);var Fi=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.Page},enumerable:!1,configurable:!0}),e}(K);var Ei=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.PageBoxMarginBox},enumerable:!1,configurable:!0}),e}(K);var un=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.Expression},enumerable:!1,configurable:!0}),e}(F);var pt=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.BinaryExpression},enumerable:!1,configurable:!0}),e.prototype.setLeft=function(t){return this.setNode("left",t)},e.prototype.getLeft=function(){return this.left},e.prototype.setRight=function(t){return this.setNode("right",t)},e.prototype.getRight=function(){return this.right},e.prototype.setOperator=function(t){return this.setNode("operator",t)},e.prototype.getOperator=function(){return this.operator},e}(F);var Di=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.Term},enumerable:!1,configurable:!0}),e.prototype.setOperator=function(t){return this.setNode("operator",t)},e.prototype.getOperator=function(){return this.operator},e.prototype.setExpression=function(t){return this.setNode("expression",t)},e.prototype.getExpression=function(){return this.expression},e}(F);var zi=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.AttributeSelector},enumerable:!1,configurable:!0}),e.prototype.setNamespacePrefix=function(t){return this.setNode("namespacePrefix",t)},e.prototype.getNamespacePrefix=function(){return this.namespacePrefix},e.prototype.setIdentifier=function(t){return this.setNode("identifier",t)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.setOperator=function(t){return this.setNode("operator",t)},e.prototype.getOperator=function(){return this.operator},e.prototype.setValue=function(t){return this.setNode("value",t)},e.prototype.getValue=function(){return this.value},e}(F);var hl=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.Operator},enumerable:!1,configurable:!0}),e}(F);var zt=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.HexColorValue},enumerable:!1,configurable:!0}),e}(F);var Ri=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.RatioValue},enumerable:!1,configurable:!0}),e}(F);var Os=".".charCodeAt(0),Ws="0".charCodeAt(0),Ls="9".charCodeAt(0),Rt=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.NumericValue},enumerable:!1,configurable:!0}),e.prototype.getValue=function(){for(var t=this.getText(),r=0,i,o=0,s=t.length;o<s&&(i=t.charCodeAt(o),Ws<=i&&i<=Ls||i===Os);o++)r+=1;return{value:t.substring(0,r),unit:r<t.length?t.substring(r):void 0}},e}(F);var $e=function(n){E(e,n);function e(t,r){var i=n.call(this,t,r)||this;return i.variable=null,i.value=null,i.needsSemicolon=!0,i}return Object.defineProperty(e.prototype,"type",{get:function(){return u.VariableDeclaration},enumerable:!1,configurable:!0}),e.prototype.setVariable=function(t){return t?(t.attachTo(this),this.variable=t,!0):!1},e.prototype.getVariable=function(){return this.variable},e.prototype.getName=function(){return this.variable?this.variable.getName():""},e.prototype.setValue=function(t){return t?(t.attachTo(this),this.value=t,!0):!1},e.prototype.getValue=function(){return this.value},e}(an);var It=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.Interpolation},enumerable:!1,configurable:!0}),e}(F);var ut=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.VariableName},enumerable:!1,configurable:!0}),e.prototype.getName=function(){return this.getText()},e}(F);var qe=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.ExtendsReference},enumerable:!1,configurable:!0}),e.prototype.getSelectors=function(){return this.selectors||(this.selectors=new ee(this)),this.selectors},e}(F);var Ii=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.MixinContentReference},enumerable:!1,configurable:!0}),e.prototype.getArguments=function(){return this.arguments||(this.arguments=new ee(this)),this.arguments},e}(F);var Mi=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.MixinContentReference},enumerable:!1,configurable:!0}),e.prototype.getParameters=function(){return this.parameters||(this.parameters=new ee(this)),this.parameters},e}(K);var et=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.MixinReference},enumerable:!1,configurable:!0}),e.prototype.getNamespaces=function(){return this.namespaces||(this.namespaces=new ee(this)),this.namespaces},e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e.prototype.getArguments=function(){return this.arguments||(this.arguments=new ee(this)),this.arguments},e.prototype.setContent=function(t){return this.setNode("content",t)},e.prototype.getContent=function(){return this.content},e}(F);var Ae=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.MixinDeclaration},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e.prototype.getParameters=function(){return this.parameters||(this.parameters=new ee(this)),this.parameters},e.prototype.setGuard=function(t){return t&&(t.attachTo(this),this.guard=t),!1},e}(K);var mn=function(n){E(e,n);function e(t,r){return n.call(this,t,r)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.UnknownAtRule},enumerable:!1,configurable:!0}),e.prototype.setAtRuleName=function(t){this.atRuleName=t},e.prototype.getAtRuleName=function(){return this.atRuleName},e}(K);var Ti=function(n){E(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.ListEntry},enumerable:!1,configurable:!0}),e.prototype.setKey=function(t){return this.setNode("key",t,0)},e.prototype.setValue=function(t){return this.setNode("value",t,1)},e}(F);var Pi=function(n){E(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.getConditions=function(){return this.conditions||(this.conditions=new ee(this)),this.conditions},e}(F);var Ai=function(n){E(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.setVariable=function(t){return this.setNode("variable",t)},e}(F);var Zn=function(n){E(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return u.Module},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e}(F);var ne;(function(n){n[n.Ignore=1]="Ignore",n[n.Warning=2]="Warning",n[n.Error=4]="Error"})(ne||(ne={}));var fn=function(){function n(e,t,r,i,o,s){o===void 0&&(o=e.offset),s===void 0&&(s=e.length),this.node=e,this.rule=t,this.level=r,this.message=i||t.message,this.offset=o,this.length=s}return n.prototype.getRule=function(){return this.rule},n.prototype.getLevel=function(){return this.level},n.prototype.getOffset=function(){return this.offset},n.prototype.getLength=function(){return this.length},n.prototype.getNode=function(){return this.node},n.prototype.getMessage=function(){return this.message},n}();var Ni=function(){function n(){this.entries=[]}return n.entries=function(e){var t=new n;return e.acceptVisitor(t),t.entries},n.prototype.visitNode=function(e){return e.isErroneous()&&e.collectIssues(this.entries),!0},n}();function Us(n,e){let t;return e.length===0?t=n:t=n.replace(/\{(\d+)\}/g,(r,i)=>{let o=i[0];return typeof e[o]<"u"?e[o]:r}),t}function js(n,e,...t){return Us(e,t)}function H(n){return js}var U=H(),j=function(){function n(e,t){this.id=e,this.message=t}return n}();var f={NumberExpected:new j("css-numberexpected",U("expected.number","number expected")),ConditionExpected:new j("css-conditionexpected",U("expected.condt","condition expected")),RuleOrSelectorExpected:new j("css-ruleorselectorexpected",U("expected.ruleorselector","at-rule or selector expected")),DotExpected:new j("css-dotexpected",U("expected.dot","dot expected")),ColonExpected:new j("css-colonexpected",U("expected.colon","colon expected")),SemiColonExpected:new j("css-semicolonexpected",U("expected.semicolon","semi-colon expected")),TermExpected:new j("css-termexpected",U("expected.term","term expected")),ExpressionExpected:new j("css-expressionexpected",U("expected.expression","expression expected")),OperatorExpected:new j("css-operatorexpected",U("expected.operator","operator expected")),IdentifierExpected:new j("css-identifierexpected",U("expected.ident","identifier expected")),PercentageExpected:new j("css-percentageexpected",U("expected.percentage","percentage expected")),URIOrStringExpected:new j("css-uriorstringexpected",U("expected.uriorstring","uri or string expected")),URIExpected:new j("css-uriexpected",U("expected.uri","URI expected")),VariableNameExpected:new j("css-varnameexpected",U("expected.varname","variable name expected")),VariableValueExpected:new j("css-varvalueexpected",U("expected.varvalue","variable value expected")),PropertyValueExpected:new j("css-propertyvalueexpected",U("expected.propvalue","property value expected")),LeftCurlyExpected:new j("css-lcurlyexpected",U("expected.lcurly","{ expected")),RightCurlyExpected:new j("css-rcurlyexpected",U("expected.rcurly","} expected")),LeftSquareBracketExpected:new j("css-rbracketexpected",U("expected.lsquare","[ expected")),RightSquareBracketExpected:new j("css-lbracketexpected",U("expected.rsquare","] expected")),LeftParenthesisExpected:new j("css-lparentexpected",U("expected.lparen","( expected")),RightParenthesisExpected:new j("css-rparentexpected",U("expected.rparent",") expected")),CommaExpected:new j("css-commaexpected",U("expected.comma","comma expected")),PageDirectiveOrDeclarationExpected:new j("css-pagedirordeclexpected",U("expected.pagedirordecl","page directive or declaraton expected")),UnknownAtRule:new j("css-unknownatrule",U("unknown.atrule","at-rule unknown")),UnknownKeyword:new j("css-unknownkeyword",U("unknown.keyword","unknown keyword")),SelectorExpected:new j("css-selectorexpected",U("expected.selector","selector expected")),StringLiteralExpected:new j("css-stringliteralexpected",U("expected.stringliteral","string literal expected")),WhitespaceExpected:new j("css-whitespaceexpected",U("expected.whitespace","whitespace expected")),MediaQueryExpected:new j("css-mediaqueryexpected",U("expected.mediaquery","media query expected")),IdentifierOrWildcardExpected:new j("css-idorwildcardexpected",U("expected.idorwildcard","identifier or wildcard expected")),WildcardExpected:new j("css-wildcardexpected",U("expected.wildcard","wildcard expected")),IdentifierOrVariableExpected:new j("css-idorvarexpected",U("expected.idorvar","identifier or variable expected"))};var Oi;(function(n){n.MIN_VALUE=-2147483648,n.MAX_VALUE=2147483647})(Oi||(Oi={}));var bn;(function(n){n.MIN_VALUE=0,n.MAX_VALUE=2147483647})(bn||(bn={}));var Q;(function(n){function e(r,i){return r===Number.MAX_VALUE&&(r=bn.MAX_VALUE),i===Number.MAX_VALUE&&(i=bn.MAX_VALUE),{line:r,character:i}}n.create=e;function t(r){var i=r;return v.objectLiteral(i)&&v.uinteger(i.line)&&v.uinteger(i.character)}n.is=t})(Q||(Q={}));var W;(function(n){function e(r,i,o,s){if(v.uinteger(r)&&v.uinteger(i)&&v.uinteger(o)&&v.uinteger(s))return{start:Q.create(r,i),end:Q.create(o,s)};if(Q.is(r)&&Q.is(i))return{start:r,end:i};throw new Error("Range#create called with invalid arguments["+r+", "+i+", "+o+", "+s+"]")}n.create=e;function t(r){var i=r;return v.objectLiteral(i)&&Q.is(i.start)&&Q.is(i.end)}n.is=t})(W||(W={}));var tt;(function(n){function e(r,i){return{uri:r,range:i}}n.create=e;function t(r){var i=r;return v.defined(i)&&W.is(i.range)&&(v.string(i.uri)||v.undefined(i.uri))}n.is=t})(tt||(tt={}));var Wi;(function(n){function e(r,i,o,s){return{targetUri:r,targetRange:i,targetSelectionRange:o,originSelectionRange:s}}n.create=e;function t(r){var i=r;return v.defined(i)&&W.is(i.targetRange)&&v.string(i.targetUri)&&(W.is(i.targetSelectionRange)||v.undefined(i.targetSelectionRange))&&(W.is(i.originSelectionRange)||v.undefined(i.originSelectionRange))}n.is=t})(Wi||(Wi={}));var vn;(function(n){function e(r,i,o,s){return{red:r,green:i,blue:o,alpha:s}}n.create=e;function t(r){var i=r;return v.numberRange(i.red,0,1)&&v.numberRange(i.green,0,1)&&v.numberRange(i.blue,0,1)&&v.numberRange(i.alpha,0,1)}n.is=t})(vn||(vn={}));var er;(function(n){function e(r,i){return{range:r,color:i}}n.create=e;function t(r){var i=r;return W.is(i.range)&&vn.is(i.color)}n.is=t})(er||(er={}));var tr;(function(n){function e(r,i,o){return{label:r,textEdit:i,additionalTextEdits:o}}n.create=e;function t(r){var i=r;return v.string(i.label)&&(v.undefined(i.textEdit)||T.is(i))&&(v.undefined(i.additionalTextEdits)||v.typedArray(i.additionalTextEdits,T.is))}n.is=t})(tr||(tr={}));var nr;(function(n){n.Comment="comment",n.Imports="imports",n.Region="region"})(nr||(nr={}));var rr;(function(n){function e(r,i,o,s,a){var l={startLine:r,endLine:i};return v.defined(o)&&(l.startCharacter=o),v.defined(s)&&(l.endCharacter=s),v.defined(a)&&(l.kind=a),l}n.create=e;function t(r){var i=r;return v.uinteger(i.startLine)&&v.uinteger(i.startLine)&&(v.undefined(i.startCharacter)||v.uinteger(i.startCharacter))&&(v.undefined(i.endCharacter)||v.uinteger(i.endCharacter))&&(v.undefined(i.kind)||v.string(i.kind))}n.is=t})(rr||(rr={}));var ir;(function(n){function e(r,i){return{location:r,message:i}}n.create=e;function t(r){var i=r;return v.defined(i)&&tt.is(i.location)&&v.string(i.message)}n.is=t})(ir||(ir={}));var ft;(function(n){n.Error=1,n.Warning=2,n.Information=3,n.Hint=4})(ft||(ft={}));var Li;(function(n){n.Unnecessary=1,n.Deprecated=2})(Li||(Li={}));var Ui;(function(n){function e(t){var r=t;return r!=null&&v.string(r.href)}n.is=e})(Ui||(Ui={}));var Mt;(function(n){function e(r,i,o,s,a,l){var c={range:r,message:i};return v.defined(o)&&(c.severity=o),v.defined(s)&&(c.code=s),v.defined(a)&&(c.source=a),v.defined(l)&&(c.relatedInformation=l),c}n.create=e;function t(r){var i,o=r;return v.defined(o)&&W.is(o.range)&&v.string(o.message)&&(v.number(o.severity)||v.undefined(o.severity))&&(v.integer(o.code)||v.string(o.code)||v.undefined(o.code))&&(v.undefined(o.codeDescription)||v.string((i=o.codeDescription)===null||i===void 0?void 0:i.href))&&(v.string(o.source)||v.undefined(o.source))&&(v.undefined(o.relatedInformation)||v.typedArray(o.relatedInformation,ir.is))}n.is=t})(M