@aventusjs/cli 0.0.11 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Aventus@Main.package.avt +266 -219
- package/lib/Aventus@UI.package.avt +1 -1
- package/lib/bin/CSharpToTypescript/AventusSharp.dll +0 -0
- package/lib/bin/CSharpToTypescript/AventusSharp.pdb +0 -0
- package/lib/bin/CSharpToTypescript/CSharpToTypescript.deps.json +3 -3
- package/lib/bin/CSharpToTypescript/CSharpToTypescript.dll +0 -0
- package/lib/bin/CSharpToTypescript/CSharpToTypescript.exe +0 -0
- package/lib/bin/CSharpToTypescript/CSharpToTypescript.pdb +0 -0
- package/lib/bin/CSharpToTypescript/package.json +1 -1
- package/out/RealInteraction.js +1 -1
- package/out/RealServer.js +75 -50
- package/out/cli.js +1 -1
- package/package.json +1 -1
package/out/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
(()=>{var __webpack_modules__={666:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U:()=>Interaction});var _logo__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(50),_server_Server__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(995);class Interaction{static realInteraction;static async load(){this.realInteraction=(await eval('import("./RealInteraction.js")')).default.RealInteraction,this.realInteraction._server=_server_Server__WEBPACK_IMPORTED_MODULE_0__.x}static async init(){this.clear(),console.log("Welcome inside Aventus CLI")}static clear(){console.clear(),(0,_logo__WEBPACK_IMPORTED_MODULE_1__.V)()}static async select(e,t){return this.realInteraction?.select(e,t)||null}static async selectMultiple(e,t){return this.realInteraction?.selectMultiple(e,t)||null}static async input(e,t,n){return this.realInteraction?.input(e,t,n)||null}static async tree(e,t){return this.realInteraction?.tree(e,t)||null}static async log(){return this.realInteraction?.log()||null}}},50:(e,t,n)=>{"use strict";n.d(t,{V:()=>r});const i=[" /\\ | | "," / \\ __ __ ___ _ __ | |_ _ _ ___ "," / /\\ \\\\ \\ / // _ \\| _ \\ | __|| | | |/ __|"," / ____ \\\\ V /| __/| | | || |_ | |_| |\\__ \\"," /_/ \\_\\\\_/ \\___||_| |_| \\__| \\____||___/"];function r(){console.log("[31m"),console.log(i.join("\r\n")),console.log("[0m")}},995:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{x:()=>Server});var _interaction_Interaction__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(666);class Server{static realServer;static async load(){this.realServer=(await eval('import("./RealServer.js")')).default.RealServer,this.realServer._interaction=_interaction_Interaction__WEBPACK_IMPORTED_MODULE_0__.U}static subscribeErrors(e){return this.realServer?.subscribeErrors(e)}static unsubscribeErrors(e){return this.realServer?.unsubscribeErrors(e)}static getErrors(){return this.realServer?.getErrors()}static start(e){return this.realServer?.start(e)}static create(){return this.realServer?.create()}static getStatistics(){return this.realServer?.getStatistics()}}},837:(e,t,n)=>{"use strict";var i,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l={};((e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})})(l,{config:()=>d,t:()=>p}),e.exports=(i=l,((e,t,n,i)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of s(t))a.call(e,l)||l===n||r(e,l,{get:()=>t[l],enumerable:!(i=o(t,l))||i.enumerable});return e})(r({},"__esModule",{value:!0}),i));var c,u=n(147),h=n(292);function d(e){if("contents"in e)c="string"==typeof e.contents?JSON.parse(e.contents):e.contents;else if("fsPath"in e){const n=(t=e.fsPath,(0,u.readFileSync)(t,"utf8")),i=JSON.parse(n);c=g(i)?i.contents.bundle:i}else{var t;if(e.uri){let t=e.uri;return"string"==typeof e.uri&&(t=new URL(e.uri)),new Promise(((e,n)=>{(async function(e){if("file:"===e.protocol)return await(0,h.readFile)(e,"utf8");if("http:"===e.protocol||"https:"===e.protocol){const t=await fetch(e.toString(),{headers:{"Accept-Encoding":"gzip, deflate",Accept:"application/json"},redirect:"follow"});if(!t.ok){let n=`Unexpected ${t.status} response while trying to read ${e}`;try{n+=`: ${await t.text()}`}catch{}throw new Error(n)}return await t.text()}throw new Error("Unsupported protocol")})(t).then((t=>{try{const n=JSON.parse(t);c=g(n)?n.contents.bundle:n,e()}catch(e){n(e)}})).catch((e=>{n(e)}))}))}}}function p(...e){const t=e[0];let n,i,r;if("string"==typeof t)n=t,i=t,e.splice(0,1),r=e&&"object"==typeof e[0]?e[0]:e;else{if(t instanceof Array){const n=e.slice(1);if(t.length!==n.length+1)throw new Error("expected a string as the first argument to l10n.t");let i=t[0];for(let e=1;e<t.length;e++)i+=`{${e-1}}`+t[e];return p(i,...n)}i=t.message,n=i,t.comment&&t.comment.length>0&&(n+=`/${Array.isArray(t.comment)?t.comment.join(""):t.comment}`),r=t.args??{}}const o=c?.[n];return o?"string"==typeof o?m(o,r):o.comment?m(o.message,r):m(i,r):m(i,r)}var f=/{([^}]+)}/g;function m(e,t){return 0===Object.keys(t).length?e:e.replace(f,((e,n)=>t[n]??e))}function g(e){return!("object"!=typeof e?.contents?.bundle||"string"!=typeof e?.version)}},147:e=>{"use strict";e.exports=require("fs")},292:e=>{"use strict";e.exports=require("fs/promises")},718:e=>{"use strict";e.exports=require("node:child_process")},673:e=>{"use strict";e.exports=require("node:events")},561:e=>{"use strict";e.exports=require("node:fs")},411:e=>{"use strict";e.exports=require("node:path")},742:e=>{"use strict";e.exports=require("node:process")},810:(e,t,n)=>{const{Argument:i}=n(555),{Command:r}=n(820),{CommanderError:o,InvalidArgumentError:s}=n(376),{Help:a}=n(65),{Option:l}=n(452);t.program=new r,t.createCommand=e=>new r(e),t.createOption=(e,t)=>new l(e,t),t.createArgument=(e,t)=>new i(e,t),t.Command=r,t.Option=l,t.Argument=i,t.Help=a,t.CommanderError=o,t.InvalidArgumentError=s,t.InvalidOptionArgumentError=s},555:(e,t,n)=>{const{InvalidArgumentError:i}=n(376);t.Argument=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e}this._name.length>3&&"..."===this._name.slice(-3)&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,t){return t!==this.defaultValue&&Array.isArray(t)?t.concat(e):[e]}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,t)=>{if(!this.argChoices.includes(e))throw new i(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(e,t):e},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}},t.humanReadableArgName=function(e){const t=e.name()+(!0===e.variadic?"...":"");return e.required?"<"+t+">":"["+t+"]"}},820:(e,t,n)=>{const i=n(673).EventEmitter,r=n(718),o=n(411),s=n(561),a=n(742),{Argument:l,humanReadableArgName:c}=n(555),{CommanderError:u}=n(376),{Help:h}=n(65),{Option:d,DualOptions:p}=n(452),{suggestSimilar:f}=n(134);class m extends i{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._outputConfiguration={writeOut:e=>a.stdout.write(e),writeErr:e=>a.stderr.write(e),getOutHelpWidth:()=>a.stdout.isTTY?a.stdout.columns:void 0,getErrHelpWidth:()=>a.stderr.isTTY?a.stderr.columns:void 0,outputError:(e,t)=>t(e)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){const e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,n){let i=t,r=n;"object"==typeof i&&null!==i&&(r=i,i=null),r=r||{};const[,o,s]=e.match(/([^ ]+) *(.*)/),a=this.createCommand(o);return i&&(a.description(i),a._executableHandler=!0),r.isDefault&&(this._defaultCommandName=a._name),a._hidden=!(!r.noHelp&&!r.hidden),a._executableFile=r.executableFile||null,s&&a.arguments(s),this._registerCommand(a),a.parent=this,a.copyInheritedSettings(this),i?this:a}createCommand(e){return new m(e)}createHelp(){return Object.assign(new h,this.configureHelp())}configureHelp(e){return void 0===e?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return void 0===e?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return"string"!=typeof e&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error("Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()");return(t=t||{}).isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new l(e,t)}argument(e,t,n,i){const r=this.createArgument(e,t);return"function"==typeof n?r.default(i).argParser(n):r.default(n),this.addArgument(r),this}arguments(e){return e.trim().split(/ +/).forEach((e=>{this.argument(e)})),this}addArgument(e){const t=this.registeredArguments.slice(-1)[0];if(t&&t.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&void 0!==e.defaultValue&&void 0===e.parseArg)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if("boolean"==typeof e)return this._addImplicitHelpCommand=e,this;e=e??"help [command]";const[,n,i]=e.match(/([^ ]+) *(.*)/),r=t??"display help for command",o=this.createCommand(n);return o.helpOption(!1),i&&o.arguments(i),r&&o.description(r),this._addImplicitHelpCommand=!0,this._helpCommand=o,this}addHelpCommand(e,t){return"object"!=typeof e?(this.helpCommand(e,t),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(void 0===this._helpCommand&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){const n=["preSubcommand","preAction","postAction"];if(!n.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.\nExpecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return this._exitCallback=e||(e=>{if("commander.executeSubCommandAsync"!==e.code)throw e}),this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new u(e,t,n)),a.exit(e)}action(e){return this._actionHandler=t=>{const n=this.registeredArguments.length,i=t.slice(0,n);return this._storeOptionsAsProperties?i[n]=this:i[n]=this.opts(),i.push(this),e.apply(this,i)},this}createOption(e,t){return new d(e,t)}_callParseArg(e,t,n,i){try{return e.parseArg(t,n)}catch(e){if("commander.invalidArgument"===e.code){const t=`${i} ${e.message}`;this.error(t,{exitCode:e.exitCode,code:e.code})}throw e}}_registerOption(e){const t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){const n=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'\n- already used by option '${t.flags}'`)}this.options.push(e)}_registerCommand(e){const t=e=>[e.name()].concat(e.aliases()),n=t(e).find((e=>this._findCommand(e)));if(n){const i=t(this._findCommand(n)).join("|"),r=t(e).join("|");throw new Error(`cannot add command '${r}' as already have command '${i}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);const t=e.name(),n=e.attributeName();if(e.negate){const t=e.long.replace(/^--no-/,"--");this._findOption(t)||this.setOptionValueWithSource(n,void 0===e.defaultValue||e.defaultValue,"default")}else void 0!==e.defaultValue&&this.setOptionValueWithSource(n,e.defaultValue,"default");const i=(t,i,r)=>{null==t&&void 0!==e.presetArg&&(t=e.presetArg);const o=this.getOptionValue(n);null!==t&&e.parseArg?t=this._callParseArg(e,t,o,i):null!==t&&e.variadic&&(t=e._concatValue(t,o)),null==t&&(t=!e.negate&&(!(!e.isBoolean()&&!e.optional)||"")),this.setOptionValueWithSource(n,t,r)};return this.on("option:"+t,(t=>{const n=`error: option '${e.flags}' argument '${t}' is invalid.`;i(t,n,"cli")})),e.envVar&&this.on("optionEnv:"+t,(t=>{const n=`error: option '${e.flags}' value '${t}' from env '${e.envVar}' is invalid.`;i(t,n,"env")})),this}_optionEx(e,t,n,i,r){if("object"==typeof t&&t instanceof d)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");const o=this.createOption(t,n);if(o.makeOptionMandatory(!!e.mandatory),"function"==typeof i)o.default(r).argParser(i);else if(i instanceof RegExp){const e=i;i=(t,n)=>{const i=e.exec(t);return i?i[0]:n},o.default(r).argParser(i)}else o.default(i);return this.addOption(o)}option(e,t,n,i){return this._optionEx({},e,t,n,i)}requiredOption(e,t,n,i){return this._optionEx({mandatory:!0},e,t,n,i)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,n){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach((n=>{void 0!==n.getOptionValueSource(e)&&(t=n.getOptionValueSource(e))})),t}_prepareUserArgs(e,t){if(void 0!==e&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(t=t||{},void 0===e&&void 0===t.from){a.versions?.electron&&(t.from="electron");const e=a.execArgv??[];(e.includes("-e")||e.includes("--eval")||e.includes("-p")||e.includes("--print"))&&(t.from="eval")}let n;switch(void 0===e&&(e=a.argv),this.rawArgs=e.slice(),t.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":a.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;case"eval":n=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(e,t){const n=this._prepareUserArgs(e,t);return this._parseCommand([],n),this}async parseAsync(e,t){const n=this._prepareUserArgs(e,t);return await this._parseCommand([],n),this}_executeSubCommand(e,t){t=t.slice();let n=!1;const i=[".js",".ts",".tsx",".mjs",".cjs"];function l(e,t){const n=o.resolve(e,t);if(s.existsSync(n))return n;if(i.includes(o.extname(t)))return;const r=i.find((e=>s.existsSync(`${n}${e}`)));return r?`${n}${r}`:void 0}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let c,h=e._executableFile||`${this._name}-${e._name}`,d=this._executableDir||"";if(this._scriptPath){let e;try{e=s.realpathSync(this._scriptPath)}catch(t){e=this._scriptPath}d=o.resolve(o.dirname(e),d)}if(d){let t=l(d,h);if(!t&&!e._executableFile&&this._scriptPath){const n=o.basename(this._scriptPath,o.extname(this._scriptPath));n!==this._name&&(t=l(d,`${n}-${e._name}`))}h=t||h}if(n=i.includes(o.extname(h)),"win32"!==a.platform?n?(t.unshift(h),t=g(a.execArgv).concat(t),c=r.spawn(a.argv[0],t,{stdio:"inherit"})):c=r.spawn(h,t,{stdio:"inherit"}):(t.unshift(h),t=g(a.execArgv).concat(t),c=r.spawn(a.execPath,t,{stdio:"inherit"})),!c.killed){["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((e=>{a.on(e,(()=>{!1===c.killed&&null===c.exitCode&&c.kill(e)}))}))}const p=this._exitCallback;c.on("close",(e=>{e=e??1,p?p(new u(e,"commander.executeSubCommandAsync","(close)")):a.exit(e)})),c.on("error",(t=>{if("ENOENT"===t.code){const t=d?`searched for local subcommand relative to directory '${d}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",n=`'${h}' does not exist\n - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ${t}`;throw new Error(n)}if("EACCES"===t.code)throw new Error(`'${h}' not executable`);if(p){const e=new u(1,"commander.executeSubCommandAsync","(error)");e.nestedError=t,p(e)}else a.exit(1)})),this.runningCommand=c}_dispatchSubcommand(e,t,n){const i=this._findCommand(e);let r;return i||this.help({error:!0}),r=this._chainOrCallSubCommandHook(r,i,"preSubcommand"),r=this._chainOrCall(r,(()=>{if(!i._executableHandler)return i._parseCommand(t,n);this._executeSubCommand(i,t.concat(n))})),r}_dispatchHelpCommand(e){e||this.help();const t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach(((e,t)=>{e.required&&null==this.args[t]&&this.missingArgument(e.name())})),this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic||this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){const e=(e,t,n)=>{let i=t;if(null!==t&&e.parseArg){const r=`error: command-argument value '${t}' is invalid for argument '${e.name()}'.`;i=this._callParseArg(e,t,n,r)}return i};this._checkNumberOfArguments();const t=[];this.registeredArguments.forEach(((n,i)=>{let r=n.defaultValue;n.variadic?i<this.args.length?(r=this.args.slice(i),n.parseArg&&(r=r.reduce(((t,i)=>e(n,i,t)),n.defaultValue))):void 0===r&&(r=[]):i<this.args.length&&(r=this.args[i],n.parseArg&&(r=e(n,r,n.defaultValue))),t[i]=r})),this.processedArgs=t}_chainOrCall(e,t){return e&&e.then&&"function"==typeof e.then?e.then((()=>t())):t()}_chainOrCallHooks(e,t){let n=e;const i=[];return this._getCommandAndAncestors().reverse().filter((e=>void 0!==e._lifeCycleHooks[t])).forEach((e=>{e._lifeCycleHooks[t].forEach((t=>{i.push({hookedCommand:e,callback:t})}))})),"postAction"===t&&i.reverse(),i.forEach((e=>{n=this._chainOrCall(n,(()=>e.callback(e.hookedCommand,this)))})),n}_chainOrCallSubCommandHook(e,t,n){let i=e;return void 0!==this._lifeCycleHooks[n]&&this._lifeCycleHooks[n].forEach((e=>{i=this._chainOrCall(i,(()=>e(this,t)))})),i}_parseCommand(e,t){const n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);!this.commands.length||0!==this.args.length||this._actionHandler||this._defaultCommandName||this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();const i=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},r=`command:${this.name()}`;if(this._actionHandler){let n;return i(),this._processArguments(),n=this._chainOrCallHooks(n,"preAction"),n=this._chainOrCall(n,(()=>this._actionHandler(this.processedArgs))),this.parent&&(n=this._chainOrCall(n,(()=>{this.parent.emit(r,e,t)}))),n=this._chainOrCallHooks(n,"postAction"),n}if(this.parent&&this.parent.listenerCount(r))i(),this._processArguments(),this.parent.emit(r,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(e){if(e)return this.commands.find((t=>t._name===e||t._aliases.includes(e)))}_findOption(e){return this.options.find((t=>t.is(e)))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach((e=>{e.options.forEach((t=>{t.mandatory&&void 0===e.getOptionValue(t.attributeName())&&e.missingMandatoryOptionValue(t)}))}))}_checkForConflictingLocalOptions(){const e=this.options.filter((e=>{const t=e.attributeName();return void 0!==this.getOptionValue(t)&&"default"!==this.getOptionValueSource(t)}));e.filter((e=>e.conflictsWith.length>0)).forEach((t=>{const n=e.find((e=>t.conflictsWith.includes(e.attributeName())));n&&this._conflictingOption(t,n)}))}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach((e=>{e._checkForConflictingLocalOptions()}))}parseOptions(e){const t=[],n=[];let i=t;const r=e.slice();function o(e){return e.length>1&&"-"===e[0]}let s=null;for(;r.length;){const e=r.shift();if("--"===e){i===n&&i.push(e),i.push(...r);break}if(!s||o(e)){if(s=null,o(e)){const t=this._findOption(e);if(t){if(t.required){const e=r.shift();void 0===e&&this.optionMissingArgument(t),this.emit(`option:${t.name()}`,e)}else if(t.optional){let e=null;r.length>0&&!o(r[0])&&(e=r.shift()),this.emit(`option:${t.name()}`,e)}else this.emit(`option:${t.name()}`);s=t.variadic?t:null;continue}}if(e.length>2&&"-"===e[0]&&"-"!==e[1]){const t=this._findOption(`-${e[1]}`);if(t){t.required||t.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${t.name()}`,e.slice(2)):(this.emit(`option:${t.name()}`),r.unshift(`-${e.slice(2)}`));continue}}if(/^--[^=]+=/.test(e)){const t=e.indexOf("="),n=this._findOption(e.slice(0,t));if(n&&(n.required||n.optional)){this.emit(`option:${n.name()}`,e.slice(t+1));continue}}if(o(e)&&(i=n),(this._enablePositionalOptions||this._passThroughOptions)&&0===t.length&&0===n.length){if(this._findCommand(e)){t.push(e),r.length>0&&n.push(...r);break}if(this._getHelpCommand()&&e===this._getHelpCommand().name()){t.push(e),r.length>0&&t.push(...r);break}if(this._defaultCommandName){n.push(e),r.length>0&&n.push(...r);break}}if(this._passThroughOptions){i.push(e),r.length>0&&i.push(...r);break}i.push(e)}else this.emit(`option:${s.name()}`,e)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){const e={},t=this.options.length;for(let n=0;n<t;n++){const t=this.options[n].attributeName();e[t]=t===this._versionOptionName?this._version:this[t]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce(((e,t)=>Object.assign(e,t.opts())),{})}error(e,t){this._outputConfiguration.outputError(`${e}\n`,this._outputConfiguration.writeErr),"string"==typeof this._showHelpAfterError?this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`):this._showHelpAfterError&&(this._outputConfiguration.writeErr("\n"),this.outputHelp({error:!0}));const n=t||{},i=n.exitCode||1,r=n.code||"commander.error";this._exit(i,r,e)}_parseOptionsEnv(){this.options.forEach((e=>{if(e.envVar&&e.envVar in a.env){const t=e.attributeName();(void 0===this.getOptionValue(t)||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,a.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}}))}_parseOptionsImplied(){const e=new p(this.options),t=e=>void 0!==this.getOptionValue(e)&&!["default","implied"].includes(this.getOptionValueSource(e));this.options.filter((n=>void 0!==n.implied&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n))).forEach((e=>{Object.keys(e.implied).filter((e=>!t(e))).forEach((t=>{this.setOptionValueWithSource(t,e.implied[t],"implied")}))}))}missingArgument(e){const t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){const t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){const t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){const n=e=>{const t=e.attributeName(),n=this.getOptionValue(t),i=this.options.find((e=>e.negate&&t===e.attributeName())),r=this.options.find((e=>!e.negate&&t===e.attributeName()));return i&&(void 0===i.presetArg&&!1===n||void 0!==i.presetArg&&n===i.presetArg)?i:r||e},i=e=>{const t=n(e),i=t.attributeName();return"env"===this.getOptionValueSource(i)?`environment variable '${t.envVar}'`:`option '${t.flags}'`},r=`error: ${i(e)} cannot be used with ${i(t)}`;this.error(r,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let n=[],i=this;do{const e=i.createHelp().visibleOptions(i).filter((e=>e.long)).map((e=>e.long));n=n.concat(e),i=i.parent}while(i&&!i._enablePositionalOptions);t=f(e,n)}const n=`error: unknown option '${e}'${t}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;const t=this.registeredArguments.length,n=1===t?"":"s",i=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${n} but got ${e.length}.`;this.error(i,{code:"commander.excessArguments"})}unknownCommand(){const e=this.args[0];let t="";if(this._showSuggestionAfterError){const n=[];this.createHelp().visibleCommands(this).forEach((e=>{n.push(e.name()),e.alias()&&n.push(e.alias())})),t=f(e,n)}const n=`error: unknown command '${e}'${t}`;this.error(n,{code:"commander.unknownCommand"})}version(e,t,n){if(void 0===e)return this._version;this._version=e,t=t||"-V, --version",n=n||"output the version number";const i=this.createOption(t,n);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),(()=>{this._outputConfiguration.writeOut(`${e}\n`),this._exit(0,"commander.version",e)})),this}description(e,t){return void 0===e&&void 0===t?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return void 0===e?this._summary:(this._summary=e,this)}alias(e){if(void 0===e)return this._aliases[0];let t=this;if(0!==this.commands.length&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");const n=this.parent?._findCommand(e);if(n){const t=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${t}'`)}return t._aliases.push(e),this}aliases(e){return void 0===e?this._aliases:(e.forEach((e=>this.alias(e))),this)}usage(e){if(void 0===e){if(this._usage)return this._usage;const e=this.registeredArguments.map((e=>c(e)));return[].concat(this.options.length||null!==this._helpOption?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?e:[]).join(" ")}return this._usage=e,this}name(e){return void 0===e?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=o.basename(e,o.extname(e)),this}executableDir(e){return void 0===e?this._executableDir:(this._executableDir=e,this)}helpInformation(e){const t=this.createHelp();return void 0===t.helpWidth&&(t.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),t.formatHelp(this,t)}_getHelpContext(e){const t={error:!!(e=e||{}).error};let n;return n=t.error?e=>this._outputConfiguration.writeErr(e):e=>this._outputConfiguration.writeOut(e),t.write=e.write||n,t.command=this,t}outputHelp(e){let t;"function"==typeof e&&(t=e,e=void 0);const n=this._getHelpContext(e);this._getCommandAndAncestors().reverse().forEach((e=>e.emit("beforeAllHelp",n))),this.emit("beforeHelp",n);let i=this.helpInformation(n);if(t&&(i=t(i),"string"!=typeof i&&!Buffer.isBuffer(i)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(i),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",n),this._getCommandAndAncestors().forEach((e=>e.emit("afterAllHelp",n)))}helpOption(e,t){return"boolean"==typeof e?(this._helpOption=e?this._helpOption??void 0:null,this):(e=e??"-h, --help",t=t??"display help for command",this._helpOption=this.createOption(e,t),this)}_getHelpOption(){return void 0===this._helpOption&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){this.outputHelp(e);let t=a.exitCode||0;0===t&&e&&"function"!=typeof e&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){const n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${n.join("', '")}'`);const i=`${e}Help`;return this.on(i,(e=>{let n;n="function"==typeof t?t({error:e.error,command:e.command}):t,n&&e.write(`${n}\n`)})),this}_outputHelpIfRequested(e){const t=this._getHelpOption();t&&e.find((e=>t.is(e)))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}}function g(e){return e.map((e=>{if(!e.startsWith("--inspect"))return e;let t,n,i="127.0.0.1",r="9229";return null!==(n=e.match(/^(--inspect(-brk)?)$/))?t=n[1]:null!==(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))?(t=n[1],/^\d+$/.test(n[3])?r=n[3]:i=n[3]):null!==(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))&&(t=n[1],i=n[3],r=n[4]),t&&"0"!==r?`${t}=${i}:${parseInt(r)+1}`:e}))}t.Command=m},376:(e,t)=>{class n extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}}t.CommanderError=n,t.InvalidArgumentError=class extends n{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}}},65:(e,t,n)=>{const{humanReadableArgName:i}=n(555);t.Help=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(e){const t=e.commands.filter((e=>!e._hidden)),n=e._getHelpCommand();return n&&!n._hidden&&t.push(n),this.sortSubcommands&&t.sort(((e,t)=>e.name().localeCompare(t.name()))),t}compareOptions(e,t){const n=e=>e.short?e.short.replace(/^-/,""):e.long.replace(/^--/,"");return n(e).localeCompare(n(t))}visibleOptions(e){const t=e.options.filter((e=>!e.hidden)),n=e._getHelpOption();if(n&&!n.hidden){const i=n.short&&e._findOption(n.short),r=n.long&&e._findOption(n.long);i||r?n.long&&!r?t.push(e.createOption(n.long,n.description)):n.short&&!i&&t.push(e.createOption(n.short,n.description)):t.push(n)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];const t=[];for(let n=e.parent;n;n=n.parent){const e=n.options.filter((e=>!e.hidden));t.push(...e)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach((t=>{t.description=t.description||e._argsDescription[t.name()]||""})),e.registeredArguments.find((e=>e.description))?e.registeredArguments:[]}subcommandTerm(e){const t=e.registeredArguments.map((e=>i(e))).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce(((e,n)=>Math.max(e,t.subcommandTerm(n).length)),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce(((e,n)=>Math.max(e,t.optionTerm(n).length)),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce(((e,n)=>Math.max(e,t.optionTerm(n).length)),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce(((e,n)=>Math.max(e,t.argumentTerm(n).length)),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let n="";for(let t=e.parent;t;t=t.parent)n=t.name()+" "+n;return n+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){const t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map((e=>JSON.stringify(e))).join(", ")}`),void 0!==e.defaultValue){(e.required||e.optional||e.isBoolean()&&"boolean"==typeof e.defaultValue)&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`)}return void 0!==e.presetArg&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),void 0!==e.envVar&&t.push(`env: ${e.envVar}`),t.length>0?`${e.description} (${t.join(", ")})`:e.description}argumentDescription(e){const t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map((e=>JSON.stringify(e))).join(", ")}`),void 0!==e.defaultValue&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){const n=`(${t.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatHelp(e,t){const n=t.padWidth(e,t),i=t.helpWidth||80;function r(e,r){if(r){const o=`${e.padEnd(n+2)}${r}`;return t.wrap(o,i-2,n+2)}return e}function o(e){return e.join("\n").replace(/^/gm," ".repeat(2))}let s=[`Usage: ${t.commandUsage(e)}`,""];const a=t.commandDescription(e);a.length>0&&(s=s.concat([t.wrap(a,i,0),""]));const l=t.visibleArguments(e).map((e=>r(t.argumentTerm(e),t.argumentDescription(e))));l.length>0&&(s=s.concat(["Arguments:",o(l),""]));const c=t.visibleOptions(e).map((e=>r(t.optionTerm(e),t.optionDescription(e))));if(c.length>0&&(s=s.concat(["Options:",o(c),""])),this.showGlobalOptions){const n=t.visibleGlobalOptions(e).map((e=>r(t.optionTerm(e),t.optionDescription(e))));n.length>0&&(s=s.concat(["Global Options:",o(n),""]))}const u=t.visibleCommands(e).map((e=>r(t.subcommandTerm(e),t.subcommandDescription(e))));return u.length>0&&(s=s.concat(["Commands:",o(u),""])),s.join("\n")}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}wrap(e,t,n,i=40){const r=new RegExp("[\\n][ \\f\\t\\v - \ufeff]+");if(e.match(r))return e;const o=t-n;if(o<i)return e;const s=e.slice(0,n),a=e.slice(n).replace("\r\n","\n"),l=" ".repeat(n),c="\\s",u=new RegExp(`\n|.{1,${o-1}}([${c}]|$)|[^${c}]+?([${c}]|$)`,"g");return s+(a.match(u)||[]).map(((e,t)=>"\n"===e?"":(t>0?l:"")+e.trimEnd())).join("\n")}}},452:(e,t,n)=>{const{InvalidArgumentError:i}=n(376);t.Option=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;const n=function(e){let t,n;const i=e.split(/[ |,]+/);i.length>1&&!/^[[<]/.test(i[1])&&(t=i.shift());n=i.shift(),!t&&/^-[^-]$/.test(n)&&(t=n,n=void 0);return{shortFlag:t,longFlag:n}}(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return"string"==typeof e&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,t){return t!==this.defaultValue&&Array.isArray(t)?t.concat(e):[e]}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,t)=>{if(!this.argChoices.includes(e))throw new i(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(e,t):e},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.name().replace(/^no-/,"").split("-").reduce(((e,t)=>e+t[0].toUpperCase()+t.slice(1)))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},t.DualOptions=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach((e=>{e.negate?this.negativeOptions.set(e.attributeName(),e):this.positiveOptions.set(e.attributeName(),e)})),this.negativeOptions.forEach(((e,t)=>{this.positiveOptions.has(t)&&this.dualOptions.add(t)}))}valueFromOption(e,t){const n=t.attributeName();if(!this.dualOptions.has(n))return!0;const i=this.negativeOptions.get(n).presetArg,r=void 0!==i&&i;return t.negate===(r===e)}}},134:(e,t)=>{const n=3;t.suggestSimilar=function(e,t){if(!t||0===t.length)return"";t=Array.from(new Set(t));const i=e.startsWith("--");i&&(e=e.slice(2),t=t.map((e=>e.slice(2))));let r=[],o=n;return t.forEach((t=>{if(t.length<=1)return;const i=function(e,t){if(Math.abs(e.length-t.length)>n)return Math.max(e.length,t.length);const i=[];for(let t=0;t<=e.length;t++)i[t]=[t];for(let e=0;e<=t.length;e++)i[0][e]=e;for(let n=1;n<=t.length;n++)for(let r=1;r<=e.length;r++){let o=1;o=e[r-1]===t[n-1]?0:1,i[r][n]=Math.min(i[r-1][n]+1,i[r][n-1]+1,i[r-1][n-1]+o),r>1&&n>1&&e[r-1]===t[n-2]&&e[r-2]===t[n-1]&&(i[r][n]=Math.min(i[r][n],i[r-2][n-2]+1))}return i[e.length][t.length]}(e,t),s=Math.max(e.length,t.length);(s-i)/s>.4&&(i<o?(o=i,r=[t]):i===o&&r.push(t))})),r.sort(((e,t)=>e.localeCompare(t))),i&&(r=r.map((e=>`--${e}`))),r.length>1?`\n(Did you mean one of ${r.join(", ")}?)`:1===r.length?`\n(Did you mean ${r[0]}?)`:""}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](n,n.exports,__webpack_require__),n.exports}__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};(()=>{"use strict";__webpack_require__.r(__webpack_exports__);var e=__webpack_require__(810);const{program:t,createCommand:n,createArgument:i,createOption:r,CommanderError:o,InvalidArgumentError:s,InvalidOptionArgumentError:a,Command:l,Argument:c,Option:u,Help:h}=e,d=require("path");var p,f=__webpack_require__(995);class m{argsNb=0;register(e){let t=e.command(this.name).description(this.description);t=this._registerArgs(t),t=this._registerOptions(t),t.action((async(...e)=>{const t=[];for(let n=0;n<this.argsNb;n++)t.push(e[n]);const n=e[this.argsNb];await this.run(t,n),process.exit(0)}))}_registerArgs(e){return this.registerArgs((t=>{let n="";if(t.type){let e="<",i=">";void 0===t.typeIsRequired||t.typeIsRequired||(e="[",i="]"),t.typeIsArray&&(i="..."+i),n+=`${e}${t.type}${i}`}this.argsNb++,e=e.argument(n,t.description,t.defaultValue)})),e}_registerOptions(e){return this.registerOptions((t=>{let n=[];if(t.shortName){Array.isArray(t.shortName)||(t.shortName=[t.shortName]);for(let e of t.shortName)n.push("-"+e)}n.push("--"+t.name);let i=n.join(", ");if(t.type){let e="<",n=">";void 0===t.typeIsRequired||t.typeIsRequired||(e="[",n="]"),t.typeIsArray&&(n="..."+n),i+=` ${e}${t.type}${n}`}e=t.required?e.requiredOption(i,t.description,t.defaultValue):e.option(i,t.description,t.defaultValue)})),e}}!function(e){e[e.Ident=0]="Ident",e[e.AtKeyword=1]="AtKeyword",e[e.String=2]="String",e[e.BadString=3]="BadString",e[e.UnquotedString=4]="UnquotedString",e[e.Hash=5]="Hash",e[e.Num=6]="Num",e[e.Percentage=7]="Percentage",e[e.Dimension=8]="Dimension",e[e.UnicodeRange=9]="UnicodeRange",e[e.CDO=10]="CDO",e[e.CDC=11]="CDC",e[e.Colon=12]="Colon",e[e.SemiColon=13]="SemiColon",e[e.CurlyL=14]="CurlyL",e[e.CurlyR=15]="CurlyR",e[e.ParenthesisL=16]="ParenthesisL",e[e.ParenthesisR=17]="ParenthesisR",e[e.BracketL=18]="BracketL",e[e.BracketR=19]="BracketR",e[e.Whitespace=20]="Whitespace",e[e.Includes=21]="Includes",e[e.Dashmatch=22]="Dashmatch",e[e.SubstringOperator=23]="SubstringOperator",e[e.PrefixOperator=24]="PrefixOperator",e[e.SuffixOperator=25]="SuffixOperator",e[e.Delim=26]="Delim",e[e.EMS=27]="EMS",e[e.EXS=28]="EXS",e[e.Length=29]="Length",e[e.Angle=30]="Angle",e[e.Time=31]="Time",e[e.Freq=32]="Freq",e[e.Exclamation=33]="Exclamation",e[e.Resolution=34]="Resolution",e[e.Comma=35]="Comma",e[e.Charset=36]="Charset",e[e.EscapedJavaScript=37]="EscapedJavaScript",e[e.BadEscapedJavaScript=38]="BadEscapedJavaScript",e[e.Comment=39]="Comment",e[e.SingleLineComment=40]="SingleLineComment",e[e.EOF=41]="EOF",e[e.ContainerQueryLength=42]="ContainerQueryLength",e[e.CustomToken=43]="CustomToken"}(p||(p={}));"a".charCodeAt(0),"f".charCodeAt(0),"z".charCodeAt(0),"u".charCodeAt(0),"A".charCodeAt(0),"F".charCodeAt(0),"Z".charCodeAt(0),"0".charCodeAt(0),"9".charCodeAt(0),"~".charCodeAt(0),"^".charCodeAt(0),"=".charCodeAt(0),"|".charCodeAt(0),"-".charCodeAt(0),"_".charCodeAt(0),"%".charCodeAt(0),"*".charCodeAt(0);const g="(".charCodeAt(0),_=")".charCodeAt(0),b=("<".charCodeAt(0),">".charCodeAt(0),"@".charCodeAt(0),"#".charCodeAt(0),"$".charCodeAt(0),"\\".charCodeAt(0),"/".charCodeAt(0),"\n".charCodeAt(0),"\r".charCodeAt(0),"\f".charCodeAt(0),'"'.charCodeAt(0),"'".charCodeAt(0)," ".charCodeAt(0),"\t".charCodeAt(0),";".charCodeAt(0)),y=":".charCodeAt(0),v="{".charCodeAt(0),x="}".charCodeAt(0),w="[".charCodeAt(0),C="]".charCodeAt(0),k=",".charCodeAt(0),$=(".".charCodeAt(0),"!".charCodeAt(0),"?".charCodeAt(0),"+".charCodeAt(0),{});$[b]=p.SemiColon,$[y]=p.Colon,$[v]=p.CurlyL,$[x]=p.CurlyR,$[C]=p.BracketR,$[w]=p.BracketL,$[g]=p.ParenthesisL,$[_]=p.ParenthesisR,$[k]=p.Comma;const A={};A.em=p.EMS,A.ex=p.EXS,A.px=p.Length,A.cm=p.Length,A.mm=p.Length,A.in=p.Length,A.pt=p.Length,A.pc=p.Length,A.deg=p.Angle,A.rad=p.Angle,A.grad=p.Angle,A.ms=p.Time,A.s=p.Time,A.hz=p.Freq,A.khz=p.Freq,A["%"]=p.Percentage,A.fr=p.Percentage,A.dpi=p.Resolution,A.dpcm=p.Resolution,A.cqw=p.ContainerQueryLength,A.cqh=p.ContainerQueryLength,A.cqi=p.ContainerQueryLength,A.cqb=p.ContainerQueryLength,A.cqmin=p.ContainerQueryLength,A.cqmax=p.ContainerQueryLength;function S(e,t){if(e.length<t.length)return!1;for(let n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0}function P(e,t){let n=e.length-t.length;return n>0?e.lastIndexOf(t)===n:0===n&&e===t}function E(e,t=!0){return e?e.length<140?e:e.slice(0,140)+(t?"…":""):""}var O,I;!function(e){e[e.Undefined=0]="Undefined",e[e.Identifier=1]="Identifier",e[e.Stylesheet=2]="Stylesheet",e[e.Ruleset=3]="Ruleset",e[e.Selector=4]="Selector",e[e.SimpleSelector=5]="SimpleSelector",e[e.SelectorInterpolation=6]="SelectorInterpolation",e[e.SelectorCombinator=7]="SelectorCombinator",e[e.SelectorCombinatorParent=8]="SelectorCombinatorParent",e[e.SelectorCombinatorSibling=9]="SelectorCombinatorSibling",e[e.SelectorCombinatorAllSiblings=10]="SelectorCombinatorAllSiblings",e[e.SelectorCombinatorShadowPiercingDescendant=11]="SelectorCombinatorShadowPiercingDescendant",e[e.Page=12]="Page",e[e.PageBoxMarginBox=13]="PageBoxMarginBox",e[e.ClassSelector=14]="ClassSelector",e[e.IdentifierSelector=15]="IdentifierSelector",e[e.ElementNameSelector=16]="ElementNameSelector",e[e.PseudoSelector=17]="PseudoSelector",e[e.AttributeSelector=18]="AttributeSelector",e[e.Declaration=19]="Declaration",e[e.Declarations=20]="Declarations",e[e.Property=21]="Property",e[e.Expression=22]="Expression",e[e.BinaryExpression=23]="BinaryExpression",e[e.Term=24]="Term",e[e.Operator=25]="Operator",e[e.Value=26]="Value",e[e.StringLiteral=27]="StringLiteral",e[e.URILiteral=28]="URILiteral",e[e.EscapedValue=29]="EscapedValue",e[e.Function=30]="Function",e[e.NumericValue=31]="NumericValue",e[e.HexColorValue=32]="HexColorValue",e[e.RatioValue=33]="RatioValue",e[e.MixinDeclaration=34]="MixinDeclaration",e[e.MixinReference=35]="MixinReference",e[e.VariableName=36]="VariableName",e[e.VariableDeclaration=37]="VariableDeclaration",e[e.Prio=38]="Prio",e[e.Interpolation=39]="Interpolation",e[e.NestedProperties=40]="NestedProperties",e[e.ExtendsReference=41]="ExtendsReference",e[e.SelectorPlaceholder=42]="SelectorPlaceholder",e[e.Debug=43]="Debug",e[e.If=44]="If",e[e.Else=45]="Else",e[e.For=46]="For",e[e.Each=47]="Each",e[e.While=48]="While",e[e.MixinContentReference=49]="MixinContentReference",e[e.MixinContentDeclaration=50]="MixinContentDeclaration",e[e.Media=51]="Media",e[e.Keyframe=52]="Keyframe",e[e.FontFace=53]="FontFace",e[e.Import=54]="Import",e[e.Namespace=55]="Namespace",e[e.Invocation=56]="Invocation",e[e.FunctionDeclaration=57]="FunctionDeclaration",e[e.ReturnStatement=58]="ReturnStatement",e[e.MediaQuery=59]="MediaQuery",e[e.MediaCondition=60]="MediaCondition",e[e.MediaFeature=61]="MediaFeature",e[e.FunctionParameter=62]="FunctionParameter",e[e.FunctionArgument=63]="FunctionArgument",e[e.KeyframeSelector=64]="KeyframeSelector",e[e.ViewPort=65]="ViewPort",e[e.Document=66]="Document",e[e.AtApplyRule=67]="AtApplyRule",e[e.CustomPropertyDeclaration=68]="CustomPropertyDeclaration",e[e.CustomPropertySet=69]="CustomPropertySet",e[e.ListEntry=70]="ListEntry",e[e.Supports=71]="Supports",e[e.SupportsCondition=72]="SupportsCondition",e[e.NamespacePrefix=73]="NamespacePrefix",e[e.GridLine=74]="GridLine",e[e.Plugin=75]="Plugin",e[e.UnknownAtRule=76]="UnknownAtRule",e[e.Use=77]="Use",e[e.ModuleConfiguration=78]="ModuleConfiguration",e[e.Forward=79]="Forward",e[e.ForwardVisibility=80]="ForwardVisibility",e[e.Module=81]="Module",e[e.UnicodeRange=82]="UnicodeRange",e[e.Layer=83]="Layer",e[e.LayerNameList=84]="LayerNameList",e[e.LayerName=85]="LayerName",e[e.PropertyAtRule=86]="PropertyAtRule",e[e.Container=87]="Container",e[e.ModuleConfig=88]="ModuleConfig"}(O||(O={})),function(e){e[e.Mixin=0]="Mixin",e[e.Rule=1]="Rule",e[e.Variable=2]="Variable",e[e.Function=3]="Function",e[e.Keyframe=4]="Keyframe",e[e.Unknown=5]="Unknown",e[e.Module=6]="Module",e[e.Forward=7]="Forward",e[e.ForwardVisibility=8]="ForwardVisibility",e[e.Property=9]="Property"}(I||(I={}));class R{get end(){return this.offset+this.length}constructor(e=-1,t=-1,n){this.parent=null,this.offset=e,this.length=t,n&&(this.nodeType=n)}set type(e){this.nodeType=e}get type(){return this.nodeType||O.Undefined}getTextProvider(){let e=this;for(;e&&!e.textProvider;)e=e.parent;return e?e.textProvider:()=>"unknown"}getText(){return this.getTextProvider()(this.offset,this.length)}matches(e){return this.length===e.length&&this.getTextProvider()(this.offset,this.length)===e}startsWith(e){return this.length>=e.length&&this.getTextProvider()(this.offset,e.length)===e}endsWith(e){return this.length>=e.length&&this.getTextProvider()(this.end-e.length,e.length)===e}accept(e){if(e(this)&&this.children)for(const t of this.children)t.accept(e)}acceptVisitor(e){this.accept(e.visitNode.bind(e))}adoptChild(e,t=-1){if(e.parent&&e.parent.children){const t=e.parent.children.indexOf(e);t>=0&&e.parent.children.splice(t,1)}e.parent=this;let n=this.children;return n||(n=this.children=[]),-1!==t?n.splice(t,0,e):n.push(e),e}attachTo(e,t=-1){return e&&e.adoptChild(this,t),this}collectIssues(e){this.issues&&e.push.apply(e,this.issues)}addIssue(e){this.issues||(this.issues=[]),this.issues.push(e)}hasIssue(e){return Array.isArray(this.issues)&&this.issues.some((t=>t.getRule()===e))}isErroneous(e=!1){return!!(this.issues&&this.issues.length>0)||e&&Array.isArray(this.children)&&this.children.some((e=>e.isErroneous(!0)))}setNode(e,t,n=-1){return!!t&&(t.attachTo(this,n),this[e]=t,!0)}addChild(e){return!!e&&(this.children||(this.children=[]),e.attachTo(this),this.updateOffsetAndLength(e),!0)}updateOffsetAndLength(e){(e.offset<this.offset||-1===this.offset)&&(this.offset=e.offset);const t=e.end;(t>this.end||-1===this.length)&&(this.length=t-this.offset)}hasChildren(){return!!this.children&&this.children.length>0}getChildren(){return this.children?this.children.slice(0):[]}getChild(e){return this.children&&e<this.children.length?this.children[e]:null}addChildren(e){for(const t of e)this.addChild(t)}findFirstChildBeforeOffset(e){if(this.children){let t=null;for(let n=this.children.length-1;n>=0;n--)if(t=this.children[n],t.offset<=e)return t}return null}findChildAtOffset(e,t){const n=this.findFirstChildBeforeOffset(e);return n&&n.end>=e?t&&n.findChildAtOffset(e,!0)||n:null}encloses(e){return this.offset<=e.offset&&this.offset+this.length>=e.offset+e.length}getParent(){let e=this.parent;for(;e instanceof F;)e=e.parent;return e}findParent(e){let t=this;for(;t&&t.type!==e;)t=t.parent;return t}findAParent(...e){let t=this;for(;t&&!e.some((e=>t.type===e));)t=t.parent;return t}setData(e,t){this.options||(this.options={}),this.options[e]=t}getData(e){return this.options&&this.options.hasOwnProperty(e)?this.options[e]:null}}class F extends R{constructor(e,t=-1){super(-1,-1),this.attachTo(e,t),this.offset=-1,this.length=-1}}class T extends R{constructor(e,t){super(e,t),this.isCustomProperty=!1}get type(){return O.Identifier}containsInterpolation(){return this.hasChildren()}}class V extends R{constructor(e,t){super(e,t)}get type(){return O.Declarations}}class N extends R{constructor(e,t){super(e,t)}getDeclarations(){return this.declarations}setDeclarations(e){return this.setNode("declarations",e)}}class D extends N{constructor(e,t){super(e,t)}get type(){return O.Ruleset}getSelectors(){return this.selectors||(this.selectors=new F(this)),this.selectors}isNested(){return!!this.parent&&null!==this.parent.findParent(O.Declarations)}}class L extends R{constructor(e,t){super(e,t)}get type(){return O.Selector}}class M extends R{constructor(e,t){super(e,t)}get type(){return O.SimpleSelector}}class U extends R{constructor(e,t){super(e,t)}}class q extends U{constructor(e,t){super(e,t),this.property=null}get type(){return O.Declaration}setProperty(e){return this.setNode("property",e)}getProperty(){return this.property}getFullPropertyName(){const e=this.property?this.property.getName():"unknown";if(this.parent instanceof V&&this.parent.getParent()instanceof G){const t=this.parent.getParent().getParent();if(t instanceof q)return t.getFullPropertyName()+e}return e}getNonPrefixedPropertyName(){const e=this.getFullPropertyName();if(e&&"-"===e.charAt(0)){const t=e.indexOf("-",1);if(-1!==t)return e.substring(t+1)}return e}setValue(e){return this.setNode("value",e)}getValue(){return this.value}setNestedProperties(e){return this.setNode("nestedProperties",e)}getNestedProperties(){return this.nestedProperties}}class j extends R{constructor(e,t){super(e,t)}get type(){return O.Property}setIdentifier(e){return this.setNode("identifier",e)}getIdentifier(){return this.identifier}getName(){return function(e,t){const n=t.exec(e);return n&&n[0].length?e.substr(0,e.length-n[0].length):e}(this.getText(),/[_\+]+$/)}isCustomProperty(){return!!this.identifier&&this.identifier.isCustomProperty}}class H extends R{constructor(e,t){super(e,t)}get type(){return O.Invocation}getArguments(){return this.arguments||(this.arguments=new F(this)),this.arguments}}class B extends H{constructor(e,t){super(e,t)}get type(){return O.Function}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}}class W extends R{constructor(e,t){super(e,t)}get type(){return O.FunctionParameter}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setDefaultValue(e){return this.setNode("defaultValue",e,0)}getDefaultValue(){return this.defaultValue}}class z extends R{constructor(e,t){super(e,t)}get type(){return O.FunctionArgument}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setValue(e){return this.setNode("value",e,0)}getValue(){return this.value}}class K extends N{constructor(e,t){super(e,t)}get type(){return O.FunctionDeclaration}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}getParameters(){return this.parameters||(this.parameters=new F(this)),this.parameters}}class G extends N{constructor(e,t){super(e,t)}get type(){return O.NestedProperties}}class Q extends N{constructor(e,t){super(e,t)}get type(){return O.Supports}}class J extends R{constructor(e,t){super(e,t)}get type(){return O.SupportsCondition}}class X extends R{constructor(e,t){super(e,t)}get type(){return O.Expression}}class Y extends R{constructor(e,t){super(e,t)}get type(){return O.BinaryExpression}setLeft(e){return this.setNode("left",e)}getLeft(){return this.left}setRight(e){return this.setNode("right",e)}getRight(){return this.right}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}}class Z extends R{constructor(e,t){super(e,t)}get type(){return O.HexColorValue}}const ee=".".charCodeAt(0),te="0".charCodeAt(0),ne="9".charCodeAt(0);class ie extends R{constructor(e,t){super(e,t)}get type(){return O.NumericValue}getValue(){const e=this.getText();let t,n=0;for(let i=0,r=e.length;i<r&&(t=e.charCodeAt(i),te<=t&&t<=ne||t===ee);i++)n+=1;return{value:e.substring(0,n),unit:n<e.length?e.substring(n):void 0}}}class re extends U{constructor(e,t){super(e,t),this.needsSemicolon=!0}get type(){return O.VariableDeclaration}setVariable(e){return!!e&&(e.attachTo(this),this.variable=e,!0)}getVariable(){return this.variable}getName(){return this.variable?this.variable.getName():""}setValue(e){return!!e&&(e.attachTo(this),this.value=e,!0)}getValue(){return this.value}}class oe extends R{constructor(e,t){super(e,t)}get type(){return O.Interpolation}}class se extends R{constructor(e,t){super(e,t)}get type(){return O.VariableName}getName(){return this.getText()}}class ae extends R{constructor(e,t){super(e,t)}get type(){return O.ExtendsReference}getSelectors(){return this.selectors||(this.selectors=new F(this)),this.selectors}}class le extends R{constructor(e,t){super(e,t)}get type(){return O.MixinReference}getNamespaces(){return this.namespaces||(this.namespaces=new F(this)),this.namespaces}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}getArguments(){return this.arguments||(this.arguments=new F(this)),this.arguments}setContent(e){return this.setNode("content",e)}getContent(){return this.content}}class ce extends N{constructor(e,t){super(e,t)}get type(){return O.MixinDeclaration}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}getParameters(){return this.parameters||(this.parameters=new F(this)),this.parameters}setGuard(e){return e&&(e.attachTo(this),this.guard=e),!1}}var ue;!function(e){e[e.Ignore=1]="Ignore",e[e.Warning=2]="Warning",e[e.Error=4]="Error"}(ue||(ue={}));class he{constructor(e,t,n,i,r=e.offset,o=e.length){this.node=e,this.rule=t,this.level=n,this.message=i||t.message,this.offset=r,this.length=o}getRule(){return this.rule}getLevel(){return this.level}getOffset(){return this.offset}getLength(){return this.length}getNode(){return this.node}getMessage(){return this.message}}var de=__webpack_require__(837);class pe{constructor(e,t){this.id=e,this.message=t}}new pe("css-numberexpected",de.t("number expected")),new pe("css-conditionexpected",de.t("condition expected")),new pe("css-ruleorselectorexpected",de.t("at-rule or selector expected")),new pe("css-dotexpected",de.t("dot expected")),new pe("css-colonexpected",de.t("colon expected")),new pe("css-semicolonexpected",de.t("semi-colon expected")),new pe("css-termexpected",de.t("term expected")),new pe("css-expressionexpected",de.t("expression expected")),new pe("css-operatorexpected",de.t("operator expected")),new pe("css-identifierexpected",de.t("identifier expected")),new pe("css-percentageexpected",de.t("percentage expected")),new pe("css-uriorstringexpected",de.t("uri or string expected")),new pe("css-uriexpected",de.t("URI expected")),new pe("css-varnameexpected",de.t("variable name expected")),new pe("css-varvalueexpected",de.t("variable value expected")),new pe("css-propertyvalueexpected",de.t("property value expected")),new pe("css-lcurlyexpected",de.t("{ expected")),new pe("css-rcurlyexpected",de.t("} expected")),new pe("css-rbracketexpected",de.t("[ expected")),new pe("css-lbracketexpected",de.t("] expected")),new pe("css-lparentexpected",de.t("( expected")),new pe("css-rparentexpected",de.t(") expected")),new pe("css-commaexpected",de.t("comma expected")),new pe("css-pagedirordeclexpected",de.t("page directive or declaraton expected")),new pe("css-unknownatrule",de.t("at-rule unknown")),new pe("css-unknownkeyword",de.t("unknown keyword")),new pe("css-selectorexpected",de.t("selector expected")),new pe("css-stringliteralexpected",de.t("string literal expected")),new pe("css-whitespaceexpected",de.t("whitespace expected")),new pe("css-mediaqueryexpected",de.t("media query expected")),new pe("css-idorwildcardexpected",de.t("identifier or wildcard expected")),new pe("css-wildcardexpected",de.t("wildcard expected")),new pe("css-idorvarexpected",de.t("identifier or variable expected"));var fe,me,ge,_e,be,ye,ve,xe,we,Ce,ke,$e,Ae,Se,Pe,Ee,Oe,Ie,Re,Fe,Te,Ve,Ne,De,Le,Me,Ue,qe,je,He,Be,We,ze,Ke,Ge,Qe,Je,Xe,Ye,Ze,et,tt,nt,it,rt,ot,st,at,lt,ct,ut,ht,dt,pt,ft,mt,gt,_t,bt,yt,vt,xt,wt,Ct,kt,$t,At,St,Pt,Et,Ot,It,Rt,Ft,Tt,Vt,Nt,Dt;!function(e){e.is=function(e){return"string"==typeof e}}(fe||(fe={})),function(e){e.is=function(e){return"string"==typeof e}}(me||(me={})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(ge||(ge={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(_e||(_e={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=_e.MAX_VALUE),t===Number.MAX_VALUE&&(t=_e.MAX_VALUE),{line:e,character:t}},e.is=function(e){let t=e;return Mt.objectLiteral(t)&&Mt.uinteger(t.line)&&Mt.uinteger(t.character)}}(be||(be={})),function(e){e.create=function(e,t,n,i){if(Mt.uinteger(e)&&Mt.uinteger(t)&&Mt.uinteger(n)&&Mt.uinteger(i))return{start:be.create(e,t),end:be.create(n,i)};if(be.is(e)&&be.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${i}]`)},e.is=function(e){let t=e;return Mt.objectLiteral(t)&&be.is(t.start)&&be.is(t.end)}}(ye||(ye={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){let t=e;return Mt.objectLiteral(t)&&ye.is(t.range)&&(Mt.string(t.uri)||Mt.undefined(t.uri))}}(ve||(ve={})),function(e){e.create=function(e,t,n,i){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:i}},e.is=function(e){let t=e;return Mt.objectLiteral(t)&&ye.is(t.targetRange)&&Mt.string(t.targetUri)&&ye.is(t.targetSelectionRange)&&(ye.is(t.originSelectionRange)||Mt.undefined(t.originSelectionRange))}}(xe||(xe={})),function(e){e.create=function(e,t,n,i){return{red:e,green:t,blue:n,alpha:i}},e.is=function(e){const t=e;return Mt.objectLiteral(t)&&Mt.numberRange(t.red,0,1)&&Mt.numberRange(t.green,0,1)&&Mt.numberRange(t.blue,0,1)&&Mt.numberRange(t.alpha,0,1)}}(we||(we={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){const t=e;return Mt.objectLiteral(t)&&ye.is(t.range)&&we.is(t.color)}}(Ce||(Ce={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){const t=e;return Mt.objectLiteral(t)&&Mt.string(t.label)&&(Mt.undefined(t.textEdit)||Fe.is(t))&&(Mt.undefined(t.additionalTextEdits)||Mt.typedArray(t.additionalTextEdits,Fe.is))}}(ke||(ke={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}($e||($e={})),function(e){e.create=function(e,t,n,i,r,o){const s={startLine:e,endLine:t};return Mt.defined(n)&&(s.startCharacter=n),Mt.defined(i)&&(s.endCharacter=i),Mt.defined(r)&&(s.kind=r),Mt.defined(o)&&(s.collapsedText=o),s},e.is=function(e){const t=e;return Mt.objectLiteral(t)&&Mt.uinteger(t.startLine)&&Mt.uinteger(t.startLine)&&(Mt.undefined(t.startCharacter)||Mt.uinteger(t.startCharacter))&&(Mt.undefined(t.endCharacter)||Mt.uinteger(t.endCharacter))&&(Mt.undefined(t.kind)||Mt.string(t.kind))}}(Ae||(Ae={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){let t=e;return Mt.defined(t)&&ve.is(t.location)&&Mt.string(t.message)}}(Se||(Se={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(Pe||(Pe={})),function(e){e.Unnecessary=1,e.Deprecated=2}(Ee||(Ee={})),function(e){e.is=function(e){const t=e;return Mt.objectLiteral(t)&&Mt.string(t.href)}}(Oe||(Oe={})),function(e){e.create=function(e,t,n,i,r,o){let s={range:e,message:t};return Mt.defined(n)&&(s.severity=n),Mt.defined(i)&&(s.code=i),Mt.defined(r)&&(s.source=r),Mt.defined(o)&&(s.relatedInformation=o),s},e.is=function(e){var t;let n=e;return Mt.defined(n)&&ye.is(n.range)&&Mt.string(n.message)&&(Mt.number(n.severity)||Mt.undefined(n.severity))&&(Mt.integer(n.code)||Mt.string(n.code)||Mt.undefined(n.code))&&(Mt.undefined(n.codeDescription)||Mt.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(Mt.string(n.source)||Mt.undefined(n.source))&&(Mt.undefined(n.relatedInformation)||Mt.typedArray(n.relatedInformation,Se.is))}}(Ie||(Ie={})),function(e){e.create=function(e,t,...n){let i={title:e,command:t};return Mt.defined(n)&&n.length>0&&(i.arguments=n),i},e.is=function(e){let t=e;return Mt.defined(t)&&Mt.string(t.title)&&Mt.string(t.command)}}(Re||(Re={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){const t=e;return Mt.objectLiteral(t)&&Mt.string(t.newText)&&ye.is(t.range)}}(Fe||(Fe={})),function(e){e.create=function(e,t,n){const i={label:e};return void 0!==t&&(i.needsConfirmation=t),void 0!==n&&(i.description=n),i},e.is=function(e){const t=e;return Mt.objectLiteral(t)&&Mt.string(t.label)&&(Mt.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Mt.string(t.description)||void 0===t.description)}}(Te||(Te={})),function(e){e.is=function(e){const t=e;return Mt.string(t)}}(Ve||(Ve={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){const t=e;return Fe.is(t)&&(Te.is(t.annotationId)||Ve.is(t.annotationId))}}(Ne||(Ne={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){let t=e;return Mt.defined(t)&&Be.is(t.textDocument)&&Array.isArray(t.edits)}}(De||(De={})),function(e){e.create=function(e,t,n){let i={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(i.options=t),void 0!==n&&(i.annotationId=n),i},e.is=function(e){let t=e;return t&&"create"===t.kind&&Mt.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Mt.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Mt.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Ve.is(t.annotationId))}}(Le||(Le={})),function(e){e.create=function(e,t,n,i){let r={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(r.options=n),void 0!==i&&(r.annotationId=i),r},e.is=function(e){let t=e;return t&&"rename"===t.kind&&Mt.string(t.oldUri)&&Mt.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Mt.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Mt.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Ve.is(t.annotationId))}}(Me||(Me={})),function(e){e.create=function(e,t,n){let i={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(i.options=t),void 0!==n&&(i.annotationId=n),i},e.is=function(e){let t=e;return t&&"delete"===t.kind&&Mt.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Mt.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Mt.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||Ve.is(t.annotationId))}}(Ue||(Ue={})),function(e){e.is=function(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((e=>Mt.string(e.kind)?Le.is(e)||Me.is(e)||Ue.is(e):De.is(e))))}}(qe||(qe={}));!function(e){e.create=function(e){return{uri:e}},e.is=function(e){let t=e;return Mt.defined(t)&&Mt.string(t.uri)}}(je||(je={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Mt.defined(t)&&Mt.string(t.uri)&&Mt.integer(t.version)}}(He||(He={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Mt.defined(t)&&Mt.string(t.uri)&&(null===t.version||Mt.integer(t.version))}}(Be||(Be={})),function(e){e.create=function(e,t,n,i){return{uri:e,languageId:t,version:n,text:i}},e.is=function(e){let t=e;return Mt.defined(t)&&Mt.string(t.uri)&&Mt.string(t.languageId)&&Mt.integer(t.version)&&Mt.string(t.text)}}(We||(We={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){const n=t;return n===e.PlainText||n===e.Markdown}}(ze||(ze={})),function(e){e.is=function(e){const t=e;return Mt.objectLiteral(e)&&ze.is(t.kind)&&Mt.string(t.value)}}(Ke||(Ke={})),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}(Ge||(Ge={})),function(e){e.PlainText=1,e.Snippet=2}(Qe||(Qe={})),function(e){e.Deprecated=1}(Je||(Je={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){const t=e;return t&&Mt.string(t.newText)&&ye.is(t.insert)&&ye.is(t.replace)}}(Xe||(Xe={})),function(e){e.asIs=1,e.adjustIndentation=2}(Ye||(Ye={})),function(e){e.is=function(e){const t=e;return t&&(Mt.string(t.detail)||void 0===t.detail)&&(Mt.string(t.description)||void 0===t.description)}}(Ze||(Ze={})),function(e){e.create=function(e){return{label:e}}}(et||(et={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(tt||(tt={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){const t=e;return Mt.string(t)||Mt.objectLiteral(t)&&Mt.string(t.language)&&Mt.string(t.value)}}(nt||(nt={})),function(e){e.is=function(e){let t=e;return!!t&&Mt.objectLiteral(t)&&(Ke.is(t.contents)||nt.is(t.contents)||Mt.typedArray(t.contents,nt.is))&&(void 0===e.range||ye.is(e.range))}}(it||(it={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(rt||(rt={})),function(e){e.create=function(e,t,...n){let i={label:e};return Mt.defined(t)&&(i.documentation=t),Mt.defined(n)?i.parameters=n:i.parameters=[],i}}(ot||(ot={})),function(e){e.Text=1,e.Read=2,e.Write=3}(st||(st={})),function(e){e.create=function(e,t){let n={range:e};return Mt.number(t)&&(n.kind=t),n}}(at||(at={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(lt||(lt={})),function(e){e.Deprecated=1}(ct||(ct={})),function(e){e.create=function(e,t,n,i,r){let o={name:e,kind:t,location:{uri:i,range:n}};return r&&(o.containerName=r),o}}(ut||(ut={})),function(e){e.create=function(e,t,n,i){return void 0!==i?{name:e,kind:t,location:{uri:n,range:i}}:{name:e,kind:t,location:{uri:n}}}}(ht||(ht={})),function(e){e.create=function(e,t,n,i,r,o){let s={name:e,detail:t,kind:n,range:i,selectionRange:r};return void 0!==o&&(s.children=o),s},e.is=function(e){let t=e;return t&&Mt.string(t.name)&&Mt.number(t.kind)&&ye.is(t.range)&&ye.is(t.selectionRange)&&(void 0===t.detail||Mt.string(t.detail))&&(void 0===t.deprecated||Mt.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(dt||(dt={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(pt||(pt={})),function(e){e.Invoked=1,e.Automatic=2}(ft||(ft={})),function(e){e.create=function(e,t,n){let i={diagnostics:e};return null!=t&&(i.only=t),null!=n&&(i.triggerKind=n),i},e.is=function(e){let t=e;return Mt.defined(t)&&Mt.typedArray(t.diagnostics,Ie.is)&&(void 0===t.only||Mt.typedArray(t.only,Mt.string))&&(void 0===t.triggerKind||t.triggerKind===ft.Invoked||t.triggerKind===ft.Automatic)}}(mt||(mt={})),function(e){e.create=function(e,t,n){let i={title:e},r=!0;return"string"==typeof t?(r=!1,i.kind=t):Re.is(t)?i.command=t:i.edit=t,r&&void 0!==n&&(i.kind=n),i},e.is=function(e){let t=e;return t&&Mt.string(t.title)&&(void 0===t.diagnostics||Mt.typedArray(t.diagnostics,Ie.is))&&(void 0===t.kind||Mt.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||Re.is(t.command))&&(void 0===t.isPreferred||Mt.boolean(t.isPreferred))&&(void 0===t.edit||qe.is(t.edit))}}(gt||(gt={})),function(e){e.create=function(e,t){let n={range:e};return Mt.defined(t)&&(n.data=t),n},e.is=function(e){let t=e;return Mt.defined(t)&&ye.is(t.range)&&(Mt.undefined(t.command)||Re.is(t.command))}}(_t||(_t={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){let t=e;return Mt.defined(t)&&Mt.uinteger(t.tabSize)&&Mt.boolean(t.insertSpaces)}}(bt||(bt={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){let t=e;return Mt.defined(t)&&ye.is(t.range)&&(Mt.undefined(t.target)||Mt.string(t.target))}}(yt||(yt={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){let n=t;return Mt.objectLiteral(n)&&ye.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(vt||(vt={})),function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"}(xt||(xt={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(wt||(wt={})),function(e){e.is=function(e){const t=e;return Mt.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(Ct||(Ct={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){const t=e;return null!=t&&ye.is(t.range)&&Mt.string(t.text)}}(kt||(kt={})),function(e){e.create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},e.is=function(e){const t=e;return null!=t&&ye.is(t.range)&&Mt.boolean(t.caseSensitiveLookup)&&(Mt.string(t.variableName)||void 0===t.variableName)}}($t||($t={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){const t=e;return null!=t&&ye.is(t.range)&&(Mt.string(t.expression)||void 0===t.expression)}}(At||(At={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){const t=e;return Mt.defined(t)&&ye.is(e.stoppedLocation)}}(St||(St={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(Pt||(Pt={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){const t=e;return Mt.objectLiteral(t)&&(void 0===t.tooltip||Mt.string(t.tooltip)||Ke.is(t.tooltip))&&(void 0===t.location||ve.is(t.location))&&(void 0===t.command||Re.is(t.command))}}(Et||(Et={})),function(e){e.create=function(e,t,n){const i={position:e,label:t};return void 0!==n&&(i.kind=n),i},e.is=function(e){const t=e;return Mt.objectLiteral(t)&&be.is(t.position)&&(Mt.string(t.label)||Mt.typedArray(t.label,Et.is))&&(void 0===t.kind||Pt.is(t.kind))&&void 0===t.textEdits||Mt.typedArray(t.textEdits,Fe.is)&&(void 0===t.tooltip||Mt.string(t.tooltip)||Ke.is(t.tooltip))&&(void 0===t.paddingLeft||Mt.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Mt.boolean(t.paddingRight))}}(Ot||(Ot={})),function(e){e.createSnippet=function(e){return{kind:"snippet",value:e}}}(It||(It={})),function(e){e.create=function(e,t,n,i){return{insertText:e,filterText:t,range:n,command:i}}}(Rt||(Rt={})),function(e){e.create=function(e){return{items:e}}}(Ft||(Ft={})),function(e){e.Invoked=0,e.Automatic=1}(Tt||(Tt={})),function(e){e.create=function(e,t){return{range:e,text:t}}}(Vt||(Vt={})),function(e){e.create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}}}(Nt||(Nt={})),function(e){e.is=function(e){const t=e;return Mt.objectLiteral(t)&&me.is(t.uri)&&Mt.string(t.name)}}(Dt||(Dt={}));var Lt,Mt,Ut,qt,jt;!function(e){function t(e,n){if(e.length<=1)return e;const i=e.length/2|0,r=e.slice(0,i),o=e.slice(i);t(r,n),t(o,n);let s=0,a=0,l=0;for(;s<r.length&&a<o.length;){let t=n(r[s],o[a]);e[l++]=t<=0?r[s++]:o[a++]}for(;s<r.length;)e[l++]=r[s++];for(;a<o.length;)e[l++]=o[a++];return e}e.create=function(e,t,n,i){return new Ht(e,t,n,i)},e.is=function(e){let t=e;return!!(Mt.defined(t)&&Mt.string(t.uri)&&(Mt.undefined(t.languageId)||Mt.string(t.languageId))&&Mt.uinteger(t.lineCount)&&Mt.func(t.getText)&&Mt.func(t.positionAt)&&Mt.func(t.offsetAt))},e.applyEdits=function(e,n){let i=e.getText(),r=t(n,((e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),o=i.length;for(let t=r.length-1;t>=0;t--){let n=r[t],s=e.offsetAt(n.range.start),a=e.offsetAt(n.range.end);if(!(a<=o))throw new Error("Overlapping edit");i=i.substring(0,s)+n.newText+i.substring(a,i.length),o=s}return i}}(Lt||(Lt={}));class Ht{constructor(e,t,n,i){this._uri=e,this._languageId=t,this._version=n,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],t=this._content,n=!0;for(let i=0;i<t.length;i++){n&&(e.push(i),n=!1);let r=t.charAt(i);n="\r"===r||"\n"===r,"\r"===r&&i+1<t.length&&"\n"===t.charAt(i+1)&&i++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,i=t.length;if(0===i)return be.create(0,e);for(;n<i;){let r=Math.floor((n+i)/2);t[r]>e?i=r:n=r+1}let r=n-1;return be.create(r,e-t[r])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],i=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,i),n)}get lineCount(){return this.getLineOffsets().length}}!function(e){const t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.numberRange=function(e,n,i){return"[object Number]"===t.call(e)&&n<=e&&e<=i},e.integer=function(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647},e.uinteger=function(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647},e.func=function(e){return"[object Function]"===t.call(e)},e.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(Mt||(Mt={}));class Bt{constructor(e,t,n,i){this._uri=e,this._languageId=t,this._version=n,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){for(let t of e)if(Bt.isIncremental(t)){const e=Kt(t.range),n=this.offsetAt(e.start),i=this.offsetAt(e.end);this._content=this._content.substring(0,n)+t.text+this._content.substring(i,this._content.length);const r=Math.max(e.start.line,0),o=Math.max(e.end.line,0);let s=this._lineOffsets;const a=zt(t.text,!1,n);if(o-r===a.length)for(let e=0,t=a.length;e<t;e++)s[e+r+1]=a[e];else a.length<1e4?s.splice(r+1,o-r,...a):this._lineOffsets=s=s.slice(0,r+1).concat(a,s.slice(o+1));const l=t.text.length-(i-n);if(0!==l)for(let e=r+1+a.length,t=s.length;e<t;e++)s[e]=s[e]+l}else{if(!Bt.isFull(t))throw new Error("Unknown change event received");this._content=t.text,this._lineOffsets=void 0}this._version=t}getLineOffsets(){return void 0===this._lineOffsets&&(this._lineOffsets=zt(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,i=t.length;if(0===i)return{line:0,character:e};for(;n<i;){let r=Math.floor((n+i)/2);t[r]>e?i=r:n=r+1}let r=n-1;return{line:r,character:e-t[r]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],i=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,i),n)}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}static isFull(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}function Wt(e,t){if(e.length<=1)return e;const n=e.length/2|0,i=e.slice(0,n),r=e.slice(n);Wt(i,t),Wt(r,t);let o=0,s=0,a=0;for(;o<i.length&&s<r.length;){let n=t(i[o],r[s]);e[a++]=n<=0?i[o++]:r[s++]}for(;o<i.length;)e[a++]=i[o++];for(;s<r.length;)e[a++]=r[s++];return e}function zt(e,t,n=0){const i=t?[n]:[];for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);13!==r&&10!==r||(13===r&&t+1<e.length&&10===e.charCodeAt(t+1)&&t++,i.push(n+t+1))}return i}function Kt(e){const t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Gt(e){const t=Kt(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,n,i){return new Bt(e,t,n,i)},e.update=function(e,t,n){if(e instanceof Bt)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){let n=e.getText(),i=Wt(t.map(Gt),((e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),r=0;const o=[];for(const t of i){let i=e.offsetAt(t.range.start);if(i<r)throw new Error("Overlapping edit");i>r&&o.push(n.substring(r,i)),t.newText.length&&o.push(t.newText),r=e.offsetAt(t.range.end)}return o.push(n.substr(r)),o.join("")}}(Ut||(Ut={})),function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[ze.Markdown,ze.PlainText]}},hover:{contentFormat:[ze.Markdown,ze.PlainText]}}}}(qt||(qt={})),function(e){e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Directory=2]="Directory",e[e.SymbolicLink=64]="SymbolicLink"}(jt||(jt={}));const Qt={E:"Edge",FF:"Firefox",S:"Safari",C:"Chrome",IE:"IE",O:"Opera"};function Jt(e){switch(e){case"experimental":return"⚠️ Property is experimental. Be cautious when using it.️\n\n";case"nonstandard":return"🚨️ Property is nonstandard. Avoid using it.\n\n";case"obsolete":return"🚨️️️ Property is obsolete. Avoid using it.\n\n";default:return""}}function Xt(e,t,n){let i;if(i=t?{kind:"markdown",value:en(e,n)}:{kind:"plaintext",value:Zt(e,n)},""!==i.value)return i}function Yt(e){return(e=e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")).replace(/</g,"<").replace(/>/g,">")}function Zt(e,t){if(!e.description||""===e.description)return"";if("string"!=typeof e.description)return e.description.value;let n="";if(!1!==t?.documentation){e.status&&(n+=Jt(e.status)),n+=e.description;const t=tn(e.browsers);t&&(n+="\n("+t+")"),"syntax"in e&&(n+=`\n\nSyntax: ${e.syntax}`)}return e.references&&e.references.length>0&&!1!==t?.references&&(n.length>0&&(n+="\n\n"),n+=e.references.map((e=>`${e.name}: ${e.url}`)).join(" | ")),n}function en(e,t){if(!e.description||""===e.description)return"";let n="";if(!1!==t?.documentation){e.status&&(n+=Jt(e.status)),"string"==typeof e.description?n+=Yt(e.description):n+=e.description.kind===ze.Markdown?e.description.value:Yt(e.description.value);const t=tn(e.browsers);t&&(n+="\n\n("+Yt(t)+")"),"syntax"in e&&e.syntax&&(n+=`\n\nSyntax: ${Yt(e.syntax)}`)}return e.references&&e.references.length>0&&!1!==t?.references&&(n.length>0&&(n+="\n\n"),n+=e.references.map((e=>`[${e.name}](${e.url})`)).join(" | ")),n}function tn(e=[]){return 0===e.length?null:e.map((e=>{let t="";const n=e.match(/([A-Z]+)(\d+)?/),i=n[1],r=n[2];return i in Qt&&(t+=Qt[i]),r&&(t+=" "+r),t})).join(", ")}const nn=/(^#([0-9A-F]{3}){1,2}$)|(^#([0-9A-F]{4}){1,2}$)/i,rn=[{label:"rgb",func:"rgb($red, $green, $blue)",insertText:"rgb(${1:red}, ${2:green}, ${3:blue})",desc:de.t("Creates a Color from red, green, and blue values.")},{label:"rgba",func:"rgba($red, $green, $blue, $alpha)",insertText:"rgba(${1:red}, ${2:green}, ${3:blue}, ${4:alpha})",desc:de.t("Creates a Color from red, green, blue, and alpha values.")},{label:"rgb relative",func:"rgb(from $color $red $green $blue)",insertText:"rgb(from ${1:color} ${2:r} ${3:g} ${4:b})",desc:de.t("Creates a Color from the red, green, and blue values of another Color.")},{label:"hsl",func:"hsl($hue, $saturation, $lightness)",insertText:"hsl(${1:hue}, ${2:saturation}, ${3:lightness})",desc:de.t("Creates a Color from hue, saturation, and lightness values.")},{label:"hsla",func:"hsla($hue, $saturation, $lightness, $alpha)",insertText:"hsla(${1:hue}, ${2:saturation}, ${3:lightness}, ${4:alpha})",desc:de.t("Creates a Color from hue, saturation, lightness, and alpha values.")},{label:"hsl relative",func:"hsl(from $color $hue $saturation $lightness)",insertText:"hsl(from ${1:color} ${2:h} ${3:s} ${4:l})",desc:de.t("Creates a Color from the hue, saturation, and lightness values of another Color.")},{label:"hwb",func:"hwb($hue $white $black)",insertText:"hwb(${1:hue} ${2:white} ${3:black})",desc:de.t("Creates a Color from hue, white, and black values.")},{label:"hwb relative",func:"hwb(from $color $hue $white $black)",insertText:"hwb(from ${1:color} ${2:h} ${3:w} ${4:b})",desc:de.t("Creates a Color from the hue, white, and black values of another Color.")},{label:"lab",func:"lab($lightness $a $b)",insertText:"lab(${1:lightness} ${2:a} ${3:b})",desc:de.t("Creates a Color from lightness, a, and b values.")},{label:"lab relative",func:"lab(from $color $lightness $a $b)",insertText:"lab(from ${1:color} ${2:l} ${3:a} ${4:b})",desc:de.t("Creates a Color from the lightness, a, and b values of another Color.")},{label:"oklab",func:"oklab($lightness $a $b)",insertText:"oklab(${1:lightness} ${2:a} ${3:b})",desc:de.t("Creates a Color from lightness, a, and b values.")},{label:"oklab relative",func:"oklab(from $color $lightness $a $b)",insertText:"oklab(from ${1:color} ${2:l} ${3:a} ${4:b})",desc:de.t("Creates a Color from the lightness, a, and b values of another Color.")},{label:"lch",func:"lch($lightness $chroma $hue)",insertText:"lch(${1:lightness} ${2:chroma} ${3:hue})",desc:de.t("Creates a Color from lightness, chroma, and hue values.")},{label:"lch relative",func:"lch(from $color $lightness $chroma $hue)",insertText:"lch(from ${1:color} ${2:l} ${3:c} ${4:h})",desc:de.t("Creates a Color from the lightness, chroma, and hue values of another Color.")},{label:"oklch",func:"oklch($lightness $chroma $hue)",insertText:"oklch(${1:lightness} ${2:chroma} ${3:hue})",desc:de.t("Creates a Color from lightness, chroma, and hue values.")},{label:"oklch relative",func:"oklch(from $color $lightness $chroma $hue)",insertText:"oklch(from ${1:color} ${2:l} ${3:c} ${4:h})",desc:de.t("Creates a Color from the lightness, chroma, and hue values of another Color.")},{label:"color",func:"color($color-space $red $green $blue)",insertText:"color(${1|srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyx,xyz-d50,xyz-d65|} ${2:red} ${3:green} ${4:blue})",desc:de.t("Creates a Color in a specific color space from red, green, and blue values.")},{label:"color relative",func:"color(from $color $color-space $red $green $blue)",insertText:"color(from ${1:color} ${2|srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyx,xyz-d50,xyz-d65|} ${3:r} ${4:g} ${5:b})",desc:de.t("Creates a Color in a specific color space from the red, green, and blue values of another Color.")},{label:"color-mix",func:"color-mix(in $color-space, $color $percentage, $color $percentage)",insertText:"color-mix(in ${1|srgb,srgb-linear,lab,oklab,xyz,xyz-d50,xyz-d65|}, ${3:color} ${4:percentage}, ${5:color} ${6:percentage})",desc:de.t("Mix two colors together in a rectangular color space.")},{label:"color-mix hue",func:"color-mix(in $color-space $interpolation-method hue, $color $percentage, $color $percentage)",insertText:"color-mix(in ${1|hsl,hwb,lch,oklch|} ${2|shorter hue,longer hue,increasing hue,decreasing hue|}, ${3:color} ${4:percentage}, ${5:color} ${6:percentage})",desc:de.t("Mix two colors together in a polar color space.")}],on=/^(rgb|rgba|hsl|hsla|hwb)$/i,sn={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"},an=new RegExp(`^(${Object.keys(sn).join("|")})$`,"i"),ln={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."},cn=new RegExp(`^(${Object.keys(ln).join("|")})$`,"i");function un(e){const t=e.getName();return!!t&&on.test(t)}function hn(e){return nn.test(e)||an.test(e)||cn.test(e)}const dn={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."},pn={"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."},fn={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."},mn=["medium","thick","thin"],gn={"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."},_n={"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."},bn={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."},yn={"var()":"Evaluates the value of a custom variable.","calc()":"Evaluates an mathematical expression. The following operators can be used: + - * /."},vn={"url()":"Reference an image file by URL","image()":"Provide image fallbacks and annotations.","-webkit-image-set()":"Provide multiple resolutions. Remember to use unprefixed image-set() in addition.","image-set()":"Provide multiple resolutions of an image and const the UA decide which is most appropriate in a given situation.","-moz-element()":"Use an element in the document as an image. Remember to use unprefixed element() in addition.","element()":"Use an element in the document as an image.","cross-fade()":"Indicates the two images to be combined and how far along in the transition the combination is.","-webkit-gradient()":"Deprecated. Use modern linear-gradient() or radial-gradient() instead.","-webkit-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-moz-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-o-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","linear-gradient()":"A linear gradient is created by specifying a straight gradient line, and then several colors placed along that line.","-webkit-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-moz-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-o-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","repeating-linear-gradient()":"Same as linear-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop’s position and the first specified color-stop’s position.","-webkit-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","-moz-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","radial-gradient()":"Colors emerge from a single point and smoothly spread outward in a circular or elliptical shape.","-webkit-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","-moz-repeating-radial-gradient()":"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."},xn={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."},wn={"circle()":"Defines a circle.","ellipse()":"Defines an ellipse.","inset()":"Defines an inset rectangle.","polygon()":"Defines a polygon."},Cn={length:["cap","ch","cm","cqb","cqh","cqi","cqmax","cqmin","cqw","dvb","dvh","dvi","dvw","em","ex","ic","in","lh","lvb","lvh","lvi","lvw","mm","pc","pt","px","q","rcap","rch","rem","rex","ric","rlh","svb","svh","svi","svw","vb","vh","vi","vmax","vmin","vw"],angle:["deg","rad","grad","turn"],time:["ms","s"],frequency:["Hz","kHz"],resolution:["dpi","dpcm","dppx"],percentage:["%","fr"]},kn=["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"],$n=["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"];function An(e){return void 0!==e}function Sn(e,t){return-1!==e.indexOf(t)}function Pn(...e){const t=[];for(const n of e)for(const e of n)Sn(t,e)||t.push(e);return t}class En{constructor(e,t){this.offset=e,this.length=t,this.symbols=[],this.parent=null,this.children=[]}addChild(e){this.children.push(e),e.setParent(this)}setParent(e){this.parent=e}findScope(e,t=0){return this.offset<=e&&this.offset+this.length>e+t||this.offset===e&&this.length===t?this.findInScope(e,t):null}findInScope(e,t=0){const n=e+t,i=function(e,t){let n=0,i=e.length;if(0===i)return 0;for(;n<i;){let r=Math.floor((n+i)/2);t(e[r])?i=r:n=r+1}return n}(this.children,(e=>e.offset>n));if(0===i)return this;const r=this.children[i-1];return r.offset<=e&&r.offset+r.length>=e+t?r.findInScope(e,t):this}addSymbol(e){this.symbols.push(e)}getSymbol(e,t){for(let n=0;n<this.symbols.length;n++){const i=this.symbols[n];if(i.name===e&&i.type===t)return i}return null}getSymbols(){return this.symbols}}class On extends En{constructor(){super(0,Number.MAX_VALUE)}}class In{constructor(e,t,n,i){this.name=e,this.value=t,this.node=n,this.type=i}}class Rn{constructor(e){this.scope=e}addSymbol(e,t,n,i){if(-1!==e.offset){const r=this.scope.findScope(e.offset,e.length);r&&r.addSymbol(new In(t,n,e,i))}}addScope(e){if(-1!==e.offset){const t=this.scope.findScope(e.offset,e.length);if(t&&(t.offset!==e.offset||t.length!==e.length)){const n=new En(e.offset,e.length);return t.addChild(n),n}return t}return null}addSymbolToChildScope(e,t,n,i,r){if(e&&-1!==e.offset){const o=this.addScope(e);o&&o.addSymbol(new In(n,i,t,r))}}visitNode(e){switch(e.type){case O.Keyframe:return this.addSymbol(e,e.getName(),void 0,I.Keyframe),!0;case O.CustomPropertyDeclaration:return this.visitCustomPropertyDeclarationNode(e);case O.VariableDeclaration:return this.visitVariableDeclarationNode(e);case O.Ruleset:return this.visitRuleSet(e);case O.MixinDeclaration:return this.addSymbol(e,e.getName(),void 0,I.Mixin),!0;case O.FunctionDeclaration:return this.addSymbol(e,e.getName(),void 0,I.Function),!0;case O.FunctionParameter:return this.visitFunctionParameterNode(e);case O.Declarations:return this.addScope(e),!0;case O.For:const t=e,n=t.getDeclarations();return n&&t.variable&&this.addSymbolToChildScope(n,t.variable,t.variable.getName(),void 0,I.Variable),!0;case O.Each:{const t=e,n=t.getDeclarations();if(n){const e=t.getVariables().getChildren();for(const t of e)this.addSymbolToChildScope(n,t,t.getName(),void 0,I.Variable)}return!0}}return!0}visitRuleSet(e){const t=this.scope.findScope(e.offset,e.length);if(t)for(const n of e.getSelectors().getChildren())n instanceof L&&1===n.getChildren().length&&t.addSymbol(new In(n.getChild(0).getText(),void 0,n,I.Rule));return!0}visitVariableDeclarationNode(e){const t=e.getValue()?e.getValue().getText():void 0;return this.addSymbol(e,e.getName(),t,I.Variable),!0}visitFunctionParameterNode(e){const t=e.getParent().getDeclarations();if(t){const n=e.getDefaultValue(),i=n?n.getText():void 0;this.addSymbolToChildScope(t,e,e.getName(),i,I.Variable)}return!0}visitCustomPropertyDeclarationNode(e){const t=e.getValue()?e.getValue().getText():"";return this.addCSSVariable(e.getProperty(),e.getProperty().getName(),t,I.Variable),!0}addCSSVariable(e,t,n,i){-1!==e.offset&&this.scope.addSymbol(new In(t,n,e,i))}}class Fn{constructor(e){this.global=new On,e.acceptVisitor(new Rn(this.global))}findSymbolsAtOffset(e,t){let n=this.global.findScope(e,0);const i=[],r={};for(;n;){const e=n.getSymbols();for(let n=0;n<e.length;n++){const o=e[n];o.type!==t||r[o.name]||(i.push(o),r[o.name]=!0)}n=n.parent}return i}internalFindSymbol(e,t){let n=e;if(e.parent instanceof W&&e.parent.getParent()instanceof N&&(n=e.parent.getParent().getDeclarations()),e.parent instanceof z&&e.parent.getParent()instanceof B){const t=e.parent.getParent().getIdentifier();if(t){const e=this.internalFindSymbol(t,[I.Function]);e&&(n=e.node.getDeclarations())}}if(!n)return null;const i=e.getText();let r=this.global.findScope(n.offset,n.length);for(;r;){for(let e=0;e<t.length;e++){const n=t[e],o=r.getSymbol(i,n);if(o)return o}r=r.parent}return null}evaluateReferenceTypes(e){if(e instanceof T){const t=e.referenceTypes;if(t)return t;{if(e.isCustomProperty)return[I.Variable];const t=function(e){const t=e.findParent(O.Declaration),n=t&&t.getValue();return n&&n.encloses(e)?t:null}(e);if(t){const n=t.getNonPrefixedPropertyName();if(("animation"===n||"animation-name"===n)&&t.getValue()&&t.getValue().offset===e.offset)return[I.Keyframe]}}}else if(e instanceof se)return[I.Variable];return e.findAParent(O.Selector,O.ExtendsReference)?[I.Rule]:null}findSymbolFromNode(e){if(!e)return null;for(;e.type===O.Interpolation;)e=e.getParent();const t=this.evaluateReferenceTypes(e);return t?this.internalFindSymbol(e,t):null}matchesSymbol(e,t){if(!e)return!1;for(;e.type===O.Interpolation;)e=e.getParent();if(!e.matches(t.name))return!1;const n=this.evaluateReferenceTypes(e);if(!n||-1===n.indexOf(t.type))return!1;return this.internalFindSymbol(e,n)===t}findSymbol(e,t,n){let i=this.global.findScope(n);for(;i;){const n=i.getSymbol(e,t);if(n)return n;i=i.parent}return null}}var Tn;(()=>{var e={470:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,i="",r=0,o=-1,s=0,a=0;a<=e.length;++a){if(a<e.length)n=e.charCodeAt(a);else{if(47===n)break;n=47}if(47===n){if(o===a-1||1===s);else if(o!==a-1&&2===s){if(i.length<2||2!==r||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2))if(i.length>2){var l=i.lastIndexOf("/");if(l!==i.length-1){-1===l?(i="",r=0):r=(i=i.slice(0,l)).length-1-i.lastIndexOf("/"),o=a,s=0;continue}}else if(2===i.length||1===i.length){i="",r=0,o=a,s=0;continue}t&&(i.length>0?i+="/..":i="..",r=2)}else i.length>0?i+="/"+e.slice(o+1,a):i=e.slice(o+1,a),r=a-o-1;o=a,s=0}else 46===n&&-1!==s?++s:s=-1}return i}var i={resolve:function(){for(var e,i="",r=!1,o=arguments.length-1;o>=-1&&!r;o--){var s;o>=0?s=arguments[o]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(i=s+"/"+i,r=47===s.charCodeAt(0))}return i=n(i,!r),r?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(t(e),0===e.length)return".";var i=47===e.charCodeAt(0),r=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!i)).length||i||(e="."),e.length>0&&r&&(e+="/"),i?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n<arguments.length;++n){var r=arguments[n];t(r),r.length>0&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":i.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=i.resolve(e))===(n=i.resolve(n)))return"";for(var r=1;r<e.length&&47===e.charCodeAt(r);++r);for(var o=e.length,s=o-r,a=1;a<n.length&&47===n.charCodeAt(a);++a);for(var l=n.length-a,c=s<l?s:l,u=-1,h=0;h<=c;++h){if(h===c){if(l>c){if(47===n.charCodeAt(a+h))return n.slice(a+h+1);if(0===h)return n.slice(a+h)}else s>c&&(47===e.charCodeAt(r+h)?u=h:0===h&&(u=0));break}var d=e.charCodeAt(r+h);if(d!==n.charCodeAt(a+h))break;47===d&&(u=h)}var p="";for(h=r+u+1;h<=o;++h)h!==o&&47!==e.charCodeAt(h)||(0===p.length?p+="..":p+="/..");return p.length>0?p+n.slice(a+u):(a+=u,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),i=47===n,r=-1,o=!0,s=e.length-1;s>=1;--s)if(47===(n=e.charCodeAt(s))){if(!o){r=s;break}}else o=!1;return-1===r?i?"/":".":i&&1===r?"//":e.slice(0,r)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var i,r=0,o=-1,s=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,l=-1;for(i=e.length-1;i>=0;--i){var c=e.charCodeAt(i);if(47===c){if(!s){r=i+1;break}}else-1===l&&(s=!1,l=i+1),a>=0&&(c===n.charCodeAt(a)?-1==--a&&(o=i):(a=-1,o=l))}return r===o?o=l:-1===o&&(o=e.length),e.slice(r,o)}for(i=e.length-1;i>=0;--i)if(47===e.charCodeAt(i)){if(!s){r=i+1;break}}else-1===o&&(s=!1,o=i+1);return-1===o?"":e.slice(r,o)},extname:function(e){t(e);for(var n=-1,i=0,r=-1,o=!0,s=0,a=e.length-1;a>=0;--a){var l=e.charCodeAt(a);if(47!==l)-1===r&&(o=!1,r=a+1),46===l?-1===n?n=a:1!==s&&(s=1):-1!==n&&(s=-1);else if(!o){i=a+1;break}}return-1===n||-1===r||0===s||1===s&&n===r-1&&n===i+1?"":e.slice(n,r)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,i=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+i:n+"/"+i:i}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var i,r=e.charCodeAt(0),o=47===r;o?(n.root="/",i=1):i=0;for(var s=-1,a=0,l=-1,c=!0,u=e.length-1,h=0;u>=i;--u)if(47!==(r=e.charCodeAt(u)))-1===l&&(c=!1,l=u+1),46===r?-1===s?s=u:1!==h&&(h=1):-1!==s&&(h=-1);else if(!c){a=u+1;break}return-1===s||-1===l||0===h||1===h&&s===l-1&&s===a+1?-1!==l&&(n.base=n.name=0===a&&o?e.slice(1,l):e.slice(a,l)):(0===a&&o?(n.name=e.slice(1,s),n.base=e.slice(1,l)):(n.name=e.slice(a,s),n.base=e.slice(a,l)),n.ext=e.slice(s,l)),a>0?n.dir=e.slice(0,a-1):o&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,e.exports=i}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,n),o.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};(()=>{let e;if(n.r(i),n.d(i,{URI:()=>u,Utils:()=>k}),"object"==typeof process)e="win32"===process.platform;else if("object"==typeof navigator){let t=navigator.userAgent;e=t.indexOf("Windows")>=0}const t=/^\w[\w\d+.-]*$/,r=/^\//,o=/^\/\//;function s(e,n){if(!e.scheme&&n)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!t.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!r.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(o.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 ("//")')}const a="",l="/",c=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class u{static isUri(e){return e instanceof u||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,n,i,r,o=!1){"object"==typeof e?(this.scheme=e.scheme||a,this.authority=e.authority||a,this.path=e.path||a,this.query=e.query||a,this.fragment=e.fragment||a):(this.scheme=function(e,t){return e||t?e:"file"}(e,o),this.authority=t||a,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==l&&(t=l+t):t=l}return t}(this.scheme,n||a),this.query=i||a,this.fragment=r||a,s(this,o))}get fsPath(){return g(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:i,query:r,fragment:o}=e;return void 0===t?t=this.scheme:null===t&&(t=a),void 0===n?n=this.authority:null===n&&(n=a),void 0===i?i=this.path:null===i&&(i=a),void 0===r?r=this.query:null===r&&(r=a),void 0===o?o=this.fragment:null===o&&(o=a),t===this.scheme&&n===this.authority&&i===this.path&&r===this.query&&o===this.fragment?this:new d(t,n,i,r,o)}static parse(e,t=!1){const n=c.exec(e);return n?new d(n[2]||a,v(n[4]||a),v(n[5]||a),v(n[7]||a),v(n[9]||a),t):new d(a,a,a,a,a)}static file(t){let n=a;if(e&&(t=t.replace(/\\/g,l)),t[0]===l&&t[1]===l){const e=t.indexOf(l,2);-1===e?(n=t.substring(2),t=l):(n=t.substring(2,e),t=t.substring(e)||l)}return new d("file",n,t,a,a)}static from(e){const t=new d(e.scheme,e.authority,e.path,e.query,e.fragment);return s(t,!0),t}toString(e=!1){return _(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof u)return e;{const t=new d(e);return t._formatted=e.external,t._fsPath=e._sep===h?e.fsPath:null,t}}return e}}const h=e?1:void 0;class d extends u{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=g(this,!1)),this._fsPath}toString(e=!1){return e?_(this,!0):(this._formatted||(this._formatted=_(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=h),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 p={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 f(e,t,n){let i,r=-1;for(let o=0;o<e.length;o++){const s=e.charCodeAt(o);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||t&&47===s||n&&91===s||n&&93===s||n&&58===s)-1!==r&&(i+=encodeURIComponent(e.substring(r,o)),r=-1),void 0!==i&&(i+=e.charAt(o));else{void 0===i&&(i=e.substr(0,o));const t=p[s];void 0!==t?(-1!==r&&(i+=encodeURIComponent(e.substring(r,o)),r=-1),i+=t):-1===r&&(r=o)}}return-1!==r&&(i+=encodeURIComponent(e.substring(r))),void 0!==i?i:e}function m(e){let t;for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);35===i||63===i?(void 0===t&&(t=e.substr(0,n)),t+=p[i]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}function g(t,n){let i;return i=t.authority&&t.path.length>1&&"file"===t.scheme?`//${t.authority}${t.path}`:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?n?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,e&&(i=i.replace(/\//g,"\\")),i}function _(e,t){const n=t?m:f;let i="",{scheme:r,authority:o,path:s,query:a,fragment:c}=e;if(r&&(i+=r,i+=":"),(o||"file"===r)&&(i+=l,i+=l),o){let e=o.indexOf("@");if(-1!==e){const t=o.substr(0,e);o=o.substr(e+1),e=t.lastIndexOf(":"),-1===e?i+=n(t,!1,!1):(i+=n(t.substr(0,e),!1,!1),i+=":",i+=n(t.substr(e+1),!1,!0)),i+="@"}o=o.toLowerCase(),e=o.lastIndexOf(":"),-1===e?i+=n(o,!1,!0):(i+=n(o.substr(0,e),!1,!0),i+=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)}`)}i+=n(s,!0,!1)}return a&&(i+="?",i+=n(a,!1,!1)),c&&(i+="#",i+=t?c:f(c,!1,!1)),i}function b(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+b(e.substr(3)):e}}const y=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function v(e){return e.match(y)?e.replace(y,(e=>b(e))):e}var x=n(470);const w=x.posix||x,C="/";var k;!function(e){e.joinPath=function(e,...t){return e.with({path:w.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,i=!1;n[0]!==C&&(n=C+n,i=!0);let r=w.resolve(n,...t);return i&&r[0]===C&&!e.authority&&(r=r.substring(1)),e.with({path:r})},e.dirname=function(e){if(0===e.path.length||e.path===C)return e;let t=w.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},e.basename=function(e){return w.basename(e.path)},e.extname=function(e){return w.extname(e.path)}}(k||(k={}))})(),Tn=i})();const{URI:Vn,Utils:Nn}=Tn;function Dn(e,...t){return Nn.joinPath(Vn.parse(e),...t).toString(!0)}class Ln{constructor(e){this.readDirectory=e,this.literalCompletions=[],this.importCompletions=[]}onCssURILiteralValue(e){this.literalCompletions.push(e)}onCssImportPath(e){this.importCompletions.push(e)}async computeCompletions(e,t){const n={items:[],isIncomplete:!1};for(const i of this.literalCompletions){const r=i.uriValue,o=Un(r);if("."===o||".."===o)n.isIncomplete=!0;else{const o=await this.providePathSuggestions(r,i.position,i.range,e,t);for(let e of o)n.items.push(e)}}for(const i of this.importCompletions){const r=i.pathValue,o=Un(r);if("."===o||".."===o)n.isIncomplete=!0;else{let o=await this.providePathSuggestions(r,i.position,i.range,e,t);"scss"===e.languageId&&o.forEach((e=>{S(e.label,"_")&&P(e.label,".scss")&&(e.textEdit?e.textEdit.newText=e.label.slice(1,-5):e.label=e.label.slice(1,-5))}));for(let e of o)n.items.push(e)}}return n}async providePathSuggestions(e,t,n,i,r){const o=Un(e),s=S(e,"'")||S(e,'"'),a=s?o.slice(0,t.character-(n.start.character+1)):o.slice(0,t.character-n.start.character),l=i.uri,c=function(e,t,n){let i;const r=e.lastIndexOf("/");if(-1===r)i=n;else{const e=t.slice(r+1),o=Hn(n.end,-e.length),s=e.indexOf(" ");let a;a=-1!==s?Hn(o,s):n.end,i=ye.create(o,a)}return i}(a,o,s?function(e,t,n){const i=Hn(e.start,t),r=Hn(e.end,n);return ye.create(i,r)}(n,1,-1):n),u=a.substring(0,a.lastIndexOf("/")+1);let h=r.resolveReference(u||".",l);if(h)try{const e=[],t=await this.readDirectory(h);for(const[n,i]of t)n.charCodeAt(0)===Mn||i!==jt.Directory&&Dn(h,n)===l||e.push(qn(n,i===jt.Directory,c));return e}catch(e){}return[]}}const Mn=".".charCodeAt(0);function Un(e){return S(e,"'")||S(e,'"')?e.slice(1,-1):e}function qn(e,t,n){return t?{label:jn(e+="/"),kind:Ge.Folder,textEdit:Fe.replace(n,jn(e)),command:{title:"Suggest",command:"editor.action.triggerSuggest"}}:{label:jn(e),kind:Ge.File,textEdit:Fe.replace(n,jn(e))}}function jn(e){return e.replace(/(\s|\(|\)|,|"|')/g,"\\$1")}function Hn(e,t){return be.create(e.line,e.character+t)}const Bn=Qe.Snippet,Wn={title:"Suggest",command:"editor.action.triggerSuggest"};var zn,Kn;!function(e){e.Enums=" ",e.Normal="d",e.VendorPrefixed="x",e.Term="y",e.Variable="z"}(zn||(zn={}));class Gn{constructor(e=null,t,n){this.variablePrefix=e,this.lsOptions=t,this.cssDataManager=n,this.completionParticipants=[]}configure(e){this.defaultSettings=e}getSymbolContext(){return this.symbolContext||(this.symbolContext=new Fn(this.styleSheet)),this.symbolContext}setCompletionParticipants(e){this.completionParticipants=e||[]}async doComplete2(e,t,n,i,r=this.defaultSettings){if(!this.lsOptions.fileSystemProvider||!this.lsOptions.fileSystemProvider.readDirectory)return this.doComplete(e,t,n,r);const o=new Ln(this.lsOptions.fileSystemProvider.readDirectory),s=this.completionParticipants;this.completionParticipants=[o].concat(s);const a=this.doComplete(e,t,n,r);try{const t=await o.computeCompletions(e,i);return{isIncomplete:a.isIncomplete||t.isIncomplete,itemDefaults:a.itemDefaults,items:t.items.concat(a.items)}}finally{this.completionParticipants=s}}doComplete(e,t,n,i){this.offset=e.offsetAt(t),this.position=t,this.currentWord=function(e,t){let n=t-1;const i=e.getText();for(;n>=0&&-1===' \t\n\r":{[()]},*>+'.indexOf(i.charAt(n));)n--;return i.substring(n+1,t)}(e,this.offset),this.defaultReplaceRange=ye.create(be.create(this.position.line,this.position.character-this.currentWord.length),this.position),this.textDocument=e,this.styleSheet=n,this.documentSettings=i;try{const e={isIncomplete:!1,itemDefaults:{editRange:{start:{line:t.line,character:t.character-this.currentWord.length},end:t}},items:[]};this.nodePath=function(e,t){let n=function(e,t){let n=null;return!e||t<e.offset||t>e.end?null:(e.accept((e=>-1===e.offset&&-1===e.length||e.offset<=t&&e.end>=t&&(n?e.length<=n.length&&(n=e):n=e,!0))),n)}(e,t);const i=[];for(;n;)i.unshift(n),n=n.parent;return i}(this.styleSheet,this.offset);for(let t=this.nodePath.length-1;t>=0;t--){const n=this.nodePath[t];if(n instanceof j)this.getCompletionsForDeclarationProperty(n.getParent(),e);else if(n instanceof X)n.parent instanceof oe?this.getVariableProposals(null,e):this.getCompletionsForExpression(n,e);else if(n instanceof M){const t=n.findAParent(O.ExtendsReference,O.Ruleset);if(t)if(t.type===O.ExtendsReference)this.getCompletionsForExtendsReference(t,n,e);else{const n=t;this.getCompletionsForSelector(n,n&&n.isNested(),e)}}else if(n instanceof z)this.getCompletionsForFunctionArgument(n,n.getParent(),e);else if(n instanceof V)this.getCompletionsForDeclarations(n,e);else if(n instanceof re)this.getCompletionsForVariableDeclaration(n,e);else if(n instanceof D)this.getCompletionsForRuleSet(n,e);else if(n instanceof oe)this.getCompletionsForInterpolation(n,e);else if(n instanceof K)this.getCompletionsForFunctionDeclaration(n,e);else if(n instanceof le)this.getCompletionsForMixinReference(n,e);else if(n instanceof B)this.getCompletionsForFunctionArgument(null,n,e);else if(n instanceof Q)this.getCompletionsForSupports(n,e);else if(n instanceof J)this.getCompletionsForSupportsCondition(n,e);else if(n instanceof ae)this.getCompletionsForExtendsReference(n,null,e);else if(n.type===O.URILiteral)this.getCompletionForUriLiteralValue(n,e);else if(null===n.parent)this.getCompletionForTopLevel(e);else{if(n.type!==O.StringLiteral||!this.isImportPathParent(n.parent.type))continue;this.getCompletionForImportPath(n,e)}if(e.items.length>0||this.offset>n.offset)return this.finalize(e)}return this.getCompletionsForStylesheet(e),0===e.items.length&&this.variablePrefix&&0===this.currentWord.indexOf(this.variablePrefix)&&this.getVariableProposals(null,e),this.finalize(e)}finally{this.position=null,this.currentWord=null,this.textDocument=null,this.styleSheet=null,this.symbolContext=null,this.defaultReplaceRange=null,this.nodePath=null}}isImportPathParent(e){return e===O.Import}finalize(e){return e}findInNodePath(...e){for(let t=this.nodePath.length-1;t>=0;t--){const n=this.nodePath[t];if(-1!==e.indexOf(n.type))return n}return null}getCompletionsForDeclarationProperty(e,t){return this.getPropertyProposals(e,t)}getPropertyProposals(e,t){const n=this.isTriggerPropertyValueCompletionEnabled,i=this.isCompletePropertyWithSemicolonEnabled;return this.cssDataManager.getProperties().forEach((r=>{let o,s,a=!1;e?(o=this.getCompletionRange(e.getProperty()),s=r.name,An(e.colonPosition)||(s+=": ",a=!0)):(o=this.getCompletionRange(null),s=r.name+": ",a=!0),!e&&i&&(s+="$0;"),e&&!e.semicolonPosition&&i&&this.offset>=this.textDocument.offsetAt(o.end)&&(s+="$0;");const l={label:r.name,documentation:Xt(r,this.doesSupportMarkdown()),tags:Qn(r)?[Je.Deprecated]:[],textEdit:Fe.replace(o,s),insertTextFormat:Qe.Snippet,kind:Ge.Property};r.restrictions||(a=!1),n&&a&&(l.command=Wn);const c=(255-("number"==typeof r.relevance?Math.min(Math.max(r.relevance,0),99):50)).toString(16),u=S(r.name,"-")?zn.VendorPrefixed:zn.Normal;l.sortText=u+"_"+c,t.items.push(l)})),this.completionParticipants.forEach((e=>{e.onCssProperty&&e.onCssProperty({propertyName:this.currentWord,range:this.defaultReplaceRange})})),t}get isTriggerPropertyValueCompletionEnabled(){return this.documentSettings?.triggerPropertyValueCompletion??!0}get isCompletePropertyWithSemicolonEnabled(){return this.documentSettings?.completePropertyWithSemicolon??!0}getCompletionsForDeclarationValue(e,t){const n=e.getFullPropertyName(),i=this.cssDataManager.getProperty(n);let r=e.getValue()||null;for(;r&&r.hasChildren();)r=r.findChildAtOffset(this.offset,!1);if(this.completionParticipants.forEach((e=>{e.onCssPropertyValue&&e.onCssPropertyValue({propertyName:n,propertyValue:this.currentWord,range:this.getCompletionRange(r)})})),i){if(i.restrictions)for(const e of i.restrictions)switch(e){case"color":this.getColorProposals(i,r,t);break;case"position":this.getPositionProposals(i,r,t);break;case"repeat":this.getRepeatStyleProposals(i,r,t);break;case"line-style":this.getLineStyleProposals(i,r,t);break;case"line-width":this.getLineWidthProposals(i,r,t);break;case"geometry-box":this.getGeometryBoxProposals(i,r,t);break;case"box":this.getBoxProposals(i,r,t);break;case"image":this.getImageProposals(i,r,t);break;case"timing-function":this.getTimingFunctionProposals(i,r,t);break;case"shape":this.getBasicShapeProposals(i,r,t)}this.getValueEnumProposals(i,r,t),this.getCSSWideKeywordProposals(i,r,t),this.getUnitProposals(i,r,t)}else{const n=function(e,t){const n=t.getFullPropertyName(),i=new Jn;function r(e){return(e instanceof T||e instanceof ie||e instanceof Z)&&i.add(e.getText()),!0}function o(e){const t=e.getFullPropertyName();return n===t}function s(e){if(e instanceof q&&e!==t&&o(e)){const t=e.getValue();t&&t.accept(r)}return!0}return e.accept(s),i}(this.styleSheet,e);for(const e of n.getEntries())t.items.push({label:e,textEdit:Fe.replace(this.getCompletionRange(r),e),kind:Ge.Value})}return this.getVariableProposals(r,t),this.getTermProposals(i,r,t),t}getValueEnumProposals(e,t,n){if(e.values)for(const i of e.values){let r,o=i.name;if(P(o,")")){const e=o.lastIndexOf("(");-1!==e&&(o=o.substring(0,e+1)+"$1"+o.substring(e+1),r=Bn)}let s=zn.Enums;S(i.name,"-")&&(s+=zn.VendorPrefixed);const a={label:i.name,documentation:Xt(i,this.doesSupportMarkdown()),tags:Qn(e)?[Je.Deprecated]:[],textEdit:Fe.replace(this.getCompletionRange(t),o),sortText:s,kind:Ge.Value,insertTextFormat:r};n.items.push(a)}return n}getCSSWideKeywordProposals(e,t,n){for(const e in bn)n.items.push({label:e,documentation:bn[e],textEdit:Fe.replace(this.getCompletionRange(t),e),kind:Ge.Value});for(const e in yn){const i=Xn(e);n.items.push({label:e,documentation:yn[e],textEdit:Fe.replace(this.getCompletionRange(t),i),kind:Ge.Function,insertTextFormat:Bn,command:S(e,"var")?Wn:void 0})}return n}getCompletionsForInterpolation(e,t){return this.offset>=e.offset+2&&this.getVariableProposals(null,t),t}getVariableProposals(e,t){const n=this.getSymbolContext().findSymbolsAtOffset(this.offset,I.Variable);for(const i of n){const n=S(i.name,"--")?`var(${i.name})`:i.name,r={label:i.name,documentation:i.value?E(i.value):i.value,textEdit:Fe.replace(this.getCompletionRange(e),n),kind:Ge.Variable,sortText:zn.Variable};if("string"==typeof r.documentation&&hn(r.documentation)&&(r.kind=Ge.Color),i.node.type===O.FunctionParameter){const e=i.node.getParent();e.type===O.MixinDeclaration&&(r.detail=de.t("argument from '{0}'",e.getName()))}t.items.push(r)}return t}getVariableProposalsForCSSVarFunction(e){const t=new Jn;this.styleSheet.acceptVisitor(new Zn(t,this.offset));let n=this.getSymbolContext().findSymbolsAtOffset(this.offset,I.Variable);for(const i of n){if(S(i.name,"--")){const t={label:i.name,documentation:i.value?E(i.value):i.value,textEdit:Fe.replace(this.getCompletionRange(null),i.name),kind:Ge.Variable};"string"==typeof t.documentation&&hn(t.documentation)&&(t.kind=Ge.Color),e.items.push(t)}t.remove(i.name)}for(const n of t.getEntries())if(S(n,"--")){const t={label:n,textEdit:Fe.replace(this.getCompletionRange(null),n),kind:Ge.Variable};e.items.push(t)}return e}getUnitProposals(e,t,n){let i="0";if(this.currentWord.length>0){const e=this.currentWord.match(/^-?\d[\.\d+]*/);e&&(i=e[0],n.isIncomplete=i.length===this.currentWord.length)}else 0===this.currentWord.length&&(n.isIncomplete=!0);if(t&&t.parent&&t.parent.type===O.Term&&(t=t.getParent()),e.restrictions)for(const r of e.restrictions){const e=Cn[r];if(e)for(const r of e){const e=i+r;n.items.push({label:e,textEdit:Fe.replace(this.getCompletionRange(t),e),kind:Ge.Unit})}}return n}getCompletionRange(e){if(e&&e.offset<=this.offset&&this.offset<=e.end){const t=-1!==e.end?this.textDocument.positionAt(e.end):this.position,n=this.textDocument.positionAt(e.offset);if(n.line===t.line)return ye.create(n,t)}return this.defaultReplaceRange}getColorProposals(e,t,n){for(const e in sn)n.items.push({label:e,documentation:sn[e],textEdit:Fe.replace(this.getCompletionRange(t),e),kind:Ge.Color});for(const e in ln)n.items.push({label:e,documentation:ln[e],textEdit:Fe.replace(this.getCompletionRange(t),e),kind:Ge.Value});const i=new Jn;this.styleSheet.acceptVisitor(new Yn(i,this.offset));for(const e of i.getEntries())n.items.push({label:e,textEdit:Fe.replace(this.getCompletionRange(t),e),kind:Ge.Color});for(const e of rn)n.items.push({label:e.label,detail:e.func,documentation:e.desc,textEdit:Fe.replace(this.getCompletionRange(t),e.insertText),insertTextFormat:Bn,kind:Ge.Function});return n}getPositionProposals(e,t,n){for(const e in dn)n.items.push({label:e,documentation:dn[e],textEdit:Fe.replace(this.getCompletionRange(t),e),kind:Ge.Value});return n}getRepeatStyleProposals(e,t,n){for(const e in pn)n.items.push({label:e,documentation:pn[e],textEdit:Fe.replace(this.getCompletionRange(t),e),kind:Ge.Value});return n}getLineStyleProposals(e,t,n){for(const e in fn)n.items.push({label:e,documentation:fn[e],textEdit:Fe.replace(this.getCompletionRange(t),e),kind:Ge.Value});return n}getLineWidthProposals(e,t,n){for(const e of mn)n.items.push({label:e,textEdit:Fe.replace(this.getCompletionRange(t),e),kind:Ge.Value});return n}getGeometryBoxProposals(e,t,n){for(const e in _n)n.items.push({label:e,documentation:_n[e],textEdit:Fe.replace(this.getCompletionRange(t),e),kind:Ge.Value});return n}getBoxProposals(e,t,n){for(const e in gn)n.items.push({label:e,documentation:gn[e],textEdit:Fe.replace(this.getCompletionRange(t),e),kind:Ge.Value});return n}getImageProposals(e,t,n){for(const e in vn){const i=Xn(e);n.items.push({label:e,documentation:vn[e],textEdit:Fe.replace(this.getCompletionRange(t),i),kind:Ge.Function,insertTextFormat:e!==i?Bn:void 0})}return n}getTimingFunctionProposals(e,t,n){for(const e in xn){const i=Xn(e);n.items.push({label:e,documentation:xn[e],textEdit:Fe.replace(this.getCompletionRange(t),i),kind:Ge.Function,insertTextFormat:e!==i?Bn:void 0})}return n}getBasicShapeProposals(e,t,n){for(const e in wn){const i=Xn(e);n.items.push({label:e,documentation:wn[e],textEdit:Fe.replace(this.getCompletionRange(t),i),kind:Ge.Function,insertTextFormat:e!==i?Bn:void 0})}return n}getCompletionsForStylesheet(e){const t=this.styleSheet.findFirstChildBeforeOffset(this.offset);return t?t instanceof D?this.getCompletionsForRuleSet(t,e):t instanceof Q?this.getCompletionsForSupports(t,e):e:this.getCompletionForTopLevel(e)}getCompletionForTopLevel(e){return this.cssDataManager.getAtDirectives().forEach((t=>{e.items.push({label:t.name,textEdit:Fe.replace(this.getCompletionRange(null),t.name),documentation:Xt(t,this.doesSupportMarkdown()),tags:Qn(t)?[Je.Deprecated]:[],kind:Ge.Keyword})})),this.getCompletionsForSelector(null,!1,e),e}getCompletionsForRuleSet(e,t){const n=e.getDeclarations();if(n&&n.endsWith("}")&&this.offset>=n.end)return this.getCompletionForTopLevel(t);return!n||this.offset<=n.offset?this.getCompletionsForSelector(e,e.isNested(),t):this.getCompletionsForDeclarations(e.getDeclarations(),t)}getCompletionsForSelector(e,t,n){const i=this.findInNodePath(O.PseudoSelector,O.IdentifierSelector,O.ClassSelector,O.ElementNameSelector);!i&&this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord,this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord),this.defaultReplaceRange=ye.create(be.create(this.position.line,this.position.character-this.currentWord.length),this.position));this.cssDataManager.getPseudoClasses().forEach((e=>{const t=Xn(e.name),r={label:e.name,textEdit:Fe.replace(this.getCompletionRange(i),t),documentation:Xt(e,this.doesSupportMarkdown()),tags:Qn(e)?[Je.Deprecated]:[],kind:Ge.Function,insertTextFormat:e.name!==t?Bn:void 0};S(e.name,":-")&&(r.sortText=zn.VendorPrefixed),n.items.push(r)}));if(this.cssDataManager.getPseudoElements().forEach((e=>{const t=Xn(e.name),r={label:e.name,textEdit:Fe.replace(this.getCompletionRange(i),t),documentation:Xt(e,this.doesSupportMarkdown()),tags:Qn(e)?[Je.Deprecated]:[],kind:Ge.Function,insertTextFormat:e.name!==t?Bn:void 0};S(e.name,"::-")&&(r.sortText=zn.VendorPrefixed),n.items.push(r)})),!t){for(const e of kn)n.items.push({label:e,textEdit:Fe.replace(this.getCompletionRange(i),e),kind:Ge.Keyword});for(const e of $n)n.items.push({label:e,textEdit:Fe.replace(this.getCompletionRange(i),e),kind:Ge.Keyword})}const r={};r[this.currentWord]=!0;const o=this.textDocument.getText();if(this.styleSheet.accept((e=>{if(e.type===O.SimpleSelector&&e.length>0){const t=o.substr(e.offset,e.length);return"."!==t.charAt(0)||r[t]||(r[t]=!0,n.items.push({label:t,textEdit:Fe.replace(this.getCompletionRange(i),t),kind:Ge.Keyword})),!1}return!0})),e&&e.isNested()){const t=e.getSelectors().findFirstChildBeforeOffset(this.offset);t&&0===e.getSelectors().getChildren().indexOf(t)&&this.getPropertyProposals(null,n)}return n}getCompletionsForDeclarations(e,t){if(!e||this.offset===e.offset)return t;const n=e.findFirstChildBeforeOffset(this.offset);if(!n)return this.getCompletionsForDeclarationProperty(null,t);if(n instanceof U){const e=n;if(!An(e.colonPosition)||this.offset<=e.colonPosition)return this.getCompletionsForDeclarationProperty(e,t);if(An(e.semicolonPosition)&&e.semicolonPosition<this.offset)return this.offset===e.semicolonPosition+1?t:this.getCompletionsForDeclarationProperty(null,t);if(e instanceof q)return this.getCompletionsForDeclarationValue(e,t)}else n instanceof ae?this.getCompletionsForExtendsReference(n,null,t):(this.currentWord&&"@"===this.currentWord[0]||n instanceof D)&&this.getCompletionsForDeclarationProperty(null,t);return t}getCompletionsForVariableDeclaration(e,t){return this.offset&&An(e.colonPosition)&&this.offset>e.colonPosition&&this.getVariableProposals(e.getValue()||null,t),t}getCompletionsForExpression(e,t){const n=e.getParent();if(n instanceof z)return this.getCompletionsForFunctionArgument(n,n.getParent(),t),t;const i=e.findParent(O.Declaration);if(!i)return this.getTermProposals(void 0,null,t),t;const r=e.findChildAtOffset(this.offset,!0);return r?r instanceof ie||r instanceof T?this.getCompletionsForDeclarationValue(i,t):t:this.getCompletionsForDeclarationValue(i,t)}getCompletionsForFunctionArgument(e,t,n){const i=t.getIdentifier();return i&&i.matches("var")&&(t.getArguments().hasChildren()&&t.getArguments().getChild(0)!==e||this.getVariableProposalsForCSSVarFunction(n)),n}getCompletionsForFunctionDeclaration(e,t){const n=e.getDeclarations();return n&&this.offset>n.offset&&this.offset<n.end&&this.getTermProposals(void 0,null,t),t}getCompletionsForMixinReference(e,t){const n=this.getSymbolContext().findSymbolsAtOffset(this.offset,I.Mixin);for(const e of n)e.node instanceof ce&&t.items.push(this.makeTermProposal(e,e.node.getParameters(),null));const i=e.getIdentifier()||null;return this.completionParticipants.forEach((e=>{e.onCssMixinReference&&e.onCssMixinReference({mixinName:this.currentWord,range:this.getCompletionRange(i)})})),t}getTermProposals(e,t,n){const i=this.getSymbolContext().findSymbolsAtOffset(this.offset,I.Function);for(const e of i)e.node instanceof K&&n.items.push(this.makeTermProposal(e,e.node.getParameters(),t));return n}makeTermProposal(e,t,n){e.node;const i=t.getChildren().map((e=>e instanceof W?e.getName():e.getText())),r=e.name+"("+i.map(((e,t)=>"${"+(t+1)+":"+e+"}")).join(", ")+")";return{label:e.name,detail:e.name+"("+i.join(", ")+")",textEdit:Fe.replace(this.getCompletionRange(n),r),insertTextFormat:Bn,kind:Ge.Function,sortText:zn.Term}}getCompletionsForSupportsCondition(e,t){const n=e.findFirstChildBeforeOffset(this.offset);if(n){if(n instanceof q)return!An(n.colonPosition)||this.offset<=n.colonPosition?this.getCompletionsForDeclarationProperty(n,t):this.getCompletionsForDeclarationValue(n,t);if(n instanceof J)return this.getCompletionsForSupportsCondition(n,t)}return An(e.lParent)&&this.offset>e.lParent&&(!An(e.rParent)||this.offset<=e.rParent)?this.getCompletionsForDeclarationProperty(null,t):t}getCompletionsForSupports(e,t){const n=e.getDeclarations();if(!n||this.offset<=n.offset){const n=e.findFirstChildBeforeOffset(this.offset);return n instanceof J?this.getCompletionsForSupportsCondition(n,t):t}return this.getCompletionForTopLevel(t)}getCompletionsForExtendsReference(e,t,n){return n}getCompletionForUriLiteralValue(e,t){let n,i,r;if(e.hasChildren()){const t=e.getChild(0);n=t.getText(),i=this.position,r=this.getCompletionRange(t)}else{n="",i=this.position;const t=this.textDocument.positionAt(e.offset+4);r=ye.create(t,t)}return this.completionParticipants.forEach((e=>{e.onCssURILiteralValue&&e.onCssURILiteralValue({uriValue:n,position:i,range:r})})),t}getCompletionForImportPath(e,t){return this.completionParticipants.forEach((t=>{t.onCssImportPath&&t.onCssImportPath({pathValue:e.getText(),position:this.position,range:this.getCompletionRange(e)})})),t}hasCharacterAtPosition(e,t){const n=this.textDocument.getText();return e>=0&&e<n.length&&n.charAt(e)===t}doesSupportMarkdown(){if(!An(this.supportsMarkdown)){if(!An(this.lsOptions.clientCapabilities))return this.supportsMarkdown=!0,this.supportsMarkdown;const e=this.lsOptions.clientCapabilities.textDocument?.completion?.completionItem?.documentationFormat;this.supportsMarkdown=Array.isArray(e)&&-1!==e.indexOf(ze.Markdown)}return this.supportsMarkdown}}function Qn(e){return!(!e.status||"nonstandard"!==e.status&&"obsolete"!==e.status)}class Jn{constructor(){this.entries={}}add(e){this.entries[e]=!0}remove(e){delete this.entries[e]}getEntries(){return Object.keys(this.entries)}}function Xn(e){return e.replace(/\(\)$/,"($1)")}class Yn{constructor(e,t){this.entries=e,this.currentOffset=t}visitNode(e){return(e instanceof Z||e instanceof B&&un(e))&&(this.currentOffset<e.offset||e.end<this.currentOffset)&&this.entries.add(e.getText()),!0}}class Zn{constructor(e,t){this.entries=e,this.currentOffset=t}visitNode(e){return e instanceof T&&e.isCustomProperty&&(this.currentOffset<e.offset||e.end<this.currentOffset)&&this.entries.add(e.getText()),!0}}!function(e){function t(e){const t=e.match(/^['"](.*)["']$/);return t?t[1]:e}e.ensure=function(e,n){return n+t(e)+n},e.remove=t}(Kn||(Kn={}));const ei=ue.Warning,ti=ue.Error,ni=ue.Ignore;class ii{constructor(e,t,n){this.id=e,this.message=t,this.defaultValue=n}}const ri={AllVendorPrefixes:new ii("compatibleVendorPrefixes",de.t("When using a vendor-specific prefix make sure to also include all other vendor-specific properties"),ni),IncludeStandardPropertyWhenUsingVendorPrefix:new ii("vendorPrefix",de.t("When using a vendor-specific prefix also include the standard property"),ei),DuplicateDeclarations:new ii("duplicateProperties",de.t("Do not use duplicate style definitions"),ni),EmptyRuleSet:new ii("emptyRules",de.t("Do not use empty rulesets"),ei),ImportStatemement:new ii("importStatement",de.t("Import statements do not load in parallel"),ni),BewareOfBoxModelSize:new ii("boxModel",de.t("Do not use width or height when using padding or border"),ni),UniversalSelector:new ii("universalSelector",de.t("The universal selector (*) is known to be slow"),ni),ZeroWithUnit:new ii("zeroUnits",de.t("No unit for zero needed"),ni),RequiredPropertiesForFontFace:new ii("fontFaceProperties",de.t("@font-face rule must define 'src' and 'font-family' properties"),ei),HexColorLength:new ii("hexColorLength",de.t("Hex colors must consist of three, four, six or eight hex numbers"),ti),ArgsInColorFunction:new ii("argumentsInColorFunction",de.t("Invalid number of parameters"),ti),UnknownProperty:new ii("unknownProperties",de.t("Unknown property."),ei),UnknownAtRules:new ii("unknownAtRules",de.t("Unknown at-rule."),ei),IEStarHack:new ii("ieHack",de.t("IE hacks are only necessary when supporting IE7 and older"),ni),UnknownVendorSpecificProperty:new ii("unknownVendorSpecificProperties",de.t("Unknown vendor specific property."),ni),PropertyIgnoredDueToDisplay:new ii("propertyIgnoredDueToDisplay",de.t("Property is ignored due to the display."),ei),AvoidImportant:new ii("important",de.t("Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored."),ni),AvoidFloat:new ii("float",de.t("Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes."),ni),AvoidIdSelector:new ii("idSelector",de.t("Selectors should not contain IDs because these rules are too tightly coupled with the HTML."),ni)},oi={ValidProperties:new class{constructor(e,t,n){this.id=e,this.message=t,this.defaultValue=n}}("validProperties",de.t("A list of properties that are not validated against the `unknownProperties` rule."),[])};class si{constructor(e){this.fullPropertyName=e.getFullPropertyName().toLowerCase(),this.node=e}}function ai(e,t,n,i){const r=e[t];r.value=n,n&&(Sn(r.properties,i)||r.properties.push(i))}function li(e,t,n,i){"top"===t||"right"===t||"bottom"===t||"left"===t?ai(e,t,n,i):function(e,t,n){ai(e,"top",t,n),ai(e,"right",t,n),ai(e,"bottom",t,n),ai(e,"left",t,n)}(e,n,i)}function ci(e,t,n){switch(t.length){case 1:li(e,void 0,t[0],n);break;case 2:li(e,"top",t[0],n),li(e,"bottom",t[0],n),li(e,"right",t[1],n),li(e,"left",t[1],n);break;case 3:li(e,"top",t[0],n),li(e,"right",t[1],n),li(e,"left",t[1],n),li(e,"bottom",t[2],n);break;case 4:li(e,"top",t[0],n),li(e,"right",t[1],n),li(e,"bottom",t[2],n),li(e,"left",t[3],n)}}function ui(e,t){for(let n of t)if(e.matches(n))return!0;return!1}function hi(e,t=!0){return(!t||!ui(e,["initial","unset"]))&&0!==parseFloat(e.getText())}function di(e,t=!0){return e.map((e=>hi(e,t)))}function pi(e,t=!0){return!ui(e,["none","hidden"])&&(!t||!ui(e,["initial","unset"]))}function fi(e,t=!0){return e.map((e=>pi(e,t)))}function mi(e){const t=e.getChildren();if(1===t.length){const e=t[0];return hi(e)&&pi(e)}for(const e of t){const t=e;if(!hi(t,!1)||!pi(t,!1))return!1}return!0}class gi{constructor(){this.data={}}add(e,t,n){let i=this.data[e];i||(i={nodes:[],names:[]},this.data[e]=i),i.names.push(t),n&&i.nodes.push(n)}}class _i{static entries(e,t,n,i,r){const o=new _i(t,n,i);return e.acceptVisitor(o),o.completeValidations(),o.getEntries(r)}constructor(e,t,n){this.cssDataManager=n,this.warnings=[],this.settings=t,this.documentText=e.getText(),this.keyframes=new gi,this.validProperties={};const i=t.getSetting(oi.ValidProperties);Array.isArray(i)&&i.forEach((e=>{if("string"==typeof e){const t=e.trim().toLowerCase();t.length&&(this.validProperties[t]=!0)}}))}isValidPropertyDeclaration(e){const t=e.fullPropertyName;return this.validProperties[t]}fetch(e,t){const n=[];for(const i of e)i.fullPropertyName===t&&n.push(i);return n}fetchWithValue(e,t,n){const i=[];for(const r of e)if(r.fullPropertyName===t){const e=r.node.getValue();e&&this.findValueInExpression(e,n)&&i.push(r)}return i}findValueInExpression(e,t){let n=!1;return e.accept((e=>(e.type===O.Identifier&&e.matches(t)&&(n=!0),!n))),n}getEntries(e=ue.Warning|ue.Error){return this.warnings.filter((t=>0!=(t.getLevel()&e)))}addEntry(e,t,n){const i=new he(e,t,this.settings.getRule(t),n);this.warnings.push(i)}getMissingNames(e,t){const n=e.slice(0);for(let e=0;e<t.length;e++){const i=n.indexOf(t[e]);-1!==i&&(n[i]=null)}let i=null;for(let e=0;e<n.length;e++){const t=n[e];t&&(i=null===i?de.t("'{0}'",t):de.t("{0}, '{1}'",i,t))}return i}visitNode(e){switch(e.type){case O.UnknownAtRule:return this.visitUnknownAtRule(e);case O.Keyframe:return this.visitKeyframe(e);case O.FontFace:return this.visitFontFace(e);case O.Ruleset:return this.visitRuleSet(e);case O.SimpleSelector:return this.visitSimpleSelector(e);case O.Function:return this.visitFunction(e);case O.NumericValue:return this.visitNumericValue(e);case O.Import:return this.visitImport(e);case O.HexColorValue:return this.visitHexColorValue(e);case O.Prio:return this.visitPrio(e);case O.IdentifierSelector:return this.visitIdentifierSelector(e)}return!0}completeValidations(){this.validateKeyframes()}visitUnknownAtRule(e){const t=e.getChild(0);if(!t)return!1;return!this.cssDataManager.getAtDirective(t.getText())&&(this.addEntry(t,ri.UnknownAtRules,`Unknown at rule ${t.getText()}`),!0)}visitKeyframe(e){const t=e.getKeyword();if(!t)return!1;const n=t.getText();return this.keyframes.add(e.getName(),n,"@keyframes"!==n?t:null),!0}validateKeyframes(){const e=["@-webkit-keyframes","@-moz-keyframes","@-o-keyframes"];for(const t in this.keyframes.data){const n=this.keyframes.data[t].names,i=-1===n.indexOf("@keyframes");if(!i&&1===n.length)continue;const r=this.getMissingNames(e,n);if(r||i)for(const e of this.keyframes.data[t].nodes){if(i){const t=de.t("Always define standard rule '@keyframes' when defining keyframes.");this.addEntry(e,ri.IncludeStandardPropertyWhenUsingVendorPrefix,t)}if(r){const t=de.t("Always include all vendor specific rules: Missing: {0}",r);this.addEntry(e,ri.AllVendorPrefixes,t)}}}return!0}visitSimpleSelector(e){const t=this.documentText.charAt(e.offset);return 1===e.length&&"*"===t&&this.addEntry(e,ri.UniversalSelector),!0}visitIdentifierSelector(e){return this.addEntry(e,ri.AvoidIdSelector),!0}visitImport(e){return this.addEntry(e,ri.ImportStatemement),!0}visitRuleSet(e){const t=e.getDeclarations();if(!t)return!1;t.hasChildren()||this.addEntry(e.getSelectors(),ri.EmptyRuleSet);const n=[];for(const e of t.getChildren())e instanceof q&&n.push(new si(e));const i=function(e){const t={top:{value:!1,properties:[]},right:{value:!1,properties:[]},bottom:{value:!1,properties:[]},left:{value:!1,properties:[]}};for(const n of e){const e=n.node.value;if(void 0!==e)switch(n.fullPropertyName){case"box-sizing":return{top:{value:!1,properties:[]},right:{value:!1,properties:[]},bottom:{value:!1,properties:[]},left:{value:!1,properties:[]}};case"width":t.width=n;break;case"height":t.height=n;break;default:const i=n.fullPropertyName.split("-");switch(i[0]){case"border":switch(i[1]){case void 0:case"top":case"right":case"bottom":case"left":switch(i[2]){case void 0:li(t,i[1],mi(e),n);break;case"width":li(t,i[1],hi(e,!1),n);break;case"style":li(t,i[1],pi(e,!0),n)}break;case"width":ci(t,di(e.getChildren(),!1),n);break;case"style":ci(t,fi(e.getChildren(),!0),n)}break;case"padding":1===i.length?ci(t,di(e.getChildren(),!0),n):li(t,i[1],hi(e,!0),n)}}}return t}(n);if(i.width){let e=[];if(i.right.value&&(e=Pn(e,i.right.properties)),i.left.value&&(e=Pn(e,i.left.properties)),0!==e.length){for(const t of e)this.addEntry(t.node,ri.BewareOfBoxModelSize);this.addEntry(i.width.node,ri.BewareOfBoxModelSize)}}if(i.height){let e=[];if(i.top.value&&(e=Pn(e,i.top.properties)),i.bottom.value&&(e=Pn(e,i.bottom.properties)),0!==e.length){for(const t of e)this.addEntry(t.node,ri.BewareOfBoxModelSize);this.addEntry(i.height.node,ri.BewareOfBoxModelSize)}}let r=this.fetchWithValue(n,"display","inline-block");if(r.length>0){const e=this.fetch(n,"float");for(let t=0;t<e.length;t++){const n=e[t].node,i=n.getValue();i&&!i.matches("none")&&this.addEntry(n,ri.PropertyIgnoredDueToDisplay,de.t("inline-block is ignored due to the float. If 'float' has a value other than 'none', the box is floated and 'display' is treated as 'block'"))}}if(r=this.fetchWithValue(n,"display","block"),r.length>0){const e=this.fetch(n,"vertical-align");for(let t=0;t<e.length;t++)this.addEntry(e[t].node,ri.PropertyIgnoredDueToDisplay,de.t("Property is ignored due to the display. With 'display: block', vertical-align should not be used."))}const o=this.fetch(n,"float");for(let e=0;e<o.length;e++){const t=o[e];this.isValidPropertyDeclaration(t)||this.addEntry(t.node,ri.AvoidFloat)}for(let e=0;e<n.length;e++){const t=n[e];if("background"!==t.fullPropertyName&&!this.validProperties[t.fullPropertyName]){const e=t.node.getValue();if(e&&"-"!==this.documentText.charAt(e.offset)){const e=this.fetch(n,t.fullPropertyName);if(e.length>1)for(let n=0;n<e.length;n++){const i=e[n].node.getValue();i&&"-"!==this.documentText.charAt(i.offset)&&e[n]!==t&&this.addEntry(t.node,ri.DuplicateDeclarations)}}}}if(!e.getSelectors().matches(":export")){const t=new gi;let i=!1;for(const e of n){const n=e.node;if(this.isCSSDeclaration(n)){let i=e.fullPropertyName;const r=i.charAt(0);if("-"===r){if("-"!==i.charAt(1)){this.cssDataManager.isKnownProperty(i)||this.validProperties[i]||this.addEntry(n.getProperty(),ri.UnknownVendorSpecificProperty);const e=n.getNonPrefixedPropertyName();t.add(e,i,n.getProperty())}}else{const e=i;"*"!==r&&"_"!==r||(this.addEntry(n.getProperty(),ri.IEStarHack),i=i.substr(1)),this.cssDataManager.isKnownProperty(e)||this.cssDataManager.isKnownProperty(i)||this.validProperties[i]||this.addEntry(n.getProperty(),ri.UnknownProperty,de.t("Unknown property: '{0}'",n.getFullPropertyName())),t.add(i,i,null)}}else i=!0}if(!i)for(const n in t.data){const i=t.data[n],r=i.names,o=this.cssDataManager.isStandardProperty(n)&&-1===r.indexOf(n);if(!o&&1===r.length)continue;const s=new Set(o?i.nodes:[]);if(o){const t=this.getContextualVendorSpecificPseudoElements(e);for(const e of i.nodes){const i=e.getName(),r=i.substring(0,i.length-n.length);t.some((e=>e.startsWith(r)))&&s.delete(e)}}const a=[];for(let e=0,t=_i.prefixes.length;e<t;e++){const t=_i.prefixes[e];this.cssDataManager.isStandardProperty(t+n)&&a.push(t+n)}const l=this.getMissingNames(a,r);if(l||o)for(const e of i.nodes){if(o&&s.has(e)){const t=de.t("Also define the standard property '{0}' for compatibility",n);this.addEntry(e,ri.IncludeStandardPropertyWhenUsingVendorPrefix,t)}if(l){const t=de.t("Always include all vendor specific properties: Missing: {0}",l);this.addEntry(e,ri.AllVendorPrefixes,t)}}}}return!0}getContextualVendorSpecificPseudoElements(e){function t(e,n){for(const i of n.getChildren()){if(i.type===O.PseudoSelector){const t=i.getChildren()[0]?.getText();t&&e.add(t)}t(e,i)}}const n=new Set;return function e(n,i){if(i.type===O.Ruleset)for(const e of i.getSelectors().getChildren())t(n,e);return i.parent?e(n,i.parent):void 0}(n,e),Array.from(n)}visitPrio(e){return this.addEntry(e,ri.AvoidImportant),!0}visitNumericValue(e){const t=e.findParent(O.Function);if(t&&"calc"===t.getName())return!0;const n=e.findParent(O.Declaration);if(n){if(n.getValue()){const t=e.getValue();if(!t.unit||-1===Cn.length.indexOf(t.unit.toLowerCase()))return!0;0===parseFloat(t.value)&&t.unit&&!this.validProperties[n.getFullPropertyName()]&&this.addEntry(e,ri.ZeroWithUnit)}}return!0}visitFontFace(e){const t=e.getDeclarations();if(!t)return!1;let n=!1,i=!1,r=!1;for(const e of t.getChildren())if(this.isCSSDeclaration(e)){const t=e.getProperty().getName().toLowerCase();"src"===t&&(n=!0),"font-family"===t&&(i=!0)}else r=!0;return r||n&&i||this.addEntry(e,ri.RequiredPropertiesForFontFace),!0}isCSSDeclaration(e){if(e instanceof q){if(!e.getValue())return!1;const t=e.getProperty();if(!t)return!1;const n=t.getIdentifier();return!(!n||n.containsInterpolation())}return!1}visitHexColorValue(e){const t=e.length;return 9!==t&&7!==t&&5!==t&&4!==t&&this.addEntry(e,ri.HexColorLength),!1}visitFunction(e){const t=e.getName().toLowerCase();let n=-1,i=0;switch(t){case"rgb(":case"hsl(":n=3;break;case"rgba(":case"hsla(":n=4}return-1!==n&&(e.getArguments().accept((e=>!(e instanceof Y)||(i+=1,!1))),i!==n&&this.addEntry(e,ri.ArgsInColorFunction)),!0}}_i.prefixes=["-ms-","-moz-","-o-","-webkit-"];"/".charCodeAt(0),"\n".charCodeAt(0),"\r".charCodeAt(0),"\f".charCodeAt(0),"$".charCodeAt(0),"#".charCodeAt(0),"{".charCodeAt(0),"=".charCodeAt(0),"!".charCodeAt(0),"<".charCodeAt(0),">".charCodeAt(0),".".charCodeAt(0),"@".charCodeAt(0);let bi=p.CustomToken;bi++,bi++,bi++,bi++,bi++,bi++,bi++,bi++,bi++;class yi{constructor(e,t){this.id=e,this.message=t}}new yi("scss-fromexpected",de.t("'from' expected")),new yi("scss-throughexpected",de.t("'through' or 'to' expected")),new yi("scss-fromexpected",de.t("'in' expected"));const vi=de.t("Sass documentation");class xi extends Gn{constructor(e,t){super("$",e,t),wi(xi.scssModuleLoaders),wi(xi.scssModuleBuiltIns)}isImportPathParent(e){return e===O.Forward||e===O.Use||super.isImportPathParent(e)}getCompletionForImportPath(e,t){const n=e.getParent().type;if(n===O.Forward||n===O.Use)for(let n of xi.scssModuleBuiltIns){const i={label:n.label,documentation:n.documentation,textEdit:Fe.replace(this.getCompletionRange(e),`'${n.label}'`),kind:Ge.Module};t.items.push(i)}return super.getCompletionForImportPath(e,t)}createReplaceFunction(){let e=1;return(t,n)=>"\\"+n+": ${"+e+++":"+(xi.variableDefaults[n]||"")+"}"}createFunctionProposals(e,t,n,i){for(const r of e){const e=r.func.replace(/\[?(\$\w+)\]?/g,this.createReplaceFunction()),o={label:r.func.substr(0,r.func.indexOf("(")),detail:r.func,documentation:r.desc,textEdit:Fe.replace(this.getCompletionRange(t),e),insertTextFormat:Qe.Snippet,kind:Ge.Function};n&&(o.sortText="z"),i.items.push(o)}return i}getCompletionsForSelector(e,t,n){return this.createFunctionProposals(xi.selectorFuncs,null,!0,n),super.getCompletionsForSelector(e,t,n)}getTermProposals(e,t,n){let i=xi.builtInFuncs;return e&&(i=i.filter((t=>!t.type||!e.restrictions||-1!==e.restrictions.indexOf(t.type)))),this.createFunctionProposals(i,t,!0,n),super.getTermProposals(e,t,n)}getColorProposals(e,t,n){return this.createFunctionProposals(xi.colorProposals,t,!1,n),super.getColorProposals(e,t,n)}getCompletionsForDeclarationProperty(e,t){return this.getCompletionForAtDirectives(t),this.getCompletionsForSelector(null,!0,t),super.getCompletionsForDeclarationProperty(e,t)}getCompletionsForExtendsReference(e,t,n){const i=this.getSymbolContext().findSymbolsAtOffset(this.offset,I.Rule);for(const e of i){const i={label:e.name,textEdit:Fe.replace(this.getCompletionRange(t),e.name),kind:Ge.Function};n.items.push(i)}return n}getCompletionForAtDirectives(e){return e.items.push(...xi.scssAtDirectives),e}getCompletionForTopLevel(e){return this.getCompletionForAtDirectives(e),this.getCompletionForModuleLoaders(e),super.getCompletionForTopLevel(e),e}getCompletionForModuleLoaders(e){return e.items.push(...xi.scssModuleLoaders),e}}function wi(e){e.forEach((e=>{if(e.documentation&&e.references&&e.references.length>0){const 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((e=>`[${e.name}](${e.url})`)).join(" | "),e.documentation=t}}))}xi.variableDefaults={$red:"1",$green:"2",$blue:"3",$alpha:"1.0",$color:"#000000",$weight:"0.5",$hue:"0",$saturation:"0%",$lightness:"0%",$degrees:"0",$amount:"0",$string:'""',$substring:'"s"',$number:"0",$limit:"1"},xi.colorProposals=[{func:"red($color)",desc:de.t("Gets the red component of a color.")},{func:"green($color)",desc:de.t("Gets the green component of a color.")},{func:"blue($color)",desc:de.t("Gets the blue component of a color.")},{func:"mix($color, $color, [$weight])",desc:de.t("Mixes two colors together.")},{func:"hue($color)",desc:de.t("Gets the hue component of a color.")},{func:"saturation($color)",desc:de.t("Gets the saturation component of a color.")},{func:"lightness($color)",desc:de.t("Gets the lightness component of a color.")},{func:"adjust-hue($color, $degrees)",desc:de.t("Changes the hue of a color.")},{func:"lighten($color, $amount)",desc:de.t("Makes a color lighter.")},{func:"darken($color, $amount)",desc:de.t("Makes a color darker.")},{func:"saturate($color, $amount)",desc:de.t("Makes a color more saturated.")},{func:"desaturate($color, $amount)",desc:de.t("Makes a color less saturated.")},{func:"grayscale($color)",desc:de.t("Converts a color to grayscale.")},{func:"complement($color)",desc:de.t("Returns the complement of a color.")},{func:"invert($color)",desc:de.t("Returns the inverse of a color.")},{func:"alpha($color)",desc:de.t("Gets the opacity component of a color.")},{func:"opacity($color)",desc:"Gets the alpha component (opacity) of a color."},{func:"rgba($color, $alpha)",desc:de.t("Changes the alpha component for a color.")},{func:"opacify($color, $amount)",desc:de.t("Makes a color more opaque.")},{func:"fade-in($color, $amount)",desc:de.t("Makes a color more opaque.")},{func:"transparentize($color, $amount)",desc:de.t("Makes a color more transparent.")},{func:"fade-out($color, $amount)",desc:de.t("Makes a color more transparent.")},{func:"adjust-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])",desc:de.t("Increases or decreases one or more components of a color.")},{func:"scale-color($color, [$red], [$green], [$blue], [$saturation], [$lightness], [$alpha])",desc:de.t("Fluidly scales one or more properties of a color.")},{func:"change-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])",desc:de.t("Changes one or more properties of a color.")},{func:"ie-hex-str($color)",desc:de.t("Converts a color into the format understood by IE filters.")}],xi.selectorFuncs=[{func:"selector-nest($selectors…)",desc:de.t("Nests selector beneath one another like they would be nested in the stylesheet.")},{func:"selector-append($selectors…)",desc:de.t("Appends selectors to one another without spaces in between.")},{func:"selector-extend($selector, $extendee, $extender)",desc:de.t("Extends $extendee with $extender within $selector.")},{func:"selector-replace($selector, $original, $replacement)",desc:de.t("Replaces $original with $replacement within $selector.")},{func:"selector-unify($selector1, $selector2)",desc:de.t("Unifies two selectors to produce a selector that matches elements matched by both.")},{func:"is-superselector($super, $sub)",desc:de.t("Returns whether $super matches all the elements $sub does, and possibly more.")},{func:"simple-selectors($selector)",desc:de.t("Returns the simple selectors that comprise a compound selector.")},{func:"selector-parse($selector)",desc:de.t("Parses a selector into the format returned by &.")}],xi.builtInFuncs=[{func:"unquote($string)",desc:de.t("Removes quotes from a string.")},{func:"quote($string)",desc:de.t("Adds quotes to a string.")},{func:"str-length($string)",desc:de.t("Returns the number of characters in a string.")},{func:"str-insert($string, $insert, $index)",desc:de.t("Inserts $insert into $string at $index.")},{func:"str-index($string, $substring)",desc:de.t("Returns the index of the first occurance of $substring in $string.")},{func:"str-slice($string, $start-at, [$end-at])",desc:de.t("Extracts a substring from $string.")},{func:"to-upper-case($string)",desc:de.t("Converts a string to upper case.")},{func:"to-lower-case($string)",desc:de.t("Converts a string to lower case.")},{func:"percentage($number)",desc:de.t("Converts a unitless number to a percentage."),type:"percentage"},{func:"round($number)",desc:de.t("Rounds a number to the nearest whole number.")},{func:"ceil($number)",desc:de.t("Rounds a number up to the next whole number.")},{func:"floor($number)",desc:de.t("Rounds a number down to the previous whole number.")},{func:"abs($number)",desc:de.t("Returns the absolute value of a number.")},{func:"min($numbers)",desc:de.t("Finds the minimum of several numbers.")},{func:"max($numbers)",desc:de.t("Finds the maximum of several numbers.")},{func:"random([$limit])",desc:de.t("Returns a random number.")},{func:"length($list)",desc:de.t("Returns the length of a list.")},{func:"nth($list, $n)",desc:de.t("Returns a specific item in a list.")},{func:"set-nth($list, $n, $value)",desc:de.t("Replaces the nth item in a list.")},{func:"join($list1, $list2, [$separator])",desc:de.t("Joins together two lists into one.")},{func:"append($list1, $val, [$separator])",desc:de.t("Appends a single value onto the end of a list.")},{func:"zip($lists)",desc:de.t("Combines several lists into a single multidimensional list.")},{func:"index($list, $value)",desc:de.t("Returns the position of a value within a list.")},{func:"list-separator(#list)",desc:de.t("Returns the separator of a list.")},{func:"map-get($map, $key)",desc:de.t("Returns the value in a map associated with a given key.")},{func:"map-merge($map1, $map2)",desc:de.t("Merges two maps together into a new map.")},{func:"map-remove($map, $keys)",desc:de.t("Returns a new map with keys removed.")},{func:"map-keys($map)",desc:de.t("Returns a list of all keys in a map.")},{func:"map-values($map)",desc:de.t("Returns a list of all values in a map.")},{func:"map-has-key($map, $key)",desc:de.t("Returns whether a map has a value associated with a given key.")},{func:"keywords($args)",desc:de.t("Returns the keywords passed to a function that takes variable arguments.")},{func:"feature-exists($feature)",desc:de.t("Returns whether a feature exists in the current Sass runtime.")},{func:"variable-exists($name)",desc:de.t("Returns whether a variable with the given name exists in the current scope.")},{func:"global-variable-exists($name)",desc:de.t("Returns whether a variable with the given name exists in the global scope.")},{func:"function-exists($name)",desc:de.t("Returns whether a function with the given name exists.")},{func:"mixin-exists($name)",desc:de.t("Returns whether a mixin with the given name exists.")},{func:"inspect($value)",desc:de.t("Returns the string representation of a value as it would be represented in Sass.")},{func:"type-of($value)",desc:de.t("Returns the type of a value.")},{func:"unit($number)",desc:de.t("Returns the unit(s) associated with a number.")},{func:"unitless($number)",desc:de.t("Returns whether a number has units.")},{func:"comparable($number1, $number2)",desc:de.t("Returns whether two numbers can be added, subtracted, or compared.")},{func:"call($name, $args…)",desc:de.t("Dynamically calls a Sass function.")}],xi.scssAtDirectives=[{label:"@extend",documentation:de.t("Inherits the styles of another selector."),kind:Ge.Keyword},{label:"@at-root",documentation:de.t("Causes one or more rules to be emitted at the root of the document."),kind:Ge.Keyword},{label:"@debug",documentation:de.t("Prints the value of an expression to the standard error output stream. Useful for debugging complicated Sass files."),kind:Ge.Keyword},{label:"@warn",documentation:de.t("Prints the value of an expression to the standard error output stream. Useful for libraries that need to warn users of deprecations or recovering from minor mixin usage mistakes. Warnings can be turned off with the `--quiet` command-line option or the `:quiet` Sass option."),kind:Ge.Keyword},{label:"@error",documentation:de.t("Throws the value of an expression as a fatal error with stack trace. Useful for validating arguments to mixins and functions."),kind:Ge.Keyword},{label:"@if",documentation:de.t("Includes the body if the expression does not evaluate to `false` or `null`."),insertText:"@if ${1:expr} {\n\t$0\n}",insertTextFormat:Qe.Snippet,kind:Ge.Keyword},{label:"@for",documentation:de.t("For loop that repeatedly outputs a set of styles for each `$var` in the `from/through` or `from/to` clause."),insertText:"@for \\$${1:var} from ${2:start} ${3|to,through|} ${4:end} {\n\t$0\n}",insertTextFormat:Qe.Snippet,kind:Ge.Keyword},{label:"@each",documentation:de.t("Each loop that sets `$var` to each item in the list or map, then outputs the styles it contains using that value of `$var`."),insertText:"@each \\$${1:var} in ${2:list} {\n\t$0\n}",insertTextFormat:Qe.Snippet,kind:Ge.Keyword},{label:"@while",documentation:de.t("While loop that takes an expression and repeatedly outputs the nested styles until the statement evaluates to `false`."),insertText:"@while ${1:condition} {\n\t$0\n}",insertTextFormat:Qe.Snippet,kind:Ge.Keyword},{label:"@mixin",documentation:de.t("Defines styles that can be re-used throughout the stylesheet with `@include`."),insertText:"@mixin ${1:name} {\n\t$0\n}",insertTextFormat:Qe.Snippet,kind:Ge.Keyword},{label:"@include",documentation:de.t("Includes the styles defined by another mixin into the current rule."),kind:Ge.Keyword},{label:"@function",documentation:de.t("Defines complex operations that can be re-used throughout stylesheets."),kind:Ge.Keyword}],xi.scssModuleLoaders=[{label:"@use",documentation:de.t("Loads mixins, functions, and variables from other Sass stylesheets as 'modules', and combines CSS from multiple stylesheets together."),references:[{name:vi,url:"https://sass-lang.com/documentation/at-rules/use"}],insertText:"@use $0;",insertTextFormat:Qe.Snippet,kind:Ge.Keyword},{label:"@forward",documentation:de.t("Loads a Sass stylesheet and makes its mixins, functions, and variables available when this stylesheet is loaded with the @use rule."),references:[{name:vi,url:"https://sass-lang.com/documentation/at-rules/forward"}],insertText:"@forward $0;",insertTextFormat:Qe.Snippet,kind:Ge.Keyword}],xi.scssModuleBuiltIns=[{label:"sass:math",documentation:de.t("Provides functions that operate on numbers."),references:[{name:vi,url:"https://sass-lang.com/documentation/modules/math"}]},{label:"sass:string",documentation:de.t("Makes it easy to combine, search, or split apart strings."),references:[{name:vi,url:"https://sass-lang.com/documentation/modules/string"}]},{label:"sass:color",documentation:de.t("Generates new colors based on existing ones, making it easy to build color themes."),references:[{name:vi,url:"https://sass-lang.com/documentation/modules/color"}]},{label:"sass:list",documentation:de.t("Lets you access and modify values in lists."),references:[{name:vi,url:"https://sass-lang.com/documentation/modules/list"}]},{label:"sass:map",documentation:de.t("Makes it possible to look up the value associated with a key in a map, and much more."),references:[{name:vi,url:"https://sass-lang.com/documentation/modules/map"}]},{label:"sass:selector",documentation:de.t("Provides access to Sass’s powerful selector engine."),references:[{name:vi,url:"https://sass-lang.com/documentation/modules/selector"}]},{label:"sass:meta",documentation:de.t("Exposes the details of Sass’s inner workings."),references:[{name:vi,url:"https://sass-lang.com/documentation/modules/meta"}]}];"/".charCodeAt(0),"\n".charCodeAt(0),"\r".charCodeAt(0),"\f".charCodeAt(0),"`".charCodeAt(0),".".charCodeAt(0);let Ci=p.CustomToken;Ci++;class ki extends Gn{constructor(e,t){super("@",e,t)}createFunctionProposals(e,t,n,i){for(const r of e){const e={label:r.name,detail:r.example,documentation:r.description,textEdit:Fe.replace(this.getCompletionRange(t),r.name+"($0)"),insertTextFormat:Qe.Snippet,kind:Ge.Function};n&&(e.sortText="z"),i.items.push(e)}return i}getTermProposals(e,t,n){let i=ki.builtInProposals;return e&&(i=i.filter((t=>!t.type||!e.restrictions||-1!==e.restrictions.indexOf(t.type)))),this.createFunctionProposals(i,t,!0,n),super.getTermProposals(e,t,n)}getColorProposals(e,t,n){return this.createFunctionProposals(ki.colorProposals,t,!1,n),super.getColorProposals(e,t,n)}getCompletionsForDeclarationProperty(e,t){return this.getCompletionsForSelector(null,!0,t),super.getCompletionsForDeclarationProperty(e,t)}}ki.builtInProposals=[{name:"if",example:"if(condition, trueValue [, falseValue]);",description:de.t("returns one of two values depending on a condition.")},{name:"boolean",example:"boolean(condition);",description:de.t('"store" a boolean test for later evaluation in a guard or if().')},{name:"length",example:"length(@list);",description:de.t("returns the number of elements in a value list")},{name:"extract",example:"extract(@list, index);",description:de.t("returns a value at the specified position in the list")},{name:"range",example:"range([start, ] end [, step]);",description:de.t("generate a list spanning a range of values")},{name:"each",example:"each(@list, ruleset);",description:de.t("bind the evaluation of a ruleset to each member of a list.")},{name:"escape",example:"escape(@string);",description:de.t("URL encodes a string")},{name:"e",example:"e(@string);",description:de.t("escape string content")},{name:"replace",example:"replace(@string, @pattern, @replacement[, @flags]);",description:de.t("string replace")},{name:"unit",example:"unit(@dimension, [@unit: '']);",description:de.t("remove or change the unit of a dimension")},{name:"color",example:"color(@string);",description:de.t("parses a string to a color"),type:"color"},{name:"convert",example:"convert(@value, unit);",description:de.t("converts numbers from one type into another")},{name:"data-uri",example:"data-uri([mimetype,] url);",description:de.t("inlines a resource and falls back to `url()`"),type:"url"},{name:"abs",description:de.t("absolute value of a number"),example:"abs(number);"},{name:"acos",description:de.t("arccosine - inverse of cosine function"),example:"acos(number);"},{name:"asin",description:de.t("arcsine - inverse of sine function"),example:"asin(number);"},{name:"ceil",example:"ceil(@number);",description:de.t("rounds up to an integer")},{name:"cos",description:de.t("cosine function"),example:"cos(number);"},{name:"floor",description:de.t("rounds down to an integer"),example:"floor(@number);"},{name:"percentage",description:de.t("converts to a %, e.g. 0.5 > 50%"),example:"percentage(@number);",type:"percentage"},{name:"round",description:de.t("rounds a number to a number of places"),example:"round(number, [places: 0]);"},{name:"sqrt",description:de.t("calculates square root of a number"),example:"sqrt(number);"},{name:"sin",description:de.t("sine function"),example:"sin(number);"},{name:"tan",description:de.t("tangent function"),example:"tan(number);"},{name:"atan",description:de.t("arctangent - inverse of tangent function"),example:"atan(number);"},{name:"pi",description:de.t("returns pi"),example:"pi();"},{name:"pow",description:de.t("first argument raised to the power of the second argument"),example:"pow(@base, @exponent);"},{name:"mod",description:de.t("first argument modulus second argument"),example:"mod(number, number);"},{name:"min",description:de.t("returns the lowest of one or more values"),example:"min(@x, @y);"},{name:"max",description:de.t("returns the lowest of one or more values"),example:"max(@x, @y);"}],ki.colorProposals=[{name:"argb",example:"argb(@color);",description:de.t("creates a #AARRGGBB")},{name:"hsl",example:"hsl(@hue, @saturation, @lightness);",description:de.t("creates a color")},{name:"hsla",example:"hsla(@hue, @saturation, @lightness, @alpha);",description:de.t("creates a color")},{name:"hsv",example:"hsv(@hue, @saturation, @value);",description:de.t("creates a color")},{name:"hsva",example:"hsva(@hue, @saturation, @value, @alpha);",description:de.t("creates a color")},{name:"hue",example:"hue(@color);",description:de.t("returns the `hue` channel of `@color` in the HSL space")},{name:"saturation",example:"saturation(@color);",description:de.t("returns the `saturation` channel of `@color` in the HSL space")},{name:"lightness",example:"lightness(@color);",description:de.t("returns the `lightness` channel of `@color` in the HSL space")},{name:"hsvhue",example:"hsvhue(@color);",description:de.t("returns the `hue` channel of `@color` in the HSV space")},{name:"hsvsaturation",example:"hsvsaturation(@color);",description:de.t("returns the `saturation` channel of `@color` in the HSV space")},{name:"hsvvalue",example:"hsvvalue(@color);",description:de.t("returns the `value` channel of `@color` in the HSV space")},{name:"red",example:"red(@color);",description:de.t("returns the `red` channel of `@color`")},{name:"green",example:"green(@color);",description:de.t("returns the `green` channel of `@color`")},{name:"blue",example:"blue(@color);",description:de.t("returns the `blue` channel of `@color`")},{name:"alpha",example:"alpha(@color);",description:de.t("returns the `alpha` channel of `@color`")},{name:"luma",example:"luma(@color);",description:de.t("returns the `luma` value (perceptual brightness) of `@color`")},{name:"saturate",example:"saturate(@color, 10%);",description:de.t("return `@color` 10% points more saturated")},{name:"desaturate",example:"desaturate(@color, 10%);",description:de.t("return `@color` 10% points less saturated")},{name:"lighten",example:"lighten(@color, 10%);",description:de.t("return `@color` 10% points lighter")},{name:"darken",example:"darken(@color, 10%);",description:de.t("return `@color` 10% points darker")},{name:"fadein",example:"fadein(@color, 10%);",description:de.t("return `@color` 10% points less transparent")},{name:"fadeout",example:"fadeout(@color, 10%);",description:de.t("return `@color` 10% points more transparent")},{name:"fade",example:"fade(@color, 50%);",description:de.t("return `@color` with 50% transparency")},{name:"spin",example:"spin(@color, 10);",description:de.t("return `@color` with a 10 degree larger in hue")},{name:"mix",example:"mix(@color1, @color2, [@weight: 50%]);",description:de.t("return a mix of `@color1` and `@color2`")},{name:"greyscale",example:"greyscale(@color);",description:de.t("returns a grey, 100% desaturated color")},{name:"contrast",example:"contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);",description:de.t("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);"}],function(){var e=[,,function(e){function t(e){this.__parent=e,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}function n(e,t){this.__cache=[""],this.__indent_size=e.indent_size,this.__indent_string=e.indent_char,e.indent_with_tabs||(this.__indent_string=new Array(e.indent_size+1).join(e.indent_char)),t=t||"",e.indent_level>0&&(t=new Array(e.indent_level+1).join(this.__indent_string)),this.__base_string=t,this.__base_string_length=t.length}function i(e,i){this.__indent_cache=new n(e,i),this.raw=!1,this._end_with_newline=e.end_with_newline,this.indent_size=e.indent_size,this.wrap_line_length=e.wrap_line_length,this.indent_empty_lines=e.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new t(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}t.prototype.clone_empty=function(){var e=new t(this.__parent);return e.set_indent(this.__indent_count,this.__alignment_count),e},t.prototype.item=function(e){return e<0?this.__items[this.__items.length+e]:this.__items[e]},t.prototype.has_match=function(e){for(var t=this.__items.length-1;t>=0;t--)if(this.__items[t].match(e))return!0;return!1},t.prototype.set_indent=function(e,t){this.is_empty()&&(this.__indent_count=e||0,this.__alignment_count=t||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},t.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},t.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},t.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var e=this.__parent.current_line;return e.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),e.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),e.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count," "===e.__items[0]&&(e.__items.splice(0,1),e.__character_count-=1),!0}return!1},t.prototype.is_empty=function(){return 0===this.__items.length},t.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},t.prototype.push=function(e){this.__items.push(e);var t=e.lastIndexOf("\n");-1!==t?this.__character_count=e.length-t:this.__character_count+=e.length},t.prototype.pop=function(){var e=null;return this.is_empty()||(e=this.__items.pop(),this.__character_count-=e.length),e},t.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},t.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},t.prototype.trim=function(){for(;" "===this.last();)this.__items.pop(),this.__character_count-=1},t.prototype.toString=function(){var e="";return this.is_empty()?this.__parent.indent_empty_lines&&(e=this.__parent.get_indent_string(this.__indent_count)):(e=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),e+=this.__items.join("")),e},n.prototype.get_indent_size=function(e,t){var n=this.__base_string_length;return t=t||0,e<0&&(n=0),n+=e*this.__indent_size,n+=t},n.prototype.get_indent_string=function(e,t){var n=this.__base_string;return t=t||0,e<0&&(e=0,n=""),t+=e*this.__indent_size,this.__ensure_cache(t),n+=this.__cache[t]},n.prototype.__ensure_cache=function(e){for(;e>=this.__cache.length;)this.__add_column()},n.prototype.__add_column=function(){var e=this.__cache.length,t=0,n="";this.__indent_size&&e>=this.__indent_size&&(e-=(t=Math.floor(e/this.__indent_size))*this.__indent_size,n=new Array(t+1).join(this.__indent_string)),e&&(n+=new Array(e+1).join(" ")),this.__cache.push(n)},i.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},i.prototype.get_line_number=function(){return this.__lines.length},i.prototype.get_indent_string=function(e,t){return this.__indent_cache.get_indent_string(e,t)},i.prototype.get_indent_size=function(e,t){return this.__indent_cache.get_indent_size(e,t)},i.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},i.prototype.add_new_line=function(e){return!(this.is_empty()||!e&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},i.prototype.get_code=function(e){this.trim(!0);var t=this.current_line.pop();t&&("\n"===t[t.length-1]&&(t=t.replace(/\n+$/g,"")),this.current_line.push(t)),this._end_with_newline&&this.__add_outputline();var n=this.__lines.join("\n");return"\n"!==e&&(n=n.replace(/[\n]/g,e)),n},i.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},i.prototype.set_indent=function(e,t){return e=e||0,t=t||0,this.next_line.set_indent(e,t),this.__lines.length>1?(this.current_line.set_indent(e,t),!0):(this.current_line.set_indent(),!1)},i.prototype.add_raw_token=function(e){for(var t=0;t<e.newlines;t++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(e.whitespace_before),this.current_line.push(e.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},i.prototype.add_token=function(e){this.__add_space_before_token(),this.current_line.push(e),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},i.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},i.prototype.remove_indent=function(e){for(var t=this.__lines.length;e<t;)this.__lines[e]._remove_indent(),e++;this.current_line._remove_wrap_indent()},i.prototype.trim=function(e){for(e=void 0!==e&&e,this.current_line.trim();e&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},i.prototype.just_added_newline=function(){return this.current_line.is_empty()},i.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},i.prototype.ensure_empty_line_above=function(e,n){for(var i=this.__lines.length-2;i>=0;){var r=this.__lines[i];if(r.is_empty())break;if(0!==r.item(0).indexOf(e)&&r.item(-1)!==n){this.__lines.splice(i+1,0,new t(this)),this.previous_line=this.__lines[this.__lines.length-2];break}i--}},e.exports.Output=i},,,,function(e){function t(e,t){this.raw_options=n(e,t),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs","\t"===this.indent_char),this.indent_with_tabs&&(this.indent_char="\t",1===this.indent_size&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}function n(e,t){var n,r={};for(n in e=i(e))n!==t&&(r[n]=e[n]);if(t&&e[t])for(n in e[t])r[n]=e[t][n];return r}function i(e){var t,n={};for(t in e){n[t.replace(/-/g,"_")]=e[t]}return n}t.prototype._get_array=function(e,t){var n=this.raw_options[e],i=t||[];return"object"==typeof n?null!==n&&"function"==typeof n.concat&&(i=n.concat()):"string"==typeof n&&(i=n.split(/[^a-zA-Z0-9_\/\-]+/)),i},t.prototype._get_boolean=function(e,t){var n=this.raw_options[e];return void 0===n?!!t:!!n},t.prototype._get_characters=function(e,t){var n=this.raw_options[e],i=t||"";return"string"==typeof n&&(i=n.replace(/\\r/,"\r").replace(/\\n/,"\n").replace(/\\t/,"\t")),i},t.prototype._get_number=function(e,t){var n=this.raw_options[e];t=parseInt(t,10),isNaN(t)&&(t=0);var i=parseInt(n,10);return isNaN(i)&&(i=t),i},t.prototype._get_selection=function(e,t,n){var i=this._get_selection_list(e,t,n);if(1!==i.length)throw new Error("Invalid Option Value: The option '"+e+"' can only be one of the following values:\n"+t+"\nYou passed in: '"+this.raw_options[e]+"'");return i[0]},t.prototype._get_selection_list=function(e,t,n){if(!t||0===t.length)throw new Error("Selection list cannot be empty.");if(n=n||[t[0]],!this._is_valid_selection(n,t))throw new Error("Invalid Default Value!");var i=this._get_array(e,n);if(!this._is_valid_selection(i,t))throw new Error("Invalid Option Value: The option '"+e+"' can contain only the following values:\n"+t+"\nYou passed in: '"+this.raw_options[e]+"'");return i},t.prototype._is_valid_selection=function(e,t){return e.length&&t.length&&!e.some((function(e){return-1===t.indexOf(e)}))},e.exports.Options=t,e.exports.normalizeOpts=i,e.exports.mergeOpts=n},,function(e){var t=RegExp.prototype.hasOwnProperty("sticky");function n(e){this.__input=e||"",this.__input_length=this.__input.length,this.__position=0}n.prototype.restart=function(){this.__position=0},n.prototype.back=function(){this.__position>0&&(this.__position-=1)},n.prototype.hasNext=function(){return this.__position<this.__input_length},n.prototype.next=function(){var e=null;return this.hasNext()&&(e=this.__input.charAt(this.__position),this.__position+=1),e},n.prototype.peek=function(e){var t=null;return e=e||0,(e+=this.__position)>=0&&e<this.__input_length&&(t=this.__input.charAt(e)),t},n.prototype.__match=function(e,n){e.lastIndex=n;var i=e.exec(this.__input);return!i||t&&e.sticky||i.index!==n&&(i=null),i},n.prototype.test=function(e,t){return t=t||0,(t+=this.__position)>=0&&t<this.__input_length&&!!this.__match(e,t)},n.prototype.testChar=function(e,t){var n=this.peek(t);return e.lastIndex=0,null!==n&&e.test(n)},n.prototype.match=function(e){var t=this.__match(e,this.__position);return t?this.__position+=t[0].length:t=null,t},n.prototype.read=function(e,t,n){var i,r="";return e&&(i=this.match(e))&&(r+=i[0]),!t||!i&&e||(r+=this.readUntil(t,n)),r},n.prototype.readUntil=function(e,t){var n,i=this.__position;e.lastIndex=this.__position;var r=e.exec(this.__input);return r?(i=r.index,t&&(i+=r[0].length)):i=this.__input_length,n=this.__input.substring(this.__position,i),this.__position=i,n},n.prototype.readUntilAfter=function(e){return this.readUntil(e,!0)},n.prototype.get_regexp=function(e,n){var i=null,r="g";return n&&t&&(r="y"),"string"==typeof e&&""!==e?i=new RegExp(e,r):e&&(i=new RegExp(e.source,r)),i},n.prototype.get_literal_regexp=function(e){return RegExp(e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},n.prototype.peekUntilAfter=function(e){var t=this.__position,n=this.readUntilAfter(e);return this.__position=t,n},n.prototype.lookBack=function(e){var t=this.__position-1;return t>=e.length&&this.__input.substring(t-e.length,t).toLowerCase()===e},e.exports.InputScanner=n},,,,,function(e){function t(e,t){e="string"==typeof e?e:e.source,t="string"==typeof t?t:t.source,this.__directives_block_pattern=new RegExp(e+/ beautify( \w+[:]\w+)+ /.source+t,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(e+/\sbeautify\signore:end\s/.source+t,"g")}t.prototype.get_directives=function(e){if(!e.match(this.__directives_block_pattern))return null;var t={};this.__directive_pattern.lastIndex=0;for(var n=this.__directive_pattern.exec(e);n;)t[n[1]]=n[2],n=this.__directive_pattern.exec(e);return t},t.prototype.readIgnored=function(e){return e.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=t},,function(e,t,n){var i=n(16).Beautifier,r=n(17).Options;e.exports=function(e,t){return new i(e,t).beautify()},e.exports.defaultOptions=function(){return new r}},function(e,t,n){var i=n(17).Options,r=n(2).Output,o=n(8).InputScanner,s=new(0,n(13).Directives)(/\/\*/,/\*\//),a=/\r\n|[\r\n]/,l=/\r\n|[\r\n]/g,c=/\s/,u=/(?:\s|\n)+/g,h=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,d=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function p(e,t){this._source_text=e||"",this._options=new i(t),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}p.prototype.eatString=function(e){var t="";for(this._ch=this._input.next();this._ch;){if(t+=this._ch,"\\"===this._ch)t+=this._input.next();else if(-1!==e.indexOf(this._ch)||"\n"===this._ch)break;this._ch=this._input.next()}return t},p.prototype.eatWhitespace=function(e){for(var t=c.test(this._input.peek()),n=0;c.test(this._input.peek());)this._ch=this._input.next(),e&&"\n"===this._ch&&(0===n||n<this._options.max_preserve_newlines)&&(n++,this._output.add_new_line(!0));return t},p.prototype.foundNestedPseudoClass=function(){for(var e=0,t=1,n=this._input.peek(t);n;){if("{"===n)return!0;if("("===n)e+=1;else if(")"===n){if(0===e)return!1;e-=1}else if(";"===n||"}"===n)return!1;t++,n=this._input.peek(t)}return!1},p.prototype.print_string=function(e){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(e)},p.prototype.preserveSingleSpace=function(e){e&&(this._output.space_before_token=!0)},p.prototype.indent=function(){this._indentLevel++},p.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},p.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e=this._source_text,t=this._options.eol;"auto"===t&&(t="\n",e&&a.test(e||"")&&(t=e.match(a)[0]));var n=(e=e.replace(l,"\n")).match(/^[\t ]*/)[0];this._output=new r(this._options,n),this._input=new o(e),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var i,p,f=0,m=!1,g=!1,_=!1,b=!1,y=!1,v=this._ch,x=!1;i=""!==this._input.read(u),p=v,this._ch=this._input.next(),"\\"===this._ch&&this._input.hasNext()&&(this._ch+=this._input.next()),v=this._ch,this._ch;)if("/"===this._ch&&"*"===this._input.peek()){this._output.add_new_line(),this._input.back();var w=this._input.read(h),C=s.get_directives(w);C&&"start"===C.ignore&&(w+=s.readIgnored(this._input)),this.print_string(w),this.eatWhitespace(!0),this._output.add_new_line()}else if("/"===this._ch&&"/"===this._input.peek())this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(d)),this.eatWhitespace(!0);else if("$"===this._ch){this.preserveSingleSpace(i),this.print_string(this._ch);var k=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);k.match(/[ :]$/)&&(k=this.eatString(": ").replace(/\s+$/,""),this.print_string(k),this._output.space_before_token=!0),0===f&&-1!==k.indexOf(":")&&(g=!0,this.indent())}else if("@"===this._ch)if(this.preserveSingleSpace(i),"{"===this._input.peek())this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var $=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);$.match(/[ :]$/)&&($=this.eatString(": ").replace(/\s+$/,""),this.print_string($),this._output.space_before_token=!0),0===f&&-1!==$.indexOf(":")?(g=!0,this.indent()):$ in this.NESTED_AT_RULE?(this._nestedLevel+=1,$ in this.CONDITIONAL_GROUP_RULE&&(_=!0)):0!==f||g||(b=!0)}else if("#"===this._ch&&"{"===this._input.peek())this.preserveSingleSpace(i),this.print_string(this._ch+this.eatString("}"));else if("{"===this._ch)g&&(g=!1,this.outdent()),b=!1,_?(_=!1,m=this._indentLevel>=this._nestedLevel):m=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&m&&this._output.previous_line&&"{"!==this._output.previous_line.item(-1)&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,"expand"===this._options.brace_style?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):("("===p?this._output.space_before_token=!1:","!==p&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if("}"===this._ch)this.outdent(),this._output.add_new_line(),"{"===p&&this._output.trim(!0),g&&(this.outdent(),g=!1),this.print_string(this._ch),m=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&"}"!==this._input.peek()&&this._output.add_new_line(!0),")"===this._input.peek()&&(this._output.trim(!0),"expand"===this._options.brace_style&&this._output.add_new_line(!0));else if(":"===this._ch){for(var A=0;A<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;A++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[A])){x=!0;break}!m&&!_||this._input.lookBack("&")||this.foundNestedPseudoClass()||this._input.lookBack("(")||b||0!==f?(this._input.lookBack(" ")&&(this._output.space_before_token=!0),":"===this._input.peek()?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":")):(this.print_string(":"),g||(g=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent()))}else if('"'===this._ch||"'"===this._ch){var S='"'===p||"'"===p;this.preserveSingleSpace(S||i),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(";"===this._ch)x=!1,0===f?(g&&(this.outdent(),g=!1),b=!1,this.print_string(this._ch),this.eatWhitespace(!0),"/"!==this._input.peek()&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if("("===this._ch)if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),f++,this.indent(),this._ch=this._input.next(),")"===this._ch||'"'===this._ch||"'"===this._ch?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),f&&(f--,this.outdent()));else{var P=!1;this._input.lookBack("with")&&(P=!0),this.preserveSingleSpace(i||P),this.print_string(this._ch),g&&"$"===p&&this._options.selector_separator_newline?(this._output.add_new_line(),y=!0):(this.eatWhitespace(),f++,this.indent())}else if(")"===this._ch)f&&(f--,this.outdent()),y&&";"===this._input.peek()&&this._options.selector_separator_newline&&(y=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(","===this._ch)this.print_string(this._ch),this.eatWhitespace(!0),!this._options.selector_separator_newline||g&&!y||0!==f||b?this._output.space_before_token=!0:this._output.add_new_line();else if(">"!==this._ch&&"+"!==this._ch&&"~"!==this._ch||g||0!==f)if("]"===this._ch)this.print_string(this._ch);else if("["===this._ch)this.preserveSingleSpace(i),this.print_string(this._ch);else if("="===this._ch)this.eatWhitespace(),this.print_string("="),c.test(this._ch)&&(this._ch="");else if("!"!==this._ch||this._input.lookBack("\\")){var E='"'===p||"'"===p;this.preserveSingleSpace(E||i),this.print_string(this._ch),!this._output.just_added_newline()&&"\n"===this._input.peek()&&x&&this._output.add_new_line()}else this._output.space_before_token=!0,this.print_string(this._ch);else this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&c.test(this._ch)&&(this._ch=""));return this._output.get_code(t)},e.exports.Beautifier=p},function(e,t,n){var i=n(6).Options;function r(e){i.call(this,e,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var t=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||t;var n=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var r=0;r<n.length;r++)"expand"!==n[r]?this.brace_style="collapse":this.brace_style=n[r]}r.prototype=new i,e.exports.Options=r}],t={};var n=function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,n),o.exports}(15);n}();"{".charCodeAt(0),"}".charCodeAt(0);function $i(e){return"/"===d.sep?decodeURIComponent(e.replace("file://","")):decodeURIComponent(e.replace("file:///",""))}var Ai=__webpack_require__(666);const Si=[class extends m{get name(){return"build"}get description(){return"Build an aventus project"}registerArgs(e){e({description:"aventus.conf.avt path",type:"string",typeIsRequired:!1})}registerOptions(e){e({name:"builds",description:"Define the build name",type:"string",typeIsRequired:!0,typeIsArray:!0}),e({name:"no-builds",description:"No builds",type:"boolean",typeIsRequired:!1}),e({name:"statics",description:"Define the static files to export",type:"string",typeIsRequired:!0,typeIsArray:!0}),e({name:"no-statics",description:"No statics",type:"boolean",typeIsRequired:!1}),e({name:"verbose",shortName:"v",description:"Debug your compilation"}),e({name:"silent",shortName:"s",description:"No output"})}async run(e,t){let n=e[0];n&&(n=(0,d.resolve)(n)),await f.x.load(),!1===t.builds&&(t.builds=[]),!1===t.statics&&(t.statics=[]),await f.x.start({onlyBuild:!0,configPath:n,builds:t.builds,statics:t.statics,debug:t.verbose,errorByBuild:!0,useStats:!t.silent}),this.handleResult(t)}handleResult(e){const t=f.x.getStatistics(),n=e.silent?e=>{}:console.log;n(),n("Loading all files : Done in "+t.loadFileTime+"ms"),n(),n("----"),n();const i=f.x.getErrors();let r=!1;const o={},s={},a=e=>{const t=0==e?0:Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,t)).toFixed(2))} ${["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"][t]}`};for(let e in t.files){const n=t.files[e];if("build"==n.type&&n.typeName){o[n.typeName]||(o[n.typeName]=[]);const e=` ${n.path} - ${a(n.size)}`;o[n.typeName].push(e)}else if("static"==n.type&&n.typeName){s[n.typeName]||(s[n.typeName]=[]);const e=` ${n.path} - ${a(n.size)}`;s[n.typeName].push(e)}}let l=Object.keys(t.builds).length,c=Object.keys(t.statics).length,u=0;for(let s in t.builds){n("Building "+s),n();let a=!1;const h=i[s],d=t.builds[s],p=o[s];if(p){for(let e of p)n(e);n()}if(h){let t=!1;for(let n in h)for(let i of h[n]){let r,o="";if(i.severity==Pe.Error)o="[31m[error][0m",a=!0,r=console.error;else if(i.severity==Pe.Warning)o="[33m[warning][0m",r=console.warn;else if(i.severity==Pe.Information)o="[34m[info][0m",r=console.info;else if(i.severity==Pe.Hint){o="[90m[hint][0m";continue}e.silent||(r(` ${o} ${$i(n).replace(/\\/g,"/")}:${i.range.start.line+1} : ${i.message}`),t=!0)}t&&n()}a?(n(" Build failed in "+d.buildTime+"ms"),r=!0):n(" Build success in "+d.buildTime+"ms"),u++,u==l&&0==c||(n(),n("----")),n()}u=0;for(let e in t.statics){n("Export static "+e),n();const i=t.statics[e],r=s[e];if(r){for(let e of r)n(e);n()}n(" Exported in "+i.buildTime+"ms"),u++,u==c||(n(),n("----")),n()}r&&process.exit(1)}},class extends m{get name(){return"dev"}get description(){return"Start an interactive cli to dev with your aventus project"}registerArgs(e){e({description:"aventus.conf.avt path",type:"string",typeIsRequired:!1})}registerOptions(e){}async run(e,t){await Ai.U.load(),await f.x.load(),console.clear(),await Ai.U.init(),await f.x.start({onlyBuild:!1});let n=[{value:"create",name:"Create..."},{value:"log",name:"Show logs"},{value:"quit",name:"Quit"}];for(Ai.U.clear();;){let e=await Ai.U.select("Which action shoud I perform?",n);"create"==e?await f.x.create():"log"==e?await Ai.U.log():"quit"==e?process.exit(0):console.log("WIP"),Ai.U.clear()}}}];t.version("0.0.11").name("aventus").description("Aventus CLI"),function(e){for(let t of Si){(new t).register(e)}}(t),t.parse(process.argv)})();var __webpack_export_target__=exports;for(var i in __webpack_exports__)__webpack_export_target__[i]=__webpack_exports__[i];__webpack_exports__.__esModule&&Object.defineProperty(__webpack_export_target__,"__esModule",{value:!0})})();
|
|
2
|
+
(()=>{var __webpack_modules__={599:(e,t,n)=>{"use strict";var i,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,c={};((e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})})(c,{config:()=>d,t:()=>p}),e.exports=(i=c,((e,t,n,i)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let c of s(t))a.call(e,c)||c===n||r(e,c,{get:()=>t[c],enumerable:!(i=o(t,c))||i.enumerable});return e})(r({},"__esModule",{value:!0}),i));var l,u=n(896),h=n(943);function d(e){if("contents"in e)l="string"==typeof e.contents?JSON.parse(e.contents):e.contents;else if("fsPath"in e){const n=(t=e.fsPath,(0,u.readFileSync)(t,"utf8")),i=JSON.parse(n);l=g(i)?i.contents.bundle:i}else{var t;if(e.uri){let t=e.uri;return"string"==typeof e.uri&&(t=new URL(e.uri)),new Promise(((e,n)=>{(async function(e){if("file:"===e.protocol)return await(0,h.readFile)(e,"utf8");if("http:"===e.protocol||"https:"===e.protocol){const t=await fetch(e.toString(),{headers:{"Accept-Encoding":"gzip, deflate",Accept:"application/json"},redirect:"follow"});if(!t.ok){let n=`Unexpected ${t.status} response while trying to read ${e}`;try{n+=`: ${await t.text()}`}catch{}throw new Error(n)}return await t.text()}throw new Error("Unsupported protocol")})(t).then((t=>{try{const n=JSON.parse(t);l=g(n)?n.contents.bundle:n,e()}catch(e){n(e)}})).catch((e=>{n(e)}))}))}}}function p(...e){const t=e[0];let n,i,r;if("string"==typeof t)n=t,i=t,e.splice(0,1),r=e&&"object"==typeof e[0]?e[0]:e;else{if(t instanceof Array){const n=e.slice(1);if(t.length!==n.length+1)throw new Error("expected a string as the first argument to l10n.t");let i=t[0];for(let e=1;e<t.length;e++)i+=`{${e-1}}`+t[e];return p(i,...n)}i=t.message,n=i,t.comment&&t.comment.length>0&&(n+=`/${Array.isArray(t.comment)?t.comment.join(""):t.comment}`),r=t.args??{}}const o=l?.[n];return o?"string"==typeof o?m(o,r):o.comment?m(o.message,r):m(i,r):m(i,r)}var f=/{([^}]+)}/g;function m(e,t){return 0===Object.keys(t).length?e:e.replace(f,((e,n)=>t[n]??e))}function g(e){return!("object"!=typeof e?.contents?.bundle||"string"!=typeof e?.version)}},234:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{N:()=>Interaction});var _logo__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(294),_server_Server__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(406);class Interaction{static realInteraction;static async load(){this.realInteraction=(await eval('import("./RealInteraction.js")')).default.RealInteraction,this.realInteraction._server=_server_Server__WEBPACK_IMPORTED_MODULE_0__.g}static async init(){this.clear(),console.log("Welcome inside Aventus CLI")}static clear(){console.clear(),(0,_logo__WEBPACK_IMPORTED_MODULE_1__.p)()}static async select(e,t){return this.realInteraction?.select(e,t)||null}static async selectMultiple(e,t){return this.realInteraction?.selectMultiple(e,t)||null}static async input(e,t,n){return this.realInteraction?.input(e,t,n)||null}static async tree(e,t){return this.realInteraction?.tree(e,t)||null}static async log(){return this.realInteraction?.log()||null}}},294:(e,t,n)=>{"use strict";n.d(t,{p:()=>r});const i=[" /\\ | | "," / \\ __ __ ___ _ __ | |_ _ _ ___ "," / /\\ \\\\ \\ / // _ \\| _ \\ | __|| | | |/ __|"," / ____ \\\\ V /| __/| | | || |_ | |_| |\\__ \\"," /_/ \\_\\\\_/ \\___||_| |_| \\__| \\____||___/"];function r(){console.log("[31m"),console.log(i.join("\r\n")),console.log("[0m")}},406:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{g:()=>Server});var _interaction_Interaction__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(234);class Server{static realServer;static async load(){this.realServer=(await eval('import("./RealServer.js")')).default.RealServer,this.realServer._interaction=_interaction_Interaction__WEBPACK_IMPORTED_MODULE_0__.N}static subscribeErrors(e){return this.realServer?.subscribeErrors(e)}static unsubscribeErrors(e){return this.realServer?.unsubscribeErrors(e)}static getErrors(){return this.realServer?.getErrors()}static start(e){return this.realServer?.start(e)}static create(){return this.realServer?.create()}static getStatistics(){return this.realServer?.getStatistics()}}},896:e=>{"use strict";e.exports=require("fs")},943:e=>{"use strict";e.exports=require("fs/promises")},421:e=>{"use strict";e.exports=require("node:child_process")},474:e=>{"use strict";e.exports=require("node:events")},24:e=>{"use strict";e.exports=require("node:fs")},760:e=>{"use strict";e.exports=require("node:path")},708:e=>{"use strict";e.exports=require("node:process")},794:(e,t,n)=>{const{Argument:i}=n(795),{Command:r}=n(835),{CommanderError:o,InvalidArgumentError:s}=n(212),{Help:a}=n(571),{Option:c}=n(157);t.DM=new r,t.gu=e=>new r(e),t.Ww=(e,t)=>new c(e,t),t.er=(e,t)=>new i(e,t),t.uB=r,t.c$=c,t.ef=i,t._V=a,t.b7=o,t.Di=s,t.a2=s},795:(e,t,n)=>{const{InvalidArgumentError:i}=n(212);t.Argument=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e}this._name.length>3&&"..."===this._name.slice(-3)&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,t){return t!==this.defaultValue&&Array.isArray(t)?t.concat(e):[e]}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,t)=>{if(!this.argChoices.includes(e))throw new i(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(e,t):e},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}},t.humanReadableArgName=function(e){const t=e.name()+(!0===e.variadic?"...":"");return e.required?"<"+t+">":"["+t+"]"}},835:(e,t,n)=>{const i=n(474).EventEmitter,r=n(421),o=n(760),s=n(24),a=n(708),{Argument:c,humanReadableArgName:l}=n(795),{CommanderError:u}=n(212),{Help:h}=n(571),{Option:d,DualOptions:p}=n(157),{suggestSimilar:f}=n(55);class m extends i{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._outputConfiguration={writeOut:e=>a.stdout.write(e),writeErr:e=>a.stderr.write(e),getOutHelpWidth:()=>a.stdout.isTTY?a.stdout.columns:void 0,getErrHelpWidth:()=>a.stderr.isTTY?a.stderr.columns:void 0,outputError:(e,t)=>t(e)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){const e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,n){let i=t,r=n;"object"==typeof i&&null!==i&&(r=i,i=null),r=r||{};const[,o,s]=e.match(/([^ ]+) *(.*)/),a=this.createCommand(o);return i&&(a.description(i),a._executableHandler=!0),r.isDefault&&(this._defaultCommandName=a._name),a._hidden=!(!r.noHelp&&!r.hidden),a._executableFile=r.executableFile||null,s&&a.arguments(s),this._registerCommand(a),a.parent=this,a.copyInheritedSettings(this),i?this:a}createCommand(e){return new m(e)}createHelp(){return Object.assign(new h,this.configureHelp())}configureHelp(e){return void 0===e?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return void 0===e?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return"string"!=typeof e&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error("Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()");return(t=t||{}).isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new c(e,t)}argument(e,t,n,i){const r=this.createArgument(e,t);return"function"==typeof n?r.default(i).argParser(n):r.default(n),this.addArgument(r),this}arguments(e){return e.trim().split(/ +/).forEach((e=>{this.argument(e)})),this}addArgument(e){const t=this.registeredArguments.slice(-1)[0];if(t&&t.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&void 0!==e.defaultValue&&void 0===e.parseArg)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if("boolean"==typeof e)return this._addImplicitHelpCommand=e,this;e=e??"help [command]";const[,n,i]=e.match(/([^ ]+) *(.*)/),r=t??"display help for command",o=this.createCommand(n);return o.helpOption(!1),i&&o.arguments(i),r&&o.description(r),this._addImplicitHelpCommand=!0,this._helpCommand=o,this}addHelpCommand(e,t){return"object"!=typeof e?(this.helpCommand(e,t),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(void 0===this._helpCommand&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){const n=["preSubcommand","preAction","postAction"];if(!n.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.\nExpecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return this._exitCallback=e||(e=>{if("commander.executeSubCommandAsync"!==e.code)throw e}),this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new u(e,t,n)),a.exit(e)}action(e){return this._actionHandler=t=>{const n=this.registeredArguments.length,i=t.slice(0,n);return this._storeOptionsAsProperties?i[n]=this:i[n]=this.opts(),i.push(this),e.apply(this,i)},this}createOption(e,t){return new d(e,t)}_callParseArg(e,t,n,i){try{return e.parseArg(t,n)}catch(e){if("commander.invalidArgument"===e.code){const t=`${i} ${e.message}`;this.error(t,{exitCode:e.exitCode,code:e.code})}throw e}}_registerOption(e){const t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){const n=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'\n- already used by option '${t.flags}'`)}this.options.push(e)}_registerCommand(e){const t=e=>[e.name()].concat(e.aliases()),n=t(e).find((e=>this._findCommand(e)));if(n){const i=t(this._findCommand(n)).join("|"),r=t(e).join("|");throw new Error(`cannot add command '${r}' as already have command '${i}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);const t=e.name(),n=e.attributeName();if(e.negate){const t=e.long.replace(/^--no-/,"--");this._findOption(t)||this.setOptionValueWithSource(n,void 0===e.defaultValue||e.defaultValue,"default")}else void 0!==e.defaultValue&&this.setOptionValueWithSource(n,e.defaultValue,"default");const i=(t,i,r)=>{null==t&&void 0!==e.presetArg&&(t=e.presetArg);const o=this.getOptionValue(n);null!==t&&e.parseArg?t=this._callParseArg(e,t,o,i):null!==t&&e.variadic&&(t=e._concatValue(t,o)),null==t&&(t=!e.negate&&(!(!e.isBoolean()&&!e.optional)||"")),this.setOptionValueWithSource(n,t,r)};return this.on("option:"+t,(t=>{const n=`error: option '${e.flags}' argument '${t}' is invalid.`;i(t,n,"cli")})),e.envVar&&this.on("optionEnv:"+t,(t=>{const n=`error: option '${e.flags}' value '${t}' from env '${e.envVar}' is invalid.`;i(t,n,"env")})),this}_optionEx(e,t,n,i,r){if("object"==typeof t&&t instanceof d)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");const o=this.createOption(t,n);if(o.makeOptionMandatory(!!e.mandatory),"function"==typeof i)o.default(r).argParser(i);else if(i instanceof RegExp){const e=i;i=(t,n)=>{const i=e.exec(t);return i?i[0]:n},o.default(r).argParser(i)}else o.default(i);return this.addOption(o)}option(e,t,n,i){return this._optionEx({},e,t,n,i)}requiredOption(e,t,n,i){return this._optionEx({mandatory:!0},e,t,n,i)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,n){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach((n=>{void 0!==n.getOptionValueSource(e)&&(t=n.getOptionValueSource(e))})),t}_prepareUserArgs(e,t){if(void 0!==e&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(t=t||{},void 0===e&&void 0===t.from){a.versions?.electron&&(t.from="electron");const e=a.execArgv??[];(e.includes("-e")||e.includes("--eval")||e.includes("-p")||e.includes("--print"))&&(t.from="eval")}let n;switch(void 0===e&&(e=a.argv),this.rawArgs=e.slice(),t.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":a.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;case"eval":n=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(e,t){const n=this._prepareUserArgs(e,t);return this._parseCommand([],n),this}async parseAsync(e,t){const n=this._prepareUserArgs(e,t);return await this._parseCommand([],n),this}_executeSubCommand(e,t){t=t.slice();let n=!1;const i=[".js",".ts",".tsx",".mjs",".cjs"];function c(e,t){const n=o.resolve(e,t);if(s.existsSync(n))return n;if(i.includes(o.extname(t)))return;const r=i.find((e=>s.existsSync(`${n}${e}`)));return r?`${n}${r}`:void 0}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let l,h=e._executableFile||`${this._name}-${e._name}`,d=this._executableDir||"";if(this._scriptPath){let e;try{e=s.realpathSync(this._scriptPath)}catch(t){e=this._scriptPath}d=o.resolve(o.dirname(e),d)}if(d){let t=c(d,h);if(!t&&!e._executableFile&&this._scriptPath){const n=o.basename(this._scriptPath,o.extname(this._scriptPath));n!==this._name&&(t=c(d,`${n}-${e._name}`))}h=t||h}if(n=i.includes(o.extname(h)),"win32"!==a.platform?n?(t.unshift(h),t=g(a.execArgv).concat(t),l=r.spawn(a.argv[0],t,{stdio:"inherit"})):l=r.spawn(h,t,{stdio:"inherit"}):(t.unshift(h),t=g(a.execArgv).concat(t),l=r.spawn(a.execPath,t,{stdio:"inherit"})),!l.killed){["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((e=>{a.on(e,(()=>{!1===l.killed&&null===l.exitCode&&l.kill(e)}))}))}const p=this._exitCallback;l.on("close",(e=>{e=e??1,p?p(new u(e,"commander.executeSubCommandAsync","(close)")):a.exit(e)})),l.on("error",(t=>{if("ENOENT"===t.code){const t=d?`searched for local subcommand relative to directory '${d}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",n=`'${h}' does not exist\n - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ${t}`;throw new Error(n)}if("EACCES"===t.code)throw new Error(`'${h}' not executable`);if(p){const e=new u(1,"commander.executeSubCommandAsync","(error)");e.nestedError=t,p(e)}else a.exit(1)})),this.runningCommand=l}_dispatchSubcommand(e,t,n){const i=this._findCommand(e);let r;return i||this.help({error:!0}),r=this._chainOrCallSubCommandHook(r,i,"preSubcommand"),r=this._chainOrCall(r,(()=>{if(!i._executableHandler)return i._parseCommand(t,n);this._executeSubCommand(i,t.concat(n))})),r}_dispatchHelpCommand(e){e||this.help();const t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach(((e,t)=>{e.required&&null==this.args[t]&&this.missingArgument(e.name())})),this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic||this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){const e=(e,t,n)=>{let i=t;if(null!==t&&e.parseArg){const r=`error: command-argument value '${t}' is invalid for argument '${e.name()}'.`;i=this._callParseArg(e,t,n,r)}return i};this._checkNumberOfArguments();const t=[];this.registeredArguments.forEach(((n,i)=>{let r=n.defaultValue;n.variadic?i<this.args.length?(r=this.args.slice(i),n.parseArg&&(r=r.reduce(((t,i)=>e(n,i,t)),n.defaultValue))):void 0===r&&(r=[]):i<this.args.length&&(r=this.args[i],n.parseArg&&(r=e(n,r,n.defaultValue))),t[i]=r})),this.processedArgs=t}_chainOrCall(e,t){return e&&e.then&&"function"==typeof e.then?e.then((()=>t())):t()}_chainOrCallHooks(e,t){let n=e;const i=[];return this._getCommandAndAncestors().reverse().filter((e=>void 0!==e._lifeCycleHooks[t])).forEach((e=>{e._lifeCycleHooks[t].forEach((t=>{i.push({hookedCommand:e,callback:t})}))})),"postAction"===t&&i.reverse(),i.forEach((e=>{n=this._chainOrCall(n,(()=>e.callback(e.hookedCommand,this)))})),n}_chainOrCallSubCommandHook(e,t,n){let i=e;return void 0!==this._lifeCycleHooks[n]&&this._lifeCycleHooks[n].forEach((e=>{i=this._chainOrCall(i,(()=>e(this,t)))})),i}_parseCommand(e,t){const n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);!this.commands.length||0!==this.args.length||this._actionHandler||this._defaultCommandName||this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();const i=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},r=`command:${this.name()}`;if(this._actionHandler){let n;return i(),this._processArguments(),n=this._chainOrCallHooks(n,"preAction"),n=this._chainOrCall(n,(()=>this._actionHandler(this.processedArgs))),this.parent&&(n=this._chainOrCall(n,(()=>{this.parent.emit(r,e,t)}))),n=this._chainOrCallHooks(n,"postAction"),n}if(this.parent&&this.parent.listenerCount(r))i(),this._processArguments(),this.parent.emit(r,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(e){if(e)return this.commands.find((t=>t._name===e||t._aliases.includes(e)))}_findOption(e){return this.options.find((t=>t.is(e)))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach((e=>{e.options.forEach((t=>{t.mandatory&&void 0===e.getOptionValue(t.attributeName())&&e.missingMandatoryOptionValue(t)}))}))}_checkForConflictingLocalOptions(){const e=this.options.filter((e=>{const t=e.attributeName();return void 0!==this.getOptionValue(t)&&"default"!==this.getOptionValueSource(t)}));e.filter((e=>e.conflictsWith.length>0)).forEach((t=>{const n=e.find((e=>t.conflictsWith.includes(e.attributeName())));n&&this._conflictingOption(t,n)}))}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach((e=>{e._checkForConflictingLocalOptions()}))}parseOptions(e){const t=[],n=[];let i=t;const r=e.slice();function o(e){return e.length>1&&"-"===e[0]}let s=null;for(;r.length;){const e=r.shift();if("--"===e){i===n&&i.push(e),i.push(...r);break}if(!s||o(e)){if(s=null,o(e)){const t=this._findOption(e);if(t){if(t.required){const e=r.shift();void 0===e&&this.optionMissingArgument(t),this.emit(`option:${t.name()}`,e)}else if(t.optional){let e=null;r.length>0&&!o(r[0])&&(e=r.shift()),this.emit(`option:${t.name()}`,e)}else this.emit(`option:${t.name()}`);s=t.variadic?t:null;continue}}if(e.length>2&&"-"===e[0]&&"-"!==e[1]){const t=this._findOption(`-${e[1]}`);if(t){t.required||t.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${t.name()}`,e.slice(2)):(this.emit(`option:${t.name()}`),r.unshift(`-${e.slice(2)}`));continue}}if(/^--[^=]+=/.test(e)){const t=e.indexOf("="),n=this._findOption(e.slice(0,t));if(n&&(n.required||n.optional)){this.emit(`option:${n.name()}`,e.slice(t+1));continue}}if(o(e)&&(i=n),(this._enablePositionalOptions||this._passThroughOptions)&&0===t.length&&0===n.length){if(this._findCommand(e)){t.push(e),r.length>0&&n.push(...r);break}if(this._getHelpCommand()&&e===this._getHelpCommand().name()){t.push(e),r.length>0&&t.push(...r);break}if(this._defaultCommandName){n.push(e),r.length>0&&n.push(...r);break}}if(this._passThroughOptions){i.push(e),r.length>0&&i.push(...r);break}i.push(e)}else this.emit(`option:${s.name()}`,e)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){const e={},t=this.options.length;for(let n=0;n<t;n++){const t=this.options[n].attributeName();e[t]=t===this._versionOptionName?this._version:this[t]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce(((e,t)=>Object.assign(e,t.opts())),{})}error(e,t){this._outputConfiguration.outputError(`${e}\n`,this._outputConfiguration.writeErr),"string"==typeof this._showHelpAfterError?this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`):this._showHelpAfterError&&(this._outputConfiguration.writeErr("\n"),this.outputHelp({error:!0}));const n=t||{},i=n.exitCode||1,r=n.code||"commander.error";this._exit(i,r,e)}_parseOptionsEnv(){this.options.forEach((e=>{if(e.envVar&&e.envVar in a.env){const t=e.attributeName();(void 0===this.getOptionValue(t)||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,a.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}}))}_parseOptionsImplied(){const e=new p(this.options),t=e=>void 0!==this.getOptionValue(e)&&!["default","implied"].includes(this.getOptionValueSource(e));this.options.filter((n=>void 0!==n.implied&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n))).forEach((e=>{Object.keys(e.implied).filter((e=>!t(e))).forEach((t=>{this.setOptionValueWithSource(t,e.implied[t],"implied")}))}))}missingArgument(e){const t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){const t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){const t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){const n=e=>{const t=e.attributeName(),n=this.getOptionValue(t),i=this.options.find((e=>e.negate&&t===e.attributeName())),r=this.options.find((e=>!e.negate&&t===e.attributeName()));return i&&(void 0===i.presetArg&&!1===n||void 0!==i.presetArg&&n===i.presetArg)?i:r||e},i=e=>{const t=n(e),i=t.attributeName();return"env"===this.getOptionValueSource(i)?`environment variable '${t.envVar}'`:`option '${t.flags}'`},r=`error: ${i(e)} cannot be used with ${i(t)}`;this.error(r,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let n=[],i=this;do{const e=i.createHelp().visibleOptions(i).filter((e=>e.long)).map((e=>e.long));n=n.concat(e),i=i.parent}while(i&&!i._enablePositionalOptions);t=f(e,n)}const n=`error: unknown option '${e}'${t}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;const t=this.registeredArguments.length,n=1===t?"":"s",i=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${n} but got ${e.length}.`;this.error(i,{code:"commander.excessArguments"})}unknownCommand(){const e=this.args[0];let t="";if(this._showSuggestionAfterError){const n=[];this.createHelp().visibleCommands(this).forEach((e=>{n.push(e.name()),e.alias()&&n.push(e.alias())})),t=f(e,n)}const n=`error: unknown command '${e}'${t}`;this.error(n,{code:"commander.unknownCommand"})}version(e,t,n){if(void 0===e)return this._version;this._version=e,t=t||"-V, --version",n=n||"output the version number";const i=this.createOption(t,n);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),(()=>{this._outputConfiguration.writeOut(`${e}\n`),this._exit(0,"commander.version",e)})),this}description(e,t){return void 0===e&&void 0===t?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return void 0===e?this._summary:(this._summary=e,this)}alias(e){if(void 0===e)return this._aliases[0];let t=this;if(0!==this.commands.length&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");const n=this.parent?._findCommand(e);if(n){const t=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${t}'`)}return t._aliases.push(e),this}aliases(e){return void 0===e?this._aliases:(e.forEach((e=>this.alias(e))),this)}usage(e){if(void 0===e){if(this._usage)return this._usage;const e=this.registeredArguments.map((e=>l(e)));return[].concat(this.options.length||null!==this._helpOption?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?e:[]).join(" ")}return this._usage=e,this}name(e){return void 0===e?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=o.basename(e,o.extname(e)),this}executableDir(e){return void 0===e?this._executableDir:(this._executableDir=e,this)}helpInformation(e){const t=this.createHelp();return void 0===t.helpWidth&&(t.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),t.formatHelp(this,t)}_getHelpContext(e){const t={error:!!(e=e||{}).error};let n;return n=t.error?e=>this._outputConfiguration.writeErr(e):e=>this._outputConfiguration.writeOut(e),t.write=e.write||n,t.command=this,t}outputHelp(e){let t;"function"==typeof e&&(t=e,e=void 0);const n=this._getHelpContext(e);this._getCommandAndAncestors().reverse().forEach((e=>e.emit("beforeAllHelp",n))),this.emit("beforeHelp",n);let i=this.helpInformation(n);if(t&&(i=t(i),"string"!=typeof i&&!Buffer.isBuffer(i)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(i),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",n),this._getCommandAndAncestors().forEach((e=>e.emit("afterAllHelp",n)))}helpOption(e,t){return"boolean"==typeof e?(this._helpOption=e?this._helpOption??void 0:null,this):(e=e??"-h, --help",t=t??"display help for command",this._helpOption=this.createOption(e,t),this)}_getHelpOption(){return void 0===this._helpOption&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){this.outputHelp(e);let t=a.exitCode||0;0===t&&e&&"function"!=typeof e&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){const n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${n.join("', '")}'`);const i=`${e}Help`;return this.on(i,(e=>{let n;n="function"==typeof t?t({error:e.error,command:e.command}):t,n&&e.write(`${n}\n`)})),this}_outputHelpIfRequested(e){const t=this._getHelpOption();t&&e.find((e=>t.is(e)))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}}function g(e){return e.map((e=>{if(!e.startsWith("--inspect"))return e;let t,n,i="127.0.0.1",r="9229";return null!==(n=e.match(/^(--inspect(-brk)?)$/))?t=n[1]:null!==(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))?(t=n[1],/^\d+$/.test(n[3])?r=n[3]:i=n[3]):null!==(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))&&(t=n[1],i=n[3],r=n[4]),t&&"0"!==r?`${t}=${i}:${parseInt(r)+1}`:e}))}t.Command=m},212:(e,t)=>{class n extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}}t.CommanderError=n,t.InvalidArgumentError=class extends n{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}}},571:(e,t,n)=>{const{humanReadableArgName:i}=n(795);t.Help=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(e){const t=e.commands.filter((e=>!e._hidden)),n=e._getHelpCommand();return n&&!n._hidden&&t.push(n),this.sortSubcommands&&t.sort(((e,t)=>e.name().localeCompare(t.name()))),t}compareOptions(e,t){const n=e=>e.short?e.short.replace(/^-/,""):e.long.replace(/^--/,"");return n(e).localeCompare(n(t))}visibleOptions(e){const t=e.options.filter((e=>!e.hidden)),n=e._getHelpOption();if(n&&!n.hidden){const i=n.short&&e._findOption(n.short),r=n.long&&e._findOption(n.long);i||r?n.long&&!r?t.push(e.createOption(n.long,n.description)):n.short&&!i&&t.push(e.createOption(n.short,n.description)):t.push(n)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];const t=[];for(let n=e.parent;n;n=n.parent){const e=n.options.filter((e=>!e.hidden));t.push(...e)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach((t=>{t.description=t.description||e._argsDescription[t.name()]||""})),e.registeredArguments.find((e=>e.description))?e.registeredArguments:[]}subcommandTerm(e){const t=e.registeredArguments.map((e=>i(e))).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce(((e,n)=>Math.max(e,t.subcommandTerm(n).length)),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce(((e,n)=>Math.max(e,t.optionTerm(n).length)),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce(((e,n)=>Math.max(e,t.optionTerm(n).length)),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce(((e,n)=>Math.max(e,t.argumentTerm(n).length)),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let n="";for(let t=e.parent;t;t=t.parent)n=t.name()+" "+n;return n+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){const t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map((e=>JSON.stringify(e))).join(", ")}`),void 0!==e.defaultValue){(e.required||e.optional||e.isBoolean()&&"boolean"==typeof e.defaultValue)&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`)}return void 0!==e.presetArg&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),void 0!==e.envVar&&t.push(`env: ${e.envVar}`),t.length>0?`${e.description} (${t.join(", ")})`:e.description}argumentDescription(e){const t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map((e=>JSON.stringify(e))).join(", ")}`),void 0!==e.defaultValue&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){const n=`(${t.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatHelp(e,t){const n=t.padWidth(e,t),i=t.helpWidth||80;function r(e,r){if(r){const o=`${e.padEnd(n+2)}${r}`;return t.wrap(o,i-2,n+2)}return e}function o(e){return e.join("\n").replace(/^/gm," ".repeat(2))}let s=[`Usage: ${t.commandUsage(e)}`,""];const a=t.commandDescription(e);a.length>0&&(s=s.concat([t.wrap(a,i,0),""]));const c=t.visibleArguments(e).map((e=>r(t.argumentTerm(e),t.argumentDescription(e))));c.length>0&&(s=s.concat(["Arguments:",o(c),""]));const l=t.visibleOptions(e).map((e=>r(t.optionTerm(e),t.optionDescription(e))));if(l.length>0&&(s=s.concat(["Options:",o(l),""])),this.showGlobalOptions){const n=t.visibleGlobalOptions(e).map((e=>r(t.optionTerm(e),t.optionDescription(e))));n.length>0&&(s=s.concat(["Global Options:",o(n),""]))}const u=t.visibleCommands(e).map((e=>r(t.subcommandTerm(e),t.subcommandDescription(e))));return u.length>0&&(s=s.concat(["Commands:",o(u),""])),s.join("\n")}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}wrap(e,t,n,i=40){const r=new RegExp("[\\n][ \\f\\t\\v - \ufeff]+");if(e.match(r))return e;const o=t-n;if(o<i)return e;const s=e.slice(0,n),a=e.slice(n).replace("\r\n","\n"),c=" ".repeat(n),l="\\s",u=new RegExp(`\n|.{1,${o-1}}([${l}]|$)|[^${l}]+?([${l}]|$)`,"g");return s+(a.match(u)||[]).map(((e,t)=>"\n"===e?"":(t>0?c:"")+e.trimEnd())).join("\n")}}},157:(e,t,n)=>{const{InvalidArgumentError:i}=n(212);t.Option=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;const n=function(e){let t,n;const i=e.split(/[ |,]+/);i.length>1&&!/^[[<]/.test(i[1])&&(t=i.shift());n=i.shift(),!t&&/^-[^-]$/.test(n)&&(t=n,n=void 0);return{shortFlag:t,longFlag:n}}(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return"string"==typeof e&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,t){return t!==this.defaultValue&&Array.isArray(t)?t.concat(e):[e]}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,t)=>{if(!this.argChoices.includes(e))throw new i(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(e,t):e},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.name().replace(/^no-/,"").split("-").reduce(((e,t)=>e+t[0].toUpperCase()+t.slice(1)))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},t.DualOptions=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach((e=>{e.negate?this.negativeOptions.set(e.attributeName(),e):this.positiveOptions.set(e.attributeName(),e)})),this.negativeOptions.forEach(((e,t)=>{this.positiveOptions.has(t)&&this.dualOptions.add(t)}))}valueFromOption(e,t){const n=t.attributeName();if(!this.dualOptions.has(n))return!0;const i=this.negativeOptions.get(n).presetArg,r=void 0!==i&&i;return t.negate===(r===e)}}},55:(e,t)=>{t.suggestSimilar=function(e,t){if(!t||0===t.length)return"";t=Array.from(new Set(t));const n=e.startsWith("--");n&&(e=e.slice(2),t=t.map((e=>e.slice(2))));let i=[],r=3;return t.forEach((t=>{if(t.length<=1)return;const n=function(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);const n=[];for(let t=0;t<=e.length;t++)n[t]=[t];for(let e=0;e<=t.length;e++)n[0][e]=e;for(let i=1;i<=t.length;i++)for(let r=1;r<=e.length;r++){let o=1;o=e[r-1]===t[i-1]?0:1,n[r][i]=Math.min(n[r-1][i]+1,n[r][i-1]+1,n[r-1][i-1]+o),r>1&&i>1&&e[r-1]===t[i-2]&&e[r-2]===t[i-1]&&(n[r][i]=Math.min(n[r][i],n[r-2][i-2]+1))}return n[e.length][t.length]}(e,t),o=Math.max(e.length,t.length);(o-n)/o>.4&&(n<r?(r=n,i=[t]):n===r&&i.push(t))})),i.sort(((e,t)=>e.localeCompare(t))),n&&(i=i.map((e=>`--${e}`))),i.length>1?`\n(Did you mean one of ${i.join(", ")}?)`:1===i.length?`\n(Did you mean ${i[0]}?)`:""}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](n,n.exports,__webpack_require__),n.exports}__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var __webpack_exports__={};(()=>{"use strict";var e=__webpack_require__(794);const{DM:t,gu:n,er:i,Ww:r,b7:o,Di:s,a2:a,uB:c,ef:l,c$:u,_V:h}=e,d=require("path");var p,f=__webpack_require__(406);class m{argsNb=0;register(e){let t=e.command(this.name).description(this.description);t=this._registerArgs(t),t=this._registerOptions(t),t.action((async(...e)=>{const t=[];for(let n=0;n<this.argsNb;n++)t.push(e[n]);const n=e[this.argsNb];await this.run(t,n),process.exit(0)}))}_registerArgs(e){return this.registerArgs((t=>{let n="";if(t.type){let e="<",i=">";void 0===t.typeIsRequired||t.typeIsRequired||(e="[",i="]"),t.typeIsArray&&(i="..."+i),n+=`${e}${t.type}${i}`}this.argsNb++,e=e.argument(n,t.description,t.defaultValue)})),e}_registerOptions(e){return this.registerOptions((t=>{let n=[];if(t.shortName){Array.isArray(t.shortName)||(t.shortName=[t.shortName]);for(let e of t.shortName)n.push("-"+e)}n.push("--"+t.name);let i=n.join(", ");if(t.type){let e="<",n=">";void 0===t.typeIsRequired||t.typeIsRequired||(e="[",n="]"),t.typeIsArray&&(n="..."+n),i+=` ${e}${t.type}${n}`}e=t.required?e.requiredOption(i,t.description,t.defaultValue):e.option(i,t.description,t.defaultValue)})),e}}!function(e){e[e.Ident=0]="Ident",e[e.AtKeyword=1]="AtKeyword",e[e.String=2]="String",e[e.BadString=3]="BadString",e[e.UnquotedString=4]="UnquotedString",e[e.Hash=5]="Hash",e[e.Num=6]="Num",e[e.Percentage=7]="Percentage",e[e.Dimension=8]="Dimension",e[e.UnicodeRange=9]="UnicodeRange",e[e.CDO=10]="CDO",e[e.CDC=11]="CDC",e[e.Colon=12]="Colon",e[e.SemiColon=13]="SemiColon",e[e.CurlyL=14]="CurlyL",e[e.CurlyR=15]="CurlyR",e[e.ParenthesisL=16]="ParenthesisL",e[e.ParenthesisR=17]="ParenthesisR",e[e.BracketL=18]="BracketL",e[e.BracketR=19]="BracketR",e[e.Whitespace=20]="Whitespace",e[e.Includes=21]="Includes",e[e.Dashmatch=22]="Dashmatch",e[e.SubstringOperator=23]="SubstringOperator",e[e.PrefixOperator=24]="PrefixOperator",e[e.SuffixOperator=25]="SuffixOperator",e[e.Delim=26]="Delim",e[e.EMS=27]="EMS",e[e.EXS=28]="EXS",e[e.Length=29]="Length",e[e.Angle=30]="Angle",e[e.Time=31]="Time",e[e.Freq=32]="Freq",e[e.Exclamation=33]="Exclamation",e[e.Resolution=34]="Resolution",e[e.Comma=35]="Comma",e[e.Charset=36]="Charset",e[e.EscapedJavaScript=37]="EscapedJavaScript",e[e.BadEscapedJavaScript=38]="BadEscapedJavaScript",e[e.Comment=39]="Comment",e[e.SingleLineComment=40]="SingleLineComment",e[e.EOF=41]="EOF",e[e.ContainerQueryLength=42]="ContainerQueryLength",e[e.CustomToken=43]="CustomToken"}(p||(p={}));"a".charCodeAt(0),"f".charCodeAt(0),"z".charCodeAt(0),"u".charCodeAt(0),"A".charCodeAt(0),"F".charCodeAt(0),"Z".charCodeAt(0),"0".charCodeAt(0),"9".charCodeAt(0),"~".charCodeAt(0),"^".charCodeAt(0),"=".charCodeAt(0),"|".charCodeAt(0),"-".charCodeAt(0),"_".charCodeAt(0),"%".charCodeAt(0),"*".charCodeAt(0);const g="(".charCodeAt(0),_=")".charCodeAt(0),b=("<".charCodeAt(0),">".charCodeAt(0),"@".charCodeAt(0),"#".charCodeAt(0),"$".charCodeAt(0),"\\".charCodeAt(0),"/".charCodeAt(0),"\n".charCodeAt(0),"\r".charCodeAt(0),"\f".charCodeAt(0),'"'.charCodeAt(0),"'".charCodeAt(0)," ".charCodeAt(0),"\t".charCodeAt(0),";".charCodeAt(0)),y=":".charCodeAt(0),v="{".charCodeAt(0),x="}".charCodeAt(0),w="[".charCodeAt(0),C="]".charCodeAt(0),k=",".charCodeAt(0),$=(".".charCodeAt(0),"!".charCodeAt(0),"?".charCodeAt(0),"+".charCodeAt(0),{});$[b]=p.SemiColon,$[y]=p.Colon,$[v]=p.CurlyL,$[x]=p.CurlyR,$[C]=p.BracketR,$[w]=p.BracketL,$[g]=p.ParenthesisL,$[_]=p.ParenthesisR,$[k]=p.Comma;const A={};A.em=p.EMS,A.ex=p.EXS,A.px=p.Length,A.cm=p.Length,A.mm=p.Length,A.in=p.Length,A.pt=p.Length,A.pc=p.Length,A.deg=p.Angle,A.rad=p.Angle,A.grad=p.Angle,A.ms=p.Time,A.s=p.Time,A.hz=p.Freq,A.khz=p.Freq,A["%"]=p.Percentage,A.fr=p.Percentage,A.dpi=p.Resolution,A.dpcm=p.Resolution,A.cqw=p.ContainerQueryLength,A.cqh=p.ContainerQueryLength,A.cqi=p.ContainerQueryLength,A.cqb=p.ContainerQueryLength,A.cqmin=p.ContainerQueryLength,A.cqmax=p.ContainerQueryLength;function S(e,t){if(e.length<t.length)return!1;for(let n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0}function P(e,t){let n=e.length-t.length;return n>0?e.lastIndexOf(t)===n:0===n&&e===t}function E(e,t=!0){return e?e.length<140?e:e.slice(0,140)+(t?"…":""):""}var O,I;function R(e,t){let n=null;return!e||t<e.offset||t>e.end?null:(e.accept((e=>-1===e.offset&&-1===e.length||e.offset<=t&&e.end>=t&&(n?e.length<=n.length&&(n=e):n=e,!0))),n)}!function(e){e[e.Undefined=0]="Undefined",e[e.Identifier=1]="Identifier",e[e.Stylesheet=2]="Stylesheet",e[e.Ruleset=3]="Ruleset",e[e.Selector=4]="Selector",e[e.SimpleSelector=5]="SimpleSelector",e[e.SelectorInterpolation=6]="SelectorInterpolation",e[e.SelectorCombinator=7]="SelectorCombinator",e[e.SelectorCombinatorParent=8]="SelectorCombinatorParent",e[e.SelectorCombinatorSibling=9]="SelectorCombinatorSibling",e[e.SelectorCombinatorAllSiblings=10]="SelectorCombinatorAllSiblings",e[e.SelectorCombinatorShadowPiercingDescendant=11]="SelectorCombinatorShadowPiercingDescendant",e[e.Page=12]="Page",e[e.PageBoxMarginBox=13]="PageBoxMarginBox",e[e.ClassSelector=14]="ClassSelector",e[e.IdentifierSelector=15]="IdentifierSelector",e[e.ElementNameSelector=16]="ElementNameSelector",e[e.PseudoSelector=17]="PseudoSelector",e[e.AttributeSelector=18]="AttributeSelector",e[e.Declaration=19]="Declaration",e[e.Declarations=20]="Declarations",e[e.Property=21]="Property",e[e.Expression=22]="Expression",e[e.BinaryExpression=23]="BinaryExpression",e[e.Term=24]="Term",e[e.Operator=25]="Operator",e[e.Value=26]="Value",e[e.StringLiteral=27]="StringLiteral",e[e.URILiteral=28]="URILiteral",e[e.EscapedValue=29]="EscapedValue",e[e.Function=30]="Function",e[e.NumericValue=31]="NumericValue",e[e.HexColorValue=32]="HexColorValue",e[e.RatioValue=33]="RatioValue",e[e.MixinDeclaration=34]="MixinDeclaration",e[e.MixinReference=35]="MixinReference",e[e.VariableName=36]="VariableName",e[e.VariableDeclaration=37]="VariableDeclaration",e[e.Prio=38]="Prio",e[e.Interpolation=39]="Interpolation",e[e.NestedProperties=40]="NestedProperties",e[e.ExtendsReference=41]="ExtendsReference",e[e.SelectorPlaceholder=42]="SelectorPlaceholder",e[e.Debug=43]="Debug",e[e.If=44]="If",e[e.Else=45]="Else",e[e.For=46]="For",e[e.Each=47]="Each",e[e.While=48]="While",e[e.MixinContentReference=49]="MixinContentReference",e[e.MixinContentDeclaration=50]="MixinContentDeclaration",e[e.Media=51]="Media",e[e.Keyframe=52]="Keyframe",e[e.FontFace=53]="FontFace",e[e.Import=54]="Import",e[e.Namespace=55]="Namespace",e[e.Invocation=56]="Invocation",e[e.FunctionDeclaration=57]="FunctionDeclaration",e[e.ReturnStatement=58]="ReturnStatement",e[e.MediaQuery=59]="MediaQuery",e[e.MediaCondition=60]="MediaCondition",e[e.MediaFeature=61]="MediaFeature",e[e.FunctionParameter=62]="FunctionParameter",e[e.FunctionArgument=63]="FunctionArgument",e[e.KeyframeSelector=64]="KeyframeSelector",e[e.ViewPort=65]="ViewPort",e[e.Document=66]="Document",e[e.AtApplyRule=67]="AtApplyRule",e[e.CustomPropertyDeclaration=68]="CustomPropertyDeclaration",e[e.CustomPropertySet=69]="CustomPropertySet",e[e.ListEntry=70]="ListEntry",e[e.Supports=71]="Supports",e[e.SupportsCondition=72]="SupportsCondition",e[e.NamespacePrefix=73]="NamespacePrefix",e[e.GridLine=74]="GridLine",e[e.Plugin=75]="Plugin",e[e.UnknownAtRule=76]="UnknownAtRule",e[e.Use=77]="Use",e[e.ModuleConfiguration=78]="ModuleConfiguration",e[e.Forward=79]="Forward",e[e.ForwardVisibility=80]="ForwardVisibility",e[e.Module=81]="Module",e[e.UnicodeRange=82]="UnicodeRange",e[e.Layer=83]="Layer",e[e.LayerNameList=84]="LayerNameList",e[e.LayerName=85]="LayerName",e[e.PropertyAtRule=86]="PropertyAtRule",e[e.Container=87]="Container",e[e.ModuleConfig=88]="ModuleConfig"}(O||(O={})),function(e){e[e.Mixin=0]="Mixin",e[e.Rule=1]="Rule",e[e.Variable=2]="Variable",e[e.Function=3]="Function",e[e.Keyframe=4]="Keyframe",e[e.Unknown=5]="Unknown",e[e.Module=6]="Module",e[e.Forward=7]="Forward",e[e.ForwardVisibility=8]="ForwardVisibility",e[e.Property=9]="Property"}(I||(I={}));class F{get end(){return this.offset+this.length}constructor(e=-1,t=-1,n){this.parent=null,this.offset=e,this.length=t,n&&(this.nodeType=n)}set type(e){this.nodeType=e}get type(){return this.nodeType||O.Undefined}getTextProvider(){let e=this;for(;e&&!e.textProvider;)e=e.parent;return e?e.textProvider:()=>"unknown"}getText(){return this.getTextProvider()(this.offset,this.length)}matches(e){return this.length===e.length&&this.getTextProvider()(this.offset,this.length)===e}startsWith(e){return this.length>=e.length&&this.getTextProvider()(this.offset,e.length)===e}endsWith(e){return this.length>=e.length&&this.getTextProvider()(this.end-e.length,e.length)===e}accept(e){if(e(this)&&this.children)for(const t of this.children)t.accept(e)}acceptVisitor(e){this.accept(e.visitNode.bind(e))}adoptChild(e,t=-1){if(e.parent&&e.parent.children){const t=e.parent.children.indexOf(e);t>=0&&e.parent.children.splice(t,1)}e.parent=this;let n=this.children;return n||(n=this.children=[]),-1!==t?n.splice(t,0,e):n.push(e),e}attachTo(e,t=-1){return e&&e.adoptChild(this,t),this}collectIssues(e){this.issues&&e.push.apply(e,this.issues)}addIssue(e){this.issues||(this.issues=[]),this.issues.push(e)}hasIssue(e){return Array.isArray(this.issues)&&this.issues.some((t=>t.getRule()===e))}isErroneous(e=!1){return!!(this.issues&&this.issues.length>0)||e&&Array.isArray(this.children)&&this.children.some((e=>e.isErroneous(!0)))}setNode(e,t,n=-1){return!!t&&(t.attachTo(this,n),this[e]=t,!0)}addChild(e){return!!e&&(this.children||(this.children=[]),e.attachTo(this),this.updateOffsetAndLength(e),!0)}updateOffsetAndLength(e){(e.offset<this.offset||-1===this.offset)&&(this.offset=e.offset);const t=e.end;(t>this.end||-1===this.length)&&(this.length=t-this.offset)}hasChildren(){return!!this.children&&this.children.length>0}getChildren(){return this.children?this.children.slice(0):[]}getChild(e){return this.children&&e<this.children.length?this.children[e]:null}addChildren(e){for(const t of e)this.addChild(t)}findFirstChildBeforeOffset(e){if(this.children){let t=null;for(let n=this.children.length-1;n>=0;n--)if(t=this.children[n],t.offset<=e)return t}return null}findChildAtOffset(e,t){const n=this.findFirstChildBeforeOffset(e);return n&&n.end>=e?t&&n.findChildAtOffset(e,!0)||n:null}encloses(e){return this.offset<=e.offset&&this.offset+this.length>=e.offset+e.length}getParent(){let e=this.parent;for(;e instanceof T;)e=e.parent;return e}findParent(e){let t=this;for(;t&&t.type!==e;)t=t.parent;return t}findAParent(...e){let t=this;for(;t&&!e.some((e=>t.type===e));)t=t.parent;return t}setData(e,t){this.options||(this.options={}),this.options[e]=t}getData(e){return this.options&&this.options.hasOwnProperty(e)?this.options[e]:null}}class T extends F{constructor(e,t=-1){super(-1,-1),this.attachTo(e,t),this.offset=-1,this.length=-1}}class V extends F{constructor(e,t){super(e,t),this.isCustomProperty=!1}get type(){return O.Identifier}containsInterpolation(){return this.hasChildren()}}class N extends F{constructor(e,t){super(e,t)}get type(){return O.Declarations}}class D extends F{constructor(e,t){super(e,t)}getDeclarations(){return this.declarations}setDeclarations(e){return this.setNode("declarations",e)}}class L extends D{constructor(e,t){super(e,t)}get type(){return O.Ruleset}getSelectors(){return this.selectors||(this.selectors=new T(this)),this.selectors}isNested(){return!!this.parent&&null!==this.parent.findParent(O.Declarations)}}class M extends F{constructor(e,t){super(e,t)}get type(){return O.Selector}}class U extends F{constructor(e,t){super(e,t)}get type(){return O.SimpleSelector}}class q extends F{constructor(e,t){super(e,t)}}class j extends q{constructor(e,t){super(e,t),this.property=null}get type(){return O.Declaration}setProperty(e){return this.setNode("property",e)}getProperty(){return this.property}getFullPropertyName(){const e=this.property?this.property.getName():"unknown";if(this.parent instanceof N&&this.parent.getParent()instanceof Q){const t=this.parent.getParent().getParent();if(t instanceof j)return t.getFullPropertyName()+e}return e}getNonPrefixedPropertyName(){const e=this.getFullPropertyName();if(e&&"-"===e.charAt(0)){const t=e.indexOf("-",1);if(-1!==t)return e.substring(t+1)}return e}setValue(e){return this.setNode("value",e)}getValue(){return this.value}setNestedProperties(e){return this.setNode("nestedProperties",e)}getNestedProperties(){return this.nestedProperties}}class B extends F{constructor(e,t){super(e,t)}get type(){return O.Property}setIdentifier(e){return this.setNode("identifier",e)}getIdentifier(){return this.identifier}getName(){return function(e,t){const n=t.exec(e);return n&&n[0].length?e.substr(0,e.length-n[0].length):e}(this.getText(),/[_\+]+$/)}isCustomProperty(){return!!this.identifier&&this.identifier.isCustomProperty}}class H extends F{constructor(e,t){super(e,t)}get type(){return O.Invocation}getArguments(){return this.arguments||(this.arguments=new T(this)),this.arguments}}class W extends H{constructor(e,t){super(e,t)}get type(){return O.Function}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}}class z extends F{constructor(e,t){super(e,t)}get type(){return O.FunctionParameter}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setDefaultValue(e){return this.setNode("defaultValue",e,0)}getDefaultValue(){return this.defaultValue}}class K extends F{constructor(e,t){super(e,t)}get type(){return O.FunctionArgument}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setValue(e){return this.setNode("value",e,0)}getValue(){return this.value}}class G extends D{constructor(e,t){super(e,t)}get type(){return O.FunctionDeclaration}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}getParameters(){return this.parameters||(this.parameters=new T(this)),this.parameters}}class Q extends D{constructor(e,t){super(e,t)}get type(){return O.NestedProperties}}class J extends D{constructor(e,t){super(e,t)}get type(){return O.Supports}}class X extends F{constructor(e,t){super(e,t)}get type(){return O.SupportsCondition}}class Y extends F{constructor(e,t){super(e,t)}get type(){return O.Expression}}class Z extends F{constructor(e,t){super(e,t)}get type(){return O.BinaryExpression}setLeft(e){return this.setNode("left",e)}getLeft(){return this.left}setRight(e){return this.setNode("right",e)}getRight(){return this.right}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}}class ee extends F{constructor(e,t){super(e,t)}get type(){return O.HexColorValue}}const te=".".charCodeAt(0),ne="0".charCodeAt(0),ie="9".charCodeAt(0);class re extends F{constructor(e,t){super(e,t)}get type(){return O.NumericValue}getValue(){const e=this.getText();let t,n=0;for(let i=0,r=e.length;i<r&&(t=e.charCodeAt(i),ne<=t&&t<=ie||t===te);i++)n+=1;return{value:e.substring(0,n),unit:n<e.length?e.substring(n):void 0}}}class oe extends q{constructor(e,t){super(e,t),this.needsSemicolon=!0}get type(){return O.VariableDeclaration}setVariable(e){return!!e&&(e.attachTo(this),this.variable=e,!0)}getVariable(){return this.variable}getName(){return this.variable?this.variable.getName():""}setValue(e){return!!e&&(e.attachTo(this),this.value=e,!0)}getValue(){return this.value}}class se extends F{constructor(e,t){super(e,t)}get type(){return O.Interpolation}}class ae extends F{constructor(e,t){super(e,t)}get type(){return O.VariableName}getName(){return this.getText()}}class ce extends F{constructor(e,t){super(e,t)}get type(){return O.ExtendsReference}getSelectors(){return this.selectors||(this.selectors=new T(this)),this.selectors}}class le extends F{constructor(e,t){super(e,t)}get type(){return O.MixinReference}getNamespaces(){return this.namespaces||(this.namespaces=new T(this)),this.namespaces}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}getArguments(){return this.arguments||(this.arguments=new T(this)),this.arguments}setContent(e){return this.setNode("content",e)}getContent(){return this.content}}class ue extends D{constructor(e,t){super(e,t)}get type(){return O.MixinDeclaration}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}getParameters(){return this.parameters||(this.parameters=new T(this)),this.parameters}setGuard(e){return e&&(e.attachTo(this),this.guard=e),!1}}var he;!function(e){e[e.Ignore=1]="Ignore",e[e.Warning=2]="Warning",e[e.Error=4]="Error"}(he||(he={}));class de{constructor(e,t,n,i,r=e.offset,o=e.length){this.node=e,this.rule=t,this.level=n,this.message=i||t.message,this.offset=r,this.length=o}getRule(){return this.rule}getLevel(){return this.level}getOffset(){return this.offset}getLength(){return this.length}getNode(){return this.node}getMessage(){return this.message}}var pe=__webpack_require__(599);class fe{constructor(e,t){this.id=e,this.message=t}}new fe("css-numberexpected",pe.t("number expected")),new fe("css-conditionexpected",pe.t("condition expected")),new fe("css-ruleorselectorexpected",pe.t("at-rule or selector expected")),new fe("css-dotexpected",pe.t("dot expected")),new fe("css-colonexpected",pe.t("colon expected")),new fe("css-semicolonexpected",pe.t("semi-colon expected")),new fe("css-termexpected",pe.t("term expected")),new fe("css-expressionexpected",pe.t("expression expected")),new fe("css-operatorexpected",pe.t("operator expected")),new fe("css-identifierexpected",pe.t("identifier expected")),new fe("css-percentageexpected",pe.t("percentage expected")),new fe("css-uriorstringexpected",pe.t("uri or string expected")),new fe("css-uriexpected",pe.t("URI expected")),new fe("css-varnameexpected",pe.t("variable name expected")),new fe("css-varvalueexpected",pe.t("variable value expected")),new fe("css-propertyvalueexpected",pe.t("property value expected")),new fe("css-lcurlyexpected",pe.t("{ expected")),new fe("css-rcurlyexpected",pe.t("} expected")),new fe("css-rbracketexpected",pe.t("[ expected")),new fe("css-lbracketexpected",pe.t("] expected")),new fe("css-lparentexpected",pe.t("( expected")),new fe("css-rparentexpected",pe.t(") expected")),new fe("css-commaexpected",pe.t("comma expected")),new fe("css-pagedirordeclexpected",pe.t("page directive or declaraton expected")),new fe("css-unknownatrule",pe.t("at-rule unknown")),new fe("css-unknownkeyword",pe.t("unknown keyword")),new fe("css-selectorexpected",pe.t("selector expected")),new fe("css-stringliteralexpected",pe.t("string literal expected")),new fe("css-whitespaceexpected",pe.t("whitespace expected")),new fe("css-mediaqueryexpected",pe.t("media query expected")),new fe("css-idorwildcardexpected",pe.t("identifier or wildcard expected")),new fe("css-wildcardexpected",pe.t("wildcard expected")),new fe("css-idorvarexpected",pe.t("identifier or variable expected"));var me,ge,_e,be,ye,ve,xe,we,Ce,ke,$e,Ae,Se,Pe,Ee,Oe,Ie,Re,Fe,Te,Ve,Ne,De,Le,Me,Ue,qe,je,Be,He,We,ze,Ke,Ge,Qe,Je,Xe,Ye,Ze,et,tt,nt,it,rt,ot,st,at,ct,lt,ut,ht,dt,pt,ft,mt,gt,_t,bt,yt,vt,xt,wt,Ct,kt,$t,At,St,Pt,Et,Ot,It,Rt,Ft,Tt,Vt,Nt,Dt,Lt;!function(e){e.is=function(e){return"string"==typeof e}}(me||(me={})),function(e){e.is=function(e){return"string"==typeof e}}(ge||(ge={})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(_e||(_e={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(be||(be={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=be.MAX_VALUE),t===Number.MAX_VALUE&&(t=be.MAX_VALUE),{line:e,character:t}},e.is=function(e){let t=e;return Ut.objectLiteral(t)&&Ut.uinteger(t.line)&&Ut.uinteger(t.character)}}(ye||(ye={})),function(e){e.create=function(e,t,n,i){if(Ut.uinteger(e)&&Ut.uinteger(t)&&Ut.uinteger(n)&&Ut.uinteger(i))return{start:ye.create(e,t),end:ye.create(n,i)};if(ye.is(e)&&ye.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${i}]`)},e.is=function(e){let t=e;return Ut.objectLiteral(t)&&ye.is(t.start)&&ye.is(t.end)}}(ve||(ve={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){let t=e;return Ut.objectLiteral(t)&&ve.is(t.range)&&(Ut.string(t.uri)||Ut.undefined(t.uri))}}(xe||(xe={})),function(e){e.create=function(e,t,n,i){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:i}},e.is=function(e){let t=e;return Ut.objectLiteral(t)&&ve.is(t.targetRange)&&Ut.string(t.targetUri)&&ve.is(t.targetSelectionRange)&&(ve.is(t.originSelectionRange)||Ut.undefined(t.originSelectionRange))}}(we||(we={})),function(e){e.create=function(e,t,n,i){return{red:e,green:t,blue:n,alpha:i}},e.is=function(e){const t=e;return Ut.objectLiteral(t)&&Ut.numberRange(t.red,0,1)&&Ut.numberRange(t.green,0,1)&&Ut.numberRange(t.blue,0,1)&&Ut.numberRange(t.alpha,0,1)}}(Ce||(Ce={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){const t=e;return Ut.objectLiteral(t)&&ve.is(t.range)&&Ce.is(t.color)}}(ke||(ke={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){const t=e;return Ut.objectLiteral(t)&&Ut.string(t.label)&&(Ut.undefined(t.textEdit)||Te.is(t))&&(Ut.undefined(t.additionalTextEdits)||Ut.typedArray(t.additionalTextEdits,Te.is))}}($e||($e={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(Ae||(Ae={})),function(e){e.create=function(e,t,n,i,r,o){const s={startLine:e,endLine:t};return Ut.defined(n)&&(s.startCharacter=n),Ut.defined(i)&&(s.endCharacter=i),Ut.defined(r)&&(s.kind=r),Ut.defined(o)&&(s.collapsedText=o),s},e.is=function(e){const t=e;return Ut.objectLiteral(t)&&Ut.uinteger(t.startLine)&&Ut.uinteger(t.startLine)&&(Ut.undefined(t.startCharacter)||Ut.uinteger(t.startCharacter))&&(Ut.undefined(t.endCharacter)||Ut.uinteger(t.endCharacter))&&(Ut.undefined(t.kind)||Ut.string(t.kind))}}(Se||(Se={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){let t=e;return Ut.defined(t)&&xe.is(t.location)&&Ut.string(t.message)}}(Pe||(Pe={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(Ee||(Ee={})),function(e){e.Unnecessary=1,e.Deprecated=2}(Oe||(Oe={})),function(e){e.is=function(e){const t=e;return Ut.objectLiteral(t)&&Ut.string(t.href)}}(Ie||(Ie={})),function(e){e.create=function(e,t,n,i,r,o){let s={range:e,message:t};return Ut.defined(n)&&(s.severity=n),Ut.defined(i)&&(s.code=i),Ut.defined(r)&&(s.source=r),Ut.defined(o)&&(s.relatedInformation=o),s},e.is=function(e){var t;let n=e;return Ut.defined(n)&&ve.is(n.range)&&Ut.string(n.message)&&(Ut.number(n.severity)||Ut.undefined(n.severity))&&(Ut.integer(n.code)||Ut.string(n.code)||Ut.undefined(n.code))&&(Ut.undefined(n.codeDescription)||Ut.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(Ut.string(n.source)||Ut.undefined(n.source))&&(Ut.undefined(n.relatedInformation)||Ut.typedArray(n.relatedInformation,Pe.is))}}(Re||(Re={})),function(e){e.create=function(e,t,...n){let i={title:e,command:t};return Ut.defined(n)&&n.length>0&&(i.arguments=n),i},e.is=function(e){let t=e;return Ut.defined(t)&&Ut.string(t.title)&&Ut.string(t.command)}}(Fe||(Fe={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){const t=e;return Ut.objectLiteral(t)&&Ut.string(t.newText)&&ve.is(t.range)}}(Te||(Te={})),function(e){e.create=function(e,t,n){const i={label:e};return void 0!==t&&(i.needsConfirmation=t),void 0!==n&&(i.description=n),i},e.is=function(e){const t=e;return Ut.objectLiteral(t)&&Ut.string(t.label)&&(Ut.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Ut.string(t.description)||void 0===t.description)}}(Ve||(Ve={})),function(e){e.is=function(e){const t=e;return Ut.string(t)}}(Ne||(Ne={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){const t=e;return Te.is(t)&&(Ve.is(t.annotationId)||Ne.is(t.annotationId))}}(De||(De={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){let t=e;return Ut.defined(t)&&We.is(t.textDocument)&&Array.isArray(t.edits)}}(Le||(Le={})),function(e){e.create=function(e,t,n){let i={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(i.options=t),void 0!==n&&(i.annotationId=n),i},e.is=function(e){let t=e;return t&&"create"===t.kind&&Ut.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Ut.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Ut.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Ne.is(t.annotationId))}}(Me||(Me={})),function(e){e.create=function(e,t,n,i){let r={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(r.options=n),void 0!==i&&(r.annotationId=i),r},e.is=function(e){let t=e;return t&&"rename"===t.kind&&Ut.string(t.oldUri)&&Ut.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Ut.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Ut.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Ne.is(t.annotationId))}}(Ue||(Ue={})),function(e){e.create=function(e,t,n){let i={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(i.options=t),void 0!==n&&(i.annotationId=n),i},e.is=function(e){let t=e;return t&&"delete"===t.kind&&Ut.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Ut.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Ut.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||Ne.is(t.annotationId))}}(qe||(qe={})),function(e){e.is=function(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((e=>Ut.string(e.kind)?Me.is(e)||Ue.is(e)||qe.is(e):Le.is(e))))}}(je||(je={}));!function(e){e.create=function(e){return{uri:e}},e.is=function(e){let t=e;return Ut.defined(t)&&Ut.string(t.uri)}}(Be||(Be={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Ut.defined(t)&&Ut.string(t.uri)&&Ut.integer(t.version)}}(He||(He={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Ut.defined(t)&&Ut.string(t.uri)&&(null===t.version||Ut.integer(t.version))}}(We||(We={})),function(e){e.create=function(e,t,n,i){return{uri:e,languageId:t,version:n,text:i}},e.is=function(e){let t=e;return Ut.defined(t)&&Ut.string(t.uri)&&Ut.string(t.languageId)&&Ut.integer(t.version)&&Ut.string(t.text)}}(ze||(ze={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){const n=t;return n===e.PlainText||n===e.Markdown}}(Ke||(Ke={})),function(e){e.is=function(e){const t=e;return Ut.objectLiteral(e)&&Ke.is(t.kind)&&Ut.string(t.value)}}(Ge||(Ge={})),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}(Qe||(Qe={})),function(e){e.PlainText=1,e.Snippet=2}(Je||(Je={})),function(e){e.Deprecated=1}(Xe||(Xe={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){const t=e;return t&&Ut.string(t.newText)&&ve.is(t.insert)&&ve.is(t.replace)}}(Ye||(Ye={})),function(e){e.asIs=1,e.adjustIndentation=2}(Ze||(Ze={})),function(e){e.is=function(e){const t=e;return t&&(Ut.string(t.detail)||void 0===t.detail)&&(Ut.string(t.description)||void 0===t.description)}}(et||(et={})),function(e){e.create=function(e){return{label:e}}}(tt||(tt={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(nt||(nt={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){const t=e;return Ut.string(t)||Ut.objectLiteral(t)&&Ut.string(t.language)&&Ut.string(t.value)}}(it||(it={})),function(e){e.is=function(e){let t=e;return!!t&&Ut.objectLiteral(t)&&(Ge.is(t.contents)||it.is(t.contents)||Ut.typedArray(t.contents,it.is))&&(void 0===e.range||ve.is(e.range))}}(rt||(rt={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(ot||(ot={})),function(e){e.create=function(e,t,...n){let i={label:e};return Ut.defined(t)&&(i.documentation=t),Ut.defined(n)?i.parameters=n:i.parameters=[],i}}(st||(st={})),function(e){e.Text=1,e.Read=2,e.Write=3}(at||(at={})),function(e){e.create=function(e,t){let n={range:e};return Ut.number(t)&&(n.kind=t),n}}(ct||(ct={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(lt||(lt={})),function(e){e.Deprecated=1}(ut||(ut={})),function(e){e.create=function(e,t,n,i,r){let o={name:e,kind:t,location:{uri:i,range:n}};return r&&(o.containerName=r),o}}(ht||(ht={})),function(e){e.create=function(e,t,n,i){return void 0!==i?{name:e,kind:t,location:{uri:n,range:i}}:{name:e,kind:t,location:{uri:n}}}}(dt||(dt={})),function(e){e.create=function(e,t,n,i,r,o){let s={name:e,detail:t,kind:n,range:i,selectionRange:r};return void 0!==o&&(s.children=o),s},e.is=function(e){let t=e;return t&&Ut.string(t.name)&&Ut.number(t.kind)&&ve.is(t.range)&&ve.is(t.selectionRange)&&(void 0===t.detail||Ut.string(t.detail))&&(void 0===t.deprecated||Ut.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(pt||(pt={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(ft||(ft={})),function(e){e.Invoked=1,e.Automatic=2}(mt||(mt={})),function(e){e.create=function(e,t,n){let i={diagnostics:e};return null!=t&&(i.only=t),null!=n&&(i.triggerKind=n),i},e.is=function(e){let t=e;return Ut.defined(t)&&Ut.typedArray(t.diagnostics,Re.is)&&(void 0===t.only||Ut.typedArray(t.only,Ut.string))&&(void 0===t.triggerKind||t.triggerKind===mt.Invoked||t.triggerKind===mt.Automatic)}}(gt||(gt={})),function(e){e.create=function(e,t,n){let i={title:e},r=!0;return"string"==typeof t?(r=!1,i.kind=t):Fe.is(t)?i.command=t:i.edit=t,r&&void 0!==n&&(i.kind=n),i},e.is=function(e){let t=e;return t&&Ut.string(t.title)&&(void 0===t.diagnostics||Ut.typedArray(t.diagnostics,Re.is))&&(void 0===t.kind||Ut.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||Fe.is(t.command))&&(void 0===t.isPreferred||Ut.boolean(t.isPreferred))&&(void 0===t.edit||je.is(t.edit))}}(_t||(_t={})),function(e){e.create=function(e,t){let n={range:e};return Ut.defined(t)&&(n.data=t),n},e.is=function(e){let t=e;return Ut.defined(t)&&ve.is(t.range)&&(Ut.undefined(t.command)||Fe.is(t.command))}}(bt||(bt={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){let t=e;return Ut.defined(t)&&Ut.uinteger(t.tabSize)&&Ut.boolean(t.insertSpaces)}}(yt||(yt={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){let t=e;return Ut.defined(t)&&ve.is(t.range)&&(Ut.undefined(t.target)||Ut.string(t.target))}}(vt||(vt={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){let n=t;return Ut.objectLiteral(n)&&ve.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(xt||(xt={})),function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"}(wt||(wt={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(Ct||(Ct={})),function(e){e.is=function(e){const t=e;return Ut.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(kt||(kt={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){const t=e;return null!=t&&ve.is(t.range)&&Ut.string(t.text)}}($t||($t={})),function(e){e.create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},e.is=function(e){const t=e;return null!=t&&ve.is(t.range)&&Ut.boolean(t.caseSensitiveLookup)&&(Ut.string(t.variableName)||void 0===t.variableName)}}(At||(At={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){const t=e;return null!=t&&ve.is(t.range)&&(Ut.string(t.expression)||void 0===t.expression)}}(St||(St={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){const t=e;return Ut.defined(t)&&ve.is(e.stoppedLocation)}}(Pt||(Pt={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(Et||(Et={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){const t=e;return Ut.objectLiteral(t)&&(void 0===t.tooltip||Ut.string(t.tooltip)||Ge.is(t.tooltip))&&(void 0===t.location||xe.is(t.location))&&(void 0===t.command||Fe.is(t.command))}}(Ot||(Ot={})),function(e){e.create=function(e,t,n){const i={position:e,label:t};return void 0!==n&&(i.kind=n),i},e.is=function(e){const t=e;return Ut.objectLiteral(t)&&ye.is(t.position)&&(Ut.string(t.label)||Ut.typedArray(t.label,Ot.is))&&(void 0===t.kind||Et.is(t.kind))&&void 0===t.textEdits||Ut.typedArray(t.textEdits,Te.is)&&(void 0===t.tooltip||Ut.string(t.tooltip)||Ge.is(t.tooltip))&&(void 0===t.paddingLeft||Ut.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Ut.boolean(t.paddingRight))}}(It||(It={})),function(e){e.createSnippet=function(e){return{kind:"snippet",value:e}}}(Rt||(Rt={})),function(e){e.create=function(e,t,n,i){return{insertText:e,filterText:t,range:n,command:i}}}(Ft||(Ft={})),function(e){e.create=function(e){return{items:e}}}(Tt||(Tt={})),function(e){e.Invoked=0,e.Automatic=1}(Vt||(Vt={})),function(e){e.create=function(e,t){return{range:e,text:t}}}(Nt||(Nt={})),function(e){e.create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}}}(Dt||(Dt={})),function(e){e.is=function(e){const t=e;return Ut.objectLiteral(t)&&ge.is(t.uri)&&Ut.string(t.name)}}(Lt||(Lt={}));var Mt,Ut,qt,jt,Bt;!function(e){function t(e,n){if(e.length<=1)return e;const i=e.length/2|0,r=e.slice(0,i),o=e.slice(i);t(r,n),t(o,n);let s=0,a=0,c=0;for(;s<r.length&&a<o.length;){let t=n(r[s],o[a]);e[c++]=t<=0?r[s++]:o[a++]}for(;s<r.length;)e[c++]=r[s++];for(;a<o.length;)e[c++]=o[a++];return e}e.create=function(e,t,n,i){return new Ht(e,t,n,i)},e.is=function(e){let t=e;return!!(Ut.defined(t)&&Ut.string(t.uri)&&(Ut.undefined(t.languageId)||Ut.string(t.languageId))&&Ut.uinteger(t.lineCount)&&Ut.func(t.getText)&&Ut.func(t.positionAt)&&Ut.func(t.offsetAt))},e.applyEdits=function(e,n){let i=e.getText(),r=t(n,((e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),o=i.length;for(let t=r.length-1;t>=0;t--){let n=r[t],s=e.offsetAt(n.range.start),a=e.offsetAt(n.range.end);if(!(a<=o))throw new Error("Overlapping edit");i=i.substring(0,s)+n.newText+i.substring(a,i.length),o=s}return i}}(Mt||(Mt={}));class Ht{constructor(e,t,n,i){this._uri=e,this._languageId=t,this._version=n,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],t=this._content,n=!0;for(let i=0;i<t.length;i++){n&&(e.push(i),n=!1);let r=t.charAt(i);n="\r"===r||"\n"===r,"\r"===r&&i+1<t.length&&"\n"===t.charAt(i+1)&&i++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,i=t.length;if(0===i)return ye.create(0,e);for(;n<i;){let r=Math.floor((n+i)/2);t[r]>e?i=r:n=r+1}let r=n-1;return ye.create(r,e-t[r])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],i=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,i),n)}get lineCount(){return this.getLineOffsets().length}}!function(e){const t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.numberRange=function(e,n,i){return"[object Number]"===t.call(e)&&n<=e&&e<=i},e.integer=function(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647},e.uinteger=function(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647},e.func=function(e){return"[object Function]"===t.call(e)},e.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(Ut||(Ut={}));class Wt{constructor(e,t,n,i){this._uri=e,this._languageId=t,this._version=n,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){for(const t of e)if(Wt.isIncremental(t)){const e=Qt(t.range),n=this.offsetAt(e.start),i=this.offsetAt(e.end);this._content=this._content.substring(0,n)+t.text+this._content.substring(i,this._content.length);const r=Math.max(e.start.line,0),o=Math.max(e.end.line,0);let s=this._lineOffsets;const a=Kt(t.text,!1,n);if(o-r===a.length)for(let e=0,t=a.length;e<t;e++)s[e+r+1]=a[e];else a.length<1e4?s.splice(r+1,o-r,...a):this._lineOffsets=s=s.slice(0,r+1).concat(a,s.slice(o+1));const c=t.text.length-(i-n);if(0!==c)for(let e=r+1+a.length,t=s.length;e<t;e++)s[e]=s[e]+c}else{if(!Wt.isFull(t))throw new Error("Unknown change event received");this._content=t.text,this._lineOffsets=void 0}this._version=t}getLineOffsets(){return void 0===this._lineOffsets&&(this._lineOffsets=Kt(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);const t=this.getLineOffsets();let n=0,i=t.length;if(0===i)return{line:0,character:e};for(;n<i;){const r=Math.floor((n+i)/2);t[r]>e?i=r:n=r+1}const r=n-1;return{line:r,character:(e=this.ensureBeforeEOL(e,t[r]))-t[r]}}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;const n=t[e.line];if(e.character<=0)return n;const i=e.line+1<t.length?t[e.line+1]:this._content.length,r=Math.min(n+e.character,i);return this.ensureBeforeEOL(r,n)}ensureBeforeEOL(e,t){for(;e>t&&Gt(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}static isFull(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}function zt(e,t){if(e.length<=1)return e;const n=e.length/2|0,i=e.slice(0,n),r=e.slice(n);zt(i,t),zt(r,t);let o=0,s=0,a=0;for(;o<i.length&&s<r.length;){const n=t(i[o],r[s]);e[a++]=n<=0?i[o++]:r[s++]}for(;o<i.length;)e[a++]=i[o++];for(;s<r.length;)e[a++]=r[s++];return e}function Kt(e,t,n=0){const i=t?[n]:[];for(let t=0;t<e.length;t++){const r=e.charCodeAt(t);Gt(r)&&(13===r&&t+1<e.length&&10===e.charCodeAt(t+1)&&t++,i.push(n+t+1))}return i}function Gt(e){return 13===e||10===e}function Qt(e){const t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Jt(e){const t=Qt(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,n,i){return new Wt(e,t,n,i)},e.update=function(e,t,n){if(e instanceof Wt)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){const n=e.getText(),i=zt(t.map(Jt),((e,t)=>{const n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}));let r=0;const o=[];for(const t of i){const i=e.offsetAt(t.range.start);if(i<r)throw new Error("Overlapping edit");i>r&&o.push(n.substring(r,i)),t.newText.length&&o.push(t.newText),r=e.offsetAt(t.range.end)}return o.push(n.substr(r)),o.join("")}}(qt||(qt={})),function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Ke.Markdown,Ke.PlainText]}},hover:{contentFormat:[Ke.Markdown,Ke.PlainText]}}}}(jt||(jt={})),function(e){e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Directory=2]="Directory",e[e.SymbolicLink=64]="SymbolicLink"}(Bt||(Bt={}));const Xt={E:"Edge",FF:"Firefox",S:"Safari",C:"Chrome",IE:"IE",O:"Opera"};function Yt(e){switch(e){case"experimental":return"⚠️ Property is experimental. Be cautious when using it.️\n\n";case"nonstandard":return"🚨️ Property is nonstandard. Avoid using it.\n\n";case"obsolete":return"🚨️️️ Property is obsolete. Avoid using it.\n\n";default:return""}}function Zt(e,t,n){let i;if(i=t?{kind:"markdown",value:nn(e,n)}:{kind:"plaintext",value:tn(e,n)},""!==i.value)return i}function en(e){return(e=e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")).replace(/</g,"<").replace(/>/g,">")}function tn(e,t){if(!e.description||""===e.description)return"";if("string"!=typeof e.description)return e.description.value;let n="";if(!1!==t?.documentation){e.status&&(n+=Yt(e.status)),n+=e.description;const t=rn(e.browsers);t&&(n+="\n("+t+")"),"syntax"in e&&(n+=`\n\nSyntax: ${e.syntax}`)}return e.references&&e.references.length>0&&!1!==t?.references&&(n.length>0&&(n+="\n\n"),n+=e.references.map((e=>`${e.name}: ${e.url}`)).join(" | ")),n}function nn(e,t){if(!e.description||""===e.description)return"";let n="";if(!1!==t?.documentation){e.status&&(n+=Yt(e.status)),"string"==typeof e.description?n+=en(e.description):n+=e.description.kind===Ke.Markdown?e.description.value:en(e.description.value);const t=rn(e.browsers);t&&(n+="\n\n("+en(t)+")"),"syntax"in e&&e.syntax&&(n+=`\n\nSyntax: ${en(e.syntax)}`)}return e.references&&e.references.length>0&&!1!==t?.references&&(n.length>0&&(n+="\n\n"),n+=e.references.map((e=>`[${e.name}](${e.url})`)).join(" | ")),n}function rn(e=[]){return 0===e.length?null:e.map((e=>{let t="";const n=e.match(/([A-Z]+)(\d+)?/),i=n[1],r=n[2];return i in Xt&&(t+=Xt[i]),r&&(t+=" "+r),t})).join(", ")}const on=/(^#([0-9A-F]{3}){1,2}$)|(^#([0-9A-F]{4}){1,2}$)/i,sn=[{label:"rgb",func:"rgb($red, $green, $blue)",insertText:"rgb(${1:red}, ${2:green}, ${3:blue})",desc:pe.t("Creates a Color from red, green, and blue values.")},{label:"rgba",func:"rgba($red, $green, $blue, $alpha)",insertText:"rgba(${1:red}, ${2:green}, ${3:blue}, ${4:alpha})",desc:pe.t("Creates a Color from red, green, blue, and alpha values.")},{label:"rgb relative",func:"rgb(from $color $red $green $blue)",insertText:"rgb(from ${1:color} ${2:r} ${3:g} ${4:b})",desc:pe.t("Creates a Color from the red, green, and blue values of another Color.")},{label:"hsl",func:"hsl($hue, $saturation, $lightness)",insertText:"hsl(${1:hue}, ${2:saturation}, ${3:lightness})",desc:pe.t("Creates a Color from hue, saturation, and lightness values.")},{label:"hsla",func:"hsla($hue, $saturation, $lightness, $alpha)",insertText:"hsla(${1:hue}, ${2:saturation}, ${3:lightness}, ${4:alpha})",desc:pe.t("Creates a Color from hue, saturation, lightness, and alpha values.")},{label:"hsl relative",func:"hsl(from $color $hue $saturation $lightness)",insertText:"hsl(from ${1:color} ${2:h} ${3:s} ${4:l})",desc:pe.t("Creates a Color from the hue, saturation, and lightness values of another Color.")},{label:"hwb",func:"hwb($hue $white $black)",insertText:"hwb(${1:hue} ${2:white} ${3:black})",desc:pe.t("Creates a Color from hue, white, and black values.")},{label:"hwb relative",func:"hwb(from $color $hue $white $black)",insertText:"hwb(from ${1:color} ${2:h} ${3:w} ${4:b})",desc:pe.t("Creates a Color from the hue, white, and black values of another Color.")},{label:"lab",func:"lab($lightness $a $b)",insertText:"lab(${1:lightness} ${2:a} ${3:b})",desc:pe.t("Creates a Color from lightness, a, and b values.")},{label:"lab relative",func:"lab(from $color $lightness $a $b)",insertText:"lab(from ${1:color} ${2:l} ${3:a} ${4:b})",desc:pe.t("Creates a Color from the lightness, a, and b values of another Color.")},{label:"oklab",func:"oklab($lightness $a $b)",insertText:"oklab(${1:lightness} ${2:a} ${3:b})",desc:pe.t("Creates a Color from lightness, a, and b values.")},{label:"oklab relative",func:"oklab(from $color $lightness $a $b)",insertText:"oklab(from ${1:color} ${2:l} ${3:a} ${4:b})",desc:pe.t("Creates a Color from the lightness, a, and b values of another Color.")},{label:"lch",func:"lch($lightness $chroma $hue)",insertText:"lch(${1:lightness} ${2:chroma} ${3:hue})",desc:pe.t("Creates a Color from lightness, chroma, and hue values.")},{label:"lch relative",func:"lch(from $color $lightness $chroma $hue)",insertText:"lch(from ${1:color} ${2:l} ${3:c} ${4:h})",desc:pe.t("Creates a Color from the lightness, chroma, and hue values of another Color.")},{label:"oklch",func:"oklch($lightness $chroma $hue)",insertText:"oklch(${1:lightness} ${2:chroma} ${3:hue})",desc:pe.t("Creates a Color from lightness, chroma, and hue values.")},{label:"oklch relative",func:"oklch(from $color $lightness $chroma $hue)",insertText:"oklch(from ${1:color} ${2:l} ${3:c} ${4:h})",desc:pe.t("Creates a Color from the lightness, chroma, and hue values of another Color.")},{label:"color",func:"color($color-space $red $green $blue)",insertText:"color(${1|srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyx,xyz-d50,xyz-d65|} ${2:red} ${3:green} ${4:blue})",desc:pe.t("Creates a Color in a specific color space from red, green, and blue values.")},{label:"color relative",func:"color(from $color $color-space $red $green $blue)",insertText:"color(from ${1:color} ${2|srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyx,xyz-d50,xyz-d65|} ${3:r} ${4:g} ${5:b})",desc:pe.t("Creates a Color in a specific color space from the red, green, and blue values of another Color.")},{label:"color-mix",func:"color-mix(in $color-space, $color $percentage, $color $percentage)",insertText:"color-mix(in ${1|srgb,srgb-linear,lab,oklab,xyz,xyz-d50,xyz-d65|}, ${3:color} ${4:percentage}, ${5:color} ${6:percentage})",desc:pe.t("Mix two colors together in a rectangular color space.")},{label:"color-mix hue",func:"color-mix(in $color-space $interpolation-method hue, $color $percentage, $color $percentage)",insertText:"color-mix(in ${1|hsl,hwb,lch,oklch|} ${2|shorter hue,longer hue,increasing hue,decreasing hue|}, ${3:color} ${4:percentage}, ${5:color} ${6:percentage})",desc:pe.t("Mix two colors together in a polar color space.")}],an=/^(rgb|rgba|hsl|hsla|hwb)$/i,cn={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"},ln=new RegExp(`^(${Object.keys(cn).join("|")})$`,"i"),un={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."},hn=new RegExp(`^(${Object.keys(un).join("|")})$`,"i");function dn(e){const t=e.getName();return!!t&&an.test(t)}function pn(e){return on.test(e)||ln.test(e)||hn.test(e)}const fn={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."},mn={"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."},gn={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."},_n=["medium","thick","thin"],bn={"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."},yn={"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."},vn={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."},xn={"var()":"Evaluates the value of a custom variable.","calc()":"Evaluates an mathematical expression. The following operators can be used: + - * /."},wn={"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."},Cn={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."},kn={"circle()":"Defines a circle.","ellipse()":"Defines an ellipse.","inset()":"Defines an inset rectangle.","polygon()":"Defines a polygon."},$n={length:["cap","ch","cm","cqb","cqh","cqi","cqmax","cqmin","cqw","dvb","dvh","dvi","dvw","em","ex","ic","in","lh","lvb","lvh","lvi","lvw","mm","pc","pt","px","q","rcap","rch","rem","rex","ric","rlh","svb","svh","svi","svw","vb","vh","vi","vmax","vmin","vw"],angle:["deg","rad","grad","turn"],time:["ms","s"],frequency:["Hz","kHz"],resolution:["dpi","dpcm","dppx"],percentage:["%","fr"]},An=["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"],Sn=["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"];function Pn(e){return void 0!==e}function En(e,t){return-1!==e.indexOf(t)}function On(...e){const t=[];for(const n of e)for(const e of n)En(t,e)||t.push(e);return t}class In{constructor(e,t){this.offset=e,this.length=t,this.symbols=[],this.parent=null,this.children=[]}addChild(e){this.children.push(e),e.setParent(this)}setParent(e){this.parent=e}findScope(e,t=0){return this.offset<=e&&this.offset+this.length>e+t||this.offset===e&&this.length===t?this.findInScope(e,t):null}findInScope(e,t=0){const n=e+t,i=function(e,t){let n=0,i=e.length;if(0===i)return 0;for(;n<i;){let r=Math.floor((n+i)/2);t(e[r])?i=r:n=r+1}return n}(this.children,(e=>e.offset>n));if(0===i)return this;const r=this.children[i-1];return r.offset<=e&&r.offset+r.length>=e+t?r.findInScope(e,t):this}addSymbol(e){this.symbols.push(e)}getSymbol(e,t){for(let n=0;n<this.symbols.length;n++){const i=this.symbols[n];if(i.name===e&&i.type===t)return i}return null}getSymbols(){return this.symbols}}class Rn extends In{constructor(){super(0,Number.MAX_VALUE)}}class Fn{constructor(e,t,n,i){this.name=e,this.value=t,this.node=n,this.type=i}}class Tn{constructor(e){this.scope=e}addSymbol(e,t,n,i){if(-1!==e.offset){const r=this.scope.findScope(e.offset,e.length);r&&r.addSymbol(new Fn(t,n,e,i))}}addScope(e){if(-1!==e.offset){const t=this.scope.findScope(e.offset,e.length);if(t&&(t.offset!==e.offset||t.length!==e.length)){const n=new In(e.offset,e.length);return t.addChild(n),n}return t}return null}addSymbolToChildScope(e,t,n,i,r){if(e&&-1!==e.offset){const o=this.addScope(e);o&&o.addSymbol(new Fn(n,i,t,r))}}visitNode(e){switch(e.type){case O.Keyframe:return this.addSymbol(e,e.getName(),void 0,I.Keyframe),!0;case O.CustomPropertyDeclaration:return this.visitCustomPropertyDeclarationNode(e);case O.VariableDeclaration:return this.visitVariableDeclarationNode(e);case O.Ruleset:return this.visitRuleSet(e);case O.MixinDeclaration:return this.addSymbol(e,e.getName(),void 0,I.Mixin),!0;case O.FunctionDeclaration:return this.addSymbol(e,e.getName(),void 0,I.Function),!0;case O.FunctionParameter:return this.visitFunctionParameterNode(e);case O.Declarations:return this.addScope(e),!0;case O.For:const t=e,n=t.getDeclarations();return n&&t.variable&&this.addSymbolToChildScope(n,t.variable,t.variable.getName(),void 0,I.Variable),!0;case O.Each:{const t=e,n=t.getDeclarations();if(n){const e=t.getVariables().getChildren();for(const t of e)this.addSymbolToChildScope(n,t,t.getName(),void 0,I.Variable)}return!0}}return!0}visitRuleSet(e){const t=this.scope.findScope(e.offset,e.length);if(t)for(const n of e.getSelectors().getChildren())n instanceof M&&1===n.getChildren().length&&t.addSymbol(new Fn(n.getChild(0).getText(),void 0,n,I.Rule));return!0}visitVariableDeclarationNode(e){const t=e.getValue()?e.getValue().getText():void 0;return this.addSymbol(e,e.getName(),t,I.Variable),!0}visitFunctionParameterNode(e){const t=e.getParent().getDeclarations();if(t){const n=e.getDefaultValue(),i=n?n.getText():void 0;this.addSymbolToChildScope(t,e,e.getName(),i,I.Variable)}return!0}visitCustomPropertyDeclarationNode(e){const t=e.getValue()?e.getValue().getText():"";return this.addCSSVariable(e.getProperty(),e.getProperty().getName(),t,I.Variable),!0}addCSSVariable(e,t,n,i){-1!==e.offset&&this.scope.addSymbol(new Fn(t,n,e,i))}}class Vn{constructor(e){this.global=new Rn,e.acceptVisitor(new Tn(this.global))}findSymbolsAtOffset(e,t){let n=this.global.findScope(e,0);const i=[],r={};for(;n;){const e=n.getSymbols();for(let n=0;n<e.length;n++){const o=e[n];o.type!==t||r[o.name]||(i.push(o),r[o.name]=!0)}n=n.parent}return i}internalFindSymbol(e,t){let n=e;if(e.parent instanceof z&&e.parent.getParent()instanceof D&&(n=e.parent.getParent().getDeclarations()),e.parent instanceof K&&e.parent.getParent()instanceof W){const t=e.parent.getParent().getIdentifier();if(t){const e=this.internalFindSymbol(t,[I.Function]);e&&(n=e.node.getDeclarations())}}if(!n)return null;const i=e.getText();let r=this.global.findScope(n.offset,n.length);for(;r;){for(let e=0;e<t.length;e++){const n=t[e],o=r.getSymbol(i,n);if(o)return o}r=r.parent}return null}evaluateReferenceTypes(e){if(e instanceof V){const t=e.referenceTypes;if(t)return t;{if(e.isCustomProperty)return[I.Variable];const t=function(e){const t=e.findParent(O.Declaration),n=t&&t.getValue();return n&&n.encloses(e)?t:null}(e);if(t){const n=t.getNonPrefixedPropertyName();if(("animation"===n||"animation-name"===n)&&t.getValue()&&t.getValue().offset===e.offset)return[I.Keyframe]}}}else if(e instanceof ae)return[I.Variable];return e.findAParent(O.Selector,O.ExtendsReference)?[I.Rule]:null}findSymbolFromNode(e){if(!e)return null;for(;e.type===O.Interpolation;)e=e.getParent();const t=this.evaluateReferenceTypes(e);return t?this.internalFindSymbol(e,t):null}matchesSymbol(e,t){if(!e)return!1;for(;e.type===O.Interpolation;)e=e.getParent();if(!e.matches(t.name))return!1;const n=this.evaluateReferenceTypes(e);if(!n||-1===n.indexOf(t.type))return!1;return this.internalFindSymbol(e,n)===t}findSymbol(e,t,n){let i=this.global.findScope(n);for(;i;){const n=i.getSymbol(e,t);if(n)return n;i=i.parent}return null}}var Nn;(()=>{var e={470:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,i="",r=0,o=-1,s=0,a=0;a<=e.length;++a){if(a<e.length)n=e.charCodeAt(a);else{if(47===n)break;n=47}if(47===n){if(o===a-1||1===s);else if(o!==a-1&&2===s){if(i.length<2||2!==r||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2))if(i.length>2){var c=i.lastIndexOf("/");if(c!==i.length-1){-1===c?(i="",r=0):r=(i=i.slice(0,c)).length-1-i.lastIndexOf("/"),o=a,s=0;continue}}else if(2===i.length||1===i.length){i="",r=0,o=a,s=0;continue}t&&(i.length>0?i+="/..":i="..",r=2)}else i.length>0?i+="/"+e.slice(o+1,a):i=e.slice(o+1,a),r=a-o-1;o=a,s=0}else 46===n&&-1!==s?++s:s=-1}return i}var i={resolve:function(){for(var e,i="",r=!1,o=arguments.length-1;o>=-1&&!r;o--){var s;o>=0?s=arguments[o]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(i=s+"/"+i,r=47===s.charCodeAt(0))}return i=n(i,!r),r?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(t(e),0===e.length)return".";var i=47===e.charCodeAt(0),r=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!i)).length||i||(e="."),e.length>0&&r&&(e+="/"),i?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n<arguments.length;++n){var r=arguments[n];t(r),r.length>0&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":i.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=i.resolve(e))===(n=i.resolve(n)))return"";for(var r=1;r<e.length&&47===e.charCodeAt(r);++r);for(var o=e.length,s=o-r,a=1;a<n.length&&47===n.charCodeAt(a);++a);for(var c=n.length-a,l=s<c?s:c,u=-1,h=0;h<=l;++h){if(h===l){if(c>l){if(47===n.charCodeAt(a+h))return n.slice(a+h+1);if(0===h)return n.slice(a+h)}else s>l&&(47===e.charCodeAt(r+h)?u=h:0===h&&(u=0));break}var d=e.charCodeAt(r+h);if(d!==n.charCodeAt(a+h))break;47===d&&(u=h)}var p="";for(h=r+u+1;h<=o;++h)h!==o&&47!==e.charCodeAt(h)||(0===p.length?p+="..":p+="/..");return p.length>0?p+n.slice(a+u):(a+=u,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),i=47===n,r=-1,o=!0,s=e.length-1;s>=1;--s)if(47===(n=e.charCodeAt(s))){if(!o){r=s;break}}else o=!1;return-1===r?i?"/":".":i&&1===r?"//":e.slice(0,r)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var i,r=0,o=-1,s=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,c=-1;for(i=e.length-1;i>=0;--i){var l=e.charCodeAt(i);if(47===l){if(!s){r=i+1;break}}else-1===c&&(s=!1,c=i+1),a>=0&&(l===n.charCodeAt(a)?-1==--a&&(o=i):(a=-1,o=c))}return r===o?o=c:-1===o&&(o=e.length),e.slice(r,o)}for(i=e.length-1;i>=0;--i)if(47===e.charCodeAt(i)){if(!s){r=i+1;break}}else-1===o&&(s=!1,o=i+1);return-1===o?"":e.slice(r,o)},extname:function(e){t(e);for(var n=-1,i=0,r=-1,o=!0,s=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===r&&(o=!1,r=a+1),46===c?-1===n?n=a:1!==s&&(s=1):-1!==n&&(s=-1);else if(!o){i=a+1;break}}return-1===n||-1===r||0===s||1===s&&n===r-1&&n===i+1?"":e.slice(n,r)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,i=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+i:n+"/"+i:i}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var i,r=e.charCodeAt(0),o=47===r;o?(n.root="/",i=1):i=0;for(var s=-1,a=0,c=-1,l=!0,u=e.length-1,h=0;u>=i;--u)if(47!==(r=e.charCodeAt(u)))-1===c&&(l=!1,c=u+1),46===r?-1===s?s=u:1!==h&&(h=1):-1!==s&&(h=-1);else if(!l){a=u+1;break}return-1===s||-1===c||0===h||1===h&&s===c-1&&s===a+1?-1!==c&&(n.base=n.name=0===a&&o?e.slice(1,c):e.slice(a,c)):(0===a&&o?(n.name=e.slice(1,s),n.base=e.slice(1,c)):(n.name=e.slice(a,s),n.base=e.slice(a,c)),n.ext=e.slice(s,c)),a>0?n.dir=e.slice(0,a-1):o&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,e.exports=i}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,n),o.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};(()=>{let e;if(n.r(i),n.d(i,{URI:()=>u,Utils:()=>k}),"object"==typeof process)e="win32"===process.platform;else if("object"==typeof navigator){let t=navigator.userAgent;e=t.indexOf("Windows")>=0}const t=/^\w[\w\d+.-]*$/,r=/^\//,o=/^\/\//;function s(e,n){if(!e.scheme&&n)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!t.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!r.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(o.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 ("//")')}const a="",c="/",l=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class u{static isUri(e){return e instanceof u||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,n,i,r,o=!1){"object"==typeof e?(this.scheme=e.scheme||a,this.authority=e.authority||a,this.path=e.path||a,this.query=e.query||a,this.fragment=e.fragment||a):(this.scheme=function(e,t){return e||t?e:"file"}(e,o),this.authority=t||a,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==c&&(t=c+t):t=c}return t}(this.scheme,n||a),this.query=i||a,this.fragment=r||a,s(this,o))}get fsPath(){return g(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:i,query:r,fragment:o}=e;return void 0===t?t=this.scheme:null===t&&(t=a),void 0===n?n=this.authority:null===n&&(n=a),void 0===i?i=this.path:null===i&&(i=a),void 0===r?r=this.query:null===r&&(r=a),void 0===o?o=this.fragment:null===o&&(o=a),t===this.scheme&&n===this.authority&&i===this.path&&r===this.query&&o===this.fragment?this:new d(t,n,i,r,o)}static parse(e,t=!1){const n=l.exec(e);return n?new d(n[2]||a,v(n[4]||a),v(n[5]||a),v(n[7]||a),v(n[9]||a),t):new d(a,a,a,a,a)}static file(t){let n=a;if(e&&(t=t.replace(/\\/g,c)),t[0]===c&&t[1]===c){const e=t.indexOf(c,2);-1===e?(n=t.substring(2),t=c):(n=t.substring(2,e),t=t.substring(e)||c)}return new d("file",n,t,a,a)}static from(e){const t=new d(e.scheme,e.authority,e.path,e.query,e.fragment);return s(t,!0),t}toString(e=!1){return _(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof u)return e;{const t=new d(e);return t._formatted=e.external,t._fsPath=e._sep===h?e.fsPath:null,t}}return e}}const h=e?1:void 0;class d extends u{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=g(this,!1)),this._fsPath}toString(e=!1){return e?_(this,!0):(this._formatted||(this._formatted=_(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=h),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 p={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 f(e,t,n){let i,r=-1;for(let o=0;o<e.length;o++){const s=e.charCodeAt(o);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||t&&47===s||n&&91===s||n&&93===s||n&&58===s)-1!==r&&(i+=encodeURIComponent(e.substring(r,o)),r=-1),void 0!==i&&(i+=e.charAt(o));else{void 0===i&&(i=e.substr(0,o));const t=p[s];void 0!==t?(-1!==r&&(i+=encodeURIComponent(e.substring(r,o)),r=-1),i+=t):-1===r&&(r=o)}}return-1!==r&&(i+=encodeURIComponent(e.substring(r))),void 0!==i?i:e}function m(e){let t;for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);35===i||63===i?(void 0===t&&(t=e.substr(0,n)),t+=p[i]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}function g(t,n){let i;return i=t.authority&&t.path.length>1&&"file"===t.scheme?`//${t.authority}${t.path}`:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?n?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,e&&(i=i.replace(/\//g,"\\")),i}function _(e,t){const n=t?m:f;let i="",{scheme:r,authority:o,path:s,query:a,fragment:l}=e;if(r&&(i+=r,i+=":"),(o||"file"===r)&&(i+=c,i+=c),o){let e=o.indexOf("@");if(-1!==e){const t=o.substr(0,e);o=o.substr(e+1),e=t.lastIndexOf(":"),-1===e?i+=n(t,!1,!1):(i+=n(t.substr(0,e),!1,!1),i+=":",i+=n(t.substr(e+1),!1,!0)),i+="@"}o=o.toLowerCase(),e=o.lastIndexOf(":"),-1===e?i+=n(o,!1,!0):(i+=n(o.substr(0,e),!1,!0),i+=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)}`)}i+=n(s,!0,!1)}return a&&(i+="?",i+=n(a,!1,!1)),l&&(i+="#",i+=t?l:f(l,!1,!1)),i}function b(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+b(e.substr(3)):e}}const y=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function v(e){return e.match(y)?e.replace(y,(e=>b(e))):e}var x=n(470);const w=x.posix||x,C="/";var k;!function(e){e.joinPath=function(e,...t){return e.with({path:w.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,i=!1;n[0]!==C&&(n=C+n,i=!0);let r=w.resolve(n,...t);return i&&r[0]===C&&!e.authority&&(r=r.substring(1)),e.with({path:r})},e.dirname=function(e){if(0===e.path.length||e.path===C)return e;let t=w.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},e.basename=function(e){return w.basename(e.path)},e.extname=function(e){return w.extname(e.path)}}(k||(k={}))})(),Nn=i})();const{URI:Dn,Utils:Ln}=Nn;function Mn(e,...t){return Ln.joinPath(Dn.parse(e),...t).toString(!0)}class Un{constructor(e){this.readDirectory=e,this.literalCompletions=[],this.importCompletions=[]}onCssURILiteralValue(e){this.literalCompletions.push(e)}onCssImportPath(e){this.importCompletions.push(e)}async computeCompletions(e,t){const n={items:[],isIncomplete:!1};for(const i of this.literalCompletions){const r=i.uriValue,o=jn(r);if("."===o||".."===o)n.isIncomplete=!0;else{const o=await this.providePathSuggestions(r,i.position,i.range,e,t);for(let e of o)n.items.push(e)}}for(const i of this.importCompletions){const r=i.pathValue,o=jn(r);if("."===o||".."===o)n.isIncomplete=!0;else{let o=await this.providePathSuggestions(r,i.position,i.range,e,t);"scss"===e.languageId&&o.forEach((e=>{S(e.label,"_")&&P(e.label,".scss")&&(e.textEdit?e.textEdit.newText=e.label.slice(1,-5):e.label=e.label.slice(1,-5))}));for(let e of o)n.items.push(e)}}return n}async providePathSuggestions(e,t,n,i,r){const o=jn(e),s=S(e,"'")||S(e,'"'),a=s?o.slice(0,t.character-(n.start.character+1)):o.slice(0,t.character-n.start.character),c=i.uri,l=function(e,t,n){let i;const r=e.lastIndexOf("/");if(-1===r)i=n;else{const e=t.slice(r+1),o=Wn(n.end,-e.length),s=e.indexOf(" ");let a;a=-1!==s?Wn(o,s):n.end,i=ve.create(o,a)}return i}(a,o,s?function(e,t,n){const i=Wn(e.start,t),r=Wn(e.end,n);return ve.create(i,r)}(n,1,-1):n),u=a.substring(0,a.lastIndexOf("/")+1);let h=r.resolveReference(u||".",c);if(h)try{const e=[],t=await this.readDirectory(h);for(const[n,i]of t)n.charCodeAt(0)===qn||i!==Bt.Directory&&Mn(h,n)===c||e.push(Bn(n,i===Bt.Directory,l));return e}catch(e){}return[]}}const qn=".".charCodeAt(0);function jn(e){return S(e,"'")||S(e,'"')?e.slice(1,-1):e}function Bn(e,t,n){return t?{label:Hn(e+="/"),kind:Qe.Folder,textEdit:Te.replace(n,Hn(e)),command:{title:"Suggest",command:"editor.action.triggerSuggest"}}:{label:Hn(e),kind:Qe.File,textEdit:Te.replace(n,Hn(e))}}function Hn(e){return e.replace(/(\s|\(|\)|,|"|')/g,"\\$1")}function Wn(e,t){return ye.create(e.line,e.character+t)}const zn=Je.Snippet,Kn={title:"Suggest",command:"editor.action.triggerSuggest"};var Gn,Qn;!function(e){e.Enums=" ",e.Normal="d",e.VendorPrefixed="x",e.Term="y",e.Variable="z"}(Gn||(Gn={}));class Jn{constructor(e=null,t,n){this.variablePrefix=e,this.lsOptions=t,this.cssDataManager=n,this.completionParticipants=[]}configure(e){this.defaultSettings=e}getSymbolContext(){return this.symbolContext||(this.symbolContext=new Vn(this.styleSheet)),this.symbolContext}setCompletionParticipants(e){this.completionParticipants=e||[]}async doComplete2(e,t,n,i,r=this.defaultSettings){if(!this.lsOptions.fileSystemProvider||!this.lsOptions.fileSystemProvider.readDirectory)return this.doComplete(e,t,n,r);const o=new Un(this.lsOptions.fileSystemProvider.readDirectory),s=this.completionParticipants;this.completionParticipants=[o].concat(s);const a=this.doComplete(e,t,n,r);try{const t=await o.computeCompletions(e,i);return{isIncomplete:a.isIncomplete||t.isIncomplete,itemDefaults:a.itemDefaults,items:t.items.concat(a.items)}}finally{this.completionParticipants=s}}doComplete(e,t,n,i){this.offset=e.offsetAt(t),this.position=t,this.currentWord=function(e,t){let n=t-1;const i=e.getText();for(;n>=0&&-1===' \t\n\r":{[()]},*>+'.indexOf(i.charAt(n));)n--;return i.substring(n+1,t)}(e,this.offset),this.defaultReplaceRange=ve.create(ye.create(this.position.line,this.position.character-this.currentWord.length),this.position),this.textDocument=e,this.styleSheet=n,this.documentSettings=i;try{const e={isIncomplete:!1,itemDefaults:{editRange:{start:{line:t.line,character:t.character-this.currentWord.length},end:t}},items:[]};this.nodePath=function(e,t){let n=R(e,t);const i=[];for(;n;)i.unshift(n),n=n.parent;return i}(this.styleSheet,this.offset);for(let t=this.nodePath.length-1;t>=0;t--){const n=this.nodePath[t];if(n instanceof B)this.getCompletionsForDeclarationProperty(n.getParent(),e);else if(n instanceof Y)n.parent instanceof se?this.getVariableProposals(null,e):this.getCompletionsForExpression(n,e);else if(n instanceof U){const t=n.findAParent(O.ExtendsReference,O.Ruleset);if(t)if(t.type===O.ExtendsReference)this.getCompletionsForExtendsReference(t,n,e);else{const n=t;this.getCompletionsForSelector(n,n&&n.isNested(),e)}}else if(n instanceof K)this.getCompletionsForFunctionArgument(n,n.getParent(),e);else if(n instanceof N)this.getCompletionsForDeclarations(n,e);else if(n instanceof oe)this.getCompletionsForVariableDeclaration(n,e);else if(n instanceof L)this.getCompletionsForRuleSet(n,e);else if(n instanceof se)this.getCompletionsForInterpolation(n,e);else if(n instanceof G)this.getCompletionsForFunctionDeclaration(n,e);else if(n instanceof le)this.getCompletionsForMixinReference(n,e);else if(n instanceof W)this.getCompletionsForFunctionArgument(null,n,e);else if(n instanceof J)this.getCompletionsForSupports(n,e);else if(n instanceof X)this.getCompletionsForSupportsCondition(n,e);else if(n instanceof ce)this.getCompletionsForExtendsReference(n,null,e);else if(n.type===O.URILiteral)this.getCompletionForUriLiteralValue(n,e);else if(null===n.parent)this.getCompletionForTopLevel(e);else{if(n.type!==O.StringLiteral||!this.isImportPathParent(n.parent.type))continue;this.getCompletionForImportPath(n,e)}if(e.items.length>0||this.offset>n.offset)return this.finalize(e)}return this.getCompletionsForStylesheet(e),0===e.items.length&&this.variablePrefix&&0===this.currentWord.indexOf(this.variablePrefix)&&this.getVariableProposals(null,e),this.finalize(e)}finally{this.position=null,this.currentWord=null,this.textDocument=null,this.styleSheet=null,this.symbolContext=null,this.defaultReplaceRange=null,this.nodePath=null}}isImportPathParent(e){return e===O.Import}finalize(e){return e}findInNodePath(...e){for(let t=this.nodePath.length-1;t>=0;t--){const n=this.nodePath[t];if(-1!==e.indexOf(n.type))return n}return null}getCompletionsForDeclarationProperty(e,t){return this.getPropertyProposals(e,t)}getPropertyProposals(e,t){const n=this.isTriggerPropertyValueCompletionEnabled,i=this.isCompletePropertyWithSemicolonEnabled;return this.cssDataManager.getProperties().forEach((r=>{let o,s,a=!1;e?(o=this.getCompletionRange(e.getProperty()),s=r.name,Pn(e.colonPosition)||(s+=": ",a=!0)):(o=this.getCompletionRange(null),s=r.name+": ",a=!0),!e&&i&&(s+="$0;"),e&&!e.semicolonPosition&&i&&this.offset>=this.textDocument.offsetAt(o.end)&&(s+="$0;");const c={label:r.name,documentation:Zt(r,this.doesSupportMarkdown()),tags:Xn(r)?[Xe.Deprecated]:[],textEdit:Te.replace(o,s),insertTextFormat:Je.Snippet,kind:Qe.Property};r.restrictions||(a=!1),n&&a&&(c.command=Kn);const l=(255-("number"==typeof r.relevance?Math.min(Math.max(r.relevance,0),99):50)).toString(16),u=S(r.name,"-")?Gn.VendorPrefixed:Gn.Normal;c.sortText=u+"_"+l,t.items.push(c)})),this.completionParticipants.forEach((e=>{e.onCssProperty&&e.onCssProperty({propertyName:this.currentWord,range:this.defaultReplaceRange})})),t}get isTriggerPropertyValueCompletionEnabled(){return this.documentSettings?.triggerPropertyValueCompletion??!0}get isCompletePropertyWithSemicolonEnabled(){return this.documentSettings?.completePropertyWithSemicolon??!0}getCompletionsForDeclarationValue(e,t){const n=e.getFullPropertyName(),i=this.cssDataManager.getProperty(n);let r=e.getValue()||null;for(;r&&r.hasChildren();)r=r.findChildAtOffset(this.offset,!1);if(this.completionParticipants.forEach((e=>{e.onCssPropertyValue&&e.onCssPropertyValue({propertyName:n,propertyValue:this.currentWord,range:this.getCompletionRange(r)})})),i){if(i.restrictions)for(const e of i.restrictions)switch(e){case"color":this.getColorProposals(i,r,t);break;case"position":this.getPositionProposals(i,r,t);break;case"repeat":this.getRepeatStyleProposals(i,r,t);break;case"line-style":this.getLineStyleProposals(i,r,t);break;case"line-width":this.getLineWidthProposals(i,r,t);break;case"geometry-box":this.getGeometryBoxProposals(i,r,t);break;case"box":this.getBoxProposals(i,r,t);break;case"image":this.getImageProposals(i,r,t);break;case"timing-function":this.getTimingFunctionProposals(i,r,t);break;case"shape":this.getBasicShapeProposals(i,r,t)}this.getValueEnumProposals(i,r,t),this.getCSSWideKeywordProposals(i,r,t),this.getUnitProposals(i,r,t)}else{const n=function(e,t){const n=t.getFullPropertyName(),i=new Yn;function r(e){return(e instanceof V||e instanceof re||e instanceof ee)&&i.add(e.getText()),!0}function o(e){const t=e.getFullPropertyName();return n===t}function s(e){if(e instanceof j&&e!==t&&o(e)){const t=e.getValue();t&&t.accept(r)}return!0}return e.accept(s),i}(this.styleSheet,e);for(const e of n.getEntries())t.items.push({label:e,textEdit:Te.replace(this.getCompletionRange(r),e),kind:Qe.Value})}return this.getVariableProposals(r,t),this.getTermProposals(i,r,t),t}getValueEnumProposals(e,t,n){if(e.values)for(const i of e.values){let r,o=i.name;if(P(o,")")){const e=o.lastIndexOf("(");-1!==e&&(o=o.substring(0,e+1)+"$1"+o.substring(e+1),r=zn)}let s=Gn.Enums;S(i.name,"-")&&(s+=Gn.VendorPrefixed);const a={label:i.name,documentation:Zt(i,this.doesSupportMarkdown()),tags:Xn(e)?[Xe.Deprecated]:[],textEdit:Te.replace(this.getCompletionRange(t),o),sortText:s,kind:Qe.Value,insertTextFormat:r};n.items.push(a)}return n}getCSSWideKeywordProposals(e,t,n){for(const e in vn)n.items.push({label:e,documentation:vn[e],textEdit:Te.replace(this.getCompletionRange(t),e),kind:Qe.Value});for(const e in xn){const i=Zn(e);n.items.push({label:e,documentation:xn[e],textEdit:Te.replace(this.getCompletionRange(t),i),kind:Qe.Function,insertTextFormat:zn,command:S(e,"var")?Kn:void 0})}return n}getCompletionsForInterpolation(e,t){return this.offset>=e.offset+2&&this.getVariableProposals(null,t),t}getVariableProposals(e,t){const n=this.getSymbolContext().findSymbolsAtOffset(this.offset,I.Variable);for(const i of n){const n=S(i.name,"--")?`var(${i.name})`:i.name,r={label:i.name,documentation:i.value?E(i.value):i.value,textEdit:Te.replace(this.getCompletionRange(e),n),kind:Qe.Variable,sortText:Gn.Variable};if("string"==typeof r.documentation&&pn(r.documentation)&&(r.kind=Qe.Color),i.node.type===O.FunctionParameter){const e=i.node.getParent();e.type===O.MixinDeclaration&&(r.detail=pe.t("argument from '{0}'",e.getName()))}t.items.push(r)}return t}getVariableProposalsForCSSVarFunction(e){const t=new Yn;this.styleSheet.acceptVisitor(new ti(t,this.offset));let n=this.getSymbolContext().findSymbolsAtOffset(this.offset,I.Variable);for(const i of n){if(S(i.name,"--")){const t={label:i.name,documentation:i.value?E(i.value):i.value,textEdit:Te.replace(this.getCompletionRange(null),i.name),kind:Qe.Variable};"string"==typeof t.documentation&&pn(t.documentation)&&(t.kind=Qe.Color),e.items.push(t)}t.remove(i.name)}for(const n of t.getEntries())if(S(n,"--")){const t={label:n,textEdit:Te.replace(this.getCompletionRange(null),n),kind:Qe.Variable};e.items.push(t)}return e}getUnitProposals(e,t,n){let i="0";if(this.currentWord.length>0){const e=this.currentWord.match(/^-?\d[\.\d+]*/);e&&(i=e[0],n.isIncomplete=i.length===this.currentWord.length)}else 0===this.currentWord.length&&(n.isIncomplete=!0);if(t&&t.parent&&t.parent.type===O.Term&&(t=t.getParent()),e.restrictions)for(const r of e.restrictions){const e=$n[r];if(e)for(const r of e){const e=i+r;n.items.push({label:e,textEdit:Te.replace(this.getCompletionRange(t),e),kind:Qe.Unit})}}return n}getCompletionRange(e){if(e&&e.offset<=this.offset&&this.offset<=e.end){const t=-1!==e.end?this.textDocument.positionAt(e.end):this.position,n=this.textDocument.positionAt(e.offset);if(n.line===t.line)return ve.create(n,t)}return this.defaultReplaceRange}getColorProposals(e,t,n){for(const e in cn)n.items.push({label:e,documentation:cn[e],textEdit:Te.replace(this.getCompletionRange(t),e),kind:Qe.Color});for(const e in un)n.items.push({label:e,documentation:un[e],textEdit:Te.replace(this.getCompletionRange(t),e),kind:Qe.Value});const i=new Yn;this.styleSheet.acceptVisitor(new ei(i,this.offset));for(const e of i.getEntries())n.items.push({label:e,textEdit:Te.replace(this.getCompletionRange(t),e),kind:Qe.Color});for(const e of sn)n.items.push({label:e.label,detail:e.func,documentation:e.desc,textEdit:Te.replace(this.getCompletionRange(t),e.insertText),insertTextFormat:zn,kind:Qe.Function});return n}getPositionProposals(e,t,n){for(const e in fn)n.items.push({label:e,documentation:fn[e],textEdit:Te.replace(this.getCompletionRange(t),e),kind:Qe.Value});return n}getRepeatStyleProposals(e,t,n){for(const e in mn)n.items.push({label:e,documentation:mn[e],textEdit:Te.replace(this.getCompletionRange(t),e),kind:Qe.Value});return n}getLineStyleProposals(e,t,n){for(const e in gn)n.items.push({label:e,documentation:gn[e],textEdit:Te.replace(this.getCompletionRange(t),e),kind:Qe.Value});return n}getLineWidthProposals(e,t,n){for(const e of _n)n.items.push({label:e,textEdit:Te.replace(this.getCompletionRange(t),e),kind:Qe.Value});return n}getGeometryBoxProposals(e,t,n){for(const e in yn)n.items.push({label:e,documentation:yn[e],textEdit:Te.replace(this.getCompletionRange(t),e),kind:Qe.Value});return n}getBoxProposals(e,t,n){for(const e in bn)n.items.push({label:e,documentation:bn[e],textEdit:Te.replace(this.getCompletionRange(t),e),kind:Qe.Value});return n}getImageProposals(e,t,n){for(const e in wn){const i=Zn(e);n.items.push({label:e,documentation:wn[e],textEdit:Te.replace(this.getCompletionRange(t),i),kind:Qe.Function,insertTextFormat:e!==i?zn:void 0})}return n}getTimingFunctionProposals(e,t,n){for(const e in Cn){const i=Zn(e);n.items.push({label:e,documentation:Cn[e],textEdit:Te.replace(this.getCompletionRange(t),i),kind:Qe.Function,insertTextFormat:e!==i?zn:void 0})}return n}getBasicShapeProposals(e,t,n){for(const e in kn){const i=Zn(e);n.items.push({label:e,documentation:kn[e],textEdit:Te.replace(this.getCompletionRange(t),i),kind:Qe.Function,insertTextFormat:e!==i?zn:void 0})}return n}getCompletionsForStylesheet(e){const t=this.styleSheet.findFirstChildBeforeOffset(this.offset);return t?t instanceof L?this.getCompletionsForRuleSet(t,e):t instanceof J?this.getCompletionsForSupports(t,e):e:this.getCompletionForTopLevel(e)}getCompletionForTopLevel(e){return this.cssDataManager.getAtDirectives().forEach((t=>{e.items.push({label:t.name,textEdit:Te.replace(this.getCompletionRange(null),t.name),documentation:Zt(t,this.doesSupportMarkdown()),tags:Xn(t)?[Xe.Deprecated]:[],kind:Qe.Keyword})})),this.getCompletionsForSelector(null,!1,e),e}getCompletionsForRuleSet(e,t){const n=e.getDeclarations();if(n&&n.endsWith("}")&&this.offset>=n.end)return this.getCompletionForTopLevel(t);return!n||this.offset<=n.offset?this.getCompletionsForSelector(e,e.isNested(),t):this.getCompletionsForDeclarations(e.getDeclarations(),t)}getCompletionsForSelector(e,t,n){const i=this.findInNodePath(O.PseudoSelector,O.IdentifierSelector,O.ClassSelector,O.ElementNameSelector);!i&&this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord,this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord),this.defaultReplaceRange=ve.create(ye.create(this.position.line,this.position.character-this.currentWord.length),this.position));this.cssDataManager.getPseudoClasses().forEach((e=>{const t=Zn(e.name),r={label:e.name,textEdit:Te.replace(this.getCompletionRange(i),t),documentation:Zt(e,this.doesSupportMarkdown()),tags:Xn(e)?[Xe.Deprecated]:[],kind:Qe.Function,insertTextFormat:e.name!==t?zn:void 0};S(e.name,":-")&&(r.sortText=Gn.VendorPrefixed),n.items.push(r)}));if(this.cssDataManager.getPseudoElements().forEach((e=>{const t=Zn(e.name),r={label:e.name,textEdit:Te.replace(this.getCompletionRange(i),t),documentation:Zt(e,this.doesSupportMarkdown()),tags:Xn(e)?[Xe.Deprecated]:[],kind:Qe.Function,insertTextFormat:e.name!==t?zn:void 0};S(e.name,"::-")&&(r.sortText=Gn.VendorPrefixed),n.items.push(r)})),!t){for(const e of An)n.items.push({label:e,textEdit:Te.replace(this.getCompletionRange(i),e),kind:Qe.Keyword});for(const e of Sn)n.items.push({label:e,textEdit:Te.replace(this.getCompletionRange(i),e),kind:Qe.Keyword})}const r={};r[this.currentWord]=!0;const o=this.textDocument.getText();if(this.styleSheet.accept((e=>{if(e.type===O.SimpleSelector&&e.length>0){const t=o.substr(e.offset,e.length);return"."!==t.charAt(0)||r[t]||(r[t]=!0,n.items.push({label:t,textEdit:Te.replace(this.getCompletionRange(i),t),kind:Qe.Keyword})),!1}return!0})),e&&e.isNested()){const t=e.getSelectors().findFirstChildBeforeOffset(this.offset);t&&0===e.getSelectors().getChildren().indexOf(t)&&this.getPropertyProposals(null,n)}return n}getCompletionsForDeclarations(e,t){if(!e||this.offset===e.offset)return t;const n=e.findFirstChildBeforeOffset(this.offset);if(!n)return this.getCompletionsForDeclarationProperty(null,t);if(n instanceof q){const e=n;if(!Pn(e.colonPosition)||this.offset<=e.colonPosition)return this.getCompletionsForDeclarationProperty(e,t);if(Pn(e.semicolonPosition)&&e.semicolonPosition<this.offset)return this.offset===e.semicolonPosition+1?t:this.getCompletionsForDeclarationProperty(null,t);if(e instanceof j)return this.getCompletionsForDeclarationValue(e,t)}else n instanceof ce?this.getCompletionsForExtendsReference(n,null,t):(this.currentWord&&"@"===this.currentWord[0]||n instanceof L)&&this.getCompletionsForDeclarationProperty(null,t);return t}getCompletionsForVariableDeclaration(e,t){return this.offset&&Pn(e.colonPosition)&&this.offset>e.colonPosition&&this.getVariableProposals(e.getValue()||null,t),t}getCompletionsForExpression(e,t){const n=e.getParent();if(n instanceof K)return this.getCompletionsForFunctionArgument(n,n.getParent(),t),t;const i=e.findParent(O.Declaration);if(!i)return this.getTermProposals(void 0,null,t),t;const r=e.findChildAtOffset(this.offset,!0);return r?r instanceof re||r instanceof V?this.getCompletionsForDeclarationValue(i,t):t:this.getCompletionsForDeclarationValue(i,t)}getCompletionsForFunctionArgument(e,t,n){const i=t.getIdentifier();return i&&i.matches("var")&&(t.getArguments().hasChildren()&&t.getArguments().getChild(0)!==e||this.getVariableProposalsForCSSVarFunction(n)),n}getCompletionsForFunctionDeclaration(e,t){const n=e.getDeclarations();return n&&this.offset>n.offset&&this.offset<n.end&&this.getTermProposals(void 0,null,t),t}getCompletionsForMixinReference(e,t){const n=this.getSymbolContext().findSymbolsAtOffset(this.offset,I.Mixin);for(const e of n)e.node instanceof ue&&t.items.push(this.makeTermProposal(e,e.node.getParameters(),null));const i=e.getIdentifier()||null;return this.completionParticipants.forEach((e=>{e.onCssMixinReference&&e.onCssMixinReference({mixinName:this.currentWord,range:this.getCompletionRange(i)})})),t}getTermProposals(e,t,n){const i=this.getSymbolContext().findSymbolsAtOffset(this.offset,I.Function);for(const e of i)e.node instanceof G&&n.items.push(this.makeTermProposal(e,e.node.getParameters(),t));return n}makeTermProposal(e,t,n){e.node;const i=t.getChildren().map((e=>e instanceof z?e.getName():e.getText())),r=e.name+"("+i.map(((e,t)=>"${"+(t+1)+":"+e+"}")).join(", ")+")";return{label:e.name,detail:e.name+"("+i.join(", ")+")",textEdit:Te.replace(this.getCompletionRange(n),r),insertTextFormat:zn,kind:Qe.Function,sortText:Gn.Term}}getCompletionsForSupportsCondition(e,t){const n=e.findFirstChildBeforeOffset(this.offset);if(n){if(n instanceof j)return!Pn(n.colonPosition)||this.offset<=n.colonPosition?this.getCompletionsForDeclarationProperty(n,t):this.getCompletionsForDeclarationValue(n,t);if(n instanceof X)return this.getCompletionsForSupportsCondition(n,t)}return Pn(e.lParent)&&this.offset>e.lParent&&(!Pn(e.rParent)||this.offset<=e.rParent)?this.getCompletionsForDeclarationProperty(null,t):t}getCompletionsForSupports(e,t){const n=e.getDeclarations();if(!n||this.offset<=n.offset){const n=e.findFirstChildBeforeOffset(this.offset);return n instanceof X?this.getCompletionsForSupportsCondition(n,t):t}return this.getCompletionForTopLevel(t)}getCompletionsForExtendsReference(e,t,n){return n}getCompletionForUriLiteralValue(e,t){let n,i,r;if(e.hasChildren()){const t=e.getChild(0);n=t.getText(),i=this.position,r=this.getCompletionRange(t)}else{n="",i=this.position;const t=this.textDocument.positionAt(e.offset+4);r=ve.create(t,t)}return this.completionParticipants.forEach((e=>{e.onCssURILiteralValue&&e.onCssURILiteralValue({uriValue:n,position:i,range:r})})),t}getCompletionForImportPath(e,t){return this.completionParticipants.forEach((t=>{t.onCssImportPath&&t.onCssImportPath({pathValue:e.getText(),position:this.position,range:this.getCompletionRange(e)})})),t}hasCharacterAtPosition(e,t){const n=this.textDocument.getText();return e>=0&&e<n.length&&n.charAt(e)===t}doesSupportMarkdown(){if(!Pn(this.supportsMarkdown)){if(!Pn(this.lsOptions.clientCapabilities))return this.supportsMarkdown=!0,this.supportsMarkdown;const e=this.lsOptions.clientCapabilities.textDocument?.completion?.completionItem?.documentationFormat;this.supportsMarkdown=Array.isArray(e)&&-1!==e.indexOf(Ke.Markdown)}return this.supportsMarkdown}}function Xn(e){return!(!e.status||"nonstandard"!==e.status&&"obsolete"!==e.status)}class Yn{constructor(){this.entries={}}add(e){this.entries[e]=!0}remove(e){delete this.entries[e]}getEntries(){return Object.keys(this.entries)}}function Zn(e){return e.replace(/\(\)$/,"($1)")}class ei{constructor(e,t){this.entries=e,this.currentOffset=t}visitNode(e){return(e instanceof ee||e instanceof W&&dn(e))&&(this.currentOffset<e.offset||e.end<this.currentOffset)&&this.entries.add(e.getText()),!0}}class ti{constructor(e,t){this.entries=e,this.currentOffset=t}visitNode(e){return e instanceof V&&e.isCustomProperty&&(this.currentOffset<e.offset||e.end<this.currentOffset)&&this.entries.add(e.getText()),!0}}!function(e){function t(e){const t=e.match(/^['"](.*)["']$/);return t?t[1]:e}e.ensure=function(e,n){return n+t(e)+n},e.remove=t}(Qn||(Qn={}));const ni=he.Warning,ii=he.Error,ri=he.Ignore;class oi{constructor(e,t,n){this.id=e,this.message=t,this.defaultValue=n}}const si={AllVendorPrefixes:new oi("compatibleVendorPrefixes",pe.t("When using a vendor-specific prefix make sure to also include all other vendor-specific properties"),ri),IncludeStandardPropertyWhenUsingVendorPrefix:new oi("vendorPrefix",pe.t("When using a vendor-specific prefix also include the standard property"),ni),DuplicateDeclarations:new oi("duplicateProperties",pe.t("Do not use duplicate style definitions"),ri),EmptyRuleSet:new oi("emptyRules",pe.t("Do not use empty rulesets"),ni),ImportStatemement:new oi("importStatement",pe.t("Import statements do not load in parallel"),ri),BewareOfBoxModelSize:new oi("boxModel",pe.t("Do not use width or height when using padding or border"),ri),UniversalSelector:new oi("universalSelector",pe.t("The universal selector (*) is known to be slow"),ri),ZeroWithUnit:new oi("zeroUnits",pe.t("No unit for zero needed"),ri),RequiredPropertiesForFontFace:new oi("fontFaceProperties",pe.t("@font-face rule must define 'src' and 'font-family' properties"),ni),HexColorLength:new oi("hexColorLength",pe.t("Hex colors must consist of three, four, six or eight hex numbers"),ii),ArgsInColorFunction:new oi("argumentsInColorFunction",pe.t("Invalid number of parameters"),ii),UnknownProperty:new oi("unknownProperties",pe.t("Unknown property."),ni),UnknownAtRules:new oi("unknownAtRules",pe.t("Unknown at-rule."),ni),IEStarHack:new oi("ieHack",pe.t("IE hacks are only necessary when supporting IE7 and older"),ri),UnknownVendorSpecificProperty:new oi("unknownVendorSpecificProperties",pe.t("Unknown vendor specific property."),ri),PropertyIgnoredDueToDisplay:new oi("propertyIgnoredDueToDisplay",pe.t("Property is ignored due to the display."),ni),AvoidImportant:new oi("important",pe.t("Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored."),ri),AvoidFloat:new oi("float",pe.t("Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes."),ri),AvoidIdSelector:new oi("idSelector",pe.t("Selectors should not contain IDs because these rules are too tightly coupled with the HTML."),ri)},ai={ValidProperties:new class{constructor(e,t,n){this.id=e,this.message=t,this.defaultValue=n}}("validProperties",pe.t("A list of properties that are not validated against the `unknownProperties` rule."),[])};class ci{constructor(e){this.fullPropertyName=e.getFullPropertyName().toLowerCase(),this.node=e}}function li(e,t,n,i){const r=e[t];r.value=n,n&&(En(r.properties,i)||r.properties.push(i))}function ui(e,t,n,i){"top"===t||"right"===t||"bottom"===t||"left"===t?li(e,t,n,i):function(e,t,n){li(e,"top",t,n),li(e,"right",t,n),li(e,"bottom",t,n),li(e,"left",t,n)}(e,n,i)}function hi(e,t,n){switch(t.length){case 1:ui(e,void 0,t[0],n);break;case 2:ui(e,"top",t[0],n),ui(e,"bottom",t[0],n),ui(e,"right",t[1],n),ui(e,"left",t[1],n);break;case 3:ui(e,"top",t[0],n),ui(e,"right",t[1],n),ui(e,"left",t[1],n),ui(e,"bottom",t[2],n);break;case 4:ui(e,"top",t[0],n),ui(e,"right",t[1],n),ui(e,"bottom",t[2],n),ui(e,"left",t[3],n)}}function di(e,t){for(let n of t)if(e.matches(n))return!0;return!1}function pi(e,t=!0){return(!t||!di(e,["initial","unset"]))&&0!==parseFloat(e.getText())}function fi(e,t=!0){return e.map((e=>pi(e,t)))}function mi(e,t=!0){return!di(e,["none","hidden"])&&(!t||!di(e,["initial","unset"]))}function gi(e,t=!0){return e.map((e=>mi(e,t)))}function _i(e){const t=e.getChildren();if(1===t.length){const e=t[0];return pi(e)&&mi(e)}for(const e of t){const t=e;if(!pi(t,!1)||!mi(t,!1))return!1}return!0}class bi{constructor(){this.data={}}add(e,t,n){let i=this.data[e];i||(i={nodes:[],names:[]},this.data[e]=i),i.names.push(t),n&&i.nodes.push(n)}}class yi{static entries(e,t,n,i,r){const o=new yi(t,n,i);return e.acceptVisitor(o),o.completeValidations(),o.getEntries(r)}constructor(e,t,n){this.cssDataManager=n,this.warnings=[],this.settings=t,this.documentText=e.getText(),this.keyframes=new bi,this.validProperties={};const i=t.getSetting(ai.ValidProperties);Array.isArray(i)&&i.forEach((e=>{if("string"==typeof e){const t=e.trim().toLowerCase();t.length&&(this.validProperties[t]=!0)}}))}isValidPropertyDeclaration(e){const t=e.fullPropertyName;return this.validProperties[t]}fetch(e,t){const n=[];for(const i of e)i.fullPropertyName===t&&n.push(i);return n}fetchWithValue(e,t,n){const i=[];for(const r of e)if(r.fullPropertyName===t){const e=r.node.getValue();e&&this.findValueInExpression(e,n)&&i.push(r)}return i}findValueInExpression(e,t){let n=!1;return e.accept((e=>(e.type===O.Identifier&&e.matches(t)&&(n=!0),!n))),n}getEntries(e=he.Warning|he.Error){return this.warnings.filter((t=>!!(t.getLevel()&e)))}addEntry(e,t,n){const i=new de(e,t,this.settings.getRule(t),n);this.warnings.push(i)}getMissingNames(e,t){const n=e.slice(0);for(let e=0;e<t.length;e++){const i=n.indexOf(t[e]);-1!==i&&(n[i]=null)}let i=null;for(let e=0;e<n.length;e++){const t=n[e];t&&(i=null===i?pe.t("'{0}'",t):pe.t("{0}, '{1}'",i,t))}return i}visitNode(e){switch(e.type){case O.UnknownAtRule:return this.visitUnknownAtRule(e);case O.Keyframe:return this.visitKeyframe(e);case O.FontFace:return this.visitFontFace(e);case O.Ruleset:return this.visitRuleSet(e);case O.SimpleSelector:return this.visitSimpleSelector(e);case O.Function:return this.visitFunction(e);case O.NumericValue:return this.visitNumericValue(e);case O.Import:return this.visitImport(e);case O.HexColorValue:return this.visitHexColorValue(e);case O.Prio:return this.visitPrio(e);case O.IdentifierSelector:return this.visitIdentifierSelector(e)}return!0}completeValidations(){this.validateKeyframes()}visitUnknownAtRule(e){const t=e.getChild(0);if(!t)return!1;return!this.cssDataManager.getAtDirective(t.getText())&&(this.addEntry(t,si.UnknownAtRules,`Unknown at rule ${t.getText()}`),!0)}visitKeyframe(e){const t=e.getKeyword();if(!t)return!1;const n=t.getText();return this.keyframes.add(e.getName(),n,"@keyframes"!==n?t:null),!0}validateKeyframes(){const e=["@-webkit-keyframes","@-moz-keyframes","@-o-keyframes"];for(const t in this.keyframes.data){const n=this.keyframes.data[t].names,i=-1===n.indexOf("@keyframes");if(!i&&1===n.length)continue;const r=this.getMissingNames(e,n);if(r||i)for(const e of this.keyframes.data[t].nodes){if(i){const t=pe.t("Always define standard rule '@keyframes' when defining keyframes.");this.addEntry(e,si.IncludeStandardPropertyWhenUsingVendorPrefix,t)}if(r){const t=pe.t("Always include all vendor specific rules: Missing: {0}",r);this.addEntry(e,si.AllVendorPrefixes,t)}}}return!0}visitSimpleSelector(e){const t=this.documentText.charAt(e.offset);return 1===e.length&&"*"===t&&this.addEntry(e,si.UniversalSelector),!0}visitIdentifierSelector(e){return this.addEntry(e,si.AvoidIdSelector),!0}visitImport(e){return this.addEntry(e,si.ImportStatemement),!0}visitRuleSet(e){const t=e.getDeclarations();if(!t)return!1;t.hasChildren()||this.addEntry(e.getSelectors(),si.EmptyRuleSet);const n=[];for(const e of t.getChildren())e instanceof j&&n.push(new ci(e));const i=function(e){const t={top:{value:!1,properties:[]},right:{value:!1,properties:[]},bottom:{value:!1,properties:[]},left:{value:!1,properties:[]}};for(const n of e){const e=n.node.value;if(void 0!==e)switch(n.fullPropertyName){case"box-sizing":return{top:{value:!1,properties:[]},right:{value:!1,properties:[]},bottom:{value:!1,properties:[]},left:{value:!1,properties:[]}};case"width":t.width=n;break;case"height":t.height=n;break;default:const i=n.fullPropertyName.split("-");switch(i[0]){case"border":switch(i[1]){case void 0:case"top":case"right":case"bottom":case"left":switch(i[2]){case void 0:ui(t,i[1],_i(e),n);break;case"width":ui(t,i[1],pi(e,!1),n);break;case"style":ui(t,i[1],mi(e,!0),n)}break;case"width":hi(t,fi(e.getChildren(),!1),n);break;case"style":hi(t,gi(e.getChildren(),!0),n)}break;case"padding":1===i.length?hi(t,fi(e.getChildren(),!0),n):ui(t,i[1],pi(e,!0),n)}}}return t}(n);if(i.width){let e=[];if(i.right.value&&(e=On(e,i.right.properties)),i.left.value&&(e=On(e,i.left.properties)),0!==e.length){for(const t of e)this.addEntry(t.node,si.BewareOfBoxModelSize);this.addEntry(i.width.node,si.BewareOfBoxModelSize)}}if(i.height){let e=[];if(i.top.value&&(e=On(e,i.top.properties)),i.bottom.value&&(e=On(e,i.bottom.properties)),0!==e.length){for(const t of e)this.addEntry(t.node,si.BewareOfBoxModelSize);this.addEntry(i.height.node,si.BewareOfBoxModelSize)}}let r=this.fetchWithValue(n,"display","inline-block");if(r.length>0){const e=this.fetch(n,"float");for(let t=0;t<e.length;t++){const n=e[t].node,i=n.getValue();i&&!i.matches("none")&&this.addEntry(n,si.PropertyIgnoredDueToDisplay,pe.t("inline-block is ignored due to the float. If 'float' has a value other than 'none', the box is floated and 'display' is treated as 'block'"))}}if(r=this.fetchWithValue(n,"display","block"),r.length>0){const e=this.fetch(n,"vertical-align");for(let t=0;t<e.length;t++)this.addEntry(e[t].node,si.PropertyIgnoredDueToDisplay,pe.t("Property is ignored due to the display. With 'display: block', vertical-align should not be used."))}const o=this.fetch(n,"float");for(let e=0;e<o.length;e++){const t=o[e];this.isValidPropertyDeclaration(t)||this.addEntry(t.node,si.AvoidFloat)}for(let e=0;e<n.length;e++){const t=n[e];if("background"!==t.fullPropertyName&&!this.validProperties[t.fullPropertyName]){const e=t.node.getValue();if(e&&"-"!==this.documentText.charAt(e.offset)){const e=this.fetch(n,t.fullPropertyName);if(e.length>1)for(let n=0;n<e.length;n++){const i=e[n].node.getValue();i&&"-"!==this.documentText.charAt(i.offset)&&e[n]!==t&&this.addEntry(t.node,si.DuplicateDeclarations)}}}}if(!e.getSelectors().matches(":export")){const t=new bi;let i=!1;for(const e of n){const n=e.node;if(this.isCSSDeclaration(n)){let i=e.fullPropertyName;const r=i.charAt(0);if("-"===r){if("-"!==i.charAt(1)){this.cssDataManager.isKnownProperty(i)||this.validProperties[i]||this.addEntry(n.getProperty(),si.UnknownVendorSpecificProperty);const e=n.getNonPrefixedPropertyName();t.add(e,i,n.getProperty())}}else{const e=i;"*"!==r&&"_"!==r||(this.addEntry(n.getProperty(),si.IEStarHack),i=i.substr(1)),this.cssDataManager.isKnownProperty(e)||this.cssDataManager.isKnownProperty(i)||this.validProperties[i]||this.addEntry(n.getProperty(),si.UnknownProperty,pe.t("Unknown property: '{0}'",n.getFullPropertyName())),t.add(i,i,null)}}else i=!0}if(!i)for(const n in t.data){const i=t.data[n],r=i.names,o=this.cssDataManager.isStandardProperty(n)&&-1===r.indexOf(n);if(!o&&1===r.length)continue;const s=new Set(o?i.nodes:[]);if(o){const t=this.getContextualVendorSpecificPseudoElements(e);for(const e of i.nodes){const i=e.getName(),r=i.substring(0,i.length-n.length);t.some((e=>e.startsWith(r)))&&s.delete(e)}}const a=[];for(let e=0,t=yi.prefixes.length;e<t;e++){const t=yi.prefixes[e];this.cssDataManager.isStandardProperty(t+n)&&a.push(t+n)}const c=this.getMissingNames(a,r);if(c||o)for(const e of i.nodes){if(o&&s.has(e)){const t=pe.t("Also define the standard property '{0}' for compatibility",n);this.addEntry(e,si.IncludeStandardPropertyWhenUsingVendorPrefix,t)}if(c){const t=pe.t("Always include all vendor specific properties: Missing: {0}",c);this.addEntry(e,si.AllVendorPrefixes,t)}}}}return!0}getContextualVendorSpecificPseudoElements(e){function t(e,n){for(const i of n.getChildren()){if(i.type===O.PseudoSelector){const t=i.getChildren()[0]?.getText();t&&e.add(t)}t(e,i)}}const n=new Set;return function e(n,i){if(i.type===O.Ruleset)for(const e of i.getSelectors().getChildren())t(n,e);return i.parent?e(n,i.parent):void 0}(n,e),Array.from(n)}visitPrio(e){return this.addEntry(e,si.AvoidImportant),!0}visitNumericValue(e){const t=e.findParent(O.Function);if(t&&"calc"===t.getName())return!0;const n=e.findParent(O.Declaration);if(n){if(n.getValue()){const t=e.getValue();if(!t.unit||-1===$n.length.indexOf(t.unit.toLowerCase()))return!0;0===parseFloat(t.value)&&t.unit&&!this.validProperties[n.getFullPropertyName()]&&this.addEntry(e,si.ZeroWithUnit)}}return!0}visitFontFace(e){const t=e.getDeclarations();if(!t)return!1;let n=!1,i=!1,r=!1;for(const e of t.getChildren())if(this.isCSSDeclaration(e)){const t=e.getProperty().getName().toLowerCase();"src"===t&&(n=!0),"font-family"===t&&(i=!0)}else r=!0;return r||n&&i||this.addEntry(e,si.RequiredPropertiesForFontFace),!0}isCSSDeclaration(e){if(e instanceof j){if(!e.getValue())return!1;const t=e.getProperty();if(!t)return!1;const n=t.getIdentifier();return!(!n||n.containsInterpolation())}return!1}visitHexColorValue(e){const t=e.length;return 9!==t&&7!==t&&5!==t&&4!==t&&this.addEntry(e,si.HexColorLength),!1}visitFunction(e){const t=e.getName().toLowerCase();let n=-1,i=0;switch(t){case"rgb(":case"hsl(":n=3;break;case"rgba(":case"hsla(":n=4}return-1!==n&&(e.getArguments().accept((e=>!(e instanceof Z)||(i+=1,!1))),i!==n&&this.addEntry(e,si.ArgsInColorFunction)),!0}}yi.prefixes=["-ms-","-moz-","-o-","-webkit-"];"/".charCodeAt(0),"\n".charCodeAt(0),"\r".charCodeAt(0),"\f".charCodeAt(0),"$".charCodeAt(0),"#".charCodeAt(0),"{".charCodeAt(0),"=".charCodeAt(0),"!".charCodeAt(0),"<".charCodeAt(0),">".charCodeAt(0),".".charCodeAt(0),"@".charCodeAt(0);let vi=p.CustomToken;vi++,vi++,vi++,vi++,vi++,vi++,vi++,vi++,vi++;class xi{constructor(e,t){this.id=e,this.message=t}}new xi("scss-fromexpected",pe.t("'from' expected")),new xi("scss-throughexpected",pe.t("'through' or 'to' expected")),new xi("scss-fromexpected",pe.t("'in' expected"));const wi=pe.t("Sass documentation");class Ci extends Jn{constructor(e,t){super("$",e,t),ki(Ci.scssModuleLoaders),ki(Ci.scssModuleBuiltIns)}isImportPathParent(e){return e===O.Forward||e===O.Use||super.isImportPathParent(e)}getCompletionForImportPath(e,t){const n=e.getParent().type;if(n===O.Forward||n===O.Use)for(let n of Ci.scssModuleBuiltIns){const i={label:n.label,documentation:n.documentation,textEdit:Te.replace(this.getCompletionRange(e),`'${n.label}'`),kind:Qe.Module};t.items.push(i)}return super.getCompletionForImportPath(e,t)}createReplaceFunction(){let e=1;return(t,n)=>"\\"+n+": ${"+e+++":"+(Ci.variableDefaults[n]||"")+"}"}createFunctionProposals(e,t,n,i){for(const r of e){const e=r.func.replace(/\[?(\$\w+)\]?/g,this.createReplaceFunction()),o={label:r.func.substr(0,r.func.indexOf("(")),detail:r.func,documentation:r.desc,textEdit:Te.replace(this.getCompletionRange(t),e),insertTextFormat:Je.Snippet,kind:Qe.Function};n&&(o.sortText="z"),i.items.push(o)}return i}getCompletionsForSelector(e,t,n){return this.createFunctionProposals(Ci.selectorFuncs,null,!0,n),super.getCompletionsForSelector(e,t,n)}getTermProposals(e,t,n){let i=Ci.builtInFuncs;return e&&(i=i.filter((t=>!t.type||!e.restrictions||-1!==e.restrictions.indexOf(t.type)))),this.createFunctionProposals(i,t,!0,n),super.getTermProposals(e,t,n)}getColorProposals(e,t,n){return this.createFunctionProposals(Ci.colorProposals,t,!1,n),super.getColorProposals(e,t,n)}getCompletionsForDeclarationProperty(e,t){return this.getCompletionForAtDirectives(t),this.getCompletionsForSelector(null,!0,t),super.getCompletionsForDeclarationProperty(e,t)}getCompletionsForExtendsReference(e,t,n){const i=this.getSymbolContext().findSymbolsAtOffset(this.offset,I.Rule);for(const e of i){const i={label:e.name,textEdit:Te.replace(this.getCompletionRange(t),e.name),kind:Qe.Function};n.items.push(i)}return n}getCompletionForAtDirectives(e){return e.items.push(...Ci.scssAtDirectives),e}getCompletionForTopLevel(e){return this.getCompletionForAtDirectives(e),this.getCompletionForModuleLoaders(e),super.getCompletionForTopLevel(e),e}getCompletionForModuleLoaders(e){return e.items.push(...Ci.scssModuleLoaders),e}}function ki(e){e.forEach((e=>{if(e.documentation&&e.references&&e.references.length>0){const 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((e=>`[${e.name}](${e.url})`)).join(" | "),e.documentation=t}}))}Ci.variableDefaults={$red:"1",$green:"2",$blue:"3",$alpha:"1.0",$color:"#000000",$weight:"0.5",$hue:"0",$saturation:"0%",$lightness:"0%",$degrees:"0",$amount:"0",$string:'""',$substring:'"s"',$number:"0",$limit:"1"},Ci.colorProposals=[{func:"red($color)",desc:pe.t("Gets the red component of a color.")},{func:"green($color)",desc:pe.t("Gets the green component of a color.")},{func:"blue($color)",desc:pe.t("Gets the blue component of a color.")},{func:"mix($color, $color, [$weight])",desc:pe.t("Mixes two colors together.")},{func:"hue($color)",desc:pe.t("Gets the hue component of a color.")},{func:"saturation($color)",desc:pe.t("Gets the saturation component of a color.")},{func:"lightness($color)",desc:pe.t("Gets the lightness component of a color.")},{func:"adjust-hue($color, $degrees)",desc:pe.t("Changes the hue of a color.")},{func:"lighten($color, $amount)",desc:pe.t("Makes a color lighter.")},{func:"darken($color, $amount)",desc:pe.t("Makes a color darker.")},{func:"saturate($color, $amount)",desc:pe.t("Makes a color more saturated.")},{func:"desaturate($color, $amount)",desc:pe.t("Makes a color less saturated.")},{func:"grayscale($color)",desc:pe.t("Converts a color to grayscale.")},{func:"complement($color)",desc:pe.t("Returns the complement of a color.")},{func:"invert($color)",desc:pe.t("Returns the inverse of a color.")},{func:"alpha($color)",desc:pe.t("Gets the opacity component of a color.")},{func:"opacity($color)",desc:"Gets the alpha component (opacity) of a color."},{func:"rgba($color, $alpha)",desc:pe.t("Changes the alpha component for a color.")},{func:"opacify($color, $amount)",desc:pe.t("Makes a color more opaque.")},{func:"fade-in($color, $amount)",desc:pe.t("Makes a color more opaque.")},{func:"transparentize($color, $amount)",desc:pe.t("Makes a color more transparent.")},{func:"fade-out($color, $amount)",desc:pe.t("Makes a color more transparent.")},{func:"adjust-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])",desc:pe.t("Increases or decreases one or more components of a color.")},{func:"scale-color($color, [$red], [$green], [$blue], [$saturation], [$lightness], [$alpha])",desc:pe.t("Fluidly scales one or more properties of a color.")},{func:"change-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])",desc:pe.t("Changes one or more properties of a color.")},{func:"ie-hex-str($color)",desc:pe.t("Converts a color into the format understood by IE filters.")}],Ci.selectorFuncs=[{func:"selector-nest($selectors…)",desc:pe.t("Nests selector beneath one another like they would be nested in the stylesheet.")},{func:"selector-append($selectors…)",desc:pe.t("Appends selectors to one another without spaces in between.")},{func:"selector-extend($selector, $extendee, $extender)",desc:pe.t("Extends $extendee with $extender within $selector.")},{func:"selector-replace($selector, $original, $replacement)",desc:pe.t("Replaces $original with $replacement within $selector.")},{func:"selector-unify($selector1, $selector2)",desc:pe.t("Unifies two selectors to produce a selector that matches elements matched by both.")},{func:"is-superselector($super, $sub)",desc:pe.t("Returns whether $super matches all the elements $sub does, and possibly more.")},{func:"simple-selectors($selector)",desc:pe.t("Returns the simple selectors that comprise a compound selector.")},{func:"selector-parse($selector)",desc:pe.t("Parses a selector into the format returned by &.")}],Ci.builtInFuncs=[{func:"unquote($string)",desc:pe.t("Removes quotes from a string.")},{func:"quote($string)",desc:pe.t("Adds quotes to a string.")},{func:"str-length($string)",desc:pe.t("Returns the number of characters in a string.")},{func:"str-insert($string, $insert, $index)",desc:pe.t("Inserts $insert into $string at $index.")},{func:"str-index($string, $substring)",desc:pe.t("Returns the index of the first occurance of $substring in $string.")},{func:"str-slice($string, $start-at, [$end-at])",desc:pe.t("Extracts a substring from $string.")},{func:"to-upper-case($string)",desc:pe.t("Converts a string to upper case.")},{func:"to-lower-case($string)",desc:pe.t("Converts a string to lower case.")},{func:"percentage($number)",desc:pe.t("Converts a unitless number to a percentage."),type:"percentage"},{func:"round($number)",desc:pe.t("Rounds a number to the nearest whole number.")},{func:"ceil($number)",desc:pe.t("Rounds a number up to the next whole number.")},{func:"floor($number)",desc:pe.t("Rounds a number down to the previous whole number.")},{func:"abs($number)",desc:pe.t("Returns the absolute value of a number.")},{func:"min($numbers)",desc:pe.t("Finds the minimum of several numbers.")},{func:"max($numbers)",desc:pe.t("Finds the maximum of several numbers.")},{func:"random([$limit])",desc:pe.t("Returns a random number.")},{func:"length($list)",desc:pe.t("Returns the length of a list.")},{func:"nth($list, $n)",desc:pe.t("Returns a specific item in a list.")},{func:"set-nth($list, $n, $value)",desc:pe.t("Replaces the nth item in a list.")},{func:"join($list1, $list2, [$separator])",desc:pe.t("Joins together two lists into one.")},{func:"append($list1, $val, [$separator])",desc:pe.t("Appends a single value onto the end of a list.")},{func:"zip($lists)",desc:pe.t("Combines several lists into a single multidimensional list.")},{func:"index($list, $value)",desc:pe.t("Returns the position of a value within a list.")},{func:"list-separator(#list)",desc:pe.t("Returns the separator of a list.")},{func:"map-get($map, $key)",desc:pe.t("Returns the value in a map associated with a given key.")},{func:"map-merge($map1, $map2)",desc:pe.t("Merges two maps together into a new map.")},{func:"map-remove($map, $keys)",desc:pe.t("Returns a new map with keys removed.")},{func:"map-keys($map)",desc:pe.t("Returns a list of all keys in a map.")},{func:"map-values($map)",desc:pe.t("Returns a list of all values in a map.")},{func:"map-has-key($map, $key)",desc:pe.t("Returns whether a map has a value associated with a given key.")},{func:"keywords($args)",desc:pe.t("Returns the keywords passed to a function that takes variable arguments.")},{func:"feature-exists($feature)",desc:pe.t("Returns whether a feature exists in the current Sass runtime.")},{func:"variable-exists($name)",desc:pe.t("Returns whether a variable with the given name exists in the current scope.")},{func:"global-variable-exists($name)",desc:pe.t("Returns whether a variable with the given name exists in the global scope.")},{func:"function-exists($name)",desc:pe.t("Returns whether a function with the given name exists.")},{func:"mixin-exists($name)",desc:pe.t("Returns whether a mixin with the given name exists.")},{func:"inspect($value)",desc:pe.t("Returns the string representation of a value as it would be represented in Sass.")},{func:"type-of($value)",desc:pe.t("Returns the type of a value.")},{func:"unit($number)",desc:pe.t("Returns the unit(s) associated with a number.")},{func:"unitless($number)",desc:pe.t("Returns whether a number has units.")},{func:"comparable($number1, $number2)",desc:pe.t("Returns whether two numbers can be added, subtracted, or compared.")},{func:"call($name, $args…)",desc:pe.t("Dynamically calls a Sass function.")}],Ci.scssAtDirectives=[{label:"@extend",documentation:pe.t("Inherits the styles of another selector."),kind:Qe.Keyword},{label:"@at-root",documentation:pe.t("Causes one or more rules to be emitted at the root of the document."),kind:Qe.Keyword},{label:"@debug",documentation:pe.t("Prints the value of an expression to the standard error output stream. Useful for debugging complicated Sass files."),kind:Qe.Keyword},{label:"@warn",documentation:pe.t("Prints the value of an expression to the standard error output stream. Useful for libraries that need to warn users of deprecations or recovering from minor mixin usage mistakes. Warnings can be turned off with the `--quiet` command-line option or the `:quiet` Sass option."),kind:Qe.Keyword},{label:"@error",documentation:pe.t("Throws the value of an expression as a fatal error with stack trace. Useful for validating arguments to mixins and functions."),kind:Qe.Keyword},{label:"@if",documentation:pe.t("Includes the body if the expression does not evaluate to `false` or `null`."),insertText:"@if ${1:expr} {\n\t$0\n}",insertTextFormat:Je.Snippet,kind:Qe.Keyword},{label:"@for",documentation:pe.t("For loop that repeatedly outputs a set of styles for each `$var` in the `from/through` or `from/to` clause."),insertText:"@for \\$${1:var} from ${2:start} ${3|to,through|} ${4:end} {\n\t$0\n}",insertTextFormat:Je.Snippet,kind:Qe.Keyword},{label:"@each",documentation:pe.t("Each loop that sets `$var` to each item in the list or map, then outputs the styles it contains using that value of `$var`."),insertText:"@each \\$${1:var} in ${2:list} {\n\t$0\n}",insertTextFormat:Je.Snippet,kind:Qe.Keyword},{label:"@while",documentation:pe.t("While loop that takes an expression and repeatedly outputs the nested styles until the statement evaluates to `false`."),insertText:"@while ${1:condition} {\n\t$0\n}",insertTextFormat:Je.Snippet,kind:Qe.Keyword},{label:"@mixin",documentation:pe.t("Defines styles that can be re-used throughout the stylesheet with `@include`."),insertText:"@mixin ${1:name} {\n\t$0\n}",insertTextFormat:Je.Snippet,kind:Qe.Keyword},{label:"@include",documentation:pe.t("Includes the styles defined by another mixin into the current rule."),kind:Qe.Keyword},{label:"@function",documentation:pe.t("Defines complex operations that can be re-used throughout stylesheets."),kind:Qe.Keyword}],Ci.scssModuleLoaders=[{label:"@use",documentation:pe.t("Loads mixins, functions, and variables from other Sass stylesheets as 'modules', and combines CSS from multiple stylesheets together."),references:[{name:wi,url:"https://sass-lang.com/documentation/at-rules/use"}],insertText:"@use $0;",insertTextFormat:Je.Snippet,kind:Qe.Keyword},{label:"@forward",documentation:pe.t("Loads a Sass stylesheet and makes its mixins, functions, and variables available when this stylesheet is loaded with the @use rule."),references:[{name:wi,url:"https://sass-lang.com/documentation/at-rules/forward"}],insertText:"@forward $0;",insertTextFormat:Je.Snippet,kind:Qe.Keyword}],Ci.scssModuleBuiltIns=[{label:"sass:math",documentation:pe.t("Provides functions that operate on numbers."),references:[{name:wi,url:"https://sass-lang.com/documentation/modules/math"}]},{label:"sass:string",documentation:pe.t("Makes it easy to combine, search, or split apart strings."),references:[{name:wi,url:"https://sass-lang.com/documentation/modules/string"}]},{label:"sass:color",documentation:pe.t("Generates new colors based on existing ones, making it easy to build color themes."),references:[{name:wi,url:"https://sass-lang.com/documentation/modules/color"}]},{label:"sass:list",documentation:pe.t("Lets you access and modify values in lists."),references:[{name:wi,url:"https://sass-lang.com/documentation/modules/list"}]},{label:"sass:map",documentation:pe.t("Makes it possible to look up the value associated with a key in a map, and much more."),references:[{name:wi,url:"https://sass-lang.com/documentation/modules/map"}]},{label:"sass:selector",documentation:pe.t("Provides access to Sass’s powerful selector engine."),references:[{name:wi,url:"https://sass-lang.com/documentation/modules/selector"}]},{label:"sass:meta",documentation:pe.t("Exposes the details of Sass’s inner workings."),references:[{name:wi,url:"https://sass-lang.com/documentation/modules/meta"}]}];"/".charCodeAt(0),"\n".charCodeAt(0),"\r".charCodeAt(0),"\f".charCodeAt(0),"`".charCodeAt(0),".".charCodeAt(0);let $i=p.CustomToken;$i++;class Ai extends Jn{constructor(e,t){super("@",e,t)}createFunctionProposals(e,t,n,i){for(const r of e){const e={label:r.name,detail:r.example,documentation:r.description,textEdit:Te.replace(this.getCompletionRange(t),r.name+"($0)"),insertTextFormat:Je.Snippet,kind:Qe.Function};n&&(e.sortText="z"),i.items.push(e)}return i}getTermProposals(e,t,n){let i=Ai.builtInProposals;return e&&(i=i.filter((t=>!t.type||!e.restrictions||-1!==e.restrictions.indexOf(t.type)))),this.createFunctionProposals(i,t,!0,n),super.getTermProposals(e,t,n)}getColorProposals(e,t,n){return this.createFunctionProposals(Ai.colorProposals,t,!1,n),super.getColorProposals(e,t,n)}getCompletionsForDeclarationProperty(e,t){return this.getCompletionsForSelector(null,!0,t),super.getCompletionsForDeclarationProperty(e,t)}}Ai.builtInProposals=[{name:"if",example:"if(condition, trueValue [, falseValue]);",description:pe.t("returns one of two values depending on a condition.")},{name:"boolean",example:"boolean(condition);",description:pe.t('"store" a boolean test for later evaluation in a guard or if().')},{name:"length",example:"length(@list);",description:pe.t("returns the number of elements in a value list")},{name:"extract",example:"extract(@list, index);",description:pe.t("returns a value at the specified position in the list")},{name:"range",example:"range([start, ] end [, step]);",description:pe.t("generate a list spanning a range of values")},{name:"each",example:"each(@list, ruleset);",description:pe.t("bind the evaluation of a ruleset to each member of a list.")},{name:"escape",example:"escape(@string);",description:pe.t("URL encodes a string")},{name:"e",example:"e(@string);",description:pe.t("escape string content")},{name:"replace",example:"replace(@string, @pattern, @replacement[, @flags]);",description:pe.t("string replace")},{name:"unit",example:"unit(@dimension, [@unit: '']);",description:pe.t("remove or change the unit of a dimension")},{name:"color",example:"color(@string);",description:pe.t("parses a string to a color"),type:"color"},{name:"convert",example:"convert(@value, unit);",description:pe.t("converts numbers from one type into another")},{name:"data-uri",example:"data-uri([mimetype,] url);",description:pe.t("inlines a resource and falls back to `url()`"),type:"url"},{name:"abs",description:pe.t("absolute value of a number"),example:"abs(number);"},{name:"acos",description:pe.t("arccosine - inverse of cosine function"),example:"acos(number);"},{name:"asin",description:pe.t("arcsine - inverse of sine function"),example:"asin(number);"},{name:"ceil",example:"ceil(@number);",description:pe.t("rounds up to an integer")},{name:"cos",description:pe.t("cosine function"),example:"cos(number);"},{name:"floor",description:pe.t("rounds down to an integer"),example:"floor(@number);"},{name:"percentage",description:pe.t("converts to a %, e.g. 0.5 > 50%"),example:"percentage(@number);",type:"percentage"},{name:"round",description:pe.t("rounds a number to a number of places"),example:"round(number, [places: 0]);"},{name:"sqrt",description:pe.t("calculates square root of a number"),example:"sqrt(number);"},{name:"sin",description:pe.t("sine function"),example:"sin(number);"},{name:"tan",description:pe.t("tangent function"),example:"tan(number);"},{name:"atan",description:pe.t("arctangent - inverse of tangent function"),example:"atan(number);"},{name:"pi",description:pe.t("returns pi"),example:"pi();"},{name:"pow",description:pe.t("first argument raised to the power of the second argument"),example:"pow(@base, @exponent);"},{name:"mod",description:pe.t("first argument modulus second argument"),example:"mod(number, number);"},{name:"min",description:pe.t("returns the lowest of one or more values"),example:"min(@x, @y);"},{name:"max",description:pe.t("returns the lowest of one or more values"),example:"max(@x, @y);"}],Ai.colorProposals=[{name:"argb",example:"argb(@color);",description:pe.t("creates a #AARRGGBB")},{name:"hsl",example:"hsl(@hue, @saturation, @lightness);",description:pe.t("creates a color")},{name:"hsla",example:"hsla(@hue, @saturation, @lightness, @alpha);",description:pe.t("creates a color")},{name:"hsv",example:"hsv(@hue, @saturation, @value);",description:pe.t("creates a color")},{name:"hsva",example:"hsva(@hue, @saturation, @value, @alpha);",description:pe.t("creates a color")},{name:"hue",example:"hue(@color);",description:pe.t("returns the `hue` channel of `@color` in the HSL space")},{name:"saturation",example:"saturation(@color);",description:pe.t("returns the `saturation` channel of `@color` in the HSL space")},{name:"lightness",example:"lightness(@color);",description:pe.t("returns the `lightness` channel of `@color` in the HSL space")},{name:"hsvhue",example:"hsvhue(@color);",description:pe.t("returns the `hue` channel of `@color` in the HSV space")},{name:"hsvsaturation",example:"hsvsaturation(@color);",description:pe.t("returns the `saturation` channel of `@color` in the HSV space")},{name:"hsvvalue",example:"hsvvalue(@color);",description:pe.t("returns the `value` channel of `@color` in the HSV space")},{name:"red",example:"red(@color);",description:pe.t("returns the `red` channel of `@color`")},{name:"green",example:"green(@color);",description:pe.t("returns the `green` channel of `@color`")},{name:"blue",example:"blue(@color);",description:pe.t("returns the `blue` channel of `@color`")},{name:"alpha",example:"alpha(@color);",description:pe.t("returns the `alpha` channel of `@color`")},{name:"luma",example:"luma(@color);",description:pe.t("returns the `luma` value (perceptual brightness) of `@color`")},{name:"saturate",example:"saturate(@color, 10%);",description:pe.t("return `@color` 10% points more saturated")},{name:"desaturate",example:"desaturate(@color, 10%);",description:pe.t("return `@color` 10% points less saturated")},{name:"lighten",example:"lighten(@color, 10%);",description:pe.t("return `@color` 10% points lighter")},{name:"darken",example:"darken(@color, 10%);",description:pe.t("return `@color` 10% points darker")},{name:"fadein",example:"fadein(@color, 10%);",description:pe.t("return `@color` 10% points less transparent")},{name:"fadeout",example:"fadeout(@color, 10%);",description:pe.t("return `@color` 10% points more transparent")},{name:"fade",example:"fade(@color, 50%);",description:pe.t("return `@color` with 50% transparency")},{name:"spin",example:"spin(@color, 10);",description:pe.t("return `@color` with a 10 degree larger in hue")},{name:"mix",example:"mix(@color1, @color2, [@weight: 50%]);",description:pe.t("return a mix of `@color1` and `@color2`")},{name:"greyscale",example:"greyscale(@color);",description:pe.t("returns a grey, 100% desaturated color")},{name:"contrast",example:"contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);",description:pe.t("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);"}],function(){var e=[,,function(e){function t(e){this.__parent=e,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}function n(e,t){this.__cache=[""],this.__indent_size=e.indent_size,this.__indent_string=e.indent_char,e.indent_with_tabs||(this.__indent_string=new Array(e.indent_size+1).join(e.indent_char)),t=t||"",e.indent_level>0&&(t=new Array(e.indent_level+1).join(this.__indent_string)),this.__base_string=t,this.__base_string_length=t.length}function i(e,i){this.__indent_cache=new n(e,i),this.raw=!1,this._end_with_newline=e.end_with_newline,this.indent_size=e.indent_size,this.wrap_line_length=e.wrap_line_length,this.indent_empty_lines=e.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new t(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}t.prototype.clone_empty=function(){var e=new t(this.__parent);return e.set_indent(this.__indent_count,this.__alignment_count),e},t.prototype.item=function(e){return e<0?this.__items[this.__items.length+e]:this.__items[e]},t.prototype.has_match=function(e){for(var t=this.__items.length-1;t>=0;t--)if(this.__items[t].match(e))return!0;return!1},t.prototype.set_indent=function(e,t){this.is_empty()&&(this.__indent_count=e||0,this.__alignment_count=t||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},t.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},t.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},t.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var e=this.__parent.current_line;return e.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),e.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),e.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count," "===e.__items[0]&&(e.__items.splice(0,1),e.__character_count-=1),!0}return!1},t.prototype.is_empty=function(){return 0===this.__items.length},t.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},t.prototype.push=function(e){this.__items.push(e);var t=e.lastIndexOf("\n");-1!==t?this.__character_count=e.length-t:this.__character_count+=e.length},t.prototype.pop=function(){var e=null;return this.is_empty()||(e=this.__items.pop(),this.__character_count-=e.length),e},t.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},t.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},t.prototype.trim=function(){for(;" "===this.last();)this.__items.pop(),this.__character_count-=1},t.prototype.toString=function(){var e="";return this.is_empty()?this.__parent.indent_empty_lines&&(e=this.__parent.get_indent_string(this.__indent_count)):(e=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),e+=this.__items.join("")),e},n.prototype.get_indent_size=function(e,t){var n=this.__base_string_length;return t=t||0,e<0&&(n=0),n+=e*this.__indent_size,n+=t},n.prototype.get_indent_string=function(e,t){var n=this.__base_string;return t=t||0,e<0&&(e=0,n=""),t+=e*this.__indent_size,this.__ensure_cache(t),n+=this.__cache[t]},n.prototype.__ensure_cache=function(e){for(;e>=this.__cache.length;)this.__add_column()},n.prototype.__add_column=function(){var e=this.__cache.length,t=0,n="";this.__indent_size&&e>=this.__indent_size&&(e-=(t=Math.floor(e/this.__indent_size))*this.__indent_size,n=new Array(t+1).join(this.__indent_string)),e&&(n+=new Array(e+1).join(" ")),this.__cache.push(n)},i.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},i.prototype.get_line_number=function(){return this.__lines.length},i.prototype.get_indent_string=function(e,t){return this.__indent_cache.get_indent_string(e,t)},i.prototype.get_indent_size=function(e,t){return this.__indent_cache.get_indent_size(e,t)},i.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},i.prototype.add_new_line=function(e){return!(this.is_empty()||!e&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},i.prototype.get_code=function(e){this.trim(!0);var t=this.current_line.pop();t&&("\n"===t[t.length-1]&&(t=t.replace(/\n+$/g,"")),this.current_line.push(t)),this._end_with_newline&&this.__add_outputline();var n=this.__lines.join("\n");return"\n"!==e&&(n=n.replace(/[\n]/g,e)),n},i.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},i.prototype.set_indent=function(e,t){return e=e||0,t=t||0,this.next_line.set_indent(e,t),this.__lines.length>1?(this.current_line.set_indent(e,t),!0):(this.current_line.set_indent(),!1)},i.prototype.add_raw_token=function(e){for(var t=0;t<e.newlines;t++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(e.whitespace_before),this.current_line.push(e.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},i.prototype.add_token=function(e){this.__add_space_before_token(),this.current_line.push(e),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},i.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},i.prototype.remove_indent=function(e){for(var t=this.__lines.length;e<t;)this.__lines[e]._remove_indent(),e++;this.current_line._remove_wrap_indent()},i.prototype.trim=function(e){for(e=void 0!==e&&e,this.current_line.trim();e&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},i.prototype.just_added_newline=function(){return this.current_line.is_empty()},i.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},i.prototype.ensure_empty_line_above=function(e,n){for(var i=this.__lines.length-2;i>=0;){var r=this.__lines[i];if(r.is_empty())break;if(0!==r.item(0).indexOf(e)&&r.item(-1)!==n){this.__lines.splice(i+1,0,new t(this)),this.previous_line=this.__lines[this.__lines.length-2];break}i--}},e.exports.Output=i},,,,function(e){function t(e,t){this.raw_options=n(e,t),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs","\t"===this.indent_char),this.indent_with_tabs&&(this.indent_char="\t",1===this.indent_size&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}function n(e,t){var n,r={};for(n in e=i(e))n!==t&&(r[n]=e[n]);if(t&&e[t])for(n in e[t])r[n]=e[t][n];return r}function i(e){var t,n={};for(t in e){n[t.replace(/-/g,"_")]=e[t]}return n}t.prototype._get_array=function(e,t){var n=this.raw_options[e],i=t||[];return"object"==typeof n?null!==n&&"function"==typeof n.concat&&(i=n.concat()):"string"==typeof n&&(i=n.split(/[^a-zA-Z0-9_\/\-]+/)),i},t.prototype._get_boolean=function(e,t){var n=this.raw_options[e];return void 0===n?!!t:!!n},t.prototype._get_characters=function(e,t){var n=this.raw_options[e],i=t||"";return"string"==typeof n&&(i=n.replace(/\\r/,"\r").replace(/\\n/,"\n").replace(/\\t/,"\t")),i},t.prototype._get_number=function(e,t){var n=this.raw_options[e];t=parseInt(t,10),isNaN(t)&&(t=0);var i=parseInt(n,10);return isNaN(i)&&(i=t),i},t.prototype._get_selection=function(e,t,n){var i=this._get_selection_list(e,t,n);if(1!==i.length)throw new Error("Invalid Option Value: The option '"+e+"' can only be one of the following values:\n"+t+"\nYou passed in: '"+this.raw_options[e]+"'");return i[0]},t.prototype._get_selection_list=function(e,t,n){if(!t||0===t.length)throw new Error("Selection list cannot be empty.");if(n=n||[t[0]],!this._is_valid_selection(n,t))throw new Error("Invalid Default Value!");var i=this._get_array(e,n);if(!this._is_valid_selection(i,t))throw new Error("Invalid Option Value: The option '"+e+"' can contain only the following values:\n"+t+"\nYou passed in: '"+this.raw_options[e]+"'");return i},t.prototype._is_valid_selection=function(e,t){return e.length&&t.length&&!e.some((function(e){return-1===t.indexOf(e)}))},e.exports.Options=t,e.exports.normalizeOpts=i,e.exports.mergeOpts=n},,function(e){var t=RegExp.prototype.hasOwnProperty("sticky");function n(e){this.__input=e||"",this.__input_length=this.__input.length,this.__position=0}n.prototype.restart=function(){this.__position=0},n.prototype.back=function(){this.__position>0&&(this.__position-=1)},n.prototype.hasNext=function(){return this.__position<this.__input_length},n.prototype.next=function(){var e=null;return this.hasNext()&&(e=this.__input.charAt(this.__position),this.__position+=1),e},n.prototype.peek=function(e){var t=null;return e=e||0,(e+=this.__position)>=0&&e<this.__input_length&&(t=this.__input.charAt(e)),t},n.prototype.__match=function(e,n){e.lastIndex=n;var i=e.exec(this.__input);return!i||t&&e.sticky||i.index!==n&&(i=null),i},n.prototype.test=function(e,t){return t=t||0,(t+=this.__position)>=0&&t<this.__input_length&&!!this.__match(e,t)},n.prototype.testChar=function(e,t){var n=this.peek(t);return e.lastIndex=0,null!==n&&e.test(n)},n.prototype.match=function(e){var t=this.__match(e,this.__position);return t?this.__position+=t[0].length:t=null,t},n.prototype.read=function(e,t,n){var i,r="";return e&&(i=this.match(e))&&(r+=i[0]),!t||!i&&e||(r+=this.readUntil(t,n)),r},n.prototype.readUntil=function(e,t){var n,i=this.__position;e.lastIndex=this.__position;var r=e.exec(this.__input);return r?(i=r.index,t&&(i+=r[0].length)):i=this.__input_length,n=this.__input.substring(this.__position,i),this.__position=i,n},n.prototype.readUntilAfter=function(e){return this.readUntil(e,!0)},n.prototype.get_regexp=function(e,n){var i=null,r="g";return n&&t&&(r="y"),"string"==typeof e&&""!==e?i=new RegExp(e,r):e&&(i=new RegExp(e.source,r)),i},n.prototype.get_literal_regexp=function(e){return RegExp(e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},n.prototype.peekUntilAfter=function(e){var t=this.__position,n=this.readUntilAfter(e);return this.__position=t,n},n.prototype.lookBack=function(e){var t=this.__position-1;return t>=e.length&&this.__input.substring(t-e.length,t).toLowerCase()===e},e.exports.InputScanner=n},,,,,function(e){function t(e,t){e="string"==typeof e?e:e.source,t="string"==typeof t?t:t.source,this.__directives_block_pattern=new RegExp(e+/ beautify( \w+[:]\w+)+ /.source+t,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(e+/\sbeautify\signore:end\s/.source+t,"g")}t.prototype.get_directives=function(e){if(!e.match(this.__directives_block_pattern))return null;var t={};this.__directive_pattern.lastIndex=0;for(var n=this.__directive_pattern.exec(e);n;)t[n[1]]=n[2],n=this.__directive_pattern.exec(e);return t},t.prototype.readIgnored=function(e){return e.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=t},,function(e,t,n){var i=n(16).Beautifier,r=n(17).Options;e.exports=function(e,t){return new i(e,t).beautify()},e.exports.defaultOptions=function(){return new r}},function(e,t,n){var i=n(17).Options,r=n(2).Output,o=n(8).InputScanner,s=new(0,n(13).Directives)(/\/\*/,/\*\//),a=/\r\n|[\r\n]/,c=/\r\n|[\r\n]/g,l=/\s/,u=/(?:\s|\n)+/g,h=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,d=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function p(e,t){this._source_text=e||"",this._options=new i(t),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}p.prototype.eatString=function(e){var t="";for(this._ch=this._input.next();this._ch;){if(t+=this._ch,"\\"===this._ch)t+=this._input.next();else if(-1!==e.indexOf(this._ch)||"\n"===this._ch)break;this._ch=this._input.next()}return t},p.prototype.eatWhitespace=function(e){for(var t=l.test(this._input.peek()),n=0;l.test(this._input.peek());)this._ch=this._input.next(),e&&"\n"===this._ch&&(0===n||n<this._options.max_preserve_newlines)&&(n++,this._output.add_new_line(!0));return t},p.prototype.foundNestedPseudoClass=function(){for(var e=0,t=1,n=this._input.peek(t);n;){if("{"===n)return!0;if("("===n)e+=1;else if(")"===n){if(0===e)return!1;e-=1}else if(";"===n||"}"===n)return!1;t++,n=this._input.peek(t)}return!1},p.prototype.print_string=function(e){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(e)},p.prototype.preserveSingleSpace=function(e){e&&(this._output.space_before_token=!0)},p.prototype.indent=function(){this._indentLevel++},p.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},p.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e=this._source_text,t=this._options.eol;"auto"===t&&(t="\n",e&&a.test(e||"")&&(t=e.match(a)[0]));var n=(e=e.replace(c,"\n")).match(/^[\t ]*/)[0];this._output=new r(this._options,n),this._input=new o(e),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var i,p,f=0,m=!1,g=!1,_=!1,b=!1,y=!1,v=this._ch,x=!1;i=""!==this._input.read(u),p=v,this._ch=this._input.next(),"\\"===this._ch&&this._input.hasNext()&&(this._ch+=this._input.next()),v=this._ch,this._ch;)if("/"===this._ch&&"*"===this._input.peek()){this._output.add_new_line(),this._input.back();var w=this._input.read(h),C=s.get_directives(w);C&&"start"===C.ignore&&(w+=s.readIgnored(this._input)),this.print_string(w),this.eatWhitespace(!0),this._output.add_new_line()}else if("/"===this._ch&&"/"===this._input.peek())this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(d)),this.eatWhitespace(!0);else if("$"===this._ch){this.preserveSingleSpace(i),this.print_string(this._ch);var k=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);k.match(/[ :]$/)&&(k=this.eatString(": ").replace(/\s+$/,""),this.print_string(k),this._output.space_before_token=!0),0===f&&-1!==k.indexOf(":")&&(g=!0,this.indent())}else if("@"===this._ch)if(this.preserveSingleSpace(i),"{"===this._input.peek())this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var $=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);$.match(/[ :]$/)&&($=this.eatString(": ").replace(/\s+$/,""),this.print_string($),this._output.space_before_token=!0),0===f&&-1!==$.indexOf(":")?(g=!0,this.indent()):$ in this.NESTED_AT_RULE?(this._nestedLevel+=1,$ in this.CONDITIONAL_GROUP_RULE&&(_=!0)):0!==f||g||(b=!0)}else if("#"===this._ch&&"{"===this._input.peek())this.preserveSingleSpace(i),this.print_string(this._ch+this.eatString("}"));else if("{"===this._ch)g&&(g=!1,this.outdent()),b=!1,_?(_=!1,m=this._indentLevel>=this._nestedLevel):m=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&m&&this._output.previous_line&&"{"!==this._output.previous_line.item(-1)&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,"expand"===this._options.brace_style?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):("("===p?this._output.space_before_token=!1:","!==p&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if("}"===this._ch)this.outdent(),this._output.add_new_line(),"{"===p&&this._output.trim(!0),g&&(this.outdent(),g=!1),this.print_string(this._ch),m=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&"}"!==this._input.peek()&&this._output.add_new_line(!0),")"===this._input.peek()&&(this._output.trim(!0),"expand"===this._options.brace_style&&this._output.add_new_line(!0));else if(":"===this._ch){for(var A=0;A<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;A++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[A])){x=!0;break}!m&&!_||this._input.lookBack("&")||this.foundNestedPseudoClass()||this._input.lookBack("(")||b||0!==f?(this._input.lookBack(" ")&&(this._output.space_before_token=!0),":"===this._input.peek()?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":")):(this.print_string(":"),g||(g=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent()))}else if('"'===this._ch||"'"===this._ch){var S='"'===p||"'"===p;this.preserveSingleSpace(S||i),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(";"===this._ch)x=!1,0===f?(g&&(this.outdent(),g=!1),b=!1,this.print_string(this._ch),this.eatWhitespace(!0),"/"!==this._input.peek()&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if("("===this._ch)if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),f++,this.indent(),this._ch=this._input.next(),")"===this._ch||'"'===this._ch||"'"===this._ch?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),f&&(f--,this.outdent()));else{var P=!1;this._input.lookBack("with")&&(P=!0),this.preserveSingleSpace(i||P),this.print_string(this._ch),g&&"$"===p&&this._options.selector_separator_newline?(this._output.add_new_line(),y=!0):(this.eatWhitespace(),f++,this.indent())}else if(")"===this._ch)f&&(f--,this.outdent()),y&&";"===this._input.peek()&&this._options.selector_separator_newline&&(y=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(","===this._ch)this.print_string(this._ch),this.eatWhitespace(!0),!this._options.selector_separator_newline||g&&!y||0!==f||b?this._output.space_before_token=!0:this._output.add_new_line();else if(">"!==this._ch&&"+"!==this._ch&&"~"!==this._ch||g||0!==f)if("]"===this._ch)this.print_string(this._ch);else if("["===this._ch)this.preserveSingleSpace(i),this.print_string(this._ch);else if("="===this._ch)this.eatWhitespace(),this.print_string("="),l.test(this._ch)&&(this._ch="");else if("!"!==this._ch||this._input.lookBack("\\")){var E='"'===p||"'"===p;this.preserveSingleSpace(E||i),this.print_string(this._ch),!this._output.just_added_newline()&&"\n"===this._input.peek()&&x&&this._output.add_new_line()}else this._output.space_before_token=!0,this.print_string(this._ch);else this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&l.test(this._ch)&&(this._ch=""));return this._output.get_code(t)},e.exports.Beautifier=p},function(e,t,n){var i=n(6).Options;function r(e){i.call(this,e,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var t=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||t;var n=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var r=0;r<n.length;r++)"expand"!==n[r]?this.brace_style="collapse":this.brace_style=n[r]}r.prototype=new i,e.exports.Options=r}],t={};var n=function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,n),o.exports}(15);0}();"{".charCodeAt(0),"}".charCodeAt(0);function Si(e){return"/"===d.sep?decodeURIComponent(e.replace("file://","")):decodeURIComponent(e.replace("file:///",""))}var Pi=__webpack_require__(234);const Ei=[class extends m{get name(){return"build"}get description(){return"Build an aventus project"}registerArgs(e){e({description:"aventus.conf.avt path",type:"string",typeIsRequired:!1})}registerOptions(e){e({name:"builds",description:"Define the build name",type:"string",typeIsRequired:!0,typeIsArray:!0}),e({name:"no-builds",description:"No builds",type:"boolean",typeIsRequired:!1}),e({name:"statics",description:"Define the static files to export",type:"string",typeIsRequired:!0,typeIsArray:!0}),e({name:"no-statics",description:"No statics",type:"boolean",typeIsRequired:!1}),e({name:"verbose",shortName:"v",description:"Debug your compilation"}),e({name:"silent",shortName:"s",description:"No output"})}async run(e,t){let n=e[0];n&&(n=(0,d.resolve)(n)),await f.g.load(),!1===t.builds&&(t.builds=[]),!1===t.statics&&(t.statics=[]),await f.g.start({onlyBuild:!0,configPath:n,builds:t.builds,statics:t.statics,debug:t.verbose,errorByBuild:!0,useStats:!t.silent}),this.handleResult(t)}handleResult(e){const t=f.g.getStatistics(),n=e.silent?e=>{}:console.log;n(),n("Loading all files : Done in "+t.loadFileTime+"ms"),n(),n("----"),n();const i=f.g.getErrors();let r=!1;const o={},s={},a=e=>{const t=0==e?0:Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,t)).toFixed(2))} ${["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"][t]}`};for(let e in t.files){const n=t.files[e];if("build"==n.type&&n.typeName){o[n.typeName]||(o[n.typeName]=[]);const e=` ${n.path} - ${a(n.size)}`;o[n.typeName].push(e)}else if("static"==n.type&&n.typeName){s[n.typeName]||(s[n.typeName]=[]);const e=` ${n.path} - ${a(n.size)}`;s[n.typeName].push(e)}}let c=Object.keys(t.builds).length,l=Object.keys(t.statics).length,u=0;for(let s in t.builds){n("Building "+s),n();let a=!1;const h=i[s],d=t.builds[s],p=o[s];if(p){for(let e of p)n(e);n()}if(h){let t=!1;for(let n in h)for(let i of h[n]){let r,o="";if(i.severity==Ee.Error)o="[31m[error][0m",a=!0,r=console.error;else if(i.severity==Ee.Warning)o="[33m[warning][0m",r=console.warn;else if(i.severity==Ee.Information)o="[34m[info][0m",r=console.info;else if(i.severity==Ee.Hint){o="[90m[hint][0m";continue}e.silent||(r(` ${o} ${Si(n).replace(/\\/g,"/")}:${i.range.start.line+1} : ${i.message}`),t=!0)}t&&n()}a?(n(" Build failed in "+d.buildTime+"ms"),r=!0):n(" Build success in "+d.buildTime+"ms"),u++,u==c&&0==l||(n(),n("----")),n()}u=0;for(let e in t.statics){n("Export static "+e),n();const i=t.statics[e],r=s[e];if(r){for(let e of r)n(e);n()}n(" Exported in "+i.buildTime+"ms"),u++,u==l||(n(),n("----")),n()}r&&process.exit(1)}},class extends m{get name(){return"dev"}get description(){return"Start an interactive cli to dev with your aventus project"}registerArgs(e){e({description:"aventus.conf.avt path",type:"string",typeIsRequired:!1})}registerOptions(e){}async run(e,t){await Pi.N.load(),await f.g.load(),console.clear(),await Pi.N.init(),await f.g.start({onlyBuild:!1});let n=[{value:"create",name:"Create..."},{value:"log",name:"Show logs"},{value:"quit",name:"Quit"}];for(Pi.N.clear();;){let e=await Pi.N.select("Which action shoud I perform?",n);"create"==e?await f.g.create():"log"==e?await Pi.N.log():"quit"==e?process.exit(0):console.log("WIP"),Pi.N.clear()}}}];t.version("0.0.13").name("aventus").description("Aventus CLI"),function(e){for(let t of Ei){(new t).register(e)}}(t),t.parse(process.argv)})();var __webpack_export_target__=exports;for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__]=__webpack_exports__[__webpack_i__];__webpack_exports__.__esModule&&Object.defineProperty(__webpack_export_target__,"__esModule",{value:!0})})();
|