u+x&&(u=a,x=l),!S&&Math.abs(e-v)<=C-1&&a>=g[e])return i[0]=a,o[0]=l,n<=g[e]&&C<=1448?this.WALKTRACE(b,c,d,y,v,h,p,w,f,g,a,t,i,l,r,o,S,s):null}const k=(u-e+(x-n)-C)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(u,k))return s[0]=!0,i[0]=u,o[0]=x,k>0&&C<=1448?this.WALKTRACE(b,c,d,y,v,h,p,w,f,g,a,t,i,l,r,o,S,s):(e++,n++,[new T(e,t-e+1,n,r-n+1)]);h=this.ClipDiagonalBound(v-C,C,v,m),p=this.ClipDiagonalBound(v+C,C,v,m);for(let m=h;m<=p;m+=2){a=m===h||m=g[m+1]?g[m+1]-1:g[m-1],l=a-(m-v)-w;const u=a;while(a>e&&l>n&&this.ElementsAreEqual(a,l))a--,l--;if(g[m]=a,S&&Math.abs(m-b)<=C&&a<=f[m])return i[0]=a,o[0]=l,u>=f[m]&&C<=1448?this.WALKTRACE(b,c,d,y,v,h,p,w,f,g,a,t,i,l,r,o,S,s):null}if(C<=1447){let e=new Int32Array(d-c+2);e[0]=b-c+1,G.Copy2(f,c,e,1,d-c+1),this.m_forwardHistory.push(e),e=new Int32Array(p-h+2),e[0]=v-h+1,G.Copy2(g,h,e,1,p-h+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(b,c,d,y,v,h,p,w,f,g,a,t,i,l,r,o,S,s)}PrettifyChanges(e){for(let t=0;t0,s=n.modifiedLength>0;while(n.originalStart+n.originalLength=0;t--){const n=e[t];let r=0,i=0;if(t>0){const n=e[t-1];n.originalLength>0&&(r=n.originalStart+n.originalLength),n.modifiedLength>0&&(i=n.modifiedStart+n.modifiedLength)}const o=n.originalLength>0,s=n.modifiedLength>0;let a=0,l=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let e=1;;e++){const t=n.originalStart-e,c=n.modifiedStart-e;if(tl&&(l=d,a=e)}n.originalStart-=a,n.modifiedStart-=a}return e}_OriginalIsBoundary(e){return e<=0||e>=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(e,t,n,r){const i=this._OriginalRegionIsBoundary(e,t)?1:0,o=this._ModifiedRegionIsBoundary(n,r)?1:0;return i+o}ConcatenateChanges(e,t){let n=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){const r=new Array(e.length+t.length-1);return G.Copy(e,0,r,0,e.length-1),r[e.length-1]=n[0],G.Copy(t,1,r,e.length,t.length-1),r}{const n=new Array(e.length+t.length);return G.Copy(e,0,n,0,e.length),G.Copy(t,0,n,e.length,t.length),n}}ChangesOverlap(e,t,n){if($.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),$.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const r=e.originalStart;let i=e.originalLength;const o=e.modifiedStart;let s=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(i=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(s=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new T(r,i,o,s),!0}return n[0]=null,!1}ClipDiagonalBound(e,t,n,r){if(e>=0&&e=X&&e<=Z||e>=Q&&e<=ee}function he(e,t,n,r){let i="",o=0,s=-1,a=0,l=0;for(let c=0;c<=e.length;++c){if(c2){const e=i.lastIndexOf(n);-1===e?(i="",o=0):(i=i.slice(0,e),o=i.length-1-i.lastIndexOf(n)),s=c,a=0;continue}if(0!==i.length){i="",o=0,s=c,a=0;continue}}t&&(i+=i.length>0?n+"..":"..",o=2)}else i.length>0?i+=`${n}${e.slice(s+1,c)}`:i=e.slice(s+1,c),o=c-s-1;s=c,a=0}else l===te&&-1!==a?++a:a=-1}return i}function pe(e,t){if(null===t||"object"!==typeof t)throw new se("pathObject","Object",t);const n=t.dir||t.root,r=t.base||`${t.name||""}${t.ext||""}`;return n?n===t.root?`${n}${r}`:`${n}${e}${r}`:r}const ue={resolve(...e){let t="",n="",r=!1;for(let i=e.length-1;i>=-1;i--){let o;if(i>=0){if(o=e[i],ae(o,"path"),0===o.length)continue}else 0===t.length?o=J["a"]():(o=J["b"]["="+t]||J["a"](),(void 0===o||o.slice(0,2).toLowerCase()!==t.toLowerCase()&&o.charCodeAt(2)===re)&&(o=t+"\\"));const s=o.length;let a=0,l="",c=!1;const d=o.charCodeAt(0);if(1===s)le(d)&&(a=1,c=!0);else if(le(d))if(c=!0,le(o.charCodeAt(1))){let e=2,t=e;while(e2&&le(o.charCodeAt(2))&&(c=!0,a=3));if(l.length>0)if(t.length>0){if(l.toLowerCase()!==t.toLowerCase())continue}else t=l;if(r){if(t.length>0)break}else if(n=`${o.slice(a)}\\${n}`,r=c,c&&t.length>0)break}return n=he(n,!r,"\\",le),r?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){ae(e,"path");const t=e.length;if(0===t)return".";let n,r=0,i=!1;const o=e.charCodeAt(0);if(1===t)return ce(o)?"\\":e;if(le(o))if(i=!0,le(e.charCodeAt(1))){let i=2,o=i;while(i2&&le(e.charCodeAt(2))&&(i=!0,r=3));let s=r0&&le(e.charCodeAt(t-1))&&(s+="\\"),void 0===n?i?"\\"+s:s:i?`${n}\\${s}`:`${n}${s}`},isAbsolute(e){ae(e,"path");const t=e.length;if(0===t)return!1;const n=e.charCodeAt(0);return le(n)||t>2&&de(n)&&e.charCodeAt(1)===ie&&le(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let t,n;for(let o=0;o0&&(void 0===t?t=n=r:t+="\\"+r)}if(void 0===t)return".";let r=!0,i=0;if("string"===typeof n&&le(n.charCodeAt(0))){++i;const e=n.length;e>1&&le(n.charCodeAt(1))&&(++i,e>2&&(le(n.charCodeAt(2))?++i:r=!1))}if(r){while(i=2&&(t="\\"+t.slice(i))}return ue.normalize(t)},relative(e,t){if(ae(e,"from"),ae(t,"to"),e===t)return"";const n=ue.resolve(e),r=ue.resolve(t);if(n===r)return"";if(e=n.toLowerCase(),t=r.toLowerCase(),e===t)return"";let i=0;while(ii&&e.charCodeAt(o-1)===re)o--;const s=o-i;let a=0;while(aa&&t.charCodeAt(l-1)===re)l--;const c=l-a,d=sd){if(t.charCodeAt(a+p)===re)return r.slice(a+p+1);if(2===p)return r.slice(a+p)}s>d&&(e.charCodeAt(i+p)===re?h=p:2===p&&(h=3)),-1===h&&(h=0)}let u="";for(p=i+h+1;p<=o;++p)p!==o&&e.charCodeAt(p)!==re||(u+=0===u.length?"..":"\\..");return a+=h,u.length>0?`${u}${r.slice(a,l)}`:(r.charCodeAt(a)===re&&++a,r.slice(a,l))},toNamespacedPath(e){if("string"!==typeof e)return e;if(0===e.length)return"";const t=ue.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===re){if(t.charCodeAt(1)===re){const e=t.charCodeAt(2);if(e!==oe&&e!==te)return"\\\\?\\UNC\\"+t.slice(2)}}else if(de(t.charCodeAt(0))&&t.charCodeAt(1)===ie&&t.charCodeAt(2)===re)return"\\\\?\\"+t;return e},dirname(e){ae(e,"path");const t=e.length;if(0===t)return".";let n=-1,r=0;const i=e.charCodeAt(0);if(1===t)return le(i)?e:".";if(le(i)){if(n=r=1,le(e.charCodeAt(1))){let i=2,o=i;while(i2&&le(e.charCodeAt(2))?3:2,r=n);let o=-1,s=!0;for(let a=t-1;a>=r;--a)if(le(e.charCodeAt(a))){if(!s){o=a;break}}else s=!1;if(-1===o){if(-1===n)return".";o=n}return e.slice(0,o)},basename(e,t){void 0!==t&&ae(t,"ext"),ae(e,"path");let n,r=0,i=-1,o=!0;if(e.length>=2&&de(e.charCodeAt(0))&&e.charCodeAt(1)===ie&&(r=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let s=t.length-1,a=-1;for(n=e.length-1;n>=r;--n){const l=e.charCodeAt(n);if(le(l)){if(!o){r=n+1;break}}else-1===a&&(o=!1,a=n+1),s>=0&&(l===t.charCodeAt(s)?-1===--s&&(i=n):(s=-1,i=a))}return r===i?i=a:-1===i&&(i=e.length),e.slice(r,i)}for(n=e.length-1;n>=r;--n)if(le(e.charCodeAt(n))){if(!o){r=n+1;break}}else-1===i&&(o=!1,i=n+1);return-1===i?"":e.slice(r,i)},extname(e){ae(e,"path");let t=0,n=-1,r=0,i=-1,o=!0,s=0;e.length>=2&&e.charCodeAt(1)===ie&&de(e.charCodeAt(0))&&(t=r=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(le(t)){if(!o){r=a+1;break}}else-1===i&&(o=!1,i=a+1),t===te?-1===n?n=a:1!==s&&(s=1):-1!==n&&(s=-1)}return-1===n||-1===i||0===s||1===s&&n===i-1&&n===r+1?"":e.slice(n,i)},format:pe.bind(null,"\\"),parse(e){ae(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const n=e.length;let r=0,i=e.charCodeAt(0);if(1===n)return le(i)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(le(i)){if(r=1,le(e.charCodeAt(1))){let t=2,i=t;while(t0&&(t.root=e.slice(0,r));let o=-1,s=r,a=-1,l=!0,c=e.length-1,d=0;for(;c>=r;--c)if(i=e.charCodeAt(c),le(i)){if(!l){s=c+1;break}}else-1===a&&(l=!1,a=c+1),i===te?-1===o?o=c:1!==d&&(d=1):-1!==o&&(d=-1);return-1!==a&&(-1===o||0===d||1===d&&o===a-1&&o===s+1?t.base=t.name=e.slice(s,a):(t.name=e.slice(s,o),t.base=e.slice(s,a),t.ext=e.slice(o,a))),t.dir=s>0&&s!==r?e.slice(0,s-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},me={resolve(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const i=r>=0?e[r]:J["a"]();ae(i,"path"),0!==i.length&&(t=`${i}/${t}`,n=i.charCodeAt(0)===ne)}return t=he(t,!n,"/",ce),n?"/"+t:t.length>0?t:"."},normalize(e){if(ae(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===ne,n=e.charCodeAt(e.length-1)===ne;return e=he(e,!t,"/",ce),0===e.length?t?"/":n?"./":".":(n&&(e+="/"),t?"/"+e:e)},isAbsolute(e){return ae(e,"path"),e.length>0&&e.charCodeAt(0)===ne},join(...e){if(0===e.length)return".";let t;for(let n=0;n0&&(void 0===t?t=r:t+="/"+r)}return void 0===t?".":me.normalize(t)},relative(e,t){if(ae(e,"from"),ae(t,"to"),e===t)return"";if(e=me.resolve(e),t=me.resolve(t),e===t)return"";const n=1,r=e.length,i=r-n,o=1,s=t.length-o,a=ia){if(t.charCodeAt(o+c)===ne)return t.slice(o+c+1);if(0===c)return t.slice(o+c)}else i>a&&(e.charCodeAt(n+c)===ne?l=c:0===c&&(l=0));let d="";for(c=n+l+1;c<=r;++c)c!==r&&e.charCodeAt(c)!==ne||(d+=0===d.length?"..":"/..");return`${d}${t.slice(o+l)}`},toNamespacedPath(e){return e},dirname(e){if(ae(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===ne;let n=-1,r=!0;for(let i=e.length-1;i>=1;--i)if(e.charCodeAt(i)===ne){if(!r){n=i;break}}else r=!1;return-1===n?t?"/":".":t&&1===n?"//":e.slice(0,n)},basename(e,t){void 0!==t&&ae(t,"ext"),ae(e,"path");let n,r=0,i=-1,o=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let s=t.length-1,a=-1;for(n=e.length-1;n>=0;--n){const l=e.charCodeAt(n);if(l===ne){if(!o){r=n+1;break}}else-1===a&&(o=!1,a=n+1),s>=0&&(l===t.charCodeAt(s)?-1===--s&&(i=n):(s=-1,i=a))}return r===i?i=a:-1===i&&(i=e.length),e.slice(r,i)}for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===ne){if(!o){r=n+1;break}}else-1===i&&(o=!1,i=n+1);return-1===i?"":e.slice(r,i)},extname(e){ae(e,"path");let t=-1,n=0,r=-1,i=!0,o=0;for(let s=e.length-1;s>=0;--s){const a=e.charCodeAt(s);if(a!==ne)-1===r&&(i=!1,r=s+1),a===te?-1===t?t=s:1!==o&&(o=1):-1!==t&&(o=-1);else if(!i){n=s+1;break}}return-1===t||-1===r||0===o||1===o&&t===r-1&&t===n+1?"":e.slice(t,r)},format:pe.bind(null,"/"),parse(e){ae(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const n=e.charCodeAt(0)===ne;let r;n?(t.root="/",r=1):r=0;let i=-1,o=0,s=-1,a=!0,l=e.length-1,c=0;for(;l>=r;--l){const t=e.charCodeAt(l);if(t!==ne)-1===s&&(a=!1,s=l+1),t===te?-1===i?i=l:1!==c&&(c=1):-1!==i&&(c=-1);else if(!a){o=l+1;break}}if(-1!==s){const r=0===o&&n?1:o;-1===i||0===c||1===c&&i===s-1&&i===o+1?t.base=t.name=e.slice(r,s):(t.name=e.slice(r,i),t.base=e.slice(r,s),t.ext=e.slice(i,s))}return o>0?t.dir=e.slice(0,o-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};me.win32=ue.win32=ue,me.posix=ue.posix=me;"win32"===J["c"]?ue.normalize:me.normalize,"win32"===J["c"]?ue.resolve:me.resolve,"win32"===J["c"]?ue.relative:me.relative,"win32"===J["c"]?ue.dirname:me.dirname,"win32"===J["c"]?ue.basename:me.basename,"win32"===J["c"]?ue.extname:me.extname,"win32"===J["c"]?ue.sep:me.sep;const fe=/^\w[\w\d+.-]*$/,ge=/^\//,be=/^\/\//;function ve(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!fe.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!ge.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(be.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}function ye(e,t){return e||t?e:"file"}function we(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==Se&&(t=Se+t):t=Se;break}return t}const xe="",Se="/",Ce=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class ke{constructor(e,t,n,r,i,o=!1){"object"===typeof e?(this.scheme=e.scheme||xe,this.authority=e.authority||xe,this.path=e.path||xe,this.query=e.query||xe,this.fragment=e.fragment||xe):(this.scheme=ye(e,o),this.authority=t||xe,this.path=we(this.scheme,n||xe),this.query=r||xe,this.fragment=i||xe,ve(this,o))}static isUri(e){return e instanceof ke||!!e&&("string"===typeof e.authority&&"string"===typeof e.fragment&&"string"===typeof e.path&&"string"===typeof e.query&&"string"===typeof e.scheme&&"function"===typeof e.fsPath&&"function"===typeof e.with&&"function"===typeof e.toString)}get fsPath(){return Re(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:o}=e;return void 0===t?t=this.scheme:null===t&&(t=xe),void 0===n?n=this.authority:null===n&&(n=xe),void 0===r?r=this.path:null===r&&(r=xe),void 0===i?i=this.query:null===i&&(i=xe),void 0===o?o=this.fragment:null===o&&(o=xe),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&o===this.fragment?this:new _e(t,n,r,i,o)}static parse(e,t=!1){const n=Ce.exec(e);return n?new _e(n[2]||xe,Ae(n[4]||xe),Ae(n[5]||xe),Ae(n[7]||xe),Ae(n[9]||xe),t):new _e(xe,xe,xe,xe,xe)}static file(e){let t=xe;if(y["d"]&&(e=e.replace(/\\/g,Se)),e[0]===Se&&e[1]===Se){const n=e.indexOf(Se,2);-1===n?(t=e.substring(2),e=Se):(t=e.substring(2,n),e=e.substring(n)||Se)}return new _e("file",t,e,xe,xe)}static from(e){return new _e(e.scheme,e.authority,e.path,e.query,e.fragment)}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPaths on URI without path");let n;return n=y["d"]&&"file"===e.scheme?ke.file(ue.join(Re(e,!0),...t)).path:me.join(e.path,...t),e.with({path:n})}toString(e=!1){return Ne(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof ke)return e;{const t=new _e(e);return t._formatted=e.external,t._fsPath=e._sep===Ee?e.fsPath:null,t}}return e}}const Ee=y["d"]?1:void 0;class _e extends ke{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=Re(this,!1)),this._fsPath}toString(e=!1){return e?Ne(this,!0):(this._formatted||(this._formatted=Ne(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=Ee),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const Fe={[58]:"%3A",[47]:"%2F",[63]:"%3F",[35]:"%23",[91]:"%5B",[93]:"%5D",[64]:"%40",[33]:"%21",[36]:"%24",[38]:"%26",[39]:"%27",[40]:"%28",[41]:"%29",[42]:"%2A",[43]:"%2B",[44]:"%2C",[59]:"%3B",[61]:"%3D",[32]:"%20"};function De(e,t){let n=void 0,r=-1;for(let i=0;i=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o)-1!==r&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),void 0!==n&&(n+=e.charAt(i));else{void 0===n&&(n=e.substr(0,i));const t=Fe[o];void 0!==t?(-1!==r&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),n+=t):-1===r&&(r=i)}}return-1!==r&&(n+=encodeURIComponent(e.substring(r))),void 0!==n?n:e}function Te(e){let t=void 0;for(let n=0;n1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,y["d"]&&(n=n.replace(/\//g,"\\")),n}function Ne(e,t){const n=t?Te:De;let r="",{scheme:i,authority:o,path:s,query:a,fragment:l}=e;if(i&&(r+=i,r+=":"),(o||"file"===i)&&(r+=Se,r+=Se),o){let e=o.indexOf("@");if(-1!==e){const t=o.substr(0,e);o=o.substr(e+1),e=t.indexOf(":"),-1===e?r+=n(t,!1):(r+=n(t.substr(0,e),!1),r+=":",r+=n(t.substr(e+1),!1)),r+="@"}o=o.toLowerCase(),e=o.indexOf(":"),-1===e?r+=n(o,!1):(r+=n(o.substr(0,e),!1),r+=o.substr(e))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const e=s.charCodeAt(1);e>=65&&e<=90&&(s=`/${String.fromCharCode(e+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const e=s.charCodeAt(0);e>=65&&e<=90&&(s=`${String.fromCharCode(e+32)}:${s.substr(2)}`)}r+=n(s,!0)}return a&&(r+="?",r+=n(a,!1)),l&&(r+="#",r+=t?l:De(l,!1)),r}function ze(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+ze(e.substr(3)):e}}const Ie=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Ae(e){return e.match(Ie)?e.replace(Ie,e=>ze(e)):e}class Me{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new Me(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return Me.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return Me.isBefore(this,e)}static isBefore(e,t){return e.lineNumbern||e===n&&t>r?(this.startLineNumber=n,this.startColumn=r,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=r)}isEmpty(){return Pe.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return Pe.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.columne.endColumn))}containsRange(e){return Pe.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)))}strictContainsRange(e){return Pe.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn)&&!(t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)))}plusRange(e){return Pe.plusRange(this,e)}static plusRange(e,t){let n,r,i,o;return t.startLineNumbere.endLineNumber?(i=t.endLineNumber,o=t.endColumn):t.endLineNumber===e.endLineNumber?(i=t.endLineNumber,o=Math.max(t.endColumn,e.endColumn)):(i=e.endLineNumber,o=e.endColumn),new Pe(n,r,i,o)}intersectRanges(e){return Pe.intersectRanges(this,e)}static intersectRanges(e,t){let n=e.startLineNumber,r=e.startColumn,i=e.endLineNumber,o=e.endColumn,s=t.startLineNumber,a=t.startColumn,l=t.endLineNumber,c=t.endColumn;return nl?(i=l,o=c):i===l&&(o=Math.min(o,c)),n>i||n===i&&r>o?null:new Pe(n,r,i,o)}equalsRange(e){return Pe.equalsRange(this,e)}static equalsRange(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return Pe.getEndPosition(this)}static getEndPosition(e){return new Me(e.endLineNumber,e.endColumn)}getStartPosition(){return Pe.getStartPosition(this)}static getStartPosition(e){return new Me(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new Pe(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new Pe(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return Pe.collapseToStart(this)}static collapseToStart(e){return new Pe(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}static fromPositions(e,t=e){return new Pe(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new Pe(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"===typeof e.startLineNumber&&"number"===typeof e.startColumn&&"number"===typeof e.endLineNumber&&"number"===typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}}const Oe=3;function Le(e,t,n,r){const i=new Y(e,t,n);return i.ComputeDiff(r)}class We{constructor(e){const t=[],n=[];for(let r=0,i=e.length;r0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&i()){const o=n.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),a=r.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);let l=Le(o,a,i,!0).changes;s&&(l=je(l)),h=[];for(let e=0,t=l.length;e1&&s>1){const r=e.charCodeAt(n-2),i=t.charCodeAt(s-2);if(r!==i)break;n--,s--}(n>1||s>1)&&this._pushTrimWhitespaceCharChange(r,i+1,1,n,o+1,1,s)}{let n=$e(e,1),s=$e(t,1);const a=e.length+1,l=t.length+1;while(n!0;const t=Date.now();return()=>Date.now()-t255?255:0|e}function Ye(e){return e<0?0:e>4294967295?4294967295:0|e}class Je{constructor(e,t){this.index=e,this.remainder=t}}class Xe{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=Ye(e);const n=this.values,r=this.prefixSum,i=t.length;return 0!==i&&(this.values=new Uint32Array(n.length+i),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+i),this.values.set(t,e),e-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}changeValue(e,t){return e=Ye(e),t=Ye(t),this.values[e]!==t&&(this.values[e]=t,e-1=n.length)return!1;let i=n.length-e;return t>=i&&(t=i),0!==t&&(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalValue(){return 0===this.values.length?0:this._getAccumulatedValue(this.values.length-1)}getAccumulatedValue(e){return e<0?0:(e=Ye(e),this._getAccumulatedValue(e))}_getAccumulatedValue(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalValue();let t=0,n=this.values.length-1,r=0,i=0,o=0;while(t<=n)if(r=t+(n-t)/2|0,i=this.prefixSum[r],o=i-this.values[r],e=i))break;t=r+1}return new Je(r,e-o)}}class Qe{constructor(e,t,n,r){this._uri=e,this._lines=t,this._eol=n,this._versionId=r,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}getText(){return null===this._cachedTextValue&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const t=e.changes;for(const n of t)this._acceptDeleteRange(n.range),this._acceptInsertText(new Me(n.range.startLineNumber,n.range.startColumn),n.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,t=this._lines.length,n=new Uint32Array(t);for(let r=0;r/?";function et(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const n of Ze)e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}const tt=et();function nt(e){let t=tt;if(e&&e instanceof RegExp)if(e.global)t=e;else{let n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}const rt={maxLen:1e3,windowSize:15,timeBudget:150};function it(e,t,n,r,i=rt){if(n.length>i.maxLen){let o=e-i.maxLen/2;return o<0?(r+=e,o=0):r+=o,n=n.substring(o,e+i.maxLen/2),it(e,t,n,r,i)}Date.now();const o=e-1-r;let s=-1,a=null;for(let l=1;;l++){Date.now(),i.timeBudget;const e=o-i.windowSize*l;t.lastIndex=Math.max(0,e);const r=ot(t,n,o,s);if(!r&&a)break;if(a=r,e<=0)break;s=e}if(a){let e={word:a[0],startColumn:r+1+a.index,endColumn:r+1+a.index+a[0].length};return t.lastIndex=0,e}return null}function ot(e,t,n,r){let i;while(i=e.exec(t)){const t=i.index||0;if(t<=n&&e.lastIndex>=n)return i;if(r>0&&t>r)return null}return null}class st{constructor(e){let t=He(e);this._defaultValue=t,this._asciiMap=st._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){let t=new Uint8Array(256);for(let n=0;n<256;n++)t[n]=e;return t}set(e,t){let n=He(t);e>=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}}class at{constructor(e,t,n){const r=new Uint8Array(e*t);for(let i=0,o=e*t;it&&(t=o),r>n&&(n=r),s>n&&(n=s)}t++,n++;let r=new at(n,t,0);for(let i=0,o=e.length;i=this._maxCharCode?0:this._states.get(e,t)}}let ct=null;function dt(){return null===ct&&(ct=new lt([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),ct}let ht=null;function pt(){if(null===ht){ht=new st(0);const e=" \t<>'\"、。。、,.:;‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…";for(let n=0;nr);if(r>0){const e=t.charCodeAt(r-1),n=t.charCodeAt(o);(40===e&&41===n||91===e&&93===n||123===e&&125===n)&&o--}return{range:{startLineNumber:n,startColumn:r+1,endLineNumber:n,endColumn:o+2},url:t.substring(r,o+1)}}static computeLinks(e,t=dt()){const n=pt();let r=[];for(let i=1,o=e.getLineCount();i<=o;i++){const o=e.getLineContent(i),s=o.length;let a=0,l=0,c=0,d=1,h=!1,p=!1,u=!1,m=!1;while(a=0?(r+=n?1:-1,r<0?r=e.length-1:r%=e.length,e[r]):null}}ft.INSTANCE=new ft;class gt{constructor(e){this.element=e,this.next=gt.Undefined,this.prev=gt.Undefined}}gt.Undefined=new gt(void 0);class bt{constructor(){this._first=gt.Undefined,this._last=gt.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===gt.Undefined}clear(){this._first=gt.Undefined,this._last=gt.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const n=new gt(e);if(this._first===gt.Undefined)this._first=n,this._last=n;else if(t){const e=this._last;this._last=n,n.prev=e,e.next=n}else{const e=this._first;this._first=n,n.next=e,e.prev=n}this._size+=1;let r=!1;return()=>{r||(r=!0,this._remove(n))}}shift(){if(this._first!==gt.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==gt.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==gt.Undefined&&e.next!==gt.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===gt.Undefined&&e.next===gt.Undefined?(this._first=gt.Undefined,this._last=gt.Undefined):e.next===gt.Undefined?(this._last=this._last.prev,this._last.next=gt.Undefined):e.prev===gt.Undefined&&(this._first=this._first.next,this._first.prev=gt.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;while(e!==gt.Undefined)yield e.element,e=e.next}toArray(){const e=[];for(let t=this._first;t!==gt.Undefined;t=t.next)e.push(t.element);return e}}var vt;(function(e){function t(e){return(t,n=null,r)=>{let i,o=!1;return i=e(e=>{if(!o)return i?i.dispose():o=!0,t.call(n,e)},null,r),o&&i.dispose(),i}}function n(e,t){return l((n,r=null,i)=>e(e=>n.call(r,t(e)),null,i))}function r(e,t){return l((n,r=null,i)=>e(e=>{t(e),n.call(r,e)},null,i))}function i(e,t){return l((n,r=null,i)=>e(e=>t(e)&&n.call(r,e),null,i))}function o(e){return e}function s(...e){return(t,n=null,r)=>g(...e.map(e=>e(e=>t.call(n,e),null,r)))}function a(e,t,r){let i=r;return n(e,e=>(i=t(i,e),i))}function l(e){let t;const n=new xt({onFirstListenerAdd(){t=e(n.fire,n)},onLastListenerRemove(){t.dispose()}});return n.event}function c(e,t,n=100,r=!1,i){let o,s=void 0,a=void 0,l=0;const c=new xt({leakWarningThreshold:i,onFirstListenerAdd(){o=e(e=>{l++,s=t(s,e),r&&!a&&(c.fire(s),s=void 0),clearTimeout(a),a=setTimeout(()=>{const e=s;s=void 0,a=void 0,(!r||l>1)&&c.fire(e),l=0},n)})},onLastListenerRemove(){o.dispose()}});return c.event}function d(e){const r=(new Date).getTime();return n(t(e),e=>(new Date).getTime()-r)}function h(e){let t,n=!0;return i(e,e=>{const r=n||e!==t;return n=!1,t=e,r})}function p(e,t=!1,n=[]){let r=n.slice(),i=e(e=>{r?r.push(e):s.fire(e)});const o=()=>{r&&r.forEach(e=>s.fire(e)),r=null},s=new xt({onFirstListenerAdd(){i||(i=e(e=>s.fire(e)))},onFirstListenerDidAdd(){r&&(t?setTimeout(o):o())},onLastListenerRemove(){i&&i.dispose(),i=null}});return s.event}e.None=()=>v.None,e.once=t,e.map=n,e.forEach=r,e.filter=i,e.signal=o,e.any=s,e.reduce=a,e.snapshot=l,e.debounce=c,e.stopwatch=d,e.latch=h,e.buffer=p;class u{constructor(e){this.event=e}map(e){return new u(n(this.event,e))}forEach(e){return new u(r(this.event,e))}filter(e){return new u(i(this.event,e))}reduce(e,t){return new u(a(this.event,e,t))}latch(){return new u(h(this.event))}debounce(e,t=100,n=!1,r){return new u(c(this.event,e,t,n,r))}on(e,t,n){return this.event(e,t,n)}once(e,n,r){return t(this.event)(e,n,r)}}function m(e){return new u(e)}function f(e,t,n=(e=>e)){const r=(...e)=>s.fire(n(...e)),i=()=>e.on(t,r),o=()=>e.removeListener(t,r),s=new xt({onFirstListenerAdd:i,onLastListenerRemove:o});return s.event}function b(e,t,n=(e=>e)){const r=(...e)=>s.fire(n(...e)),i=()=>e.addEventListener(t,r),o=()=>e.removeEventListener(t,r),s=new xt({onFirstListenerAdd:i,onLastListenerRemove:o});return s.event}function y(e){const t=new xt;let n=!1;return e.then(void 0,()=>null).then(()=>{n?t.fire(void 0):setTimeout(()=>t.fire(void 0),0)}),n=!0,t.event}function w(e){return new Promise(n=>t(e)(n))}e.chain=m,e.fromNodeEventEmitter=f,e.fromDOMEventEmitter=b,e.fromPromise=y,e.toPromise=w})(vt||(vt={}));let yt=-1;class wt{constructor(e,t=Math.random().toString(18).slice(2,5)){this.customThreshold=e,this.name=t,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(e){let t=yt;if("number"===typeof this.customThreshold&&(t=this.customThreshold),t<=0||e{const e=this._stacks.get(n)||0;this._stacks.set(n,e-1)}}}class xt{constructor(e){this._disposed=!1,this._options=e,this._leakageMon=yt>0?new wt(this._options&&this._options.leakWarningThreshold):void 0}get event(){return this._event||(this._event=(e,t,n)=>{this._listeners||(this._listeners=new bt);const r=this._listeners.isEmpty();r&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const i=this._listeners.push(t?[e,t]:e);let o,s;return r&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,e,t),this._leakageMon&&(o=this._leakageMon.check(this._listeners.size)),s={dispose:()=>{if(o&&o(),s.dispose=xt._noop,!this._disposed&&(i(),this._options&&this._options.onLastListenerRemove)){const e=this._listeners&&!this._listeners.isEmpty();e||this._options.onLastListenerRemove(this)}}},n instanceof b?n.add(s):Array.isArray(n)&&n.push(s),s}),this._event}fire(e){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new bt);for(let t of this._listeners)this._deliveryQueue.push([t,e]);while(this._deliveryQueue.size>0){const[e,n]=this._deliveryQueue.shift();try{"function"===typeof e?e.call(void 0,n):e[0].call(e[1],n)}catch(t){o(t)}}}}dispose(){this._listeners&&this._listeners.clear(),this._deliveryQueue&&this._deliveryQueue.clear(),this._leakageMon&&this._leakageMon.dispose(),this._disposed=!0}}xt._noop=function(){};const St=Object.freeze((function(e,t){const n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}));var Ct;(function(e){function t(t){return t===e.None||t===e.Cancelled||(t instanceof kt||!(!t||"object"!==typeof t)&&("boolean"===typeof t.isCancellationRequested&&"function"===typeof t.onCancellationRequested))}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:vt.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:St})})(Ct||(Ct={}));class kt{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?St:(this._emitter||(this._emitter=new xt),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class Et{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new kt),this._token}cancel(){this._token?this._token instanceof kt&&this._token.cancel():this._token=Ct.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof kt&&this._token.dispose():this._token=Ct.None}}class _t{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const Ft=new _t,Dt=new _t,Tt=new _t;var Rt,Nt,zt,It,At,Mt,Pt,Ot,Lt,Wt,Ut,Vt,jt,Bt,Kt,qt,$t,Gt,Ht,Yt,Jt,Xt,Qt,Zt,en,tn,nn,rn,on,sn,an,ln,cn,dn;function hn(e,t){const n=(65535&t)<<16>>>0;return(e|n)>>>0}(function(){function e(e,t,n=t,r=n){Ft.define(e,t),Dt.define(e,n),Tt.define(e,r)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")})(),function(e){function t(e){return Ft.keyCodeToStr(e)}function n(e){return Ft.strToKeyCode(e)}function r(e){return Dt.keyCodeToStr(e)}function i(e){return Tt.keyCodeToStr(e)}function o(e){return Dt.strToKeyCode(e)||Tt.strToKeyCode(e)}e.toString=t,e.fromString=n,e.toUserSettingsUS=r,e.toUserSettingsGeneral=i,e.fromUserSettings=o}(Rt||(Rt={}));class pn extends Pe{constructor(e,t,n,r){super(e,t,n,r),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=n,this.positionColumn=r}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return pn.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new pn(this.startLineNumber,this.startColumn,e,t):new pn(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new Me(this.positionLineNumber,this.positionColumn)}setStartPosition(e,t){return 0===this.getDirection()?new pn(e,t,this.endLineNumber,this.endColumn):new pn(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new pn(e.lineNumber,e.column,t.lineNumber,t.column)}static liftSelection(e){return new pn(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let n=0,r=e.length;nthis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,r=!0;else{let e=this._lines[t-1].length+1;n<1?(n=1,r=!0):n>e&&(n=e,r=!0)}return r?{lineNumber:t,column:n}:e}}class vn{constructor(e,t){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=t,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){let e=[];return Object.keys(this._models).forEach(t=>e.push(this._models[t])),e}acceptNewModel(e){this._models[e.url]=new bn(ke.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,t){if(!this._models[e])return;let n=this._models[e];n.onEvents(t)}acceptRemovedModel(e){this._models[e]&&delete this._models[e]}computeDiff(e,t,n,r){return gn(this,void 0,void 0,(function*(){const i=this._getModel(e),o=this._getModel(t);if(!i||!o)return null;const s=i.getLinesContent(),a=o.getLinesContent(),l=new Ke(s,a,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0,maxComputationTime:r}),c=l.computeDiff(),d=!(c.changes.length>0)&&this._modelsAreIdentical(i,o);return{quitEarly:c.quitEarly,identical:d,changes:c.changes}}))}_modelsAreIdentical(e,t){const n=e.getLineCount(),r=t.getLineCount();if(n!==r)return!1;for(let i=1;i<=n;i++){const n=e.getLineContent(i),r=t.getLineContent(i);if(n!==r)return!1}return!0}computeMoreMinimalEdits(e,t){return gn(this,void 0,void 0,(function*(){const n=this._getModel(e);if(!n)return t;const r=[];let i=void 0;t=_(t,(e,t)=>{if(e.range&&t.range)return Pe.compareRangesUsingStarts(e.range,t.range);let n=e.range?0:1,r=t.range?0:1;return n-r});for(let{range:e,text:o,eol:s}of t){if("number"===typeof s&&(i=s),Pe.isEmpty(e)&&!o)continue;const t=n.getValueInRange(e);if(o=o.replace(/\r\n|\n|\r/g,n.eol),t===o)continue;if(Math.max(o.length,t.length)>vn._diffLimit){r.push({range:e,text:o});continue}const a=q(t,o,!1),l=n.offsetAt(Pe.lift(e).getStartPosition());for(const e of a){const t=n.positionAt(l+e.originalStart),i=n.positionAt(l+e.originalStart+e.originalLength),s={text:o.substr(e.modifiedStart,e.modifiedLength),range:{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:i.lineNumber,endColumn:i.column}};n.getValueInRange(s.range)!==s.text&&r.push(s)}}return"number"===typeof i&&r.push({eol:i,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),r}))}computeLinks(e){return gn(this,void 0,void 0,(function*(){let t=this._getModel(e);return t?mt(t):null}))}textualSuggest(e,t,n,r){return gn(this,void 0,void 0,(function*(){const i=this._getModel(e);if(!i)return null;const o=[],s=new Set,a=new RegExp(n,r),l=i.getWordAtPosition(t,a);l&&s.add(i.getValueInRange(l));for(let e of i.words(a))if(!s.has(e)&&(s.add(e),isNaN(Number(e))&&(o.push(e),s.size>vn._suggestionsLimit)))break;return o}))}computeWordRanges(e,t,n,r){return gn(this,void 0,void 0,(function*(){let i=this._getModel(e);if(!i)return Object.create(null);const o=new RegExp(n,r),s=Object.create(null);for(let e=t.startLineNumber;ethis._host.fhr(e,t),i=S(n,r);let o={host:i,getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(o,t),Promise.resolve(x(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,t){if(!this._foreignModule||"function"!==typeof this._foreignModule[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(n){return Promise.reject(n)}}}vn._diffLimit=1e5,vn._suggestionsLimit=1e4,"function"===typeof importScripts&&(y["a"].monaco=fn());let yn=!1;function wn(e){if(yn)return;yn=!0;const t=new E(e=>{self.postMessage(e)},t=>new vn(t,e));self.onmessage=e=>{t.onmessage(e.data)}}var xn;self.onmessage=e=>{yn||wn(null)},function(e){e[e["Ident"]=0]="Ident",e[e["AtKeyword"]=1]="AtKeyword",e[e["String"]=2]="String",e[e["BadString"]=3]="BadString",e[e["UnquotedString"]=4]="UnquotedString",e[e["Hash"]=5]="Hash",e[e["Num"]=6]="Num",e[e["Percentage"]=7]="Percentage",e[e["Dimension"]=8]="Dimension",e[e["UnicodeRange"]=9]="UnicodeRange",e[e["CDO"]=10]="CDO",e[e["CDC"]=11]="CDC",e[e["Colon"]=12]="Colon",e[e["SemiColon"]=13]="SemiColon",e[e["CurlyL"]=14]="CurlyL",e[e["CurlyR"]=15]="CurlyR",e[e["ParenthesisL"]=16]="ParenthesisL",e[e["ParenthesisR"]=17]="ParenthesisR",e[e["BracketL"]=18]="BracketL",e[e["BracketR"]=19]="BracketR",e[e["Whitespace"]=20]="Whitespace",e[e["Includes"]=21]="Includes",e[e["Dashmatch"]=22]="Dashmatch",e[e["SubstringOperator"]=23]="SubstringOperator",e[e["PrefixOperator"]=24]="PrefixOperator",e[e["SuffixOperator"]=25]="SuffixOperator",e[e["Delim"]=26]="Delim",e[e["EMS"]=27]="EMS",e[e["EXS"]=28]="EXS",e[e["Length"]=29]="Length",e[e["Angle"]=30]="Angle",e[e["Time"]=31]="Time",e[e["Freq"]=32]="Freq",e[e["Exclamation"]=33]="Exclamation",e[e["Resolution"]=34]="Resolution",e[e["Comma"]=35]="Comma",e[e["Charset"]=36]="Charset",e[e["EscapedJavaScript"]=37]="EscapedJavaScript",e[e["BadEscapedJavaScript"]=38]="BadEscapedJavaScript",e[e["Comment"]=39]="Comment",e[e["SingleLineComment"]=40]="SingleLineComment",e[e["EOF"]=41]="EOF",e[e["CustomToken"]=42]="CustomToken"}(xn||(xn={}));var Sn=function(){function e(e){this.source=e,this.len=e.length,this.position=0}return e.prototype.substring=function(e,t){return void 0===t&&(t=this.position),this.source.substring(e,t)},e.prototype.eos=function(){return this.len<=this.position},e.prototype.pos=function(){return this.position},e.prototype.goBackTo=function(e){this.position=e},e.prototype.goBack=function(e){this.position-=e},e.prototype.advance=function(e){this.position+=e},e.prototype.nextChar=function(){return this.source.charCodeAt(this.position++)||0},e.prototype.peekChar=function(e){return void 0===e&&(e=0),this.source.charCodeAt(this.position+e)||0},e.prototype.lookbackChar=function(e){return void 0===e&&(e=0),this.source.charCodeAt(this.position-e)||0},e.prototype.advanceIfChar=function(e){return e===this.source.charCodeAt(this.position)&&(this.position++,!0)},e.prototype.advanceIfChars=function(e){if(this.position+e.length>this.source.length)return!1;for(var t=0;t".charCodeAt(0),Bn="@".charCodeAt(0),Kn="#".charCodeAt(0),qn="$".charCodeAt(0),$n="\\".charCodeAt(0),Gn="/".charCodeAt(0),Hn="\n".charCodeAt(0),Yn="\r".charCodeAt(0),Jn="\f".charCodeAt(0),Xn='"'.charCodeAt(0),Qn="'".charCodeAt(0),Zn=" ".charCodeAt(0),er="\t".charCodeAt(0),tr=";".charCodeAt(0),nr=":".charCodeAt(0),rr="{".charCodeAt(0),ir="}".charCodeAt(0),or="[".charCodeAt(0),sr="]".charCodeAt(0),ar=",".charCodeAt(0),lr=".".charCodeAt(0),cr="!".charCodeAt(0),dr={};dr[tr]=xn.SemiColon,dr[nr]=xn.Colon,dr[rr]=xn.CurlyL,dr[ir]=xn.CurlyR,dr[sr]=xn.BracketR,dr[or]=xn.BracketL,dr[Wn]=xn.ParenthesisL,dr[Un]=xn.ParenthesisR,dr[ar]=xn.Comma;var hr={};hr["em"]=xn.EMS,hr["ex"]=xn.EXS,hr["px"]=xn.Length,hr["cm"]=xn.Length,hr["mm"]=xn.Length,hr["in"]=xn.Length,hr["pt"]=xn.Length,hr["pc"]=xn.Length,hr["deg"]=xn.Angle,hr["rad"]=xn.Angle,hr["grad"]=xn.Angle,hr["ms"]=xn.Time,hr["s"]=xn.Time,hr["hz"]=xn.Freq,hr["khz"]=xn.Freq,hr["%"]=xn.Percentage,hr["fr"]=xn.Percentage,hr["dpi"]=xn.Resolution,hr["dpcm"]=xn.Resolution;var pr=function(){function e(){this.stream=new Sn(""),this.ignoreComment=!0,this.ignoreWhitespace=!0,this.inURL=!1}return e.prototype.setSource=function(e){this.stream=new Sn(e)},e.prototype.finishToken=function(e,t,n){return{offset:e,len:this.stream.pos()-e,type:t,text:n||this.stream.substring(e)}},e.prototype.substring=function(e,t){return this.stream.substring(e,e+t)},e.prototype.pos=function(){return this.stream.pos()},e.prototype.goBackTo=function(e){this.stream.goBackTo(e)},e.prototype.scanUnquotedString=function(){var e=this.stream.pos(),t=[];return this._unquotedString(t)?this.finishToken(e,xn.UnquotedString,t.join("")):null},e.prototype.scan=function(){var e=this.trivia();if(null!==e)return e;var t=this.stream.pos();return this.stream.eos()?this.finishToken(t,xn.EOF):this.scanNext(t)},e.prototype.scanNext=function(e){if(this.stream.advanceIfChars([Vn,cr,Mn,Mn]))return this.finishToken(e,xn.CDO);if(this.stream.advanceIfChars([Mn,Mn,jn]))return this.finishToken(e,xn.CDC);var t=[];if(this.ident(t))return this.finishToken(e,xn.Ident,t.join(""));if(this.stream.advanceIfChar(Bn)){if(t=["@"],this._name(t)){var n=t.join("");return"@charset"===n?this.finishToken(e,xn.Charset,n):this.finishToken(e,xn.AtKeyword,n)}return this.finishToken(e,xn.Delim)}if(this.stream.advanceIfChar(Kn))return t=["#"],this._name(t)?this.finishToken(e,xn.Hash,t.join("")):this.finishToken(e,xn.Delim);if(this.stream.advanceIfChar(cr))return this.finishToken(e,xn.Exclamation);if(this._number()){var r=this.stream.pos();if(t=[this.stream.substring(e,r)],this.stream.advanceIfChar(On))return this.finishToken(e,xn.Percentage);if(this.ident(t)){var i=this.stream.substring(r).toLowerCase(),o=hr[i];return"undefined"!==typeof o?this.finishToken(e,o,t.join("")):this.finishToken(e,xn.Dimension,t.join(""))}return this.finishToken(e,xn.Num)}t=[];var s=this._string(t);return null!==s?this.finishToken(e,s,t.join("")):(s=dr[this.stream.peekChar()],"undefined"!==typeof s?(this.stream.advance(1),this.finishToken(e,s)):this.stream.peekChar(0)===Nn&&this.stream.peekChar(1)===In?(this.stream.advance(2),this.finishToken(e,xn.Includes)):this.stream.peekChar(0)===An&&this.stream.peekChar(1)===In?(this.stream.advance(2),this.finishToken(e,xn.Dashmatch)):this.stream.peekChar(0)===Ln&&this.stream.peekChar(1)===In?(this.stream.advance(2),this.finishToken(e,xn.SubstringOperator)):this.stream.peekChar(0)===zn&&this.stream.peekChar(1)===In?(this.stream.advance(2),this.finishToken(e,xn.PrefixOperator)):this.stream.peekChar(0)===qn&&this.stream.peekChar(1)===In?(this.stream.advance(2),this.finishToken(e,xn.SuffixOperator)):(this.stream.nextChar(),this.finishToken(e,xn.Delim)))},e.prototype.trivia=function(){while(1){var e=this.stream.pos();if(this._whitespace()){if(!this.ignoreWhitespace)return this.finishToken(e,xn.Whitespace)}else{if(!this.comment())return null;if(!this.ignoreComment)return this.finishToken(e,xn.Comment)}}},e.prototype.comment=function(){if(this.stream.advanceIfChars([Gn,Ln])){var e=!1,t=!1;return this.stream.advanceWhileChar((function(n){return t&&n===Gn?(e=!0,!1):(t=n===Ln,!0)})),e&&this.stream.advance(1),!0}return!1},e.prototype._number=function(){var e,t=0;return this.stream.peekChar()===lr&&(t=1),e=this.stream.peekChar(t),e>=Tn&&e<=Rn&&(this.stream.advance(t+1),this.stream.advanceWhileChar((function(e){return e>=Tn&&e<=Rn||0===t&&e===lr})),!0)},e.prototype._newline=function(e){var t=this.stream.peekChar();switch(t){case Yn:case Jn:case Hn:return this.stream.advance(1),e.push(String.fromCharCode(t)),t===Yn&&this.stream.advanceIfChar(Hn)&&e.push("\n"),!0}return!1},e.prototype._escape=function(e,t){var n=this.stream.peekChar();if(n===$n){this.stream.advance(1),n=this.stream.peekChar();var r=0;while(r<6&&(n>=Tn&&n<=Rn||n>=Cn&&n<=kn||n>=_n&&n<=Fn))this.stream.advance(1),n=this.stream.peekChar(),r++;if(r>0){try{var i=parseInt(this.stream.substring(this.stream.pos()-r),16);i&&e.push(String.fromCharCode(i))}catch(o){}return n===Zn||n===er?this.stream.advance(1):this._newline([]),!0}if(n!==Yn&&n!==Jn&&n!==Hn)return this.stream.advance(1),e.push(String.fromCharCode(n)),!0;if(t)return this._newline(e)}return!1},e.prototype._stringChar=function(e,t){var n=this.stream.peekChar();return 0!==n&&n!==e&&n!==$n&&n!==Yn&&n!==Jn&&n!==Hn&&(this.stream.advance(1),t.push(String.fromCharCode(n)),!0)},e.prototype._string=function(e){if(this.stream.peekChar()===Qn||this.stream.peekChar()===Xn){var t=this.stream.nextChar();e.push(String.fromCharCode(t));while(this._stringChar(t,e)||this._escape(e,!0));return this.stream.peekChar()===t?(this.stream.nextChar(),e.push(String.fromCharCode(t)),xn.String):xn.BadString}return null},e.prototype._unquotedChar=function(e){var t=this.stream.peekChar();return 0!==t&&t!==$n&&t!==Qn&&t!==Xn&&t!==Wn&&t!==Un&&t!==Zn&&t!==er&&t!==Hn&&t!==Jn&&t!==Yn&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)},e.prototype._unquotedString=function(e){var t=!1;while(this._unquotedChar(e)||this._escape(e))t=!0;return t},e.prototype._whitespace=function(){var e=this.stream.advanceWhileChar((function(e){return e===Zn||e===er||e===Hn||e===Jn||e===Yn}));return e>0},e.prototype._name=function(e){var t=!1;while(this._identChar(e)||this._escape(e))t=!0;return t},e.prototype.ident=function(e){var t=this.stream.pos(),n=this._minus(e);if(n&&this._minus(e)){if(this._identFirstChar(e)||this._escape(e)){while(this._identChar(e)||this._escape(e));return!0}}else if(this._identFirstChar(e)||this._escape(e)){while(this._identChar(e)||this._escape(e));return!0}return this.stream.goBackTo(t),!1},e.prototype._identFirstChar=function(e){var t=this.stream.peekChar();return(t===Pn||t>=Cn&&t<=En||t>=_n&&t<=Dn||t>=128&&t<=65535)&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)},e.prototype._minus=function(e){var t=this.stream.peekChar();return t===Mn&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)},e.prototype._identChar=function(e){var t=this.stream.peekChar();return(t===Pn||t===Mn||t>=Cn&&t<=En||t>=_n&&t<=Dn||t>=Tn&&t<=Rn||t>=128&&t<=65535)&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)},e}();function ur(e,t){if(e.length0?e.lastIndexOf(t)===n:0===n&&e===t}function fr(e,t,n){void 0===n&&(n=4);var r=Math.abs(e.length-t.length);if(r>n)return 0;var i,o,s=[],a=[];for(i=0;ie.end?null:(e.accept((function(e){return-1===e.offset&&-1===e.length||e.offset<=t&&e.end>=t&&(n?e.length<=n.length&&(n=e):n=e,!0)})),n)}function Sr(e,t){var n=xr(e,t),r=[];while(n)r.unshift(n),n=n.parent;return r}function Cr(e){var t=e.findParent(vr.Declaration),n=t&&t.getValue();return n&&n.encloses(e)?t:null}(function(e){e[e["Undefined"]=0]="Undefined",e[e["Identifier"]=1]="Identifier",e[e["Stylesheet"]=2]="Stylesheet",e[e["Ruleset"]=3]="Ruleset",e[e["Selector"]=4]="Selector",e[e["SimpleSelector"]=5]="SimpleSelector",e[e["SelectorInterpolation"]=6]="SelectorInterpolation",e[e["SelectorCombinator"]=7]="SelectorCombinator",e[e["SelectorCombinatorParent"]=8]="SelectorCombinatorParent",e[e["SelectorCombinatorSibling"]=9]="SelectorCombinatorSibling",e[e["SelectorCombinatorAllSiblings"]=10]="SelectorCombinatorAllSiblings",e[e["SelectorCombinatorShadowPiercingDescendant"]=11]="SelectorCombinatorShadowPiercingDescendant",e[e["Page"]=12]="Page",e[e["PageBoxMarginBox"]=13]="PageBoxMarginBox",e[e["ClassSelector"]=14]="ClassSelector",e[e["IdentifierSelector"]=15]="IdentifierSelector",e[e["ElementNameSelector"]=16]="ElementNameSelector",e[e["PseudoSelector"]=17]="PseudoSelector",e[e["AttributeSelector"]=18]="AttributeSelector",e[e["Declaration"]=19]="Declaration",e[e["Declarations"]=20]="Declarations",e[e["Property"]=21]="Property",e[e["Expression"]=22]="Expression",e[e["BinaryExpression"]=23]="BinaryExpression",e[e["Term"]=24]="Term",e[e["Operator"]=25]="Operator",e[e["Value"]=26]="Value",e[e["StringLiteral"]=27]="StringLiteral",e[e["URILiteral"]=28]="URILiteral",e[e["EscapedValue"]=29]="EscapedValue",e[e["Function"]=30]="Function",e[e["NumericValue"]=31]="NumericValue",e[e["HexColorValue"]=32]="HexColorValue",e[e["MixinDeclaration"]=33]="MixinDeclaration",e[e["MixinReference"]=34]="MixinReference",e[e["VariableName"]=35]="VariableName",e[e["VariableDeclaration"]=36]="VariableDeclaration",e[e["Prio"]=37]="Prio",e[e["Interpolation"]=38]="Interpolation",e[e["NestedProperties"]=39]="NestedProperties",e[e["ExtendsReference"]=40]="ExtendsReference",e[e["SelectorPlaceholder"]=41]="SelectorPlaceholder",e[e["Debug"]=42]="Debug",e[e["If"]=43]="If",e[e["Else"]=44]="Else",e[e["For"]=45]="For",e[e["Each"]=46]="Each",e[e["While"]=47]="While",e[e["MixinContentReference"]=48]="MixinContentReference",e[e["MixinContentDeclaration"]=49]="MixinContentDeclaration",e[e["Media"]=50]="Media",e[e["Keyframe"]=51]="Keyframe",e[e["FontFace"]=52]="FontFace",e[e["Import"]=53]="Import",e[e["Namespace"]=54]="Namespace",e[e["Invocation"]=55]="Invocation",e[e["FunctionDeclaration"]=56]="FunctionDeclaration",e[e["ReturnStatement"]=57]="ReturnStatement",e[e["MediaQuery"]=58]="MediaQuery",e[e["FunctionParameter"]=59]="FunctionParameter",e[e["FunctionArgument"]=60]="FunctionArgument",e[e["KeyframeSelector"]=61]="KeyframeSelector",e[e["ViewPort"]=62]="ViewPort",e[e["Document"]=63]="Document",e[e["AtApplyRule"]=64]="AtApplyRule",e[e["CustomPropertyDeclaration"]=65]="CustomPropertyDeclaration",e[e["CustomPropertySet"]=66]="CustomPropertySet",e[e["ListEntry"]=67]="ListEntry",e[e["Supports"]=68]="Supports",e[e["SupportsCondition"]=69]="SupportsCondition",e[e["NamespacePrefix"]=70]="NamespacePrefix",e[e["GridLine"]=71]="GridLine",e[e["Plugin"]=72]="Plugin",e[e["UnknownAtRule"]=73]="UnknownAtRule",e[e["Use"]=74]="Use",e[e["ModuleConfiguration"]=75]="ModuleConfiguration",e[e["Forward"]=76]="Forward",e[e["ForwardVisibility"]=77]="ForwardVisibility",e[e["Module"]=78]="Module"})(vr||(vr={})),function(e){e[e["Mixin"]=0]="Mixin",e[e["Rule"]=1]="Rule",e[e["Variable"]=2]="Variable",e[e["Function"]=3]="Function",e[e["Keyframe"]=4]="Keyframe",e[e["Unknown"]=5]="Unknown",e[e["Module"]=6]="Module",e[e["Forward"]=7]="Forward",e[e["ForwardVisibility"]=8]="ForwardVisibility"}(yr||(yr={}));var kr,Er=function(){function e(e,t,n){void 0===e&&(e=-1),void 0===t&&(t=-1),this.parent=null,this.offset=e,this.length=t,n&&(this.nodeType=n)}return Object.defineProperty(e.prototype,"end",{get:function(){return this.offset+this.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this.nodeType||vr.Undefined},set:function(e){this.nodeType=e},enumerable:!0,configurable:!0}),e.prototype.getTextProvider=function(){var e=this;while(e&&!e.textProvider)e=e.parent;return e?e.textProvider:function(){return"unknown"}},e.prototype.getText=function(){return this.getTextProvider()(this.offset,this.length)},e.prototype.matches=function(e){return this.length===e.length&&this.getTextProvider()(this.offset,this.length)===e},e.prototype.startsWith=function(e){return this.length>=e.length&&this.getTextProvider()(this.offset,e.length)===e},e.prototype.endsWith=function(e){return this.length>=e.length&&this.getTextProvider()(this.end-e.length,e.length)===e},e.prototype.accept=function(e){if(e(this)&&this.children)for(var t=0,n=this.children;t=0&&e.parent.children.splice(n,1)}e.parent=this;var r=this.children;return r||(r=this.children=[]),-1!==t?r.splice(t,0,e):r.push(e),e},e.prototype.attachTo=function(e,t){return void 0===t&&(t=-1),e&&e.adoptChild(this,t),this},e.prototype.collectIssues=function(e){this.issues&&e.push.apply(e,this.issues)},e.prototype.addIssue=function(e){this.issues||(this.issues=[]),this.issues.push(e)},e.prototype.hasIssue=function(e){return Array.isArray(this.issues)&&this.issues.some((function(t){return t.getRule()===e}))},e.prototype.isErroneous=function(e){return void 0===e&&(e=!1),!!(this.issues&&this.issues.length>0)||e&&Array.isArray(this.children)&&this.children.some((function(e){return e.isErroneous(!0)}))},e.prototype.setNode=function(e,t,n){return void 0===n&&(n=-1),!!t&&(t.attachTo(this,n),this[e]=t,!0)},e.prototype.addChild=function(e){return!!e&&(this.children||(this.children=[]),e.attachTo(this),this.updateOffsetAndLength(e),!0)},e.prototype.updateOffsetAndLength=function(e){(e.offsetthis.end||-1===this.length)&&(this.length=t-this.offset)},e.prototype.hasChildren=function(){return!!this.children&&this.children.length>0},e.prototype.getChildren=function(){return this.children?this.children.slice(0):[]},e.prototype.getChild=function(e){return this.children&&e=0;n--)if(t=this.children[n],t.offset<=e)return t;return null},e.prototype.findChildAtOffset=function(e,t){var n=this.findFirstChildBeforeOffset(e);return n&&n.end>=e?t&&n.findChildAtOffset(e,!0)||n:null},e.prototype.encloses=function(e){return this.offset<=e.offset&&this.offset+this.length>=e.offset+e.length},e.prototype.getParent=function(){var e=this.parent;while(e instanceof _r)e=e.parent;return e},e.prototype.findParent=function(e){var t=this;while(t&&t.type!==e)t=t.parent;return t},e.prototype.findAParent=function(){for(var e=[],t=0;t/g,">")}function Yi(e){if(!e.description||""===e.description)return"";if("string"!==typeof e.description)return e.description.value;var t="";e.status&&(t+=$i(e.status)),t+=e.description;var n=Xi(e.browsers);return n&&(t+="\n("+n+")"),"syntax"in e&&(t+="\n\nSyntax: "+e.syntax),e.references&&e.references.length>0&&(t+="\n\n",t+=e.references.map((function(e){return e.name+": "+e.url})).join(" | ")),t}function Ji(e){if(!e.description||""===e.description)return"";var t="";e.status&&(t+=$i(e.status));var n="string"===typeof e.description?e.description:e.description.value;t+=Hi(n);var r=Xi(e.browsers);return r&&(t+="\n\n("+Hi(r)+")"),"syntax"in e&&e.syntax&&(t+="\n\nSyntax: "+Hi(e.syntax)),e.references&&e.references.length>0&&(t+="\n\n",t+=e.references.map((function(e){return"["+e.name+"]("+e.url+")"})).join(" | ")),t}function Xi(e){return void 0===e&&(e=[]),0===e.length?null:e.map((function(e){var t="",n=e.match(/([A-Z]+)(\d+)?/),r=n[1],i=n[2];return r in qi&&(t+=qi[r]),i&&(t+=" "+i),t})).join(", ")}var Qi=Vi(),Zi=[{func:"rgb($red, $green, $blue)",desc:Qi("css.builtin.rgb","Creates a Color from red, green, and blue values.")},{func:"rgba($red, $green, $blue, $alpha)",desc:Qi("css.builtin.rgba","Creates a Color from red, green, blue, and alpha values.")},{func:"hsl($hue, $saturation, $lightness)",desc:Qi("css.builtin.hsl","Creates a Color from hue, saturation, and lightness values.")},{func:"hsla($hue, $saturation, $lightness, $alpha)",desc:Qi("css.builtin.hsla","Creates a Color from hue, saturation, lightness, and alpha values.")}],eo={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"},to={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."};function no(e,t){var n=e.getText(),r=n.match(/^([-+]?[0-9]*\.?[0-9]+)(%?)$/);if(r){r[2]&&(t=100);var i=parseFloat(r[1])/t;if(i>=0&&i<=1)return i}throw new Error}function ro(e){var t=e.getText(),n=t.match(/^([-+]?[0-9]*\.?[0-9]+)(deg)?$/);if(n)return parseFloat(t)%360;throw new Error}function io(e){var t=e.getName();return!!t&&/^(rgb|rgba|hsl|hsla)$/gi.test(t)}var oo=48,so=57,ao=65,lo=97,co=102;function ho(e){return e=lo&&e<=co?e-lo+10:0)}function po(e){if("#"!==e[0])return null;switch(e.length){case 4:return{red:17*ho(e.charCodeAt(1))/255,green:17*ho(e.charCodeAt(2))/255,blue:17*ho(e.charCodeAt(3))/255,alpha:1};case 5:return{red:17*ho(e.charCodeAt(1))/255,green:17*ho(e.charCodeAt(2))/255,blue:17*ho(e.charCodeAt(3))/255,alpha:17*ho(e.charCodeAt(4))/255};case 7:return{red:(16*ho(e.charCodeAt(1))+ho(e.charCodeAt(2)))/255,green:(16*ho(e.charCodeAt(3))+ho(e.charCodeAt(4)))/255,blue:(16*ho(e.charCodeAt(5))+ho(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(16*ho(e.charCodeAt(1))+ho(e.charCodeAt(2)))/255,green:(16*ho(e.charCodeAt(3))+ho(e.charCodeAt(4)))/255,blue:(16*ho(e.charCodeAt(5))+ho(e.charCodeAt(6)))/255,alpha:(16*ho(e.charCodeAt(7))+ho(e.charCodeAt(8)))/255}}return null}function uo(e,t,n,r){if(void 0===r&&(r=1),e/=60,0===t)return{red:n,green:n,blue:n,alpha:r};var i=function(e,t,n){while(n<0)n+=6;while(n>=6)n-=6;return n<1?(t-e)*n+e:n<3?t:n<4?(t-e)*(4-n)+e:e},o=n<=.5?n*(t+1):n+t-n*t,s=2*n-o;return{red:i(s,o,e+2),green:i(s,o,e),blue:i(s,o,e-2),alpha:r}}function mo(e){var t=e.red,n=e.green,r=e.blue,i=e.alpha,o=Math.max(t,n,r),s=Math.min(t,n,r),a=0,l=0,c=(s+o)/2,d=o-s;if(d>0){switch(l=Math.min(c<=.5?d/(2*c):d/(2-2*c),1),o){case t:a=(n-r)/d+(n4)return null;try{var o=4===i.length?no(i[3],1):1;if("rgb"===r||"rgba"===r)return{red:no(i[0],255),green:no(i[1],255),blue:no(i[2],255),alpha:o};if("hsl"===r||"hsla"===r){var s=ro(i[0]),a=no(i[1],100),l=no(i[2],100);return uo(s,a,l,o)}}catch(u){return null}}else if(e.type===vr.Identifier){if(e.parent&&e.parent.type!==vr.Term)return null;var c=e.parent;if(c&&c.parent&&c.parent.type===vr.BinaryExpression){var d=c.parent;if(d.parent&&d.parent.type===vr.ListEntry&&d.parent.key===d)return null}var h=e.getText().toLowerCase();if("none"===h)return null;var p=eo[h];if(p)return po(p)}return null}var go={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."},bo={"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."},vo={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."},yo=["medium","thick","thin"],wo={"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."},xo={"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."},So={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."},Co={"url()":"Reference an image file by URL","image()":"Provide image fallbacks and annotations.","-webkit-image-set()":"Provide multiple resolutions. Remember to use unprefixed image-set() in addition.","image-set()":"Provide multiple resolutions of an image and const the UA decide which is most appropriate in a given situation.","-moz-element()":"Use an element in the document as an image. Remember to use unprefixed element() in addition.","element()":"Use an element in the document as an image.","cross-fade()":"Indicates the two images to be combined and how far along in the transition the combination is.","-webkit-gradient()":"Deprecated. Use modern linear-gradient() or radial-gradient() instead.","-webkit-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-moz-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-o-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","linear-gradient()":"A linear gradient is created by specifying a straight gradient line, and then several colors placed along that line.","-webkit-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-moz-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-o-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","repeating-linear-gradient()":"Same as linear-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop’s position and the first specified color-stop’s position.","-webkit-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","-moz-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","radial-gradient()":"Colors emerge from a single point and smoothly spread outward in a circular or elliptical shape.","-webkit-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","-moz-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","repeating-radial-gradient()":"Same as radial-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop’s position and the first specified color-stop’s position."},ko={ease:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0).","ease-in":"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0).","ease-in-out":"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0).","ease-out":"Equivalent to cubic-bezier(0, 0, 0.58, 1.0).",linear:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0).","step-end":"Equivalent to steps(1, end).","step-start":"Equivalent to steps(1, start).","steps()":"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value “start” or “end”.","cubic-bezier()":"Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2).","cubic-bezier(0.6, -0.28, 0.735, 0.045)":"Ease-in Back. Overshoots.","cubic-bezier(0.68, -0.55, 0.265, 1.55)":"Ease-in-out Back. Overshoots.","cubic-bezier(0.175, 0.885, 0.32, 1.275)":"Ease-out Back. Overshoots.","cubic-bezier(0.6, 0.04, 0.98, 0.335)":"Ease-in Circular. Based on half circle.","cubic-bezier(0.785, 0.135, 0.15, 0.86)":"Ease-in-out Circular. Based on half circle.","cubic-bezier(0.075, 0.82, 0.165, 1)":"Ease-out Circular. Based on half circle.","cubic-bezier(0.55, 0.055, 0.675, 0.19)":"Ease-in Cubic. Based on power of three.","cubic-bezier(0.645, 0.045, 0.355, 1)":"Ease-in-out Cubic. Based on power of three.","cubic-bezier(0.215, 0.610, 0.355, 1)":"Ease-out Cubic. Based on power of three.","cubic-bezier(0.95, 0.05, 0.795, 0.035)":"Ease-in Exponential. Based on two to the power ten.","cubic-bezier(1, 0, 0, 1)":"Ease-in-out Exponential. Based on two to the power ten.","cubic-bezier(0.19, 1, 0.22, 1)":"Ease-out Exponential. Based on two to the power ten.","cubic-bezier(0.47, 0, 0.745, 0.715)":"Ease-in Sine.","cubic-bezier(0.445, 0.05, 0.55, 0.95)":"Ease-in-out Sine.","cubic-bezier(0.39, 0.575, 0.565, 1)":"Ease-out Sine.","cubic-bezier(0.55, 0.085, 0.68, 0.53)":"Ease-in Quadratic. Based on power of two.","cubic-bezier(0.455, 0.03, 0.515, 0.955)":"Ease-in-out Quadratic. Based on power of two.","cubic-bezier(0.25, 0.46, 0.45, 0.94)":"Ease-out Quadratic. Based on power of two.","cubic-bezier(0.895, 0.03, 0.685, 0.22)":"Ease-in Quartic. Based on power of four.","cubic-bezier(0.77, 0, 0.175, 1)":"Ease-in-out Quartic. Based on power of four.","cubic-bezier(0.165, 0.84, 0.44, 1)":"Ease-out Quartic. Based on power of four.","cubic-bezier(0.755, 0.05, 0.855, 0.06)":"Ease-in Quintic. Based on power of five.","cubic-bezier(0.86, 0, 0.07, 1)":"Ease-in-out Quintic. Based on power of five.","cubic-bezier(0.23, 1, 0.320, 1)":"Ease-out Quintic. Based on power of five."},Eo={"circle()":"Defines a circle.","ellipse()":"Defines an ellipse.","inset()":"Defines an inset rectangle.","polygon()":"Defines a polygon."},_o={length:["em","rem","ex","px","cm","mm","in","pt","pc","ch","vw","vh","vmin","vmax"],angle:["deg","rad","grad","turn"],time:["ms","s"],frequency:["Hz","kHz"],resolution:["dpi","dpcm","dppx"],percentage:["%","fr"]},Fo=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","const","video","wbr"],Do=["circle","clipPath","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","hatch","hatchpath","image","line","linearGradient","marker","mask","mesh","meshpatch","meshrow","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidcolor","stop","svg","switch","symbol","text","textPath","tspan","use","view"],To=["@bottom-center","@bottom-left","@bottom-left-corner","@bottom-right","@bottom-right-corner","@left-bottom","@left-middle","@left-top","@right-bottom","@right-middle","@right-top","@top-center","@top-left","@top-left-corner","@top-right","@top-right-corner"];function Ro(e){return Object.keys(e).map((function(t){return e[t]}))}function No(e){return"undefined"!==typeof e}var zo=function(){for(var e=0,t=0,n=arguments.length;te.offset?i-e.offset:0}return e},e.prototype.markError=function(e,t,n,r){this.token!==this.lastErrorToken&&(e.addIssue(new Oi(e,t,kr.Error,void 0,this.token.offset,this.token.len)),this.lastErrorToken=this.token),(n||r)&&this.resync(n,r)},e.prototype.parseStylesheet=function(e){var t=e.version,n=e.getText(),r=function(r,i){if(e.version!==t)throw new Error("Underlying model has changed, AST is no longer valid");return n.substr(r,i)};return this.internalParse(n,this._parseStylesheet,r)},e.prototype.internalParse=function(e,t,n){this.scanner.setSource(e),this.token=this.scanner.scan();var r=t.bind(this)();return r&&(r.textProvider=n||function(t,n){return e.substr(t,n)}),r},e.prototype._parseStylesheet=function(){var e=this.create(Dr);while(e.addChild(this._parseStylesheetStart()));var t=!1;do{var n=!1;do{n=!1;var r=this._parseStylesheetStatement();r&&(e.addChild(r),n=!0,t=!1,this.peek(xn.EOF)||!this._needsSemicolonAfter(r)||this.accept(xn.SemiColon)||this.markError(e,Ki.SemiColonExpected));while(this.accept(xn.SemiColon)||this.accept(xn.CDO)||this.accept(xn.CDC))n=!0,t=!1}while(n);if(this.peek(xn.EOF))break;t||(this.peek(xn.AtKeyword)?this.markError(e,Ki.UnknownAtRule):this.markError(e,Ki.RuleOrSelectorExpected),t=!0),this.consumeToken()}while(!this.peek(xn.EOF));return this.finish(e)},e.prototype._parseStylesheetStart=function(){return this._parseCharset()},e.prototype._parseStylesheetStatement=function(e){return void 0===e&&(e=!1),this.peek(xn.AtKeyword)?this._parseStylesheetAtStatement(e):this._parseRuleset(e)},e.prototype._parseStylesheetAtStatement=function(e){return void 0===e&&(e=!1),this._parseImport()||this._parseMedia(e)||this._parsePage()||this._parseFontFace()||this._parseKeyframe()||this._parseSupports(e)||this._parseViewPort()||this._parseNamespace()||this._parseDocument()||this._parseUnknownAtRule()},e.prototype._tryParseRuleset=function(e){var t=this.mark();if(this._parseSelector(e)){while(this.accept(xn.Comma)&&this._parseSelector(e));if(this.accept(xn.CurlyL))return this.restoreAtMark(t),this._parseRuleset(e)}return this.restoreAtMark(t),null},e.prototype._parseRuleset=function(e){void 0===e&&(e=!1);var t=this.create(Nr),n=t.getSelectors();if(!n.addChild(this._parseSelector(e)))return null;while(this.accept(xn.Comma))if(!n.addChild(this._parseSelector(e)))return this.finish(t,Ki.SelectorExpected);return this._parseBody(t,this._parseRuleSetDeclaration.bind(this))},e.prototype._parseRuleSetDeclarationAtStatement=function(){return this._parseAtApply()||this._parseUnknownAtRule()},e.prototype._parseRuleSetDeclaration=function(){return this.peek(xn.AtKeyword)?this._parseRuleSetDeclarationAtStatement():this._tryParseCustomPropertyDeclaration()||this._parseDeclaration()},e.prototype._parseAtApply=function(){if(!this.peekKeyword("@apply"))return null;var e=this.create(Ar);return this.consumeToken(),e.setIdentifier(this._parseIdent([yr.Variable]))?this.finish(e):this.finish(e,Ki.IdentifierExpected)},e.prototype._needsSemicolonAfter=function(e){switch(e.type){case vr.Keyframe:case vr.ViewPort:case vr.Media:case vr.Ruleset:case vr.Namespace:case vr.If:case vr.For:case vr.Each:case vr.While:case vr.MixinDeclaration:case vr.FunctionDeclaration:case vr.MixinContentDeclaration:return!1;case vr.ExtendsReference:case vr.MixinContentReference:case vr.ReturnStatement:case vr.MediaQuery:case vr.Debug:case vr.Import:case vr.AtApplyRule:case vr.CustomPropertyDeclaration:return!0;case vr.VariableDeclaration:return e.needsSemicolon;case vr.MixinReference:return!e.getContent();case vr.Declaration:return!e.getNestedProperties()}return!1},e.prototype._parseDeclarations=function(e){var t=this.create(Tr);if(!this.accept(xn.CurlyL))return null;var n=e();while(t.addChild(n)){if(this.peek(xn.CurlyR))break;if(this._needsSemicolonAfter(n)&&!this.accept(xn.SemiColon))return this.finish(t,Ki.SemiColonExpected,[xn.SemiColon,xn.CurlyR]);n&&this.prevToken&&this.prevToken.type===xn.SemiColon&&(n.semicolonPosition=this.prevToken.offset);while(this.accept(xn.SemiColon));n=e()}return this.accept(xn.CurlyR)?this.finish(t):this.finish(t,Ki.RightCurlyExpected,[xn.CurlyR,xn.SemiColon])},e.prototype._parseBody=function(e,t){return e.setDeclarations(this._parseDeclarations(t))?this.finish(e):this.finish(e,Ki.LeftCurlyExpected,[xn.CurlyR,xn.SemiColon])},e.prototype._parseSelector=function(e){var t=this.create(zr),n=!1;e&&(n=t.addChild(this._parseCombinator()));while(t.addChild(this._parseSimpleSelector()))n=!0,t.addChild(this._parseCombinator());return n?this.finish(t):null},e.prototype._parseDeclaration=function(e){var t=this.create(Lr);if(!t.setProperty(this._parseProperty()))return null;if(!this.accept(xn.Colon)){var n=e?zo(e,[xn.SemiColon]):[xn.SemiColon];return this.finish(t,Ki.ColonExpected,[xn.Colon],n)}return this.prevToken&&(t.colonPosition=this.prevToken.offset),t.setValue(this._parseExpr())?(t.addChild(this._parsePrio()),this.peek(xn.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)):this.finish(t,Ki.PropertyValueExpected)},e.prototype._tryParseCustomPropertyDeclaration=function(){if(!this.peekRegExp(xn.Ident,/^--/))return null;var e=this.create(Pr);if(!e.setProperty(this._parseProperty()))return null;if(!this.accept(xn.Colon))return this.finish(e,Ki.ColonExpected,[xn.Colon]);this.prevToken&&(e.colonPosition=this.prevToken.offset);var t=this.mark();if(this.peek(xn.CurlyL)){var n=this.create(Or),r=this._parseDeclarations(this._parseRuleSetDeclaration.bind(this));if(n.setDeclarations(r)&&!r.isErroneous(!0)&&(n.addChild(this._parsePrio()),this.peek(xn.SemiColon)))return this.finish(n),e.setPropertySet(n),e.semicolonPosition=this.token.offset,this.finish(e);this.restoreAtMark(t)}var i=this._parseExpr();return i&&!i.isErroneous(!0)&&(this._parsePrio(),this.peek(xn.SemiColon))?(e.setValue(i),e.semicolonPosition=this.token.offset,this.finish(e)):(this.restoreAtMark(t),e.addChild(this._parseCustomPropertyValue()),e.addChild(this._parsePrio()),No(e.colonPosition)&&this.token.offset===e.colonPosition+1?this.finish(e,Ki.PropertyValueExpected):this.finish(e))},e.prototype._parseCustomPropertyValue=function(){var e=this.create(Er),t=function(){return 0===n&&0===r&&0===i},n=0,r=0,i=0;e:while(1){switch(this.token.type){case xn.SemiColon:if(t())break e;break;case xn.Exclamation:if(t())break e;break;case xn.CurlyL:n++;break;case xn.CurlyR:if(n--,n<0){if(0===r&&0===i)break e;return this.finish(e,Ki.LeftCurlyExpected)}break;case xn.ParenthesisL:r++;break;case xn.ParenthesisR:if(r--,r<0)return this.finish(e,Ki.LeftParenthesisExpected);break;case xn.BracketL:i++;break;case xn.BracketR:if(i--,i<0)return this.finish(e,Ki.LeftSquareBracketExpected);break;case xn.BadString:break e;case xn.EOF:var o=Ki.RightCurlyExpected;return i>0?o=Ki.RightSquareBracketExpected:r>0&&(o=Ki.RightParenthesisExpected),this.finish(e,o)}this.consumeToken()}return this.finish(e)},e.prototype._tryToParseDeclaration=function(){var e=this.mark();return this._parseProperty()&&this.accept(xn.Colon)?(this.restoreAtMark(e),this._parseDeclaration()):(this.restoreAtMark(e),null)},e.prototype._parseProperty=function(){var e=this.create(Wr),t=this.mark();return(this.acceptDelim("*")||this.acceptDelim("_"))&&this.hasWhitespace()?(this.restoreAtMark(t),null):e.setIdentifier(this._parsePropertyIdentifier())?this.finish(e):null},e.prototype._parsePropertyIdentifier=function(){return this._parseIdent()},e.prototype._parseCharset=function(){if(!this.peek(xn.Charset))return null;var e=this.create(Er);return this.consumeToken(),this.accept(xn.String)?this.accept(xn.SemiColon)?this.finish(e):this.finish(e,Ki.SemiColonExpected):this.finish(e,Ki.IdentifierExpected)},e.prototype._parseImport=function(){if(!this.peekKeyword("@import"))return null;var e=this.create(ti);return this.consumeToken(),e.addChild(this._parseURILiteral())||e.addChild(this._parseStringLiteral())?(this.peek(xn.SemiColon)||this.peek(xn.EOF)||e.setMedialist(this._parseMediaQueryList()),this.finish(e)):this.finish(e,Ki.URIOrStringExpected)},e.prototype._parseNamespace=function(){if(!this.peekKeyword("@namespace"))return null;var e=this.create(si);return this.consumeToken(),e.addChild(this._parseURILiteral())||(e.addChild(this._parseIdent()),e.addChild(this._parseURILiteral())||e.addChild(this._parseStringLiteral()))?this.accept(xn.SemiColon)?this.finish(e):this.finish(e,Ki.SemiColonExpected):this.finish(e,Ki.URIExpected,[xn.SemiColon])},e.prototype._parseFontFace=function(){if(!this.peekKeyword("@font-face"))return null;var e=this.create(Xr);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},e.prototype._parseViewPort=function(){if(!this.peekKeyword("@-ms-viewport")&&!this.peekKeyword("@-o-viewport")&&!this.peekKeyword("@viewport"))return null;var e=this.create(Jr);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},e.prototype._parseKeyframe=function(){if(!this.peekRegExp(xn.AtKeyword,this.keyframeRegex))return null;var e=this.create(Zr),t=this.create(Er);return this.consumeToken(),e.setKeyword(this.finish(t)),t.matches("@-ms-keyframes")&&this.markError(t,Ki.UnknownKeyword),e.setIdentifier(this._parseKeyframeIdent())?this._parseBody(e,this._parseKeyframeSelector.bind(this)):this.finish(e,Ki.IdentifierExpected,[xn.CurlyR])},e.prototype._parseKeyframeIdent=function(){return this._parseIdent([yr.Keyframe])},e.prototype._parseKeyframeSelector=function(){var e=this.create(ei);if(!e.addChild(this._parseIdent())&&!this.accept(xn.Percentage))return null;while(this.accept(xn.Comma))if(!e.addChild(this._parseIdent())&&!this.accept(xn.Percentage))return this.finish(e,Ki.PercentageExpected);return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},e.prototype._tryParseKeyframeSelector=function(){var e=this.create(ei),t=this.mark();if(!e.addChild(this._parseIdent())&&!this.accept(xn.Percentage))return null;while(this.accept(xn.Comma))if(!e.addChild(this._parseIdent())&&!this.accept(xn.Percentage))return this.restoreAtMark(t),null;return this.peek(xn.CurlyL)?this._parseBody(e,this._parseRuleSetDeclaration.bind(this)):(this.restoreAtMark(t),null)},e.prototype._parseSupports=function(e){if(void 0===e&&(e=!1),!this.peekKeyword("@supports"))return null;var t=this.create(li);return this.consumeToken(),t.addChild(this._parseSupportsCondition()),this._parseBody(t,this._parseSupportsDeclaration.bind(this,e))},e.prototype._parseSupportsDeclaration=function(e){return void 0===e&&(e=!1),e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)},e.prototype._parseSupportsCondition=function(){var e=this.create(pi);if(this.acceptIdent("not"))e.addChild(this._parseSupportsConditionInParens());else if(e.addChild(this._parseSupportsConditionInParens()),this.peekRegExp(xn.Ident,/^(and|or)$/i)){var t=this.token.text.toLowerCase();while(this.acceptIdent(t))e.addChild(this._parseSupportsConditionInParens())}return this.finish(e)},e.prototype._parseSupportsConditionInParens=function(){var e=this.create(pi);if(this.accept(xn.ParenthesisL))return this.prevToken&&(e.lParent=this.prevToken.offset),e.addChild(this._tryToParseDeclaration())||this._parseSupportsCondition()?this.accept(xn.ParenthesisR)?(this.prevToken&&(e.rParent=this.prevToken.offset),this.finish(e)):this.finish(e,Ki.RightParenthesisExpected,[xn.ParenthesisR],[]):this.finish(e,Ki.ConditionExpected);if(this.peek(xn.Ident)){var t=this.mark();if(this.consumeToken(),!this.hasWhitespace()&&this.accept(xn.ParenthesisL)){var n=1;while(this.token.type!==xn.EOF&&0!==n)this.token.type===xn.ParenthesisL?n++:this.token.type===xn.ParenthesisR&&n--,this.consumeToken();return this.finish(e)}this.restoreAtMark(t)}return this.finish(e,Ki.LeftParenthesisExpected,[],[xn.ParenthesisL])},e.prototype._parseMediaDeclaration=function(e){return void 0===e&&(e=!1),e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)},e.prototype._parseMedia=function(e){if(void 0===e&&(e=!1),!this.peekKeyword("@media"))return null;var t=this.create(ai);return this.consumeToken(),t.addChild(this._parseMediaQueryList())?this._parseBody(t,this._parseMediaDeclaration.bind(this,e)):this.finish(t,Ki.MediaQueryExpected)},e.prototype._parseMediaQueryList=function(){var e=this.create(di);if(!e.addChild(this._parseMediaQuery([xn.CurlyL])))return this.finish(e,Ki.MediaQueryExpected);while(this.accept(xn.Comma))if(!e.addChild(this._parseMediaQuery([xn.CurlyL])))return this.finish(e,Ki.MediaQueryExpected);return this.finish(e)},e.prototype._parseMediaQuery=function(e){var t=this.create(hi),n=!0,r=!1;if(!this.peek(xn.ParenthesisL)){if(this.acceptIdent("only")||this.acceptIdent("not"),!t.addChild(this._parseIdent()))return null;r=!0,n=this.acceptIdent("and")}while(n)if(t.addChild(this._parseMediaContentStart()))n=this.acceptIdent("and");else{if(!this.accept(xn.ParenthesisL))return r?this.finish(t,Ki.LeftParenthesisExpected,[],e):null;if(!t.addChild(this._parseMediaFeatureName()))return this.finish(t,Ki.IdentifierExpected,[],e);if(this.accept(xn.Colon)&&!t.addChild(this._parseExpr()))return this.finish(t,Ki.TermExpected,[],e);if(!this.accept(xn.ParenthesisR))return this.finish(t,Ki.RightParenthesisExpected,[],e);n=this.acceptIdent("and")}return this.finish(t)},e.prototype._parseMediaContentStart=function(){return null},e.prototype._parseMediaFeatureName=function(){return this._parseIdent()},e.prototype._parseMedium=function(){var e=this.create(Er);return e.addChild(this._parseIdent())?this.finish(e):null},e.prototype._parsePageDeclaration=function(){return this._parsePageMarginBox()||this._parseRuleSetDeclaration()},e.prototype._parsePage=function(){if(!this.peekKeyword("@page"))return null;var e=this.create(ui);if(this.consumeToken(),e.addChild(this._parsePageSelector()))while(this.accept(xn.Comma))if(!e.addChild(this._parsePageSelector()))return this.finish(e,Ki.IdentifierExpected);return this._parseBody(e,this._parsePageDeclaration.bind(this))},e.prototype._parsePageMarginBox=function(){if(!this.peek(xn.AtKeyword))return null;var e=this.create(mi);return this.acceptOneKeyword(To)||this.markError(e,Ki.UnknownAtRule,[],[xn.CurlyL]),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},e.prototype._parsePageSelector=function(){if(!this.peek(xn.Ident)&&!this.peek(xn.Colon))return null;var e=this.create(Er);return e.addChild(this._parseIdent()),this.accept(xn.Colon)&&!e.addChild(this._parseIdent())?this.finish(e,Ki.IdentifierExpected):this.finish(e)},e.prototype._parseDocument=function(){if(!this.peekKeyword("@-moz-document"))return null;var e=this.create(ci);return this.consumeToken(),this.resync([],[xn.CurlyL]),this._parseBody(e,this._parseStylesheetStatement.bind(this))},e.prototype._parseUnknownAtRule=function(){if(!this.peek(xn.AtKeyword))return null;var e=this.create(zi);e.addChild(this._parseUnknownAtRuleName());var t=function(){return 0===r&&0===i&&0===o},n=0,r=0,i=0,o=0;e:while(1){switch(this.token.type){case xn.SemiColon:if(t())break e;break;case xn.EOF:return r>0?this.finish(e,Ki.RightCurlyExpected):o>0?this.finish(e,Ki.RightSquareBracketExpected):i>0?this.finish(e,Ki.RightParenthesisExpected):this.finish(e);case xn.CurlyL:n++,r++;break;case xn.CurlyR:if(r--,n>0&&0===r){if(this.consumeToken(),o>0)return this.finish(e,Ki.RightSquareBracketExpected);if(i>0)return this.finish(e,Ki.RightParenthesisExpected);break e}if(r<0){if(0===i&&0===o)break e;return this.finish(e,Ki.LeftCurlyExpected)}break;case xn.ParenthesisL:i++;break;case xn.ParenthesisR:if(i--,i<0)return this.finish(e,Ki.LeftParenthesisExpected);break;case xn.BracketL:o++;break;case xn.BracketR:if(o--,o<0)return this.finish(e,Ki.LeftSquareBracketExpected);break}this.consumeToken()}return e},e.prototype._parseUnknownAtRuleName=function(){var e=this.create(Er);return this.accept(xn.AtKeyword)?this.finish(e):e},e.prototype._parseOperator=function(){if(this.peekDelim("/")||this.peekDelim("*")||this.peekDelim("+")||this.peekDelim("-")||this.peek(xn.Dashmatch)||this.peek(xn.Includes)||this.peek(xn.SubstringOperator)||this.peek(xn.PrefixOperator)||this.peek(xn.SuffixOperator)||this.peekDelim("=")){var e=this.createNode(vr.Operator);return this.consumeToken(),this.finish(e)}return null},e.prototype._parseUnaryOperator=function(){if(!this.peekDelim("+")&&!this.peekDelim("-"))return null;var e=this.create(Er);return this.consumeToken(),this.finish(e)},e.prototype._parseCombinator=function(){if(this.peekDelim(">")){var e=this.create(Er);this.consumeToken();var t=this.mark();if(!this.hasWhitespace()&&this.acceptDelim(">")){if(!this.hasWhitespace()&&this.acceptDelim(">"))return e.type=vr.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(t)}return e.type=vr.SelectorCombinatorParent,this.finish(e)}if(this.peekDelim("+")){e=this.create(Er);return this.consumeToken(),e.type=vr.SelectorCombinatorSibling,this.finish(e)}if(this.peekDelim("~")){e=this.create(Er);return this.consumeToken(),e.type=vr.SelectorCombinatorAllSiblings,this.finish(e)}if(this.peekDelim("/")){e=this.create(Er);this.consumeToken();t=this.mark();if(!this.hasWhitespace()&&this.acceptIdent("deep")&&!this.hasWhitespace()&&this.acceptDelim("/"))return e.type=vr.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(t)}return null},e.prototype._parseSimpleSelector=function(){var e=this.create(Ir),t=0;e.addChild(this._parseElementName())&&t++;while((0===t||!this.hasWhitespace())&&e.addChild(this._parseSimpleSelectorBody()))t++;return t>0?this.finish(e):null},e.prototype._parseSimpleSelectorBody=function(){return this._parsePseudo()||this._parseHash()||this._parseClass()||this._parseAttrib()},e.prototype._parseSelectorIdent=function(){return this._parseIdent()},e.prototype._parseHash=function(){if(!this.peek(xn.Hash)&&!this.peekDelim("#"))return null;var e=this.createNode(vr.IdentifierSelector);if(this.acceptDelim("#")){if(this.hasWhitespace()||!e.addChild(this._parseSelectorIdent()))return this.finish(e,Ki.IdentifierExpected)}else this.consumeToken();return this.finish(e)},e.prototype._parseClass=function(){if(!this.peekDelim("."))return null;var e=this.createNode(vr.ClassSelector);return this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseSelectorIdent())?this.finish(e,Ki.IdentifierExpected):this.finish(e)},e.prototype._parseElementName=function(){var e=this.mark(),t=this.createNode(vr.ElementNameSelector);return t.addChild(this._parseNamespacePrefix()),t.addChild(this._parseSelectorIdent())||this.acceptDelim("*")?this.finish(t):(this.restoreAtMark(e),null)},e.prototype._parseNamespacePrefix=function(){var e=this.mark(),t=this.createNode(vr.NamespacePrefix);return!t.addChild(this._parseIdent())&&this.acceptDelim("*"),this.acceptDelim("|")?this.finish(t):(this.restoreAtMark(e),null)},e.prototype._parseAttrib=function(){if(!this.peek(xn.BracketL))return null;var e=this.create(vi);return this.consumeToken(),e.setNamespacePrefix(this._parseNamespacePrefix()),e.setIdentifier(this._parseIdent())?(e.setOperator(this._parseOperator())&&(e.setValue(this._parseBinaryExpr()),this.acceptIdent("i")),this.accept(xn.BracketR)?this.finish(e):this.finish(e,Ki.RightSquareBracketExpected)):this.finish(e,Ki.IdentifierExpected)},e.prototype._parsePseudo=function(){var e=this,t=this._tryParsePseudoIdentifier();if(t){if(!this.hasWhitespace()&&this.accept(xn.ParenthesisL)){var n=function(){var t=e.create(Er);if(!t.addChild(e._parseSelector(!1)))return null;while(e.accept(xn.Comma)&&t.addChild(e._parseSelector(!1)));return e.peek(xn.ParenthesisR)?e.finish(t):null};if(t.addChild(this.try(n)||this._parseBinaryExpr()),!this.accept(xn.ParenthesisR))return this.finish(t,Ki.RightParenthesisExpected)}return this.finish(t)}return null},e.prototype._tryParsePseudoIdentifier=function(){if(!this.peek(xn.Colon))return null;var e=this.mark(),t=this.createNode(vr.PseudoSelector);return this.consumeToken(),this.hasWhitespace()?(this.restoreAtMark(e),null):(this.accept(xn.Colon)&&this.hasWhitespace()&&this.markError(t,Ki.IdentifierExpected),t.addChild(this._parseIdent())||this.markError(t,Ki.IdentifierExpected),t)},e.prototype._tryParsePrio=function(){var e=this.mark(),t=this._parsePrio();return t||(this.restoreAtMark(e),null)},e.prototype._parsePrio=function(){if(!this.peek(xn.Exclamation))return null;var e=this.createNode(vr.Prio);return this.accept(xn.Exclamation)&&this.acceptIdent("important")?this.finish(e):null},e.prototype._parseExpr=function(e){void 0===e&&(e=!1);var t=this.create(fi);if(!t.addChild(this._parseBinaryExpr()))return null;while(1){if(this.peek(xn.Comma)){if(e)return this.finish(t);this.consumeToken()}if(!t.addChild(this._parseBinaryExpr()))break}return this.finish(t)},e.prototype._parseNamedLine=function(){if(!this.peek(xn.BracketL))return null;var e=this.createNode(vr.GridLine);this.consumeToken();while(e.addChild(this._parseIdent()));return this.accept(xn.BracketR)?this.finish(e):this.finish(e,Ki.RightSquareBracketExpected)},e.prototype._parseBinaryExpr=function(e,t){var n=this.create(gi);if(!n.setLeft(e||this._parseTerm()))return null;if(!n.setOperator(t||this._parseOperator()))return this.finish(n);if(!n.setRight(this._parseTerm()))return this.finish(n,Ki.TermExpected);n=this.finish(n);var r=this._parseOperator();return r&&(n=this._parseBinaryExpr(n,r)),this.finish(n)},e.prototype._parseTerm=function(){var e=this.create(bi);return e.setOperator(this._parseUnaryOperator()),e.setExpression(this._parseTermExpression())?this.finish(e):null},e.prototype._parseTermExpression=function(){return this._parseURILiteral()||this._parseFunction()||this._parseIdent()||this._parseStringLiteral()||this._parseNumeric()||this._parseHexColor()||this._parseOperation()||this._parseNamedLine()},e.prototype._parseOperation=function(){if(!this.peek(xn.ParenthesisL))return null;var e=this.create(Er);return this.consumeToken(),e.addChild(this._parseExpr()),this.accept(xn.ParenthesisR)?this.finish(e):this.finish(e,Ki.RightParenthesisExpected)},e.prototype._parseNumeric=function(){if(this.peek(xn.Num)||this.peek(xn.Percentage)||this.peek(xn.Resolution)||this.peek(xn.Length)||this.peek(xn.EMS)||this.peek(xn.EXS)||this.peek(xn.Angle)||this.peek(xn.Time)||this.peek(xn.Dimension)||this.peek(xn.Freq)){var e=this.create(Ci);return this.consumeToken(),this.finish(e)}return null},e.prototype._parseStringLiteral=function(){if(!this.peek(xn.String)&&!this.peek(xn.BadString))return null;var e=this.createNode(vr.StringLiteral);return this.consumeToken(),this.finish(e)},e.prototype._parseURILiteral=function(){if(!this.peekRegExp(xn.Ident,/^url(-prefix)?$/i))return null;var e=this.mark(),t=this.createNode(vr.URILiteral);return this.accept(xn.Ident),this.hasWhitespace()||!this.peek(xn.ParenthesisL)?(this.restoreAtMark(e),null):(this.scanner.inURL=!0,this.consumeToken(),t.addChild(this._parseURLArgument()),this.scanner.inURL=!1,this.accept(xn.ParenthesisR)?this.finish(t):this.finish(t,Ki.RightParenthesisExpected))},e.prototype._parseURLArgument=function(){var e=this.create(Er);return this.accept(xn.String)||this.accept(xn.BadString)||this.acceptUnquotedString()?this.finish(e):null},e.prototype._parseIdent=function(e){if(!this.peek(xn.Ident))return null;var t=this.create(Fr);return e&&(t.referenceTypes=e),t.isCustomProperty=this.peekRegExp(xn.Ident,/^--/),this.consumeToken(),this.finish(t)},e.prototype._parseFunction=function(){var e=this.mark(),t=this.create(Vr);if(!t.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(xn.ParenthesisL))return this.restoreAtMark(e),null;if(t.getArguments().addChild(this._parseFunctionArgument()))while(this.accept(xn.Comma)){if(this.peek(xn.ParenthesisR))break;t.getArguments().addChild(this._parseFunctionArgument())||this.markError(t,Ki.ExpressionExpected)}return this.accept(xn.ParenthesisR)?this.finish(t):this.finish(t,Ki.RightParenthesisExpected)},e.prototype._parseFunctionIdentifier=function(){if(!this.peek(xn.Ident))return null;var e=this.create(Fr);if(e.referenceTypes=[yr.Function],this.acceptIdent("progid")){if(this.accept(xn.Colon))while(this.accept(xn.Ident)&&this.acceptDelim("."));return this.finish(e)}return this.consumeToken(),this.finish(e)},e.prototype._parseFunctionArgument=function(){var e=this.create(Br);return e.setValue(this._parseExpr(!0))?this.finish(e):null},e.prototype._parseHexColor=function(){if(this.peekRegExp(xn.Hash,/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/g)){var e=this.create(yi);return this.consumeToken(),this.finish(e)}return null},e}();function Ao(e,t){var n=0,r=e.length;if(0===r)return 0;while(ne+t||this.offset===e&&this.length===t?this.findInScope(e,t):null},e.prototype.findInScope=function(e,t){void 0===t&&(t=0);var n=e+t,r=Ao(this.children,(function(e){return e.offset>n}));if(0===r)return this;var i=this.children[r-1];return i.offset<=e&&i.offset+i.length>=e+t?i.findInScope(e,t):this},e.prototype.addSymbol=function(e){this.symbols.push(e)},e.prototype.getSymbol=function(e,t){for(var n=0;n0&&(i.arguments=n),i}function n(e){var t=e;return Us.defined(t)&&Us.string(t.title)&&Us.string(t.command)}e.create=t,e.is=n}(Xo||(Xo={})),function(e){function t(e,t){return{range:e,newText:t}}function n(e,t){return{range:{start:e,end:e},newText:t}}function r(e){return{range:e,newText:""}}function i(e){var t=e;return Us.objectLiteral(t)&&Us.string(t.newText)&&Lo.is(t.range)}e.replace=t,e.insert=n,e.del=r,e.is=i}(Qo||(Qo={})),function(e){function t(e,t){return{textDocument:e,edits:t}}function n(e){var t=e;return Us.defined(t)&&hs.is(t.textDocument)&&Array.isArray(t.edits)}e.create=t,e.is=n}(Zo||(Zo={})),function(e){function t(e,t){var n={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(n.options=t),n}function n(e){var t=e;return t&&"create"===t.kind&&Us.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Us.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Us.boolean(t.options.ignoreIfExists)))}e.create=t,e.is=n}(es||(es={})),function(e){function t(e,t,n){var r={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(r.options=n),r}function n(e){var t=e;return t&&"rename"===t.kind&&Us.string(t.oldUri)&&Us.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Us.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Us.boolean(t.options.ignoreIfExists)))}e.create=t,e.is=n}(ts||(ts={})),function(e){function t(e,t){var n={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(n.options=t),n}function n(e){var t=e;return t&&"delete"===t.kind&&Us.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Us.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Us.boolean(t.options.ignoreIfNotExists)))}e.create=t,e.is=n}(ns||(ns={})),function(e){function t(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return Us.string(e.kind)?es.is(e)||ts.is(e)||ns.is(e):Zo.is(e)})))}e.is=t}(rs||(rs={}));var ds,hs,ps,us,ms,fs,gs,bs,vs,ys,ws,xs,Ss,Cs,ks,Es,_s,Fs,Ds,Ts,Rs,Ns,zs,Is,As,Ms,Ps,Os,Ls=function(){function e(e){this.edits=e}return e.prototype.insert=function(e,t){this.edits.push(Qo.insert(e,t))},e.prototype.replace=function(e,t){this.edits.push(Qo.replace(e,t))},e.prototype.delete=function(e){this.edits.push(Qo.del(e))},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e}();(function(){function e(e){var t=this;this._textEditChanges=Object.create(null),e&&(this._workspaceEdit=e,e.documentChanges?e.documentChanges.forEach((function(e){if(Zo.is(e)){var n=new Ls(e.edits);t._textEditChanges[e.textDocument.uri]=n}})):e.changes&&Object.keys(e.changes).forEach((function(n){var r=new Ls(e.changes[n]);t._textEditChanges[n]=r})))}Object.defineProperty(e.prototype,"edit",{get:function(){return void 0===this._workspaceEdit?{documentChanges:[]}:this._workspaceEdit},enumerable:!0,configurable:!0}),e.prototype.getTextEditChange=function(e){if(hs.is(e)){if(this._workspaceEdit||(this._workspaceEdit={documentChanges:[]}),!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t=e,n=this._textEditChanges[t.uri];if(!n){var r=[],i={textDocument:t,edits:r};this._workspaceEdit.documentChanges.push(i),n=new Ls(r),this._textEditChanges[t.uri]=n}return n}if(this._workspaceEdit||(this._workspaceEdit={changes:Object.create(null)}),!this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");n=this._textEditChanges[e];if(!n){r=[];this._workspaceEdit.changes[e]=r,n=new Ls(r),this._textEditChanges[e]=n}return n},e.prototype.createFile=function(e,t){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(es.create(e,t))},e.prototype.renameFile=function(e,t,n){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(ts.create(e,t,n))},e.prototype.deleteFile=function(e,t){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(ns.create(e,t))},e.prototype.checkDocumentChanges=function(){if(!this._workspaceEdit||!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.")}})();(function(e){function t(e){return{uri:e}}function n(e){var t=e;return Us.defined(t)&&Us.string(t.uri)}e.create=t,e.is=n})(ds||(ds={})),function(e){function t(e,t){return{uri:e,version:t}}function n(e){var t=e;return Us.defined(t)&&Us.string(t.uri)&&(null===t.version||Us.number(t.version))}e.create=t,e.is=n}(hs||(hs={})),function(e){function t(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}}function n(e){var t=e;return Us.defined(t)&&Us.string(t.uri)&&Us.string(t.languageId)&&Us.number(t.version)&&Us.string(t.text)}e.create=t,e.is=n}(ps||(ps={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(us||(us={})),function(e){function t(t){var n=t;return n===e.PlainText||n===e.Markdown}e.is=t}(us||(us={})),function(e){function t(e){var t=e;return Us.objectLiteral(e)&&us.is(t.kind)&&Us.string(t.value)}e.is=t}(ms||(ms={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(fs||(fs={})),function(e){e.PlainText=1,e.Snippet=2}(gs||(gs={})),function(e){e.Deprecated=1}(bs||(bs={})),function(e){function t(e,t,n){return{newText:e,insert:t,replace:n}}function n(e){var t=e;return t&&Us.string(t.newText)&&Lo.is(t.insert)&&Lo.is(t.replace)}e.create=t,e.is=n}(vs||(vs={})),function(e){function t(e){return{label:e}}e.create=t}(ys||(ys={})),function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}e.create=t}(ws||(ws={})),function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function n(e){var t=e;return Us.string(t)||Us.objectLiteral(t)&&Us.string(t.language)&&Us.string(t.value)}e.fromPlainText=t,e.is=n}(xs||(xs={})),function(e){function t(e){var t=e;return!!t&&Us.objectLiteral(t)&&(ms.is(t.contents)||xs.is(t.contents)||Us.typedArray(t.contents,xs.is))&&(void 0===e.range||Lo.is(e.range))}e.is=t}(Ss||(Ss={})),function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}e.create=t}(Cs||(Cs={})),function(e){function t(e,t){for(var n=[],r=2;r=0;s--){var a=r[s],l=e.offsetAt(a.range.start),c=e.offsetAt(a.range.end);if(!(c<=o))throw new Error("Overlapping edit");n=n.substring(0,l)+a.newText+n.substring(c,n.length),o=l}return n}function i(e,t){if(e.length<=1)return e;var n=e.length/2|0,r=e.slice(0,n),o=e.slice(n);i(r,t),i(o,t);var s=0,a=0,l=0;while(s0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return Oo.create(0,e);while(ne?r=i:n=i+1}var o=n-1;return Oo.create(o,e-t[o])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],r=e.line+1e?r=i:n=i+1}var o=n-1;return{line:o,character:e-t[o]}},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],r=e.line+1n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Ys(e){var t=Hs(e.range);return t!==e.range?{newText:e.newText,range:t}:e}(function(e){function t(e,t,n,r){return new qs(e,t,n,r)}function n(e,t,n){if(e instanceof qs)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")}function r(e,t){for(var n=e.getText(),r=$s(t.map(Ys),(function(e,t){var n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),i=0,o=[],s=0,a=r;si&&o.push(n.substring(i,c)),l.newText.length&&o.push(l.newText),i=e.offsetAt(l.range.end)}return o.push(n.substr(i)),o.join("")}e.create=t,e.update=n,e.applyEdits=r})(js||(js={})),function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[us.Markdown,us.PlainText]}},hover:{contentFormat:[us.Markdown,us.PlainText]}}}}(Bs||(Bs={})),function(e){e[e["Unknown"]=0]="Unknown",e[e["File"]=1]="File",e[e["Directory"]=2]="Directory",e[e["SymbolicLink"]=64]="SymbolicLink"}(Ks||(Ks={}));var Js=n("ed59"),Xs="/".charCodeAt(0),Qs=".".charCodeAt(0);function Zs(e){var t=e.lastIndexOf("/");return-1!==t?e.substr(0,t):""}function ea(e){for(var t=e.length-1;t>=0;t--){var n=e.charCodeAt(t);if(n===Qs){if(t>0&&e.charCodeAt(t-1)!==Xs)return e.substr(t);break}if(n===Xs)break}return""}function ta(e){for(var t=[],n=0,r=e;n1&&0===e[e.length-1].length&&t.push("");var o=t.join("/");return 0===e[0].length&&(o="/"+o),o}function na(e){for(var t=[],n=1;n0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=0;i--){var o=this.nodePath[i];if(o instanceof Wr)this.getCompletionsForDeclarationProperty(o.getParent(),r);else if(o instanceof fi)o.parent instanceof Ei?this.getVariableProposals(null,r):this.getCompletionsForExpression(o,r);else if(o instanceof Ir){var s=o.findAParent(vr.ExtendsReference,vr.Ruleset);if(s)if(s.type===vr.ExtendsReference)this.getCompletionsForExtendsReference(s,o,r);else{var a=s;this.getCompletionsForSelector(a,a&&a.isNested(),r)}}else if(o instanceof Br)this.getCompletionsForFunctionArgument(o,o.getParent(),r);else if(o instanceof Tr)this.getCompletionsForDeclarations(o,r);else if(o instanceof ki)this.getCompletionsForVariableDeclaration(o,r);else if(o instanceof Nr)this.getCompletionsForRuleSet(o,r);else if(o instanceof Ei)this.getCompletionsForInterpolation(o,r);else if(o instanceof Yr)this.getCompletionsForFunctionDeclaration(o,r);else if(o instanceof Ri)this.getCompletionsForMixinReference(o,r);else if(o instanceof Vr)this.getCompletionsForFunctionArgument(null,o,r);else if(o instanceof li)this.getCompletionsForSupports(o,r);else if(o instanceof pi)this.getCompletionsForSupportsCondition(o,r);else if(o instanceof Fi)this.getCompletionsForExtendsReference(o,null,r);else if(o.type===vr.URILiteral)this.getCompletionForUriLiteralValue(o,r);else if(null===o.parent)this.getCompletionForTopLevel(r);else{if(o.type!==vr.StringLiteral||!this.isImportPathParent(o.parent.type))continue;this.getCompletionForImportPath(o,r)}if(r.items.length>0||this.offset>o.offset)return this.finalize(r)}return this.getCompletionsForStylesheet(r),0===r.items.length&&this.variablePrefix&&0===this.currentWord.indexOf(this.variablePrefix)&&this.getVariableProposals(null,r),this.finalize(r)}finally{this.position=null,this.currentWord=null,this.textDocument=null,this.styleSheet=null,this.symbolContext=null,this.defaultReplaceRange=null,this.nodePath=null}},e.prototype.isImportPathParent=function(e){return e===vr.Import},e.prototype.finalize=function(e){return e},e.prototype.findInNodePath=function(){for(var e=[],t=0;t=0;n--){var r=this.nodePath[n];if(-1!==e.indexOf(r.type))return r}return null},e.prototype.getCompletionsForDeclarationProperty=function(e,t){return this.getPropertyProposals(e,t)},e.prototype.getPropertyProposals=function(e,t){var n=this,r=this.isTriggerPropertyValueCompletionEnabled,i=this.isCompletePropertyWithSemicolonEnabled,o=this.cssDataManager.getProperties();return o.forEach((function(o){var s,a,l=!1;e?(s=n.getCompletionRange(e.getProperty()),a=o.name,No(e.colonPosition)||(a+=": ",l=!0)):(s=n.getCompletionRange(null),a=o.name+": ",l=!0),!e&&i&&(a+="$0;"),e&&!e.semicolonPosition&&i&&n.offset>=n.textDocument.offsetAt(s.end)&&(a+="$0;");var c={label:o.name,documentation:Gi(o,n.doesSupportMarkdown()),tags:ya(o)?[bs.Deprecated]:[],textEdit:Qo.replace(s,a),insertTextFormat:gs.Snippet,kind:fs.Property};o.restrictions||(l=!1),r&&l&&(c.command={title:"Suggest",command:"editor.action.triggerSuggest"});var d="number"===typeof o.relevance?Math.min(Math.max(o.relevance,0),99):50,h=(255-d).toString(16),p=ur(o.name,"-")?ua.VendorPrefixed:ua.Normal;c.sortText=p+"_"+h,t.items.push(c)})),this.completionParticipants.forEach((function(e){e.onCssProperty&&e.onCssProperty({propertyName:n.currentWord,range:n.defaultReplaceRange})})),t},Object.defineProperty(e.prototype,"isTriggerPropertyValueCompletionEnabled",{get:function(){return!this.settings||!this.settings.completion||void 0===this.settings.completion.triggerPropertyValueCompletion||this.settings.completion.triggerPropertyValueCompletion},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isCompletePropertyWithSemicolonEnabled",{get:function(){return!this.settings||!this.settings.completion||void 0===this.settings.completion.completePropertyWithSemicolon||this.settings.completion.completePropertyWithSemicolon},enumerable:!0,configurable:!0}),e.prototype.getCompletionsForDeclarationValue=function(e,t){var n=this,r=e.getFullPropertyName(),i=this.cssDataManager.getProperty(r),o=e.getValue()||null;while(o&&o.hasChildren())o=o.findChildAtOffset(this.offset,!1);if(this.completionParticipants.forEach((function(e){e.onCssPropertyValue&&e.onCssPropertyValue({propertyName:r,propertyValue:n.currentWord,range:n.getCompletionRange(o)})})),i){if(i.restrictions)for(var s=0,a=i.restrictions;s=e.offset+2&&this.getVariableProposals(null,t),t},e.prototype.getVariableProposals=function(e,t){for(var n=this.getSymbolContext().findSymbolsAtOffset(this.offset,yr.Variable),r=0,i=n;r0){var i=this.currentWord.match(/^-?\d[\.\d+]*/);i&&(r=i[0],n.isIncomplete=r.length===this.currentWord.length)}else 0===this.currentWord.length&&(n.isIncomplete=!0);if(t&&t.parent&&t.parent.type===vr.Term&&(t=t.getParent()),e.restrictions)for(var o=0,s=e.restrictions;o=n.end;if(r)return this.getCompletionForTopLevel(t);var i=!n||this.offset<=n.offset;return i?this.getCompletionsForSelector(e,e.isNested(),t):this.getCompletionsForDeclarations(e.getDeclarations(),t)},e.prototype.getCompletionsForSelector=function(e,t,n){var r=this,i=this.findInNodePath(vr.PseudoSelector,vr.IdentifierSelector,vr.ClassSelector,vr.ElementNameSelector);!i&&this.offset-this.currentWord.length>0&&":"===this.textDocument.getText()[this.offset-this.currentWord.length-1]&&(this.currentWord=":"+this.currentWord,this.defaultReplaceRange=Lo.create(Oo.create(this.position.line,this.position.character-this.currentWord.length),this.position));var o=this.cssDataManager.getPseudoClasses();o.forEach((function(e){var t=xa(e.name),o={label:e.name,textEdit:Qo.replace(r.getCompletionRange(i),t),documentation:Gi(e,r.doesSupportMarkdown()),tags:ya(e)?[bs.Deprecated]:[],kind:fs.Function,insertTextFormat:e.name!==t?ba:void 0};ur(e.name,":-")&&(o.sortText=ua.VendorPrefixed),n.items.push(o)}));var s=this.cssDataManager.getPseudoElements();if(s.forEach((function(e){var t=xa(e.name),o={label:e.name,textEdit:Qo.replace(r.getCompletionRange(i),t),documentation:Gi(e,r.doesSupportMarkdown()),tags:ya(e)?[bs.Deprecated]:[],kind:fs.Function,insertTextFormat:e.name!==t?ba:void 0};ur(e.name,"::-")&&(o.sortText=ua.VendorPrefixed),n.items.push(o)})),!t){for(var a=0,l=Fo;a0){var t=u.substr(e.offset,e.length);return"."!==t.charAt(0)||p[t]||(p[t]=!0,n.items.push({label:t,textEdit:Qo.replace(r.getCompletionRange(i),t),kind:fs.Keyword})),!1}return!0})),e&&e.isNested()){var m=e.getSelectors().findFirstChildBeforeOffset(this.offset);m&&0===e.getSelectors().getChildren().indexOf(m)&&this.getPropertyProposals(null,n)}return n},e.prototype.getCompletionsForDeclarations=function(e,t){if(!e||this.offset===e.offset)return t;var n=e.findFirstChildBeforeOffset(this.offset);if(!n)return this.getCompletionsForDeclarationProperty(null,t);if(n instanceof Mr){var r=n;if(!No(r.colonPosition)||this.offset<=r.colonPosition)return this.getCompletionsForDeclarationProperty(r,t);if(No(r.semicolonPosition)&&r.semicolonPositione.colonPosition&&this.getVariableProposals(e.getValue(),t),t},e.prototype.getCompletionsForExpression=function(e,t){var n=e.getParent();if(n instanceof Br)return this.getCompletionsForFunctionArgument(n,n.getParent(),t),t;var r=e.findParent(vr.Declaration);if(!r)return this.getTermProposals(void 0,null,t),t;var i=e.findChildAtOffset(this.offset,!0);return i?i instanceof Ci||i instanceof Fr?this.getCompletionsForDeclarationValue(r,t):t:this.getCompletionsForDeclarationValue(r,t)},e.prototype.getCompletionsForFunctionArgument=function(e,t,n){var r=t.getIdentifier();return r&&r.matches("var")&&(t.getArguments().hasChildren()&&t.getArguments().getChild(0)!==e||this.getVariableProposalsForCSSVarFunction(n)),n},e.prototype.getCompletionsForFunctionDeclaration=function(e,t){var n=e.getDeclarations();return n&&this.offset>n.offset&&this.offsete.lParent&&(!No(e.rParent)||this.offset<=e.rParent)?this.getCompletionsForDeclarationProperty(null,t):t},e.prototype.getCompletionsForSupports=function(e,t){var n=e.getDeclarations(),r=!n||this.offset<=n.offset;if(r){var i=e.findFirstChildBeforeOffset(this.offset);return i instanceof pi?this.getCompletionsForSupportsCondition(i,t):t}return this.getCompletionForTopLevel(t)},e.prototype.getCompletionsForExtendsReference=function(e,t,n){return n},e.prototype.getCompletionForUriLiteralValue=function(e,t){var n,r,i;if(e.hasChildren()){var o=e.getChild(0);n=o.getText(),r=this.position,i=this.getCompletionRange(o)}else{n="",r=this.position;var s=this.textDocument.positionAt(e.offset+"url(".length);i=Lo.create(s,s)}return this.completionParticipants.forEach((function(e){e.onCssURILiteralValue&&e.onCssURILiteralValue({uriValue:n,position:r,range:i})})),t},e.prototype.getCompletionForImportPath=function(e,t){var n=this;return this.completionParticipants.forEach((function(t){t.onCssImportPath&&t.onCssImportPath({pathValue:e.getText(),position:n.position,range:n.getCompletionRange(e)})})),t},e.prototype.doesSupportMarkdown=function(){var e,t,n;if(!No(this.supportsMarkdown)){if(!No(this.lsOptions.clientCapabilities))return this.supportsMarkdown=!0,this.supportsMarkdown;var r=null===(n=null===(t=null===(e=this.lsOptions.clientCapabilities.textDocument)||void 0===e?void 0:e.completion)||void 0===t?void 0:t.completionItem)||void 0===n?void 0:n.documentationFormat;this.supportsMarkdown=Array.isArray(r)&&-1!==r.indexOf(us.Markdown)}return this.supportsMarkdown},e}();function ya(e){return!(!e.status||"nonstandard"!==e.status&&"obsolete"!==e.status)}var wa=function(){function e(){this.entries={}}return e.prototype.add=function(e){this.entries[e]=!0},e.prototype.getEntries=function(){return Object.keys(this.entries)},e}();function xa(e){return e.replace(/\(\)$/,"($1)")}function Sa(e,t){var n=t.getFullPropertyName(),r=new wa;function i(e){return(e instanceof Fr||e instanceof Ci||e instanceof yi)&&r.add(e.getText()),!0}function o(e){var t=e.getFullPropertyName();return n===t}function s(e){if(e instanceof Lr&&e!==t&&o(e)){var n=e.getValue();n&&n.accept(i)}return!0}return e.accept(s),r}var Ca=function(){function e(e,t){this.entries=e,this.currentOffset=t}return e.prototype.visitNode=function(e){return(e instanceof yi||e instanceof Vr&&io(e))&&(this.currentOffset=0&&-1===' \t\n\r":{[()]},*>+'.indexOf(r.charAt(n)))n--;return r.substring(n+1,t)}function Ea(e){return e.toLowerCase()in eo||/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)}var _a,Fa=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Da=Vi(),Ta=function(){function e(){this.parent=null,this.children=null,this.attributes=null}return e.prototype.findAttribute=function(e){if(this.attributes)for(var t=0,n=this.attributes;t"),this.writeLine(t,r.join(""))}},e}();(function(e){function t(e,t){return t+n(e)+t}function n(e){var t=e.match(/^['"](.*)["']$/);return t?t[1]:e}e.ensure=t,e.remove=n})(_a||(_a={}));var Ia=function(){function e(){this.id=0,this.attr=0,this.tag=0}return e}();function Aa(e,t){for(var n=new Ta,r=0,i=e.getChildren();r1){var c=t.cloneWithParent();n.addChild(c.findRoot()),n=c}n.append(s[l])}}break;case vr.SelectorPlaceholder:if(o.matches("@at-root"))return n;case vr.ElementNameSelector:var d=o.getText();n.addAttr("name","*"===d?"element":Ma(d));break;case vr.ClassSelector:n.addAttr("class",Ma(o.getText().substring(1)));break;case vr.IdentifierSelector:n.addAttr("id",Ma(o.getText().substring(1)));break;case vr.MixinDeclaration:n.addAttr("class",o.getName());break;case vr.PseudoSelector:n.addAttr(Ma(o.getText()),"");break;case vr.AttributeSelector:var h=o,p=h.getIdentifier();if(p){var u=h.getValue(),m=h.getOperator(),f=void 0;if(u&&m)switch(Ma(m.getText())){case"|=":f=_a.remove(Ma(u.getText()))+"-…";break;case"^=":f=_a.remove(Ma(u.getText()))+"…";break;case"$=":f="…"+_a.remove(Ma(u.getText()));break;case"~=":f=" … "+_a.remove(Ma(u.getText()))+" … ";break;case"*=":f="…"+_a.remove(Ma(u.getText()))+"…";break;default:f=_a.remove(Ma(u.getText()));break}n.addAttr(Ma(p.getText()),f)}break}}return n}function Ma(e){var t=new pr;t.setSource(e);var n=t.scanUnquotedString();return n?n.text:e}var Pa=function(){function e(e){this.cssDataManager=e}return e.prototype.selectorToMarkedString=function(e){var t=Wa(e);if(t){var n=new za('"').print(t);return n.push(this.selectorToSpecificityMarkedString(e)),n}return[]},e.prototype.simpleSelectorToMarkedString=function(e){var t=Aa(e),n=new za('"').print(t);return n.push(this.selectorToSpecificityMarkedString(e)),n},e.prototype.isPseudoElementIdentifier=function(e){var t=e.match(/^::?([\w-]+)/);return!!t&&!!this.cssDataManager.getPseudoElement("::"+t[1])},e.prototype.selectorToSpecificityMarkedString=function(e){var t=this,n=function(e){for(var i=0,o=e.getChildren();i0&&n(s)}},r=new Ia;return n(e),Da("specificity","[Selector Specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity): ({0}, {1}, {2})",r.id,r.attr,r.tag)},e}(),Oa=function(){function e(e){this.prev=null,this.element=e}return e.prototype.processSelector=function(e){var t=null;if(!(this.element instanceof Ra)&&e.getChildren().some((function(e){return e.hasChildren()&&e.getChild(0).type===vr.SelectorCombinator}))){var n=this.element.findRoot();n.parent instanceof Ra&&(t=this.element,this.element=n.parent,this.element.removeChild(n),this.prev=null)}for(var r=0,i=e.getChildren();r=0;s--){var a=n[s].getSelectors().getChild(0);a&&o.processSelector(a)}return o.processSelector(e),t}var Ua=function(){function e(e,t){this.clientCapabilities=e,this.cssDataManager=t,this.selectorPrinting=new Pa(t)}return e.prototype.doHover=function(e,t,n){function r(t){return Lo.create(e.positionAt(t.offset),e.positionAt(t.end))}for(var i=e.offsetAt(t),o=Sr(n,i),s=null,a=0;a0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=i.length/2&&o.push({property:e.name,score:t})})),o.sort((function(e,t){return t.score-e.score||e.property.localeCompare(t.property)}));for(var s=3,a=0,l=o;a=0;a--){var l=s[a];if(l instanceof Lr){var c=l.getProperty();if(c&&c.offset===i&&c.end===o)return void this.getFixesForUnknownProperty(e,c,n,r)}}},e}(),ll=function(){function e(e){this.fullPropertyName=e.getFullPropertyName().toLowerCase(),this.node=e}return e}();function cl(e,t,n,r){var i=e[t];i.value=n,n&&(Mo(i.properties,r)||i.properties.push(r))}function dl(e,t,n){cl(e,"top",t,n),cl(e,"right",t,n),cl(e,"bottom",t,n),cl(e,"left",t,n)}function hl(e,t,n,r){"top"===t||"right"===t||"bottom"===t||"left"===t?cl(e,t,n,r):dl(e,n,r)}function pl(e,t,n){switch(t.length){case 1:hl(e,void 0,t[0],n);break;case 2:hl(e,"top",t[0],n),hl(e,"bottom",t[0],n),hl(e,"right",t[1],n),hl(e,"left",t[1],n);break;case 3:hl(e,"top",t[0],n),hl(e,"right",t[1],n),hl(e,"left",t[1],n),hl(e,"bottom",t[2],n);break;case 4:hl(e,"top",t[0],n),hl(e,"right",t[1],n),hl(e,"bottom",t[2],n),hl(e,"left",t[3],n);break}}function ul(e,t){for(var n=0,r=t;n0)for(var f=0,g=["width","height","margin-top","margin-bottom","float"];f0)for(v=this.fetch(r,"float"),y=0;y0)for(v=this.fetch(r,"vertical-align"),y=0;y1)for(var _=0;_".charCodeAt(0),Pl=".".charCodeAt(0),Ol=("@".charCodeAt(0),xn.CustomToken),Ll=Ol++,Wl=Ol++,Ul=(Ol++,Ol++),Vl=Ol++,jl=Ol++,Bl=Ol++,Kl=Ol++,ql=(Ol++,function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kl(t,e),t.prototype.scanNext=function(t){if(this.stream.advanceIfChar(Tl)){var n=["$"];if(this.ident(n))return this.finishToken(t,Ll,n.join(""));this.stream.goBackTo(t)}return this.stream.advanceIfChars([Rl,Nl])?this.finishToken(t,Wl):this.stream.advanceIfChars([zl,zl])?this.finishToken(t,Ul):this.stream.advanceIfChars([Il,zl])?this.finishToken(t,Vl):this.stream.advanceIfChar(Al)?this.stream.advanceIfChar(zl)?this.finishToken(t,Bl):this.finishToken(t,xn.Delim):this.stream.advanceIfChar(Ml)?this.stream.advanceIfChar(zl)?this.finishToken(t,jl):this.finishToken(t,xn.Delim):this.stream.advanceIfChars([Pl,Pl,Pl])?this.finishToken(t,Kl):e.prototype.scanNext.call(this,t)},t.prototype.comment=function(){return!!e.prototype.comment.call(this)||!(this.inURL||!this.stream.advanceIfChars([El,El]))&&(this.stream.advanceWhileChar((function(e){switch(e){case _l:case Fl:case Dl:return!1;default:return!0}})),!0)},t}(pr)),$l=Vi(),Gl=function(){function e(e,t){this.id=e,this.message=t}return e}(),Hl={FromExpected:new Gl("scss-fromexpected",$l("expected.from","'from' expected")),ThroughOrToExpected:new Gl("scss-throughexpected",$l("expected.through","'through' or 'to' expected")),InExpected:new Gl("scss-fromexpected",$l("expected.in","'in' expected"))},Yl=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Jl=function(e){function t(){return e.call(this,new ql)||this}return Yl(t,e),t.prototype._parseStylesheetStatement=function(t){return void 0===t&&(t=!1),this.peek(xn.AtKeyword)?this._parseWarnAndDebug()||this._parseControlStatement()||this._parseMixinDeclaration()||this._parseMixinContent()||this._parseMixinReference()||this._parseFunctionDeclaration()||this._parseForward()||this._parseUse()||this._parseRuleset(t)||e.prototype._parseStylesheetAtStatement.call(this,t):this._parseRuleset(!0)||this._parseVariableDeclaration()},t.prototype._parseImport=function(){if(!this.peekKeyword("@import"))return null;var e=this.create(ti);if(this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,Ki.URIOrStringExpected);while(this.accept(xn.Comma))if(!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,Ki.URIOrStringExpected);return this.peek(xn.SemiColon)||this.peek(xn.EOF)||e.setMedialist(this._parseMediaQueryList()),this.finish(e)},t.prototype._parseVariableDeclaration=function(e){if(void 0===e&&(e=[]),!this.peek(Ll))return null;var t=this.create(ki);if(!t.setVariable(this._parseVariable()))return null;if(!this.accept(xn.Colon))return this.finish(t,Ki.ColonExpected);if(this.prevToken&&(t.colonPosition=this.prevToken.offset),!t.setValue(this._parseExpr()))return this.finish(t,Ki.VariableValueExpected,[],e);while(this.peek(xn.Exclamation))if(t.addChild(this._tryParsePrio()));else{if(this.consumeToken(),!this.peekRegExp(xn.Ident,/^(default|global)$/))return this.finish(t,Ki.UnknownKeyword);this.consumeToken()}return this.peek(xn.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)},t.prototype._parseMediaContentStart=function(){return this._parseInterpolation()},t.prototype._parseMediaFeatureName=function(){return this._parseModuleMember()||this._parseFunction()||this._parseIdent()||this._parseVariable()},t.prototype._parseKeyframeSelector=function(){return this._tryParseKeyframeSelector()||this._parseControlStatement(this._parseKeyframeSelector.bind(this))||this._parseVariableDeclaration()||this._parseMixinContent()},t.prototype._parseVariable=function(){if(!this.peek(Ll))return null;var e=this.create(_i);return this.consumeToken(),e},t.prototype._parseModuleMember=function(){var e=this.mark(),t=this.create(Pi);return t.setIdentifier(this._parseIdent([yr.Module]))?this.hasWhitespace()||!this.acceptDelim(".")||this.hasWhitespace()?(this.restoreAtMark(e),null):t.addChild(this._parseVariable()||this._parseFunction())?t:this.finish(t,Ki.IdentifierOrVariableExpected):null},t.prototype._parseIdent=function(e){var t=this;if(!this.peek(xn.Ident)&&!this.peek(Wl)&&!this.peekDelim("-"))return null;var n=this.create(Fr);n.referenceTypes=e,n.isCustomProperty=this.peekRegExp(xn.Ident,/^--/);var r=!1,i=function(){var e=t.mark();return t.acceptDelim("-")&&(t.hasWhitespace()||t.acceptDelim("-"),t.hasWhitespace())?(t.restoreAtMark(e),null):t._parseInterpolation()};while(this.accept(xn.Ident)||n.addChild(i())||r&&this.acceptRegexp(/[\w-]/))if(r=!0,this.hasWhitespace())break;return r?this.finish(n):null},t.prototype._parseTermExpression=function(){return this._parseModuleMember()||this._parseVariable()||this._parseSelectorCombinator()||e.prototype._parseTermExpression.call(this)},t.prototype._parseInterpolation=function(){if(this.peek(Wl)){var e=this.create(Ei);return this.consumeToken(),e.addChild(this._parseExpr())||this._parseSelectorCombinator()?this.accept(xn.CurlyR)?this.finish(e):this.finish(e,Ki.RightCurlyExpected):this.accept(xn.CurlyR)?this.finish(e):this.finish(e,Ki.ExpressionExpected)}return null},t.prototype._parseOperator=function(){if(this.peek(Ul)||this.peek(Vl)||this.peek(jl)||this.peek(Bl)||this.peekDelim(">")||this.peekDelim("<")||this.peekIdent("and")||this.peekIdent("or")||this.peekDelim("%")){var t=this.createNode(vr.Operator);return this.consumeToken(),this.finish(t)}return e.prototype._parseOperator.call(this)},t.prototype._parseUnaryOperator=function(){if(this.peekIdent("not")){var t=this.create(Er);return this.consumeToken(),this.finish(t)}return e.prototype._parseUnaryOperator.call(this)},t.prototype._parseRuleSetDeclaration=function(){return this.peek(xn.AtKeyword)?this._parseKeyframe()||this._parseImport()||this._parseMedia(!0)||this._parseFontFace()||this._parseWarnAndDebug()||this._parseControlStatement()||this._parseFunctionDeclaration()||this._parseExtends()||this._parseMixinReference()||this._parseMixinContent()||this._parseMixinDeclaration()||this._parseRuleset(!0)||this._parseSupports(!0)||e.prototype._parseRuleSetDeclarationAtStatement.call(this):this._parseVariableDeclaration()||this._tryParseRuleset(!0)||e.prototype._parseRuleSetDeclaration.call(this)},t.prototype._parseDeclaration=function(e){var t=this.create(Lr);if(!t.setProperty(this._parseProperty()))return null;if(!this.accept(xn.Colon))return this.finish(t,Ki.ColonExpected,[xn.Colon],e);this.prevToken&&(t.colonPosition=this.prevToken.offset);var n=!1;if(t.setValue(this._parseExpr())&&(n=!0,t.addChild(this._parsePrio())),this.peek(xn.CurlyL))t.setNestedProperties(this._parseNestedProperties());else if(!n)return this.finish(t,Ki.PropertyValueExpected);return this.peek(xn.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)},t.prototype._parseNestedProperties=function(){var e=this.create(Qr);return this._parseBody(e,this._parseDeclaration.bind(this))},t.prototype._parseExtends=function(){if(this.peekKeyword("@extend")){var e=this.create(Fi);if(this.consumeToken(),!e.getSelectors().addChild(this._parseSimpleSelector()))return this.finish(e,Ki.SelectorExpected);while(this.accept(xn.Comma))e.getSelectors().addChild(this._parseSimpleSelector());return this.accept(xn.Exclamation)&&!this.acceptIdent("optional")?this.finish(e,Ki.UnknownKeyword):this.finish(e)}return null},t.prototype._parseSimpleSelectorBody=function(){return this._parseSelectorCombinator()||this._parseSelectorPlaceholder()||e.prototype._parseSimpleSelectorBody.call(this)},t.prototype._parseSelectorCombinator=function(){if(this.peekDelim("&")){var e=this.createNode(vr.SelectorCombinator);this.consumeToken();while(!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(xn.Num)||this.accept(xn.Dimension)||e.addChild(this._parseIdent())||this.acceptDelim("&")));return this.finish(e)}return null},t.prototype._parseSelectorPlaceholder=function(){if(this.peekDelim("%")){var e=this.createNode(vr.SelectorPlaceholder);return this.consumeToken(),this._parseIdent(),this.finish(e)}if(this.peekKeyword("@at-root")){e=this.createNode(vr.SelectorPlaceholder);return this.consumeToken(),this.finish(e)}return null},t.prototype._parseElementName=function(){var t=this.mark(),n=e.prototype._parseElementName.call(this);return n&&!this.hasWhitespace()&&this.peek(xn.ParenthesisL)?(this.restoreAtMark(t),null):n},t.prototype._tryParsePseudoIdentifier=function(){return this._parseInterpolation()||e.prototype._tryParsePseudoIdentifier.call(this)},t.prototype._parseWarnAndDebug=function(){if(!this.peekKeyword("@debug")&&!this.peekKeyword("@warn")&&!this.peekKeyword("@error"))return null;var e=this.createNode(vr.Debug);return this.consumeToken(),e.addChild(this._parseExpr()),this.finish(e)},t.prototype._parseControlStatement=function(e){return void 0===e&&(e=this._parseRuleSetDeclaration.bind(this)),this.peek(xn.AtKeyword)?this._parseIfStatement(e)||this._parseForStatement(e)||this._parseEachStatement(e)||this._parseWhileStatement(e):null},t.prototype._parseIfStatement=function(e){return this.peekKeyword("@if")?this._internalParseIfStatement(e):null},t.prototype._internalParseIfStatement=function(e){var t=this.create(Kr);if(this.consumeToken(),!t.setExpression(this._parseExpr(!0)))return this.finish(t,Ki.ExpressionExpected);if(this._parseBody(t,e),this.acceptKeyword("@else"))if(this.peekIdent("if"))t.setElseClause(this._internalParseIfStatement(e));else if(this.peek(xn.CurlyL)){var n=this.create(Hr);this._parseBody(n,e),t.setElseClause(n)}return this.finish(t)},t.prototype._parseForStatement=function(e){if(!this.peekKeyword("@for"))return null;var t=this.create(qr);return this.consumeToken(),t.setVariable(this._parseVariable())?this.acceptIdent("from")?t.addChild(this._parseBinaryExpr())?this.acceptIdent("to")||this.acceptIdent("through")?t.addChild(this._parseBinaryExpr())?this._parseBody(t,e):this.finish(t,Ki.ExpressionExpected,[xn.CurlyR]):this.finish(t,Hl.ThroughOrToExpected,[xn.CurlyR]):this.finish(t,Ki.ExpressionExpected,[xn.CurlyR]):this.finish(t,Hl.FromExpected,[xn.CurlyR]):this.finish(t,Ki.VariableNameExpected,[xn.CurlyR])},t.prototype._parseEachStatement=function(e){if(!this.peekKeyword("@each"))return null;var t=this.create($r);this.consumeToken();var n=t.getVariables();if(!n.addChild(this._parseVariable()))return this.finish(t,Ki.VariableNameExpected,[xn.CurlyR]);while(this.accept(xn.Comma))if(!n.addChild(this._parseVariable()))return this.finish(t,Ki.VariableNameExpected,[xn.CurlyR]);return this.finish(n),this.acceptIdent("in")?t.addChild(this._parseExpr())?this._parseBody(t,e):this.finish(t,Ki.ExpressionExpected,[xn.CurlyR]):this.finish(t,Hl.InExpected,[xn.CurlyR])},t.prototype._parseWhileStatement=function(e){if(!this.peekKeyword("@while"))return null;var t=this.create(Gr);return this.consumeToken(),t.addChild(this._parseBinaryExpr())?this._parseBody(t,e):this.finish(t,Ki.ExpressionExpected,[xn.CurlyR])},t.prototype._parseFunctionBodyDeclaration=function(){return this._parseVariableDeclaration()||this._parseReturnStatement()||this._parseWarnAndDebug()||this._parseControlStatement(this._parseFunctionBodyDeclaration.bind(this))},t.prototype._parseFunctionDeclaration=function(){if(!this.peekKeyword("@function"))return null;var e=this.create(Yr);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([yr.Function])))return this.finish(e,Ki.IdentifierExpected,[xn.CurlyR]);if(!this.accept(xn.ParenthesisL))return this.finish(e,Ki.LeftParenthesisExpected,[xn.CurlyR]);if(e.getParameters().addChild(this._parseParameterDeclaration()))while(this.accept(xn.Comma)){if(this.peek(xn.ParenthesisR))break;if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,Ki.VariableNameExpected)}return this.accept(xn.ParenthesisR)?this._parseBody(e,this._parseFunctionBodyDeclaration.bind(this)):this.finish(e,Ki.RightParenthesisExpected,[xn.CurlyR])},t.prototype._parseReturnStatement=function(){if(!this.peekKeyword("@return"))return null;var e=this.createNode(vr.ReturnStatement);return this.consumeToken(),e.addChild(this._parseExpr())?this.finish(e):this.finish(e,Ki.ExpressionExpected)},t.prototype._parseMixinDeclaration=function(){if(!this.peekKeyword("@mixin"))return null;var e=this.create(Ni);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([yr.Mixin])))return this.finish(e,Ki.IdentifierExpected,[xn.CurlyR]);if(this.accept(xn.ParenthesisL)){if(e.getParameters().addChild(this._parseParameterDeclaration()))while(this.accept(xn.Comma)){if(this.peek(xn.ParenthesisR))break;if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,Ki.VariableNameExpected)}if(!this.accept(xn.ParenthesisR))return this.finish(e,Ki.RightParenthesisExpected,[xn.CurlyR])}return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},t.prototype._parseParameterDeclaration=function(){var e=this.create(jr);return e.setIdentifier(this._parseVariable())?(this.accept(Kl),this.accept(xn.Colon)&&!e.setDefaultValue(this._parseExpr(!0))?this.finish(e,Ki.VariableValueExpected,[],[xn.Comma,xn.ParenthesisR]):this.finish(e)):null},t.prototype._parseMixinContent=function(){if(!this.peekKeyword("@content"))return null;var e=this.create(Di);if(this.consumeToken(),this.accept(xn.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument()))while(this.accept(xn.Comma)){if(this.peek(xn.ParenthesisR))break;if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,Ki.ExpressionExpected)}if(!this.accept(xn.ParenthesisR))return this.finish(e,Ki.RightParenthesisExpected)}return this.finish(e)},t.prototype._parseMixinReference=function(){if(!this.peekKeyword("@include"))return null;var e=this.create(Ri);this.consumeToken();var t=this._parseIdent([yr.Mixin]);if(!e.setIdentifier(t))return this.finish(e,Ki.IdentifierExpected,[xn.CurlyR]);if(!this.hasWhitespace()&&this.acceptDelim(".")&&!this.hasWhitespace()){var n=this._parseIdent([yr.Mixin]);if(!n)return this.finish(e,Ki.IdentifierExpected,[xn.CurlyR]);var r=this.create(Pi);t.referenceTypes=[yr.Module],r.setIdentifier(t),e.setIdentifier(n),e.addChild(r)}if(this.accept(xn.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument()))while(this.accept(xn.Comma)){if(this.peek(xn.ParenthesisR))break;if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,Ki.ExpressionExpected)}if(!this.accept(xn.ParenthesisR))return this.finish(e,Ki.RightParenthesisExpected)}return(this.peekIdent("using")||this.peek(xn.CurlyL))&&e.setContent(this._parseMixinContentDeclaration()),this.finish(e)},t.prototype._parseMixinContentDeclaration=function(){var e=this.create(Ti);if(this.acceptIdent("using")){if(!this.accept(xn.ParenthesisL))return this.finish(e,Ki.LeftParenthesisExpected,[xn.CurlyL]);if(e.getParameters().addChild(this._parseParameterDeclaration()))while(this.accept(xn.Comma)){if(this.peek(xn.ParenthesisR))break;if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,Ki.VariableNameExpected)}if(!this.accept(xn.ParenthesisR))return this.finish(e,Ki.RightParenthesisExpected,[xn.CurlyL])}return this.peek(xn.CurlyL)&&this._parseBody(e,this._parseMixinReferenceBodyStatement.bind(this)),this.finish(e)},t.prototype._parseMixinReferenceBodyStatement=function(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()},t.prototype._parseFunctionArgument=function(){var e=this.create(Br),t=this.mark(),n=this._parseVariable();if(n)if(this.accept(xn.Colon))e.setIdentifier(n);else{if(this.accept(Kl))return e.setValue(n),this.finish(e);this.restoreAtMark(t)}return e.setValue(this._parseExpr(!0))?(this.accept(Kl),e.addChild(this._parsePrio()),this.finish(e)):e.setValue(this._tryParsePrio())?this.finish(e):null},t.prototype._parseURLArgument=function(){var t=this.mark(),n=e.prototype._parseURLArgument.call(this);if(!n||!this.peek(xn.ParenthesisR)){this.restoreAtMark(t);var r=this.create(Er);return r.addChild(this._parseBinaryExpr()),this.finish(r)}return n},t.prototype._parseOperation=function(){if(!this.peek(xn.ParenthesisL))return null;var e=this.create(Er);this.consumeToken();while(e.addChild(this._parseListElement()))this.accept(xn.Comma);return this.accept(xn.ParenthesisR)?this.finish(e):this.finish(e,Ki.RightParenthesisExpected)},t.prototype._parseListElement=function(){var e=this.create(Ii),t=this._parseBinaryExpr();if(!t)return null;if(this.accept(xn.Colon)){if(e.setKey(t),!e.setValue(this._parseBinaryExpr()))return this.finish(e,Ki.ExpressionExpected)}else e.setValue(t);return this.finish(e)},t.prototype._parseUse=function(){if(!this.peekKeyword("@use"))return null;var e=this.create(ni);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,Ki.StringLiteralExpected);if(!this.peek(xn.SemiColon)&&!this.peek(xn.EOF)){if(!this.peekRegExp(xn.Ident,/as|with/))return this.finish(e,Ki.UnknownKeyword);if(this.acceptIdent("as")&&!e.setIdentifier(this._parseIdent([yr.Module]))&&!this.acceptDelim("*"))return this.finish(e,Ki.IdentifierOrWildcardExpected);if(this.acceptIdent("with")){if(!this.accept(xn.ParenthesisL))return this.finish(e,Ki.LeftParenthesisExpected,[xn.ParenthesisR]);if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,Ki.VariableNameExpected);while(this.accept(xn.Comma)){if(this.peek(xn.ParenthesisR))break;if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,Ki.VariableNameExpected)}if(!this.accept(xn.ParenthesisR))return this.finish(e,Ki.RightParenthesisExpected)}}return this.accept(xn.SemiColon)||this.accept(xn.EOF)?this.finish(e):this.finish(e,Ki.SemiColonExpected)},t.prototype._parseModuleConfigDeclaration=function(){var e=this.create(ri);return e.setIdentifier(this._parseVariable())?this.accept(xn.Colon)&&e.setValue(this._parseExpr(!0))?this.finish(e):this.finish(e,Ki.VariableValueExpected,[],[xn.Comma,xn.ParenthesisR]):null},t.prototype._parseForward=function(){if(!this.peekKeyword("@forward"))return null;var e=this.create(ii);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,Ki.StringLiteralExpected);if(!this.peek(xn.SemiColon)&&!this.peek(xn.EOF)){if(!this.peekRegExp(xn.Ident,/as|hide|show/))return this.finish(e,Ki.UnknownKeyword);if(this.acceptIdent("as")){var t=this._parseIdent([yr.Forward]);if(!e.setIdentifier(t))return this.finish(e,Ki.IdentifierExpected);if(this.hasWhitespace()||!this.acceptDelim("*"))return this.finish(e,Ki.WildcardExpected)}if((this.peekIdent("hide")||this.peekIdent("show"))&&!e.addChild(this._parseForwardVisibility()))return this.finish(e,Ki.IdentifierOrVariableExpected)}return this.accept(xn.SemiColon)||this.accept(xn.EOF)?this.finish(e):this.finish(e,Ki.SemiColonExpected)},t.prototype._parseForwardVisibility=function(){var e=this.create(oi);e.setIdentifier(this._parseIdent());while(e.addChild(this._parseVariable()||this._parseIdent()));return e.getChildren().length>1?e:null},t.prototype._parseSupportsCondition=function(){return this._parseInterpolation()||e.prototype._parseSupportsCondition.call(this)},t}(Io),Xl=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ql=Vi(),Zl=function(e){function t(n,r){var i=e.call(this,"$",n,r)||this;return ec(t.scssModuleLoaders),ec(t.scssModuleBuiltIns),i}return Xl(t,e),t.prototype.isImportPathParent=function(t){return t===vr.Forward||t===vr.Use||e.prototype.isImportPathParent.call(this,t)},t.prototype.getCompletionForImportPath=function(n,r){var i=n.getParent().type;if(i===vr.Forward||i===vr.Use)for(var o=0,s=t.scssModuleBuiltIns;o0){var t="string"===typeof e.documentation?{kind:"markdown",value:e.documentation}:{kind:"markdown",value:e.documentation.value};t.value+="\n\n",t.value+=e.references.map((function(e){return"["+e.name+"]("+e.url+")"})).join(" | "),e.documentation=t}}))}var tc=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),nc="/".charCodeAt(0),rc="\n".charCodeAt(0),ic="\r".charCodeAt(0),oc="\f".charCodeAt(0),sc="`".charCodeAt(0),ac=".".charCodeAt(0),lc=xn.CustomToken,cc=lc++,dc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return tc(t,e),t.prototype.scanNext=function(t){var n=this.escapedJavaScript();return null!==n?this.finishToken(t,n):this.stream.advanceIfChars([ac,ac,ac])?this.finishToken(t,cc):e.prototype.scanNext.call(this,t)},t.prototype.comment=function(){return!!e.prototype.comment.call(this)||!(this.inURL||!this.stream.advanceIfChars([nc,nc]))&&(this.stream.advanceWhileChar((function(e){switch(e){case rc:case ic:case oc:return!1;default:return!0}})),!0)},t.prototype.escapedJavaScript=function(){var e=this.stream.peekChar();return e===sc?(this.stream.advance(1),this.stream.advanceWhileChar((function(e){return e!==sc})),this.stream.advanceIfChar(sc)?xn.EscapedJavaScript:xn.BadEscapedJavaScript):null},t}(pr),hc=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),pc=function(e){function t(){return e.call(this,new dc)||this}return hc(t,e),t.prototype._parseStylesheetStatement=function(t){return void 0===t&&(t=!1),this.peek(xn.AtKeyword)?this._parseVariableDeclaration()||this._parsePlugin()||e.prototype._parseStylesheetAtStatement.call(this,t):this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseFunction()||this._parseRuleset(!0)},t.prototype._parseImport=function(){if(!this.peekKeyword("@import")&&!this.peekKeyword("@import-once"))return null;var e=this.create(ti);if(this.consumeToken(),this.accept(xn.ParenthesisL)){if(!this.accept(xn.Ident))return this.finish(e,Ki.IdentifierExpected,[xn.SemiColon]);do{if(!this.accept(xn.Comma))break}while(this.accept(xn.Ident));if(!this.accept(xn.ParenthesisR))return this.finish(e,Ki.RightParenthesisExpected,[xn.SemiColon])}return e.addChild(this._parseURILiteral())||e.addChild(this._parseStringLiteral())?(this.peek(xn.SemiColon)||this.peek(xn.EOF)||e.setMedialist(this._parseMediaQueryList()),this.finish(e)):this.finish(e,Ki.URIOrStringExpected,[xn.SemiColon])},t.prototype._parsePlugin=function(){if(!this.peekKeyword("@plugin"))return null;var e=this.createNode(vr.Plugin);return this.consumeToken(),e.addChild(this._parseStringLiteral())?this.accept(xn.SemiColon)?this.finish(e):this.finish(e,Ki.SemiColonExpected):this.finish(e,Ki.StringLiteralExpected)},t.prototype._parseMediaQuery=function(t){var n=e.prototype._parseMediaQuery.call(this,t);if(!n){var r=this.create(hi);return r.addChild(this._parseVariable())?this.finish(r):null}return n},t.prototype._parseMediaDeclaration=function(e){return void 0===e&&(e=!1),this._tryParseRuleset(e)||this._tryToParseDeclaration()||this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseDetachedRuleSetMixin()||this._parseStylesheetStatement(e)},t.prototype._parseMediaFeatureName=function(){return this._parseIdent()||this._parseVariable()},t.prototype._parseVariableDeclaration=function(e){void 0===e&&(e=[]);var t=this.create(ki),n=this.mark();if(!t.setVariable(this._parseVariable(!0)))return null;if(!this.accept(xn.Colon))return this.restoreAtMark(n),null;if(this.prevToken&&(t.colonPosition=this.prevToken.offset),t.setValue(this._parseDetachedRuleSet()))t.needsSemicolon=!1;else if(!t.setValue(this._parseExpr()))return this.finish(t,Ki.VariableValueExpected,[],e);return t.addChild(this._parsePrio()),this.peek(xn.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)},t.prototype._parseDetachedRuleSet=function(){var e=this.mark();if(this.peekDelim("#")||this.peekDelim(".")){if(this.consumeToken(),this.hasWhitespace()||!this.accept(xn.ParenthesisL))return this.restoreAtMark(e),null;var t=this.create(Ni);if(t.getParameters().addChild(this._parseMixinParameter()))while(this.accept(xn.Comma)||this.accept(xn.SemiColon)){if(this.peek(xn.ParenthesisR))break;t.getParameters().addChild(this._parseMixinParameter())||this.markError(t,Ki.IdentifierExpected,[],[xn.ParenthesisR])}if(!this.accept(xn.ParenthesisR))return this.restoreAtMark(e),null}if(!this.peek(xn.CurlyL))return null;var n=this.create(Rr);return this._parseBody(n,this._parseDetachedRuleSetBody.bind(this)),this.finish(n)},t.prototype._parseDetachedRuleSetBody=function(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()},t.prototype._addLookupChildren=function(e){if(!e.addChild(this._parseLookupValue()))return!1;var t=!1;while(1){if(this.peek(xn.BracketL)&&(t=!0),!e.addChild(this._parseLookupValue()))break;t=!1}return!t},t.prototype._parseLookupValue=function(){var e=this.create(Er),t=this.mark();return this.accept(xn.BracketL)&&((e.addChild(this._parseVariable(!1,!0))||e.addChild(this._parsePropertyIdentifier()))&&this.accept(xn.BracketR)||this.accept(xn.BracketR))?e:(this.restoreAtMark(t),null)},t.prototype._parseVariable=function(e,t){void 0===e&&(e=!1),void 0===t&&(t=!1);var n=!e&&this.peekDelim("$");if(!this.peekDelim("@")&&!n&&!this.peek(xn.AtKeyword))return null;var r=this.create(_i),i=this.mark();while(this.acceptDelim("@")||!e&&this.acceptDelim("$"))if(this.hasWhitespace())return this.restoreAtMark(i),null;return(this.accept(xn.AtKeyword)||this.accept(xn.Ident))&&(t||!this.peek(xn.BracketL)||this._addLookupChildren(r))?r:(this.restoreAtMark(i),null)},t.prototype._parseTermExpression=function(){return this._parseVariable()||this._parseEscaped()||e.prototype._parseTermExpression.call(this)||this._tryParseMixinReference(!1)},t.prototype._parseEscaped=function(){if(this.peek(xn.EscapedJavaScript)||this.peek(xn.BadEscapedJavaScript)){var e=this.createNode(vr.EscapedValue);return this.consumeToken(),this.finish(e)}if(this.peekDelim("~")){e=this.createNode(vr.EscapedValue);return this.consumeToken(),this.accept(xn.String)||this.accept(xn.EscapedJavaScript)?this.finish(e):this.finish(e,Ki.TermExpected)}return null},t.prototype._parseOperator=function(){var t=this._parseGuardOperator();return t||e.prototype._parseOperator.call(this)},t.prototype._parseGuardOperator=function(){if(this.peekDelim(">")){var e=this.createNode(vr.Operator);return this.consumeToken(),this.acceptDelim("="),e}if(this.peekDelim("=")){e=this.createNode(vr.Operator);return this.consumeToken(),this.acceptDelim("<"),e}if(this.peekDelim("<")){e=this.createNode(vr.Operator);return this.consumeToken(),this.acceptDelim("="),e}return null},t.prototype._parseRuleSetDeclaration=function(){return this.peek(xn.AtKeyword)?this._parseKeyframe()||this._parseMedia(!0)||this._parseImport()||this._parseSupports(!0)||this._parseDetachedRuleSetMixin()||this._parseVariableDeclaration()||e.prototype._parseRuleSetDeclarationAtStatement.call(this):this._tryParseMixinDeclaration()||this._tryParseRuleset(!0)||this._tryParseMixinReference()||this._parseFunction()||this._parseExtend()||e.prototype._parseRuleSetDeclaration.call(this)},t.prototype._parseKeyframeIdent=function(){return this._parseIdent([yr.Keyframe])||this._parseVariable()},t.prototype._parseKeyframeSelector=function(){return this._parseDetachedRuleSetMixin()||e.prototype._parseKeyframeSelector.call(this)},t.prototype._parseSimpleSelectorBody=function(){return this._parseSelectorCombinator()||e.prototype._parseSimpleSelectorBody.call(this)},t.prototype._parseSelector=function(e){var t=this.create(zr),n=!1;e&&(n=t.addChild(this._parseCombinator()));while(t.addChild(this._parseSimpleSelector())){n=!0;var r=this.mark();if(t.addChild(this._parseGuard())&&this.peek(xn.CurlyL))break;this.restoreAtMark(r),t.addChild(this._parseCombinator())}return n?this.finish(t):null},t.prototype._parseSelectorCombinator=function(){if(this.peekDelim("&")){var e=this.createNode(vr.SelectorCombinator);this.consumeToken();while(!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(xn.Num)||this.accept(xn.Dimension)||e.addChild(this._parseIdent())||this.acceptDelim("&")));return this.finish(e)}return null},t.prototype._parseSelectorIdent=function(){if(!this.peekInterpolatedIdent())return null;var e=this.createNode(vr.SelectorInterpolation),t=this._acceptInterpolatedIdent(e);return t?this.finish(e):null},t.prototype._parsePropertyIdentifier=function(e){void 0===e&&(e=!1);var t=/^[\w-]+/;if(!this.peekInterpolatedIdent()&&!this.peekRegExp(this.token.type,t))return null;var n=this.mark(),r=this.create(Fr);r.isCustomProperty=this.acceptDelim("-")&&this.acceptDelim("-");var i=!1;return i=e?r.isCustomProperty?r.addChild(this._parseIdent()):r.addChild(this._parseRegexp(t)):r.isCustomProperty?this._acceptInterpolatedIdent(r):this._acceptInterpolatedIdent(r,t),i?(e||this.hasWhitespace()||(this.acceptDelim("+"),this.hasWhitespace()||this.acceptIdent("_")),this.finish(r)):(this.restoreAtMark(n),null)},t.prototype.peekInterpolatedIdent=function(){return this.peek(xn.Ident)||this.peekDelim("@")||this.peekDelim("$")||this.peekDelim("-")},t.prototype._acceptInterpolatedIdent=function(e,t){var n=this,r=!1,i=function(){var e=n.mark();return n.acceptDelim("-")&&(n.hasWhitespace()||n.acceptDelim("-"),n.hasWhitespace())?(n.restoreAtMark(e),null):n._parseInterpolation()},o=t?function(){return n.acceptRegexp(t)}:function(){return n.accept(xn.Ident)};while(o()||e.addChild(this._parseInterpolation()||this.try(i)))if(r=!0,this.hasWhitespace())break;return r},t.prototype._parseInterpolation=function(){var e=this.mark();if(this.peekDelim("@")||this.peekDelim("$")){var t=this.createNode(vr.Interpolation);return this.consumeToken(),this.hasWhitespace()||!this.accept(xn.CurlyL)?(this.restoreAtMark(e),null):t.addChild(this._parseIdent())?this.accept(xn.CurlyR)?this.finish(t):this.finish(t,Ki.RightCurlyExpected):this.finish(t,Ki.IdentifierExpected)}return null},t.prototype._tryParseMixinDeclaration=function(){var e=this.mark(),t=this.create(Ni);if(!t.setIdentifier(this._parseMixinDeclarationIdentifier())||!this.accept(xn.ParenthesisL))return this.restoreAtMark(e),null;if(t.getParameters().addChild(this._parseMixinParameter()))while(this.accept(xn.Comma)||this.accept(xn.SemiColon)){if(this.peek(xn.ParenthesisR))break;t.getParameters().addChild(this._parseMixinParameter())||this.markError(t,Ki.IdentifierExpected,[],[xn.ParenthesisR])}return this.accept(xn.ParenthesisR)?(t.setGuard(this._parseGuard()),this.peek(xn.CurlyL)?this._parseBody(t,this._parseMixInBodyDeclaration.bind(this)):(this.restoreAtMark(e),null)):(this.restoreAtMark(e),null)},t.prototype._parseMixInBodyDeclaration=function(){return this._parseFontFace()||this._parseRuleSetDeclaration()},t.prototype._parseMixinDeclarationIdentifier=function(){var e;if(this.peekDelim("#")||this.peekDelim(".")){if(e=this.create(Fr),this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseIdent()))return null}else{if(!this.peek(xn.Hash))return null;e=this.create(Fr),this.consumeToken()}return e.referenceTypes=[yr.Mixin],this.finish(e)},t.prototype._parsePseudo=function(){if(!this.peek(xn.Colon))return null;var t=this.mark(),n=this.create(Fi);return this.consumeToken(),this.acceptIdent("extend")?this._completeExtends(n):(this.restoreAtMark(t),e.prototype._parsePseudo.call(this))},t.prototype._parseExtend=function(){if(!this.peekDelim("&"))return null;var e=this.mark(),t=this.create(Fi);return this.consumeToken(),!this.hasWhitespace()&&this.accept(xn.Colon)&&this.acceptIdent("extend")?this._completeExtends(t):(this.restoreAtMark(e),null)},t.prototype._completeExtends=function(e){if(!this.accept(xn.ParenthesisL))return this.finish(e,Ki.LeftParenthesisExpected);var t=e.getSelectors();if(!t.addChild(this._parseSelector(!0)))return this.finish(e,Ki.SelectorExpected);while(this.accept(xn.Comma))if(!t.addChild(this._parseSelector(!0)))return this.finish(e,Ki.SelectorExpected);return this.accept(xn.ParenthesisR)?this.finish(e):this.finish(e,Ki.RightParenthesisExpected)},t.prototype._parseDetachedRuleSetMixin=function(){if(!this.peek(xn.AtKeyword))return null;var e=this.mark(),t=this.create(Ri);return!t.addChild(this._parseVariable(!0))||!this.hasWhitespace()&&this.accept(xn.ParenthesisL)?this.accept(xn.ParenthesisR)?this.finish(t):this.finish(t,Ki.RightParenthesisExpected):(this.restoreAtMark(e),null)},t.prototype._tryParseMixinReference=function(e){void 0===e&&(e=!0);var t=this.mark(),n=this.create(Ri),r=this._parseMixinDeclarationIdentifier();while(r){this.acceptDelim(">");var i=this._parseMixinDeclarationIdentifier();if(!i)break;n.getNamespaces().addChild(r),r=i}if(!n.setIdentifier(r))return this.restoreAtMark(t),null;var o=!1;if(this.accept(xn.ParenthesisL)){if(o=!0,n.getArguments().addChild(this._parseMixinArgument()))while(this.accept(xn.Comma)||this.accept(xn.SemiColon)){if(this.peek(xn.ParenthesisR))break;if(!n.getArguments().addChild(this._parseMixinArgument()))return this.finish(n,Ki.ExpressionExpected)}if(!this.accept(xn.ParenthesisR))return this.finish(n,Ki.RightParenthesisExpected);r.referenceTypes=[yr.Mixin]}else r.referenceTypes=[yr.Mixin,yr.Rule];return this.peek(xn.BracketL)?e||this._addLookupChildren(n):n.addChild(this._parsePrio()),o||this.peek(xn.SemiColon)||this.peek(xn.CurlyR)||this.peek(xn.EOF)?this.finish(n):(this.restoreAtMark(t),null)},t.prototype._parseMixinArgument=function(){var e=this.create(Br),t=this.mark(),n=this._parseVariable();return n&&(this.accept(xn.Colon)?e.setIdentifier(n):this.restoreAtMark(t)),e.setValue(this._parseDetachedRuleSet()||this._parseExpr(!0))?this.finish(e):(this.restoreAtMark(t),null)},t.prototype._parseMixinParameter=function(){var e=this.create(jr);if(this.peekKeyword("@rest")){var t=this.create(Er);return this.consumeToken(),this.accept(cc)?(e.setIdentifier(this.finish(t)),this.finish(e)):this.finish(e,Ki.DotExpected,[],[xn.Comma,xn.ParenthesisR])}if(this.peek(cc)){var n=this.create(Er);return this.consumeToken(),e.setIdentifier(this.finish(n)),this.finish(e)}var r=!1;return e.setIdentifier(this._parseVariable())&&(this.accept(xn.Colon),r=!0),e.setDefaultValue(this._parseDetachedRuleSet()||this._parseExpr(!0))||r?this.finish(e):null},t.prototype._parseGuard=function(){if(!this.peekIdent("when"))return null;var e=this.create(Ai);if(this.consumeToken(),e.isNegated=this.acceptIdent("not"),!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,Ki.ConditionExpected);while(this.acceptIdent("and")||this.accept(xn.Comma))if(!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,Ki.ConditionExpected);return this.finish(e)},t.prototype._parseGuardCondition=function(){if(!this.peek(xn.ParenthesisL))return null;var e=this.create(Mi);return this.consumeToken(),e.addChild(this._parseExpr()),this.accept(xn.ParenthesisR)?this.finish(e):this.finish(e,Ki.RightParenthesisExpected)},t.prototype._parseFunction=function(){var e=this.mark(),t=this.create(Vr);if(!t.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(xn.ParenthesisL))return this.restoreAtMark(e),null;if(t.getArguments().addChild(this._parseMixinArgument()))while(this.accept(xn.Comma)||this.accept(xn.SemiColon)){if(this.peek(xn.ParenthesisR))break;if(!t.getArguments().addChild(this._parseMixinArgument()))return this.finish(t,Ki.ExpressionExpected)}return this.accept(xn.ParenthesisR)?this.finish(t):this.finish(t,Ki.RightParenthesisExpected)},t.prototype._parseFunctionIdentifier=function(){if(this.peekDelim("%")){var t=this.create(Fr);return t.referenceTypes=[yr.Function],this.consumeToken(),this.finish(t)}return e.prototype._parseFunctionIdentifier.call(this)},t.prototype._parseURLArgument=function(){var t=this.mark(),n=e.prototype._parseURLArgument.call(this);if(!n||!this.peek(xn.ParenthesisR)){this.restoreAtMark(t);var r=this.create(Er);return r.addChild(this._parseBinaryExpr()),this.finish(r)}return n},t}(Io),uc=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mc=Vi(),fc=function(e){function t(t,n){return e.call(this,"@",t,n)||this}return uc(t,e),t.prototype.createFunctionProposals=function(e,t,n,r){for(var i=0,o=e;i 50%"),example:"percentage(@number);",type:"percentage"},{name:"round",description:mc("less.builtin.round","rounds a number to a number of places"),example:"round(number, [places: 0]);"},{name:"sqrt",description:mc("less.builtin.sqrt","calculates square root of a number"),example:"sqrt(number);"},{name:"sin",description:mc("less.builtin.sin","sine function"),example:"sin(number);"},{name:"tan",description:mc("less.builtin.tan","tangent function"),example:"tan(number);"},{name:"atan",description:mc("less.builtin.atan","arctangent - inverse of tangent function"),example:"atan(number);"},{name:"pi",description:mc("less.builtin.pi","returns pi"),example:"pi();"},{name:"pow",description:mc("less.builtin.pow","first argument raised to the power of the second argument"),example:"pow(@base, @exponent);"},{name:"mod",description:mc("less.builtin.mod","first argument modulus second argument"),example:"mod(number, number);"},{name:"min",description:mc("less.builtin.min","returns the lowest of one or more values"),example:"min(@x, @y);"},{name:"max",description:mc("less.builtin.max","returns the lowest of one or more values"),example:"max(@x, @y);"}],t.colorProposals=[{name:"argb",example:"argb(@color);",description:mc("less.builtin.argb","creates a #AARRGGBB")},{name:"hsl",example:"hsl(@hue, @saturation, @lightness);",description:mc("less.builtin.hsl","creates a color")},{name:"hsla",example:"hsla(@hue, @saturation, @lightness, @alpha);",description:mc("less.builtin.hsla","creates a color")},{name:"hsv",example:"hsv(@hue, @saturation, @value);",description:mc("less.builtin.hsv","creates a color")},{name:"hsva",example:"hsva(@hue, @saturation, @value, @alpha);",description:mc("less.builtin.hsva","creates a color")},{name:"hue",example:"hue(@color);",description:mc("less.builtin.hue","returns the `hue` channel of `@color` in the HSL space")},{name:"saturation",example:"saturation(@color);",description:mc("less.builtin.saturation","returns the `saturation` channel of `@color` in the HSL space")},{name:"lightness",example:"lightness(@color);",description:mc("less.builtin.lightness","returns the `lightness` channel of `@color` in the HSL space")},{name:"hsvhue",example:"hsvhue(@color);",description:mc("less.builtin.hsvhue","returns the `hue` channel of `@color` in the HSV space")},{name:"hsvsaturation",example:"hsvsaturation(@color);",description:mc("less.builtin.hsvsaturation","returns the `saturation` channel of `@color` in the HSV space")},{name:"hsvvalue",example:"hsvvalue(@color);",description:mc("less.builtin.hsvvalue","returns the `value` channel of `@color` in the HSV space")},{name:"red",example:"red(@color);",description:mc("less.builtin.red","returns the `red` channel of `@color`")},{name:"green",example:"green(@color);",description:mc("less.builtin.green","returns the `green` channel of `@color`")},{name:"blue",example:"blue(@color);",description:mc("less.builtin.blue","returns the `blue` channel of `@color`")},{name:"alpha",example:"alpha(@color);",description:mc("less.builtin.alpha","returns the `alpha` channel of `@color`")},{name:"luma",example:"luma(@color);",description:mc("less.builtin.luma","returns the `luma` value (perceptual brightness) of `@color`")},{name:"saturate",example:"saturate(@color, 10%);",description:mc("less.builtin.saturate","return `@color` 10% points more saturated")},{name:"desaturate",example:"desaturate(@color, 10%);",description:mc("less.builtin.desaturate","return `@color` 10% points less saturated")},{name:"lighten",example:"lighten(@color, 10%);",description:mc("less.builtin.lighten","return `@color` 10% points lighter")},{name:"darken",example:"darken(@color, 10%);",description:mc("less.builtin.darken","return `@color` 10% points darker")},{name:"fadein",example:"fadein(@color, 10%);",description:mc("less.builtin.fadein","return `@color` 10% points less transparent")},{name:"fadeout",example:"fadeout(@color, 10%);",description:mc("less.builtin.fadeout","return `@color` 10% points more transparent")},{name:"fade",example:"fade(@color, 50%);",description:mc("less.builtin.fade","return `@color` with 50% transparency")},{name:"spin",example:"spin(@color, 10);",description:mc("less.builtin.spin","return `@color` with a 10 degree larger in hue")},{name:"mix",example:"mix(@color1, @color2, [@weight: 50%]);",description:mc("less.builtin.mix","return a mix of `@color1` and `@color2`")},{name:"greyscale",example:"greyscale(@color);",description:mc("less.builtin.greyscale","returns a grey, 100% desaturated color")},{name:"contrast",example:"contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);",description:mc("less.builtin.contrast","return `@darkcolor` if `@color1 is> 43% luma` otherwise return `@lightcolor`, see notes")},{name:"multiply",example:"multiply(@color1, @color2);"},{name:"screen",example:"screen(@color1, @color2);"},{name:"overlay",example:"overlay(@color1, @color2);"},{name:"softlight",example:"softlight(@color1, @color2);"},{name:"hardlight",example:"hardlight(@color1, @color2);"},{name:"difference",example:"difference(@color1, @color2);"},{name:"exclusion",example:"exclusion(@color1, @color2);"},{name:"average",example:"average(@color1, @color2);"},{name:"negation",example:"negation(@color1, @color2);"}],t}(va);function gc(e,t){var n=bc(e);return yc(n,t)}function bc(e){function t(t){return e.positionAt(t.offset).line}function n(t){return e.positionAt(t.offset+t.len).line}function r(){switch(e.languageId){case"scss":return new ql;case"less":return new dc;default:return new pr}}function i(e,r){var i=t(e),o=n(e);return i!==o?{startLine:i,endLine:o,kind:r}:null}var o=[],s=[],a=r();a.ignoreComment=!1,a.setSource(e.getText());var l=a.scan(),c=null,d=function(){switch(l.type){case xn.CurlyL:case Wl:s.push({line:t(l),type:"brace",isStart:!0});break;case xn.CurlyR:if(0!==s.length){var r=vc(s,"brace");if(!r)break;var d=n(l);"brace"===r.type&&(c&&n(c)!==d&&d--,r.line!==d&&o.push({startLine:r.line,endLine:d,kind:void 0}))}break;case xn.Comment:var h=function(e){return"#region"===e?{line:t(l),type:"comment",isStart:!0}:{line:n(l),type:"comment",isStart:!1}},p=function(t){var n=t.text.match(/^\s*\/\*\s*(#region|#endregion)\b\s*(.*?)\s*\*\//);if(n)return h(n[1]);if("scss"===e.languageId||"less"===e.languageId){var r=t.text.match(/^\s*\/\/\s*(#region|#endregion)\b\s*(.*?)\s*/);if(r)return h(r[1])}return null},u=p(l);if(u)if(u.isStart)s.push(u);else{r=vc(s,"comment");if(!r)break;"comment"===r.type&&r.line!==u.line&&o.push({startLine:r.line,endLine:u.line,kind:"region"})}else{var m=i(l,"comment");m&&o.push(m)}break}c=l,l=a.scan()};while(l.type!==xn.EOF)d();return o}function vc(e,t){if(0===e.length)return null;for(var n=e.length-1;n>=0;n--)if(e[n].type===t&&e[n].isStart)return e.splice(n,1)[0];return null}function yc(e,t){var n=t&&t.rangeLimit||Number.MAX_VALUE,r=e.sort((function(e,t){var n=e.startLine-t.startLine;return 0===n&&(n=e.endLine-t.endLine),n})),i=[],o=-1;return r.forEach((function(e){e.startLine && ]#",relevance:50,description:"@counter-style descriptor. Specifies the symbols used by the marker-construction algorithm specified by the system descriptor. Needs to be specified if the counter system is 'additive'.",restrictions:["integer","string","image","identifier"]},{name:"align-content",values:[{name:"center",description:"Lines are packed toward the center of the flex container."},{name:"flex-end",description:"Lines are packed toward the end of the flex container."},{name:"flex-start",description:"Lines are packed toward the start of the flex container."},{name:"space-around",description:"Lines are evenly distributed in the flex container, with half-size spaces on either end."},{name:"space-between",description:"Lines are evenly distributed in the flex container."},{name:"stretch",description:"Lines stretch to take up the remaining space."}],syntax:"normal | | | ? ",relevance:59,description:"Aligns a flex container’s lines within the flex container when there is extra space in the cross-axis, similar to how 'justify-content' aligns individual items within the main-axis.",restrictions:["enum"]},{name:"align-items",values:[{name:"baseline",description:"If the flex item’s inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."},{name:"center",description:"The flex item’s margin box is centered in the cross axis within the line."},{name:"flex-end",description:"The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."},{name:"flex-start",description:"The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."}],syntax:"normal | stretch | | [ ? ]",relevance:81,description:"Aligns flex items along the cross axis of the current line of the flex container.",restrictions:["enum"]},{name:"justify-items",values:[{name:"auto"},{name:"normal"},{name:"end"},{name:"start"},{name:"flex-end",description:'"Flex items are packed toward the end of the line."'},{name:"flex-start",description:'"Flex items are packed toward the start of the line."'},{name:"self-end",description:"The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."},{name:"self-start",description:"The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."},{name:"center",description:"The items are packed flush to each other toward the center of the of the alignment container."},{name:"left"},{name:"right"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"save"},{name:"unsave"},{name:"legacy"}],syntax:"normal | stretch | | ? [ | left | right ] | legacy | legacy && [ left | right | center ]",relevance:50,description:"Defines the default justify-self for all items of the box, giving them the default way of justifying each box along the appropriate axis",restrictions:["enum"]},{name:"justify-self",browsers:["E16","FF45","S10.1","C57","O44"],values:[{name:"auto"},{name:"normal"},{name:"end"},{name:"start"},{name:"flex-end",description:'"Flex items are packed toward the end of the line."'},{name:"flex-start",description:'"Flex items are packed toward the start of the line."'},{name:"self-end",description:"The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."},{name:"self-start",description:"The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."},{name:"center",description:"The items are packed flush to each other toward the center of the of the alignment container."},{name:"left"},{name:"right"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"save"},{name:"unsave"}],syntax:"auto | normal | stretch | | ? [ | left | right ]",relevance:52,description:"Defines the way of justifying a box inside its container along the appropriate axis.",restrictions:["enum"]},{name:"align-self",values:[{name:"auto",description:"Computes to the value of 'align-items' on the element’s parent, or 'stretch' if the element has no parent. On absolutely positioned elements, it computes to itself."},{name:"baseline",description:"If the flex item’s inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."},{name:"center",description:"The flex item’s margin box is centered in the cross axis within the line."},{name:"flex-end",description:"The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."},{name:"flex-start",description:"The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."}],syntax:"auto | normal | stretch | | ? ",relevance:69,description:"Allows the default alignment along the cross axis to be overridden for individual flex items.",restrictions:["enum"]},{name:"all",browsers:["E79","FF27","S9.1","C37","O24"],values:[],syntax:"initial | inherit | unset | revert",relevance:51,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/all"}],description:"Shorthand that resets all properties except 'direction' and 'unicode-bidi'.",restrictions:["enum"]},{name:"alt",browsers:["S9"],values:[],relevance:50,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/alt"}],description:"Provides alternative text for assistive technology to replace the generated content of a ::before or ::after element.",restrictions:["string","enum"]},{name:"animation",values:[{name:"alternate",description:"The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."},{name:"alternate-reverse",description:"The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."},{name:"backwards",description:"The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."},{name:"both",description:"Both forwards and backwards fill modes are applied."},{name:"forwards",description:"The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."},{name:"infinite",description:"Causes the animation to repeat forever."},{name:"none",description:"No animation is performed"},{name:"normal",description:"Normal playback."},{name:"reverse",description:"All iterations of the animation are played in the reverse direction from the way they were specified."}],syntax:"#",relevance:79,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/animation"}],description:"Shorthand property combines six of the animation properties into a single property.",restrictions:["time","timing-function","enum","identifier","number"]},{name:"animation-delay",syntax:"#",relevance:62,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/animation-delay"}],description:"Defines when the animation will start.",restrictions:["time"]},{name:"animation-direction",values:[{name:"alternate",description:"The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."},{name:"alternate-reverse",description:"The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."},{name:"normal",description:"Normal playback."},{name:"reverse",description:"All iterations of the animation are played in the reverse direction from the way they were specified."}],syntax:"#",relevance:55,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/animation-direction"}],description:"Defines whether or not the animation should play in reverse on alternate cycles.",restrictions:["enum"]},{name:"animation-duration",syntax:"#",relevance:64,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/animation-duration"}],description:"Defines the length of time that an animation takes to complete one cycle.",restrictions:["time"]},{name:"animation-fill-mode",values:[{name:"backwards",description:"The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."},{name:"both",description:"Both forwards and backwards fill modes are applied."},{name:"forwards",description:"The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."},{name:"none",description:"There is no change to the property value between the time the animation is applied and the time the animation begins playing or after the animation completes."}],syntax:"#",relevance:61,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/animation-fill-mode"}],description:"Defines what values are applied by the animation outside the time it is executing.",restrictions:["enum"]},{name:"animation-iteration-count",values:[{name:"infinite",description:"Causes the animation to repeat forever."}],syntax:"#",relevance:59,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/animation-iteration-count"}],description:"Defines the number of times an animation cycle is played. The default value is one, meaning the animation will play from beginning to end once.",restrictions:["number","enum"]},{name:"animation-name",values:[{name:"none",description:"No animation is performed"}],syntax:"[ none | ]#",relevance:64,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/animation-name"}],description:"Defines a list of animations that apply. Each name is used to select the keyframe at-rule that provides the property values for the animation.",restrictions:["identifier","enum"]},{name:"animation-play-state",values:[{name:"paused",description:"A running animation will be paused."},{name:"running",description:"Resume playback of a paused animation."}],syntax:"#",relevance:53,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/animation-play-state"}],description:"Defines whether the animation is running or paused.",restrictions:["enum"]},{name:"animation-timing-function",syntax:"#",relevance:68,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/animation-timing-function"}],description:"Describes how the animation will progress over one cycle of its duration.",restrictions:["timing-function"]},{name:"backface-visibility",values:[{name:"hidden",description:"Back side is hidden."},{name:"visible",description:"Back side is visible."}],syntax:"visible | hidden",relevance:59,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/backface-visibility"}],description:"Determines whether or not the 'back' side of a transformed element is visible when facing the viewer. With an identity transform, the front side of an element faces the viewer.",restrictions:["enum"]},{name:"background",values:[{name:"fixed",description:"The background is fixed with regard to the viewport. In paged media where there is no viewport, a 'fixed' background is fixed with respect to the page box and therefore replicated on every page."},{name:"local",description:"The background is fixed with regard to the element's contents: if the element has a scrolling mechanism, the background scrolls with the element's contents."},{name:"none",description:"A value of 'none' counts as an image layer but draws nothing."},{name:"scroll",description:"The background is fixed with regard to the element itself and does not scroll with its contents. (It is effectively attached to the element's border.)"}],syntax:"[ , ]* ",relevance:93,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/background"}],description:"Shorthand property for setting most background properties at the same place in the style sheet.",restrictions:["enum","image","color","position","length","repeat","percentage","box"]},{name:"background-attachment",values:[{name:"fixed",description:"The background is fixed with regard to the viewport. In paged media where there is no viewport, a 'fixed' background is fixed with respect to the page box and therefore replicated on every page."},{name:"local",description:"The background is fixed with regard to the element’s contents: if the element has a scrolling mechanism, the background scrolls with the element’s contents."},{name:"scroll",description:"The background is fixed with regard to the element itself and does not scroll with its contents. (It is effectively attached to the element’s border.)"}],syntax:"#",relevance:53,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/background-attachment"}],description:"Specifies whether the background images are fixed with regard to the viewport ('fixed') or scroll along with the element ('scroll') or its contents ('local').",restrictions:["enum"]},{name:"background-blend-mode",browsers:["E79","FF30","S8","C35","O22"],values:[{name:"normal",description:"Default attribute which specifies no blending"},{name:"multiply",description:"The source color is multiplied by the destination color and replaces the destination."},{name:"screen",description:"Multiplies the complements of the backdrop and source color values, then complements the result."},{name:"overlay",description:"Multiplies or screens the colors, depending on the backdrop color value."},{name:"darken",description:"Selects the darker of the backdrop and source colors."},{name:"lighten",description:"Selects the lighter of the backdrop and source colors."},{name:"color-dodge",description:"Brightens the backdrop color to reflect the source color."},{name:"color-burn",description:"Darkens the backdrop color to reflect the source color."},{name:"hard-light",description:"Multiplies or screens the colors, depending on the source color value."},{name:"soft-light",description:"Darkens or lightens the colors, depending on the source color value."},{name:"difference",description:"Subtracts the darker of the two constituent colors from the lighter color.."},{name:"exclusion",description:"Produces an effect similar to that of the Difference mode but lower in contrast."},{name:"hue",browsers:["E79","FF30","S8","C35","O22"],description:"Creates a color with the hue of the source color and the saturation and luminosity of the backdrop color."},{name:"saturation",browsers:["E79","FF30","S8","C35","O22"],description:"Creates a color with the saturation of the source color and the hue and luminosity of the backdrop color."},{name:"color",browsers:["E79","FF30","S8","C35","O22"],description:"Creates a color with the hue and saturation of the source color and the luminosity of the backdrop color."},{name:"luminosity",browsers:["E79","FF30","S8","C35","O22"],description:"Creates a color with the luminosity of the source color and the hue and saturation of the backdrop color."}],syntax:"#",relevance:50,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/background-blend-mode"}],description:"Defines the blending mode of each background layer.",restrictions:["enum"]},{name:"background-clip",syntax:"#",relevance:67,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/background-clip"}],description:"Determines the background painting area.",restrictions:["box"]},{name:"background-color",syntax:"",relevance:94,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/background-color"}],description:"Sets the background color of an element.",restrictions:["color"]},{name:"background-image",values:[{name:"none",description:"Counts as an image layer but draws nothing."}],syntax:"#",relevance:88,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/background-image"}],description:"Sets the background image(s) of an element.",restrictions:["image","enum"]},{name:"background-origin",syntax:"#",relevance:53,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/background-origin"}],description:"For elements rendered as a single box, specifies the background positioning area. For elements rendered as multiple boxes (e.g., inline boxes on several lines, boxes on several pages) specifies which boxes 'box-decoration-break' operates on to determine the background positioning area(s).",restrictions:["box"]},{name:"background-position",syntax:"#",relevance:87,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/background-position"}],description:"Specifies the initial position of the background image(s) (after any resizing) within their corresponding background positioning area.",restrictions:["position","length","percentage"]},{name:"background-position-x",values:[{name:"center",description:"Equivalent 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."},{name:"left",description:"Equivalent 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."},{name:"right",description:"Equivalent 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."}],status:"experimental",syntax:"[ center | [ [ left | right | x-start | x-end ]? ? ]! ]#",relevance:54,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/background-position-x"}],description:"If background images have been specified, this property specifies their initial position (after any resizing) within their corresponding background positioning area.",restrictions:["length","percentage"]},{name:"background-position-y",values:[{name:"bottom",description:"Equivalent 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."},{name:"center",description:"Equivalent 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."},{name:"top",description:"Equivalent 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."}],status:"experimental",syntax:"[ center | [ [ top | bottom | y-start | y-end ]? ? ]! ]#",relevance:53,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/background-position-y"}],description:"If background images have been specified, this property specifies their initial position (after any resizing) within their corresponding background positioning area.",restrictions:["length","percentage"]},{name:"background-repeat",values:[],syntax:"#",relevance:85,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/background-repeat"}],description:"Specifies how background images are tiled after they have been sized and positioned.",restrictions:["repeat"]},{name:"background-size",values:[{name:"auto",description:"Resolved by using the image’s intrinsic ratio and the size of the other dimension, or failing that, using the image’s intrinsic size, or failing that, treating it as 100%."},{name:"contain",description:"Scale the image, while preserving its intrinsic aspect ratio (if any), to the largest size such that both its width and its height can fit inside the background positioning area."},{name:"cover",description:"Scale the image, while preserving its intrinsic aspect ratio (if any), to the smallest size such that both its width and its height can completely cover the background positioning area."}],syntax:"#",relevance:85,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/background-size"}],description:"Specifies the size of the background images.",restrictions:["length","percentage"]},{name:"behavior",browsers:["IE6"],relevance:50,description:"IE only. Used to extend behaviors of the browser.",restrictions:["url"]},{name:"block-size",browsers:["E79","FF41","S12.1","C57","O44"],values:[{name:"auto",description:"Depends on the values of other properties."}],syntax:"<'width'>",relevance:50,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/block-size"}],description:"Logical 'width'. Mapping depends on the element’s 'writing-mode'.",restrictions:["length","percentage"]},{name:"border",syntax:" || || ",relevance:95,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border"}],description:"Shorthand property for setting border width, style, and color.",restrictions:["length","line-width","line-style","color"]},{name:"border-block-end",browsers:["E79","FF41","S12.1","C69","O56"],syntax:"<'border-top-width'> || <'border-top-style'> || <'color'>",relevance:50,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-block-end"}],description:"Logical 'border-bottom'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",restrictions:["length","line-width","line-style","color"]},{name:"border-block-start",browsers:["E79","FF41","S12.1","C69","O56"],syntax:"<'border-top-width'> || <'border-top-style'> || <'color'>",relevance:50,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-block-start"}],description:"Logical 'border-top'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",restrictions:["length","line-width","line-style","color"]},{name:"border-block-end-color",browsers:["E79","FF41","S12.1","C69","O56"],syntax:"<'border-top-color'>",relevance:50,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-block-end-color"}],description:"Logical 'border-bottom-color'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",restrictions:["color"]},{name:"border-block-start-color",browsers:["E79","FF41","S12.1","C69","O56"],syntax:"<'border-top-color'>",relevance:50,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-block-start-color"}],description:"Logical 'border-top-color'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",restrictions:["color"]},{name:"border-block-end-style",browsers:["E79","FF41","S12.1","C69","O56"],syntax:"<'border-top-style'>",relevance:50,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-block-end-style"}],description:"Logical 'border-bottom-style'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",restrictions:["line-style"]},{name:"border-block-start-style",browsers:["E79","FF41","S12.1","C69","O56"],syntax:"<'border-top-style'>",relevance:50,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-block-start-style"}],description:"Logical 'border-top-style'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",restrictions:["line-style"]},{name:"border-block-end-width",browsers:["E79","FF41","S12.1","C69","O56"],syntax:"<'border-top-width'>",relevance:50,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-block-end-width"}],description:"Logical 'border-bottom-width'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",restrictions:["length","line-width"]},{name:"border-block-start-width",browsers:["E79","FF41","S12.1","C69","O56"],syntax:"<'border-top-width'>",relevance:50,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-block-start-width"}],description:"Logical 'border-top-width'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",restrictions:["length","line-width"]},{name:"border-bottom",syntax:" || || ",relevance:88,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-bottom"}],description:"Shorthand property for setting border width, style and color.",restrictions:["length","line-width","line-style","color"]},{name:"border-bottom-color",syntax:"<'border-top-color'>",relevance:71,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-bottom-color"}],description:"Sets the color of the bottom border.",restrictions:["color"]},{name:"border-bottom-left-radius",syntax:"{1,2}",relevance:74,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-bottom-left-radius"}],description:"Defines the radii of the bottom left outer border edge.",restrictions:["length","percentage"]},{name:"border-bottom-right-radius",syntax:"{1,2}",relevance:73,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-bottom-right-radius"}],description:"Defines the radii of the bottom right outer border edge.",restrictions:["length","percentage"]},{name:"border-bottom-style",syntax:"",relevance:57,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-bottom-style"}],description:"Sets the style of the bottom border.",restrictions:["line-style"]},{name:"border-bottom-width",syntax:"",relevance:62,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-bottom-width"}],description:"Sets the thickness of the bottom border.",restrictions:["length","line-width"]},{name:"border-collapse",values:[{name:"collapse",description:"Selects the collapsing borders model."},{name:"separate",description:"Selects the separated borders border model."}],syntax:"collapse | separate",relevance:75,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-collapse"}],description:"Selects a table's border model.",restrictions:["enum"]},{name:"border-color",values:[],syntax:"{1,4}",relevance:86,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-color"}],description:"The color of the border around all four edges of an element.",restrictions:["color"]},{name:"border-image",values:[{name:"auto",description:"If 'auto' is specified then the border image width is the intrinsic width or height (whichever is applicable) of the corresponding image slice. If the image does not have the required intrinsic dimension then the corresponding border-width is used instead."},{name:"fill",description:"Causes the middle part of the border-image to be preserved."},{name:"none",description:"Use the border styles."},{name:"repeat",description:"The image is tiled (repeated) to fill the area."},{name:"round",description:"The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the image is rescaled so that it does."},{name:"space",description:"The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the extra space is distributed around the tiles."},{name:"stretch",description:"The image is stretched to fill the area."},{name:"url()"}],syntax:"<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>",relevance:52,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-image"}],description:"Shorthand property for setting 'border-image-source', 'border-image-slice', 'border-image-width', 'border-image-outset' and 'border-image-repeat'. Omitted values are set to their initial values.",restrictions:["length","percentage","number","url","enum"]},{name:"border-image-outset",syntax:"[ | ]{1,4}",relevance:50,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-image-outset"}],description:"The values specify the amount by which the border image area extends beyond the border box on the top, right, bottom, and left sides respectively. If the fourth value is absent, it is the same as the second. If the third one is also absent, it is the same as the first. If the second one is also absent, it is the same as the first. Numbers represent multiples of the corresponding border-width.",restrictions:["length","number"]},{name:"border-image-repeat",values:[{name:"repeat",description:"The image is tiled (repeated) to fill the area."},{name:"round",description:"The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the image is rescaled so that it does."},{name:"space",description:"The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the extra space is distributed around the tiles."},{name:"stretch",description:"The image is stretched to fill the area."}],syntax:"[ stretch | repeat | round | space ]{1,2}",relevance:51,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-image-repeat"}],description:"Specifies how the images for the sides and the middle part of the border image are scaled and tiled. If the second keyword is absent, it is assumed to be the same as the first.",restrictions:["enum"]},{name:"border-image-slice",values:[{name:"fill",description:"Causes the middle part of the border-image to be preserved."}],syntax:"{1,4} && fill?",relevance:51,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-image-slice"}],description:"Specifies inward offsets from the top, right, bottom, and left edges of the image, dividing it into nine regions: four corners, four edges and a middle.",restrictions:["number","percentage"]},{name:"border-image-source",values:[{name:"none",description:"Use the border styles."}],syntax:"none | ",relevance:50,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-image-source"}],description:"Specifies an image to use instead of the border styles given by the 'border-style' properties and as an additional background layer for the element. If the value is 'none' or if the image cannot be displayed, the border styles will be used.",restrictions:["image"]},{name:"border-image-width",values:[{name:"auto",description:"The border image width is the intrinsic width or height (whichever is applicable) of the corresponding image slice. If the image does not have the required intrinsic dimension then the corresponding border-width is used instead."}],syntax:"[ | | auto ]{1,4}",relevance:51,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-image-width"}],description:"The four values of 'border-image-width' specify offsets that are used to divide the border image area into nine parts. They represent inward distances from the top, right, bottom, and left sides of the area, respectively.",restrictions:["length","percentage","number"]},{name:"border-inline-end",browsers:["E79","FF41","S12.1","C69","O56"],syntax:"<'border-top-width'> || <'border-top-style'> || <'color'>",relevance:50,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-inline-end"}],description:"Logical 'border-right'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",restrictions:["length","line-width","line-style","color"]},{name:"border-inline-start",browsers:["E79","FF41","S12.1","C69","O56"],syntax:"<'border-top-width'> || <'border-top-style'> || <'color'>",relevance:50,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-inline-start"}],description:"Logical 'border-left'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",restrictions:["length","line-width","line-style","color"]},{name:"border-inline-end-color",browsers:["E79","FF41","S12.1","C69","O56"],syntax:"<'border-top-color'>",relevance:50,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-inline-end-color"}],description:"Logical 'border-right-color'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",restrictions:["color"]},{name:"border-inline-start-color",browsers:["E79","FF41","S12.1","C69","O56"],syntax:"<'border-top-color'>",relevance:50,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-inline-start-color"}],description:"Logical 'border-left-color'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",restrictions:["color"]},{name:"border-inline-end-style",browsers:["E79","FF41","S12.1","C69","O56"],syntax:"<'border-top-style'>",relevance:50,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-inline-end-style"}],description:"Logical 'border-right-style'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",restrictions:["line-style"]},{name:"border-inline-start-style",browsers:["E79","FF41","S12.1","C69","O56"],syntax:"<'border-top-style'>",relevance:50,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-inline-start-style"}],description:"Logical 'border-left-style'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",restrictions:["line-style"]},{name:"border-inline-end-width",browsers:["E79","FF41","S12.1","C69","O56"],syntax:"<'border-top-width'>",relevance:50,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-inline-end-width"}],description:"Logical 'border-right-width'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",restrictions:["length","line-width"]},{name:"border-inline-start-width",browsers:["E79","FF41","S12.1","C69","O56"],syntax:"<'border-top-width'>",relevance:50,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-inline-start-width"}],description:"Logical 'border-left-width'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",restrictions:["length","line-width"]},{name:"border-left",syntax:" || || ",relevance:82,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-left"}],description:"Shorthand property for setting border width, style and color",restrictions:["length","line-width","line-style","color"]},{name:"border-left-color",syntax:"",relevance:65,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-left-color"}],description:"Sets the color of the left border.",restrictions:["color"]},{name:"border-left-style",syntax:"",relevance:54,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-left-style"}],description:"Sets the style of the left border.",restrictions:["line-style"]},{name:"border-left-width",syntax:"",relevance:58,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-left-width"}],description:"Sets the thickness of the left border.",restrictions:["length","line-width"]},{name:"border-radius",syntax:"{1,4} [ / {1,4} ]?",relevance:91,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-radius"}],description:"Defines the radii of the outer border edge.",restrictions:["length","percentage"]},{name:"border-right",syntax:" || || ",relevance:81,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-right"}],description:"Shorthand property for setting border width, style and color",restrictions:["length","line-width","line-style","color"]},{name:"border-right-color",syntax:"",relevance:64,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-right-color"}],description:"Sets the color of the right border.",restrictions:["color"]},{name:"border-right-style",syntax:"",relevance:54,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-right-style"}],description:"Sets the style of the right border.",restrictions:["line-style"]},{name:"border-right-width",syntax:"",relevance:60,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/border-right-width"}],description:"Sets the thickness of the right border.",restrictions:["length","line-width"]},{name:"border-spacing",syntax:"