市场夺宝奇兵
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

5533 lines
209 KiB

  1. import { __commonJS, __require } from "./dep-lCKrEJQm.js";
  2. import { require_lib } from "./dep-BuoK8Wda.js";
  3. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/fs.js
  4. var require_fs = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/fs.js": ((exports) => {
  5. Object.defineProperty(exports, "__esModule", { value: true });
  6. exports.getFileSystem = getFileSystem;
  7. exports.setFileSystem = setFileSystem;
  8. let fileSystem = {
  9. readFile: () => {
  10. throw Error("readFile not implemented");
  11. },
  12. writeFile: () => {
  13. throw Error("writeFile not implemented");
  14. }
  15. };
  16. function setFileSystem(fs) {
  17. fileSystem.readFile = fs.readFile;
  18. fileSystem.writeFile = fs.writeFile;
  19. }
  20. function getFileSystem() {
  21. return fileSystem;
  22. }
  23. }) });
  24. //#endregion
  25. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/unquote.js
  26. var require_unquote = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/unquote.js": ((exports) => {
  27. Object.defineProperty(exports, "__esModule", { value: true });
  28. exports.default = unquote;
  29. const reg = /['"]/;
  30. function unquote(str$1) {
  31. if (!str$1) return "";
  32. if (reg.test(str$1.charAt(0))) str$1 = str$1.substr(1);
  33. if (reg.test(str$1.charAt(str$1.length - 1))) str$1 = str$1.substr(0, str$1.length - 1);
  34. return str$1;
  35. }
  36. }) });
  37. //#endregion
  38. //#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.6/node_modules/icss-utils/src/replaceValueSymbols.js
  39. var require_replaceValueSymbols = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.6/node_modules/icss-utils/src/replaceValueSymbols.js": ((exports, module) => {
  40. const matchValueName = /[$]?[\w-]+/g;
  41. const replaceValueSymbols$2 = (value, replacements) => {
  42. let matches;
  43. while (matches = matchValueName.exec(value)) {
  44. const replacement = replacements[matches[0]];
  45. if (replacement) {
  46. value = value.slice(0, matches.index) + replacement + value.slice(matchValueName.lastIndex);
  47. matchValueName.lastIndex -= matches[0].length - replacement.length;
  48. }
  49. }
  50. return value;
  51. };
  52. module.exports = replaceValueSymbols$2;
  53. }) });
  54. //#endregion
  55. //#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.6/node_modules/icss-utils/src/replaceSymbols.js
  56. var require_replaceSymbols = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.6/node_modules/icss-utils/src/replaceSymbols.js": ((exports, module) => {
  57. const replaceValueSymbols$1 = require_replaceValueSymbols();
  58. const replaceSymbols$1 = (css, replacements) => {
  59. css.walk((node) => {
  60. if (node.type === "decl" && node.value) node.value = replaceValueSymbols$1(node.value.toString(), replacements);
  61. else if (node.type === "rule" && node.selector) node.selector = replaceValueSymbols$1(node.selector.toString(), replacements);
  62. else if (node.type === "atrule" && node.params) node.params = replaceValueSymbols$1(node.params.toString(), replacements);
  63. });
  64. };
  65. module.exports = replaceSymbols$1;
  66. }) });
  67. //#endregion
  68. //#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.6/node_modules/icss-utils/src/extractICSS.js
  69. var require_extractICSS = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.6/node_modules/icss-utils/src/extractICSS.js": ((exports, module) => {
  70. const importPattern = /^:import\(("[^"]*"|'[^']*'|[^"']+)\)$/;
  71. const balancedQuotes = /^("[^"]*"|'[^']*'|[^"']+)$/;
  72. const getDeclsObject = (rule) => {
  73. const object = {};
  74. rule.walkDecls((decl) => {
  75. const before = decl.raws.before ? decl.raws.before.trim() : "";
  76. object[before + decl.prop] = decl.value;
  77. });
  78. return object;
  79. };
  80. /**
  81. *
  82. * @param {string} css
  83. * @param {boolean} removeRules
  84. * @param {'auto' | 'rule' | 'at-rule'} mode
  85. */
  86. const extractICSS$2 = (css, removeRules = true, mode = "auto") => {
  87. const icssImports = {};
  88. const icssExports = {};
  89. function addImports(node, path$2) {
  90. const unquoted = path$2.replace(/'|"/g, "");
  91. icssImports[unquoted] = Object.assign(icssImports[unquoted] || {}, getDeclsObject(node));
  92. if (removeRules) node.remove();
  93. }
  94. function addExports(node) {
  95. Object.assign(icssExports, getDeclsObject(node));
  96. if (removeRules) node.remove();
  97. }
  98. css.each((node) => {
  99. if (node.type === "rule" && mode !== "at-rule") {
  100. if (node.selector.slice(0, 7) === ":import") {
  101. const matches = importPattern.exec(node.selector);
  102. if (matches) addImports(node, matches[1]);
  103. }
  104. if (node.selector === ":export") addExports(node);
  105. }
  106. if (node.type === "atrule" && mode !== "rule") {
  107. if (node.name === "icss-import") {
  108. const matches = balancedQuotes.exec(node.params);
  109. if (matches) addImports(node, matches[1]);
  110. }
  111. if (node.name === "icss-export") addExports(node);
  112. }
  113. });
  114. return {
  115. icssImports,
  116. icssExports
  117. };
  118. };
  119. module.exports = extractICSS$2;
  120. }) });
  121. //#endregion
  122. //#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.6/node_modules/icss-utils/src/createICSSRules.js
  123. var require_createICSSRules = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.6/node_modules/icss-utils/src/createICSSRules.js": ((exports, module) => {
  124. const createImports = (imports, postcss, mode = "rule") => {
  125. return Object.keys(imports).map((path$2) => {
  126. const aliases = imports[path$2];
  127. const declarations = Object.keys(aliases).map((key) => postcss.decl({
  128. prop: key,
  129. value: aliases[key],
  130. raws: { before: "\n " }
  131. }));
  132. const hasDeclarations = declarations.length > 0;
  133. const rule = mode === "rule" ? postcss.rule({
  134. selector: `:import('${path$2}')`,
  135. raws: { after: hasDeclarations ? "\n" : "" }
  136. }) : postcss.atRule({
  137. name: "icss-import",
  138. params: `'${path$2}'`,
  139. raws: { after: hasDeclarations ? "\n" : "" }
  140. });
  141. if (hasDeclarations) rule.append(declarations);
  142. return rule;
  143. });
  144. };
  145. const createExports = (exports$1, postcss, mode = "rule") => {
  146. const declarations = Object.keys(exports$1).map((key) => postcss.decl({
  147. prop: key,
  148. value: exports$1[key],
  149. raws: { before: "\n " }
  150. }));
  151. if (declarations.length === 0) return [];
  152. const rule = mode === "rule" ? postcss.rule({
  153. selector: `:export`,
  154. raws: { after: "\n" }
  155. }) : postcss.atRule({
  156. name: "icss-export",
  157. raws: { after: "\n" }
  158. });
  159. rule.append(declarations);
  160. return [rule];
  161. };
  162. const createICSSRules$1 = (imports, exports$1, postcss, mode) => [...createImports(imports, postcss, mode), ...createExports(exports$1, postcss, mode)];
  163. module.exports = createICSSRules$1;
  164. }) });
  165. //#endregion
  166. //#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.6/node_modules/icss-utils/src/index.js
  167. var require_src$4 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.6/node_modules/icss-utils/src/index.js": ((exports, module) => {
  168. const replaceValueSymbols = require_replaceValueSymbols();
  169. const replaceSymbols = require_replaceSymbols();
  170. const extractICSS$1 = require_extractICSS();
  171. const createICSSRules = require_createICSSRules();
  172. module.exports = {
  173. replaceValueSymbols,
  174. replaceSymbols,
  175. extractICSS: extractICSS$1,
  176. createICSSRules
  177. };
  178. }) });
  179. //#endregion
  180. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/Parser.js
  181. var require_Parser = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/Parser.js": ((exports) => {
  182. Object.defineProperty(exports, "__esModule", { value: true });
  183. var _icssUtils = require_src$4();
  184. const importRegexp = /^:import\((.+)\)$/;
  185. var Parser$1 = class {
  186. constructor(pathFetcher, trace) {
  187. this.pathFetcher = pathFetcher;
  188. this.plugin = this.plugin.bind(this);
  189. this.exportTokens = {};
  190. this.translations = {};
  191. this.trace = trace;
  192. }
  193. plugin() {
  194. const parser$1 = this;
  195. return {
  196. postcssPlugin: "css-modules-parser",
  197. async OnceExit(css) {
  198. await Promise.all(parser$1.fetchAllImports(css));
  199. parser$1.linkImportedSymbols(css);
  200. return parser$1.extractExports(css);
  201. }
  202. };
  203. }
  204. fetchAllImports(css) {
  205. let imports = [];
  206. css.each((node) => {
  207. if (node.type == "rule" && node.selector.match(importRegexp)) imports.push(this.fetchImport(node, css.source.input.from, imports.length));
  208. });
  209. return imports;
  210. }
  211. linkImportedSymbols(css) {
  212. (0, _icssUtils.replaceSymbols)(css, this.translations);
  213. }
  214. extractExports(css) {
  215. css.each((node) => {
  216. if (node.type == "rule" && node.selector == ":export") this.handleExport(node);
  217. });
  218. }
  219. handleExport(exportNode) {
  220. exportNode.each((decl) => {
  221. if (decl.type == "decl") {
  222. Object.keys(this.translations).forEach((translation) => {
  223. decl.value = decl.value.replace(translation, this.translations[translation]);
  224. });
  225. this.exportTokens[decl.prop] = decl.value;
  226. }
  227. });
  228. exportNode.remove();
  229. }
  230. async fetchImport(importNode, relativeTo, depNr) {
  231. const file = importNode.selector.match(importRegexp)[1];
  232. const depTrace = this.trace + String.fromCharCode(depNr);
  233. const exports$1 = await this.pathFetcher(file, relativeTo, depTrace);
  234. try {
  235. importNode.each((decl) => {
  236. if (decl.type == "decl") this.translations[decl.prop] = exports$1[decl.value];
  237. });
  238. importNode.remove();
  239. } catch (err) {
  240. console.log(err);
  241. }
  242. }
  243. };
  244. exports.default = Parser$1;
  245. }) });
  246. //#endregion
  247. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/saveJSON.js
  248. var require_saveJSON = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/saveJSON.js": ((exports) => {
  249. Object.defineProperty(exports, "__esModule", { value: true });
  250. exports.default = saveJSON;
  251. var _fs$2 = require_fs();
  252. function saveJSON(cssFile, json) {
  253. return new Promise((resolve, reject) => {
  254. const { writeFile } = (0, _fs$2.getFileSystem)();
  255. writeFile(`${cssFile}.json`, JSON.stringify(json), (e) => e ? reject(e) : resolve(json));
  256. });
  257. }
  258. }) });
  259. //#endregion
  260. //#region ../../node_modules/.pnpm/lodash.camelcase@4.3.0/node_modules/lodash.camelcase/index.js
  261. var require_lodash = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/lodash.camelcase@4.3.0/node_modules/lodash.camelcase/index.js": ((exports, module) => {
  262. /**
  263. * lodash (Custom Build) <https://lodash.com/>
  264. * Build: `lodash modularize exports="npm" -o ./`
  265. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  266. * Released under MIT license <https://lodash.com/license>
  267. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  268. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  269. */
  270. /** Used as references for various `Number` constants. */
  271. var INFINITY = Infinity;
  272. /** `Object#toString` result references. */
  273. var symbolTag = "[object Symbol]";
  274. /** Used to match words composed of alphanumeric characters. */
  275. var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
  276. /** Used to match Latin Unicode letters (excluding mathematical operators). */
  277. var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
  278. /** Used to compose unicode character classes. */
  279. var rsAstralRange = "\\ud800-\\udfff", rsComboMarksRange = "\\u0300-\\u036f\\ufe20-\\ufe23", rsComboSymbolsRange = "\\u20d0-\\u20f0", rsDingbatRange = "\\u2700-\\u27bf", rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff", rsMathOpRange = "\\xac\\xb1\\xd7\\xf7", rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", rsPunctuationRange = "\\u2000-\\u206f", rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde", rsVarRange = "\\ufe0e\\ufe0f", rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
  280. /** Used to compose unicode capture groups. */
  281. var rsApos = "['’]", rsAstral = "[" + rsAstralRange + "]", rsBreak = "[" + rsBreakRange + "]", rsCombo = "[" + rsComboMarksRange + rsComboSymbolsRange + "]", rsDigits = "\\d+", rsDingbat = "[" + rsDingbatRange + "]", rsLower = "[" + rsLowerRange + "]", rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]", rsFitz = "\\ud83c[\\udffb-\\udfff]", rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")", rsNonAstral = "[^" + rsAstralRange + "]", rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}", rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]", rsUpper = "[" + rsUpperRange + "]", rsZWJ = "\\u200d";
  282. /** Used to compose unicode regexes. */
  283. var rsLowerMisc = "(?:" + rsLower + "|" + rsMisc + ")", rsUpperMisc = "(?:" + rsUpper + "|" + rsMisc + ")", rsOptLowerContr = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?", rsOptUpperContr = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?", reOptMod = rsModifier + "?", rsOptVar = "[" + rsVarRange + "]?", rsOptJoin = "(?:" + rsZWJ + "(?:" + [
  284. rsNonAstral,
  285. rsRegional,
  286. rsSurrPair
  287. ].join("|") + ")" + rsOptVar + reOptMod + ")*", rsSeq = rsOptVar + reOptMod + rsOptJoin, rsEmoji = "(?:" + [
  288. rsDingbat,
  289. rsRegional,
  290. rsSurrPair
  291. ].join("|") + ")" + rsSeq, rsSymbol = "(?:" + [
  292. rsNonAstral + rsCombo + "?",
  293. rsCombo,
  294. rsRegional,
  295. rsSurrPair,
  296. rsAstral
  297. ].join("|") + ")";
  298. /** Used to match apostrophes. */
  299. var reApos = RegExp(rsApos, "g");
  300. /**
  301. * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
  302. * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
  303. */
  304. var reComboMark = RegExp(rsCombo, "g");
  305. /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
  306. var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g");
  307. /** Used to match complex or compound words. */
  308. var reUnicodeWord = RegExp([
  309. rsUpper + "?" + rsLower + "+" + rsOptLowerContr + "(?=" + [
  310. rsBreak,
  311. rsUpper,
  312. "$"
  313. ].join("|") + ")",
  314. rsUpperMisc + "+" + rsOptUpperContr + "(?=" + [
  315. rsBreak,
  316. rsUpper + rsLowerMisc,
  317. "$"
  318. ].join("|") + ")",
  319. rsUpper + "?" + rsLowerMisc + "+" + rsOptLowerContr,
  320. rsUpper + "+" + rsOptUpperContr,
  321. rsDigits,
  322. rsEmoji
  323. ].join("|"), "g");
  324. /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
  325. var reHasUnicode = RegExp("[" + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + "]");
  326. /** Used to detect strings that need a more robust regexp to match words. */
  327. var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
  328. /** Used to map Latin Unicode letters to basic Latin letters. */
  329. var deburredLetters = {
  330. "À": "A",
  331. "Á": "A",
  332. "Â": "A",
  333. "Ã": "A",
  334. "Ä": "A",
  335. "Å": "A",
  336. "à": "a",
  337. "á": "a",
  338. "â": "a",
  339. "ã": "a",
  340. "ä": "a",
  341. "å": "a",
  342. "Ç": "C",
  343. "ç": "c",
  344. "Ð": "D",
  345. "ð": "d",
  346. "È": "E",
  347. "É": "E",
  348. "Ê": "E",
  349. "Ë": "E",
  350. "è": "e",
  351. "é": "e",
  352. "ê": "e",
  353. "ë": "e",
  354. "Ì": "I",
  355. "Í": "I",
  356. "Î": "I",
  357. "Ï": "I",
  358. "ì": "i",
  359. "í": "i",
  360. "î": "i",
  361. "ï": "i",
  362. "Ñ": "N",
  363. "ñ": "n",
  364. "Ò": "O",
  365. "Ó": "O",
  366. "Ô": "O",
  367. "Õ": "O",
  368. "Ö": "O",
  369. "Ø": "O",
  370. "ò": "o",
  371. "ó": "o",
  372. "ô": "o",
  373. "õ": "o",
  374. "ö": "o",
  375. "ø": "o",
  376. "Ù": "U",
  377. "Ú": "U",
  378. "Û": "U",
  379. "Ü": "U",
  380. "ù": "u",
  381. "ú": "u",
  382. "û": "u",
  383. "ü": "u",
  384. "Ý": "Y",
  385. "ý": "y",
  386. "ÿ": "y",
  387. "Æ": "Ae",
  388. "æ": "ae",
  389. "Þ": "Th",
  390. "þ": "th",
  391. "ß": "ss",
  392. "Ā": "A",
  393. "Ă": "A",
  394. "Ą": "A",
  395. "ā": "a",
  396. "ă": "a",
  397. "ą": "a",
  398. "Ć": "C",
  399. "Ĉ": "C",
  400. "Ċ": "C",
  401. "Č": "C",
  402. "ć": "c",
  403. "ĉ": "c",
  404. "ċ": "c",
  405. "č": "c",
  406. "Ď": "D",
  407. "Đ": "D",
  408. "ď": "d",
  409. "đ": "d",
  410. "Ē": "E",
  411. "Ĕ": "E",
  412. "Ė": "E",
  413. "Ę": "E",
  414. "Ě": "E",
  415. "ē": "e",
  416. "ĕ": "e",
  417. "ė": "e",
  418. "ę": "e",
  419. "ě": "e",
  420. "Ĝ": "G",
  421. "Ğ": "G",
  422. "Ġ": "G",
  423. "Ģ": "G",
  424. "ĝ": "g",
  425. "ğ": "g",
  426. "ġ": "g",
  427. "ģ": "g",
  428. "Ĥ": "H",
  429. "Ħ": "H",
  430. "ĥ": "h",
  431. "ħ": "h",
  432. "Ĩ": "I",
  433. "Ī": "I",
  434. "Ĭ": "I",
  435. "Į": "I",
  436. "İ": "I",
  437. "ĩ": "i",
  438. "ī": "i",
  439. "ĭ": "i",
  440. "į": "i",
  441. "ı": "i",
  442. "Ĵ": "J",
  443. "ĵ": "j",
  444. "Ķ": "K",
  445. "ķ": "k",
  446. "ĸ": "k",
  447. "Ĺ": "L",
  448. "Ļ": "L",
  449. "Ľ": "L",
  450. "Ŀ": "L",
  451. "Ł": "L",
  452. "ĺ": "l",
  453. "ļ": "l",
  454. "ľ": "l",
  455. "ŀ": "l",
  456. "ł": "l",
  457. "Ń": "N",
  458. "Ņ": "N",
  459. "Ň": "N",
  460. "Ŋ": "N",
  461. "ń": "n",
  462. "ņ": "n",
  463. "ň": "n",
  464. "ŋ": "n",
  465. "Ō": "O",
  466. "Ŏ": "O",
  467. "Ő": "O",
  468. "ō": "o",
  469. "ŏ": "o",
  470. "ő": "o",
  471. "Ŕ": "R",
  472. "Ŗ": "R",
  473. "Ř": "R",
  474. "ŕ": "r",
  475. "ŗ": "r",
  476. "ř": "r",
  477. "Ś": "S",
  478. "Ŝ": "S",
  479. "Ş": "S",
  480. "Š": "S",
  481. "ś": "s",
  482. "ŝ": "s",
  483. "ş": "s",
  484. "š": "s",
  485. "Ţ": "T",
  486. "Ť": "T",
  487. "Ŧ": "T",
  488. "ţ": "t",
  489. "ť": "t",
  490. "ŧ": "t",
  491. "Ũ": "U",
  492. "Ū": "U",
  493. "Ŭ": "U",
  494. "Ů": "U",
  495. "Ű": "U",
  496. "Ų": "U",
  497. "ũ": "u",
  498. "ū": "u",
  499. "ŭ": "u",
  500. "ů": "u",
  501. "ű": "u",
  502. "ų": "u",
  503. "Ŵ": "W",
  504. "ŵ": "w",
  505. "Ŷ": "Y",
  506. "ŷ": "y",
  507. "Ÿ": "Y",
  508. "Ź": "Z",
  509. "Ż": "Z",
  510. "Ž": "Z",
  511. "ź": "z",
  512. "ż": "z",
  513. "ž": "z",
  514. "IJ": "IJ",
  515. "ij": "ij",
  516. "Œ": "Oe",
  517. "œ": "oe",
  518. "ʼn": "'n",
  519. "ſ": "ss"
  520. };
  521. /** Detect free variable `global` from Node.js. */
  522. var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
  523. /** Detect free variable `self`. */
  524. var freeSelf = typeof self == "object" && self && self.Object === Object && self;
  525. /** Used as a reference to the global object. */
  526. var root$1 = freeGlobal || freeSelf || Function("return this")();
  527. /**
  528. * A specialized version of `_.reduce` for arrays without support for
  529. * iteratee shorthands.
  530. *
  531. * @private
  532. * @param {Array} [array] The array to iterate over.
  533. * @param {Function} iteratee The function invoked per iteration.
  534. * @param {*} [accumulator] The initial value.
  535. * @param {boolean} [initAccum] Specify using the first element of `array` as
  536. * the initial value.
  537. * @returns {*} Returns the accumulated value.
  538. */
  539. function arrayReduce(array, iteratee, accumulator, initAccum) {
  540. var index = -1, length = array ? array.length : 0;
  541. if (initAccum && length) accumulator = array[++index];
  542. while (++index < length) accumulator = iteratee(accumulator, array[index], index, array);
  543. return accumulator;
  544. }
  545. /**
  546. * Converts an ASCII `string` to an array.
  547. *
  548. * @private
  549. * @param {string} string The string to convert.
  550. * @returns {Array} Returns the converted array.
  551. */
  552. function asciiToArray(string$1) {
  553. return string$1.split("");
  554. }
  555. /**
  556. * Splits an ASCII `string` into an array of its words.
  557. *
  558. * @private
  559. * @param {string} The string to inspect.
  560. * @returns {Array} Returns the words of `string`.
  561. */
  562. function asciiWords(string$1) {
  563. return string$1.match(reAsciiWord) || [];
  564. }
  565. /**
  566. * The base implementation of `_.propertyOf` without support for deep paths.
  567. *
  568. * @private
  569. * @param {Object} object The object to query.
  570. * @returns {Function} Returns the new accessor function.
  571. */
  572. function basePropertyOf(object) {
  573. return function(key) {
  574. return object == null ? void 0 : object[key];
  575. };
  576. }
  577. /**
  578. * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
  579. * letters to basic Latin letters.
  580. *
  581. * @private
  582. * @param {string} letter The matched letter to deburr.
  583. * @returns {string} Returns the deburred letter.
  584. */
  585. var deburrLetter = basePropertyOf(deburredLetters);
  586. /**
  587. * Checks if `string` contains Unicode symbols.
  588. *
  589. * @private
  590. * @param {string} string The string to inspect.
  591. * @returns {boolean} Returns `true` if a symbol is found, else `false`.
  592. */
  593. function hasUnicode(string$1) {
  594. return reHasUnicode.test(string$1);
  595. }
  596. /**
  597. * Checks if `string` contains a word composed of Unicode symbols.
  598. *
  599. * @private
  600. * @param {string} string The string to inspect.
  601. * @returns {boolean} Returns `true` if a word is found, else `false`.
  602. */
  603. function hasUnicodeWord(string$1) {
  604. return reHasUnicodeWord.test(string$1);
  605. }
  606. /**
  607. * Converts `string` to an array.
  608. *
  609. * @private
  610. * @param {string} string The string to convert.
  611. * @returns {Array} Returns the converted array.
  612. */
  613. function stringToArray(string$1) {
  614. return hasUnicode(string$1) ? unicodeToArray(string$1) : asciiToArray(string$1);
  615. }
  616. /**
  617. * Converts a Unicode `string` to an array.
  618. *
  619. * @private
  620. * @param {string} string The string to convert.
  621. * @returns {Array} Returns the converted array.
  622. */
  623. function unicodeToArray(string$1) {
  624. return string$1.match(reUnicode) || [];
  625. }
  626. /**
  627. * Splits a Unicode `string` into an array of its words.
  628. *
  629. * @private
  630. * @param {string} The string to inspect.
  631. * @returns {Array} Returns the words of `string`.
  632. */
  633. function unicodeWords(string$1) {
  634. return string$1.match(reUnicodeWord) || [];
  635. }
  636. /**
  637. * Used to resolve the
  638. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  639. * of values.
  640. */
  641. var objectToString = Object.prototype.toString;
  642. /** Built-in value references. */
  643. var Symbol$1 = root$1.Symbol;
  644. /** Used to convert symbols to primitives and strings. */
  645. var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0;
  646. /**
  647. * The base implementation of `_.slice` without an iteratee call guard.
  648. *
  649. * @private
  650. * @param {Array} array The array to slice.
  651. * @param {number} [start=0] The start position.
  652. * @param {number} [end=array.length] The end position.
  653. * @returns {Array} Returns the slice of `array`.
  654. */
  655. function baseSlice(array, start, end) {
  656. var index = -1, length = array.length;
  657. if (start < 0) start = -start > length ? 0 : length + start;
  658. end = end > length ? length : end;
  659. if (end < 0) end += length;
  660. length = start > end ? 0 : end - start >>> 0;
  661. start >>>= 0;
  662. var result = Array(length);
  663. while (++index < length) result[index] = array[index + start];
  664. return result;
  665. }
  666. /**
  667. * The base implementation of `_.toString` which doesn't convert nullish
  668. * values to empty strings.
  669. *
  670. * @private
  671. * @param {*} value The value to process.
  672. * @returns {string} Returns the string.
  673. */
  674. function baseToString(value) {
  675. if (typeof value == "string") return value;
  676. if (isSymbol(value)) return symbolToString ? symbolToString.call(value) : "";
  677. var result = value + "";
  678. return result == "0" && 1 / value == -INFINITY ? "-0" : result;
  679. }
  680. /**
  681. * Casts `array` to a slice if it's needed.
  682. *
  683. * @private
  684. * @param {Array} array The array to inspect.
  685. * @param {number} start The start position.
  686. * @param {number} [end=array.length] The end position.
  687. * @returns {Array} Returns the cast slice.
  688. */
  689. function castSlice(array, start, end) {
  690. var length = array.length;
  691. end = end === void 0 ? length : end;
  692. return !start && end >= length ? array : baseSlice(array, start, end);
  693. }
  694. /**
  695. * Creates a function like `_.lowerFirst`.
  696. *
  697. * @private
  698. * @param {string} methodName The name of the `String` case method to use.
  699. * @returns {Function} Returns the new case function.
  700. */
  701. function createCaseFirst(methodName) {
  702. return function(string$1) {
  703. string$1 = toString(string$1);
  704. var strSymbols = hasUnicode(string$1) ? stringToArray(string$1) : void 0;
  705. var chr = strSymbols ? strSymbols[0] : string$1.charAt(0);
  706. var trailing = strSymbols ? castSlice(strSymbols, 1).join("") : string$1.slice(1);
  707. return chr[methodName]() + trailing;
  708. };
  709. }
  710. /**
  711. * Creates a function like `_.camelCase`.
  712. *
  713. * @private
  714. * @param {Function} callback The function to combine each word.
  715. * @returns {Function} Returns the new compounder function.
  716. */
  717. function createCompounder(callback) {
  718. return function(string$1) {
  719. return arrayReduce(words(deburr(string$1).replace(reApos, "")), callback, "");
  720. };
  721. }
  722. /**
  723. * Checks if `value` is object-like. A value is object-like if it's not `null`
  724. * and has a `typeof` result of "object".
  725. *
  726. * @static
  727. * @memberOf _
  728. * @since 4.0.0
  729. * @category Lang
  730. * @param {*} value The value to check.
  731. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  732. * @example
  733. *
  734. * _.isObjectLike({});
  735. * // => true
  736. *
  737. * _.isObjectLike([1, 2, 3]);
  738. * // => true
  739. *
  740. * _.isObjectLike(_.noop);
  741. * // => false
  742. *
  743. * _.isObjectLike(null);
  744. * // => false
  745. */
  746. function isObjectLike(value) {
  747. return !!value && typeof value == "object";
  748. }
  749. /**
  750. * Checks if `value` is classified as a `Symbol` primitive or object.
  751. *
  752. * @static
  753. * @memberOf _
  754. * @since 4.0.0
  755. * @category Lang
  756. * @param {*} value The value to check.
  757. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  758. * @example
  759. *
  760. * _.isSymbol(Symbol.iterator);
  761. * // => true
  762. *
  763. * _.isSymbol('abc');
  764. * // => false
  765. */
  766. function isSymbol(value) {
  767. return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
  768. }
  769. /**
  770. * Converts `value` to a string. An empty string is returned for `null`
  771. * and `undefined` values. The sign of `-0` is preserved.
  772. *
  773. * @static
  774. * @memberOf _
  775. * @since 4.0.0
  776. * @category Lang
  777. * @param {*} value The value to process.
  778. * @returns {string} Returns the string.
  779. * @example
  780. *
  781. * _.toString(null);
  782. * // => ''
  783. *
  784. * _.toString(-0);
  785. * // => '-0'
  786. *
  787. * _.toString([1, 2, 3]);
  788. * // => '1,2,3'
  789. */
  790. function toString(value) {
  791. return value == null ? "" : baseToString(value);
  792. }
  793. /**
  794. * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
  795. *
  796. * @static
  797. * @memberOf _
  798. * @since 3.0.0
  799. * @category String
  800. * @param {string} [string=''] The string to convert.
  801. * @returns {string} Returns the camel cased string.
  802. * @example
  803. *
  804. * _.camelCase('Foo Bar');
  805. * // => 'fooBar'
  806. *
  807. * _.camelCase('--foo-bar--');
  808. * // => 'fooBar'
  809. *
  810. * _.camelCase('__FOO_BAR__');
  811. * // => 'fooBar'
  812. */
  813. var camelCase = createCompounder(function(result, word$1, index) {
  814. word$1 = word$1.toLowerCase();
  815. return result + (index ? capitalize(word$1) : word$1);
  816. });
  817. /**
  818. * Converts the first character of `string` to upper case and the remaining
  819. * to lower case.
  820. *
  821. * @static
  822. * @memberOf _
  823. * @since 3.0.0
  824. * @category String
  825. * @param {string} [string=''] The string to capitalize.
  826. * @returns {string} Returns the capitalized string.
  827. * @example
  828. *
  829. * _.capitalize('FRED');
  830. * // => 'Fred'
  831. */
  832. function capitalize(string$1) {
  833. return upperFirst(toString(string$1).toLowerCase());
  834. }
  835. /**
  836. * Deburrs `string` by converting
  837. * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
  838. * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
  839. * letters to basic Latin letters and removing
  840. * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
  841. *
  842. * @static
  843. * @memberOf _
  844. * @since 3.0.0
  845. * @category String
  846. * @param {string} [string=''] The string to deburr.
  847. * @returns {string} Returns the deburred string.
  848. * @example
  849. *
  850. * _.deburr('déjà vu');
  851. * // => 'deja vu'
  852. */
  853. function deburr(string$1) {
  854. string$1 = toString(string$1);
  855. return string$1 && string$1.replace(reLatin, deburrLetter).replace(reComboMark, "");
  856. }
  857. /**
  858. * Converts the first character of `string` to upper case.
  859. *
  860. * @static
  861. * @memberOf _
  862. * @since 4.0.0
  863. * @category String
  864. * @param {string} [string=''] The string to convert.
  865. * @returns {string} Returns the converted string.
  866. * @example
  867. *
  868. * _.upperFirst('fred');
  869. * // => 'Fred'
  870. *
  871. * _.upperFirst('FRED');
  872. * // => 'FRED'
  873. */
  874. var upperFirst = createCaseFirst("toUpperCase");
  875. /**
  876. * Splits `string` into an array of its words.
  877. *
  878. * @static
  879. * @memberOf _
  880. * @since 3.0.0
  881. * @category String
  882. * @param {string} [string=''] The string to inspect.
  883. * @param {RegExp|string} [pattern] The pattern to match words.
  884. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  885. * @returns {Array} Returns the words of `string`.
  886. * @example
  887. *
  888. * _.words('fred, barney, & pebbles');
  889. * // => ['fred', 'barney', 'pebbles']
  890. *
  891. * _.words('fred, barney, & pebbles', /[^, ]+/g);
  892. * // => ['fred', 'barney', '&', 'pebbles']
  893. */
  894. function words(string$1, pattern, guard) {
  895. string$1 = toString(string$1);
  896. pattern = guard ? void 0 : pattern;
  897. if (pattern === void 0) return hasUnicodeWord(string$1) ? unicodeWords(string$1) : asciiWords(string$1);
  898. return string$1.match(pattern) || [];
  899. }
  900. module.exports = camelCase;
  901. }) });
  902. //#endregion
  903. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/localsConvention.js
  904. var require_localsConvention = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/localsConvention.js": ((exports) => {
  905. Object.defineProperty(exports, "__esModule", { value: true });
  906. exports.makeLocalsConventionReducer = makeLocalsConventionReducer;
  907. var _lodash = _interopRequireDefault$22(require_lodash());
  908. function _interopRequireDefault$22(obj) {
  909. return obj && obj.__esModule ? obj : { default: obj };
  910. }
  911. function dashesCamelCase(string$1) {
  912. return string$1.replace(/-+(\w)/g, (_, firstLetter) => firstLetter.toUpperCase());
  913. }
  914. function makeLocalsConventionReducer(localsConvention, inputFile) {
  915. const isFunc = typeof localsConvention === "function";
  916. return (tokens$1, [className$1, value]) => {
  917. if (isFunc) {
  918. const convention = localsConvention(className$1, value, inputFile);
  919. tokens$1[convention] = value;
  920. return tokens$1;
  921. }
  922. switch (localsConvention) {
  923. case "camelCase":
  924. tokens$1[className$1] = value;
  925. tokens$1[(0, _lodash.default)(className$1)] = value;
  926. break;
  927. case "camelCaseOnly":
  928. tokens$1[(0, _lodash.default)(className$1)] = value;
  929. break;
  930. case "dashes":
  931. tokens$1[className$1] = value;
  932. tokens$1[dashesCamelCase(className$1)] = value;
  933. break;
  934. case "dashesOnly":
  935. tokens$1[dashesCamelCase(className$1)] = value;
  936. break;
  937. }
  938. return tokens$1;
  939. };
  940. }
  941. }) });
  942. //#endregion
  943. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/FileSystemLoader.js
  944. var require_FileSystemLoader = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/FileSystemLoader.js": ((exports) => {
  945. Object.defineProperty(exports, "__esModule", { value: true });
  946. var _postcss$1 = _interopRequireDefault$21(__require("postcss"));
  947. var _path = _interopRequireDefault$21(__require("path"));
  948. var _Parser$1 = _interopRequireDefault$21(require_Parser());
  949. var _fs$1 = require_fs();
  950. function _interopRequireDefault$21(obj) {
  951. return obj && obj.__esModule ? obj : { default: obj };
  952. }
  953. var Core = class Core {
  954. constructor(plugins) {
  955. this.plugins = plugins || Core.defaultPlugins;
  956. }
  957. async load(sourceString, sourcePath, trace, pathFetcher) {
  958. const parser$1 = new _Parser$1.default(pathFetcher, trace);
  959. const plugins = this.plugins.concat([parser$1.plugin()]);
  960. return {
  961. injectableSource: (await (0, _postcss$1.default)(plugins).process(sourceString, { from: sourcePath })).css,
  962. exportTokens: parser$1.exportTokens
  963. };
  964. }
  965. };
  966. const traceKeySorter = (a, b) => {
  967. if (a.length < b.length) return a < b.substring(0, a.length) ? -1 : 1;
  968. if (a.length > b.length) return a.substring(0, b.length) <= b ? -1 : 1;
  969. return a < b ? -1 : 1;
  970. };
  971. var FileSystemLoader = class {
  972. constructor(root$2, plugins, fileResolve) {
  973. if (root$2 === "/" && process.platform === "win32") {
  974. const cwdDrive = process.cwd().slice(0, 3);
  975. if (!/^[A-Za-z]:\\$/.test(cwdDrive)) throw new Error(`Failed to obtain root from "${process.cwd()}".`);
  976. root$2 = cwdDrive;
  977. }
  978. this.root = root$2;
  979. this.fileResolve = fileResolve;
  980. this.sources = {};
  981. this.traces = {};
  982. this.importNr = 0;
  983. this.core = new Core(plugins);
  984. this.tokensByFile = {};
  985. this.fs = (0, _fs$1.getFileSystem)();
  986. }
  987. async fetch(_newPath, relativeTo, _trace) {
  988. const newPath = _newPath.replace(/^["']|["']$/g, "");
  989. const trace = _trace || String.fromCharCode(this.importNr++);
  990. const useFileResolve = typeof this.fileResolve === "function";
  991. const fileResolvedPath = useFileResolve ? await this.fileResolve(newPath, relativeTo) : await Promise.resolve();
  992. if (fileResolvedPath && !_path.default.isAbsolute(fileResolvedPath)) throw new Error("The returned path from the \"fileResolve\" option must be absolute.");
  993. const relativeDir = _path.default.dirname(relativeTo);
  994. const rootRelativePath = fileResolvedPath || _path.default.resolve(relativeDir, newPath);
  995. let fileRelativePath = fileResolvedPath || _path.default.resolve(_path.default.resolve(this.root, relativeDir), newPath);
  996. if (!useFileResolve && newPath[0] !== "." && !_path.default.isAbsolute(newPath)) try {
  997. fileRelativePath = __require.resolve(newPath);
  998. } catch (e) {}
  999. const tokens$1 = this.tokensByFile[fileRelativePath];
  1000. if (tokens$1) return tokens$1;
  1001. return new Promise((resolve, reject) => {
  1002. this.fs.readFile(fileRelativePath, "utf-8", async (err, source) => {
  1003. if (err) reject(err);
  1004. const { injectableSource, exportTokens } = await this.core.load(source, rootRelativePath, trace, this.fetch.bind(this));
  1005. this.sources[fileRelativePath] = injectableSource;
  1006. this.traces[trace] = fileRelativePath;
  1007. this.tokensByFile[fileRelativePath] = exportTokens;
  1008. resolve(exportTokens);
  1009. });
  1010. });
  1011. }
  1012. get finalSource() {
  1013. const traces = this.traces;
  1014. const sources = this.sources;
  1015. let written = /* @__PURE__ */ new Set();
  1016. return Object.keys(traces).sort(traceKeySorter).map((key) => {
  1017. const filename = traces[key];
  1018. if (written.has(filename)) return null;
  1019. written.add(filename);
  1020. return sources[filename];
  1021. }).join("");
  1022. }
  1023. };
  1024. exports.default = FileSystemLoader;
  1025. }) });
  1026. //#endregion
  1027. //#region ../../node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.6/node_modules/postcss-modules-extract-imports/src/topologicalSort.js
  1028. var require_topologicalSort = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.6/node_modules/postcss-modules-extract-imports/src/topologicalSort.js": ((exports, module) => {
  1029. const PERMANENT_MARKER = 2;
  1030. const TEMPORARY_MARKER = 1;
  1031. function createError(node, graph) {
  1032. const er = /* @__PURE__ */ new Error("Nondeterministic import's order");
  1033. const relatedNode = graph[node].find((relatedNode$1) => graph[relatedNode$1].indexOf(node) > -1);
  1034. er.nodes = [node, relatedNode];
  1035. return er;
  1036. }
  1037. function walkGraph(node, graph, state, result, strict) {
  1038. if (state[node] === PERMANENT_MARKER) return;
  1039. if (state[node] === TEMPORARY_MARKER) {
  1040. if (strict) return createError(node, graph);
  1041. return;
  1042. }
  1043. state[node] = TEMPORARY_MARKER;
  1044. const children = graph[node];
  1045. const length = children.length;
  1046. for (let i$1 = 0; i$1 < length; ++i$1) {
  1047. const error = walkGraph(children[i$1], graph, state, result, strict);
  1048. if (error instanceof Error) return error;
  1049. }
  1050. state[node] = PERMANENT_MARKER;
  1051. result.push(node);
  1052. }
  1053. function topologicalSort$1(graph, strict) {
  1054. const result = [];
  1055. const state = {};
  1056. const nodes = Object.keys(graph);
  1057. const length = nodes.length;
  1058. for (let i$1 = 0; i$1 < length; ++i$1) {
  1059. const er = walkGraph(nodes[i$1], graph, state, result, strict);
  1060. if (er instanceof Error) return er;
  1061. }
  1062. return result;
  1063. }
  1064. module.exports = topologicalSort$1;
  1065. }) });
  1066. //#endregion
  1067. //#region ../../node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.6/node_modules/postcss-modules-extract-imports/src/index.js
  1068. var require_src$3 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.6/node_modules/postcss-modules-extract-imports/src/index.js": ((exports, module) => {
  1069. const topologicalSort = require_topologicalSort();
  1070. const matchImports$1 = /^(.+?)\s+from\s+(?:"([^"]+)"|'([^']+)'|(global))$/;
  1071. const icssImport = /^:import\((?:"([^"]+)"|'([^']+)')\)/;
  1072. const VISITED_MARKER = 1;
  1073. /**
  1074. * :import('G') {}
  1075. *
  1076. * Rule
  1077. * composes: ... from 'A'
  1078. * composes: ... from 'B'
  1079. * Rule
  1080. * composes: ... from 'A'
  1081. * composes: ... from 'A'
  1082. * composes: ... from 'C'
  1083. *
  1084. * Results in:
  1085. *
  1086. * graph: {
  1087. * G: [],
  1088. * A: [],
  1089. * B: ['A'],
  1090. * C: ['A'],
  1091. * }
  1092. */
  1093. function addImportToGraph(importId, parentId, graph, visited) {
  1094. const siblingsId = parentId + "_siblings";
  1095. const visitedId = parentId + "_" + importId;
  1096. if (visited[visitedId] !== VISITED_MARKER) {
  1097. if (!Array.isArray(visited[siblingsId])) visited[siblingsId] = [];
  1098. const siblings = visited[siblingsId];
  1099. if (Array.isArray(graph[importId])) graph[importId] = graph[importId].concat(siblings);
  1100. else graph[importId] = siblings.slice();
  1101. visited[visitedId] = VISITED_MARKER;
  1102. siblings.push(importId);
  1103. }
  1104. }
  1105. module.exports = (options = {}) => {
  1106. let importIndex = 0;
  1107. const createImportedName = typeof options.createImportedName !== "function" ? (importName) => `i__imported_${importName.replace(/\W/g, "_")}_${importIndex++}` : options.createImportedName;
  1108. const failOnWrongOrder = options.failOnWrongOrder;
  1109. return {
  1110. postcssPlugin: "postcss-modules-extract-imports",
  1111. prepare() {
  1112. const graph = {};
  1113. const visited = {};
  1114. const existingImports = {};
  1115. const importDecls = {};
  1116. const imports = {};
  1117. return { Once(root$2, postcss) {
  1118. root$2.walkRules((rule) => {
  1119. const matches = icssImport.exec(rule.selector);
  1120. if (matches) {
  1121. const [, doubleQuotePath, singleQuotePath] = matches;
  1122. const importPath = doubleQuotePath || singleQuotePath;
  1123. addImportToGraph(importPath, "root", graph, visited);
  1124. existingImports[importPath] = rule;
  1125. }
  1126. });
  1127. root$2.walkDecls(/^composes$/, (declaration) => {
  1128. const multiple = declaration.value.split(",");
  1129. const values = [];
  1130. multiple.forEach((value) => {
  1131. const matches = value.trim().match(matchImports$1);
  1132. if (!matches) {
  1133. values.push(value);
  1134. return;
  1135. }
  1136. let tmpSymbols;
  1137. let [, symbols, doubleQuotePath, singleQuotePath, global$1] = matches;
  1138. if (global$1) tmpSymbols = symbols.split(/\s+/).map((s) => `global(${s})`);
  1139. else {
  1140. const importPath = doubleQuotePath || singleQuotePath;
  1141. let parent = declaration.parent;
  1142. let parentIndexes = "";
  1143. while (parent.type !== "root") {
  1144. parentIndexes = parent.parent.index(parent) + "_" + parentIndexes;
  1145. parent = parent.parent;
  1146. }
  1147. const { selector: selector$1 } = declaration.parent;
  1148. const parentRule = `_${parentIndexes}${selector$1}`;
  1149. addImportToGraph(importPath, parentRule, graph, visited);
  1150. importDecls[importPath] = declaration;
  1151. imports[importPath] = imports[importPath] || {};
  1152. tmpSymbols = symbols.split(/\s+/).map((s) => {
  1153. if (!imports[importPath][s]) imports[importPath][s] = createImportedName(s, importPath);
  1154. return imports[importPath][s];
  1155. });
  1156. }
  1157. values.push(tmpSymbols.join(" "));
  1158. });
  1159. declaration.value = values.join(", ");
  1160. });
  1161. const importsOrder = topologicalSort(graph, failOnWrongOrder);
  1162. if (importsOrder instanceof Error) {
  1163. const importPath = importsOrder.nodes.find((importPath$1) => importDecls.hasOwnProperty(importPath$1));
  1164. throw importDecls[importPath].error("Failed to resolve order of composed modules " + importsOrder.nodes.map((importPath$1) => "`" + importPath$1 + "`").join(", ") + ".", {
  1165. plugin: "postcss-modules-extract-imports",
  1166. word: "composes"
  1167. });
  1168. }
  1169. let lastImportRule;
  1170. importsOrder.forEach((path$2) => {
  1171. const importedSymbols = imports[path$2];
  1172. let rule = existingImports[path$2];
  1173. if (!rule && importedSymbols) {
  1174. rule = postcss.rule({
  1175. selector: `:import("${path$2}")`,
  1176. raws: { after: "\n" }
  1177. });
  1178. if (lastImportRule) root$2.insertAfter(lastImportRule, rule);
  1179. else root$2.prepend(rule);
  1180. }
  1181. lastImportRule = rule;
  1182. if (!importedSymbols) return;
  1183. Object.keys(importedSymbols).forEach((importedSymbol) => {
  1184. rule.append(postcss.decl({
  1185. value: importedSymbol,
  1186. prop: importedSymbols[importedSymbol],
  1187. raws: { before: "\n " }
  1188. }));
  1189. });
  1190. });
  1191. } };
  1192. }
  1193. };
  1194. };
  1195. module.exports.postcss = true;
  1196. }) });
  1197. //#endregion
  1198. //#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/wasm-hash.js
  1199. var require_wasm_hash = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/wasm-hash.js": ((exports, module) => {
  1200. const MAX_SHORT_STRING$1 = Math.floor(65472 / 4) & -4;
  1201. var WasmHash = class {
  1202. /**
  1203. * @param {WebAssembly.Instance} instance wasm instance
  1204. * @param {WebAssembly.Instance[]} instancesPool pool of instances
  1205. * @param {number} chunkSize size of data chunks passed to wasm
  1206. * @param {number} digestSize size of digest returned by wasm
  1207. */
  1208. constructor(instance, instancesPool, chunkSize, digestSize) {
  1209. const exports$1 = instance.exports;
  1210. exports$1.init();
  1211. this.exports = exports$1;
  1212. this.mem = Buffer.from(exports$1.memory.buffer, 0, 65536);
  1213. this.buffered = 0;
  1214. this.instancesPool = instancesPool;
  1215. this.chunkSize = chunkSize;
  1216. this.digestSize = digestSize;
  1217. }
  1218. reset() {
  1219. this.buffered = 0;
  1220. this.exports.init();
  1221. }
  1222. /**
  1223. * @param {Buffer | string} data data
  1224. * @param {BufferEncoding=} encoding encoding
  1225. * @returns {this} itself
  1226. */
  1227. update(data, encoding) {
  1228. if (typeof data === "string") {
  1229. while (data.length > MAX_SHORT_STRING$1) {
  1230. this._updateWithShortString(data.slice(0, MAX_SHORT_STRING$1), encoding);
  1231. data = data.slice(MAX_SHORT_STRING$1);
  1232. }
  1233. this._updateWithShortString(data, encoding);
  1234. return this;
  1235. }
  1236. this._updateWithBuffer(data);
  1237. return this;
  1238. }
  1239. /**
  1240. * @param {string} data data
  1241. * @param {BufferEncoding=} encoding encoding
  1242. * @returns {void}
  1243. */
  1244. _updateWithShortString(data, encoding) {
  1245. const { exports: exports$1, buffered, mem, chunkSize } = this;
  1246. let endPos;
  1247. if (data.length < 70) if (!encoding || encoding === "utf-8" || encoding === "utf8") {
  1248. endPos = buffered;
  1249. for (let i$1 = 0; i$1 < data.length; i$1++) {
  1250. const cc = data.charCodeAt(i$1);
  1251. if (cc < 128) mem[endPos++] = cc;
  1252. else if (cc < 2048) {
  1253. mem[endPos] = cc >> 6 | 192;
  1254. mem[endPos + 1] = cc & 63 | 128;
  1255. endPos += 2;
  1256. } else {
  1257. endPos += mem.write(data.slice(i$1), endPos, encoding);
  1258. break;
  1259. }
  1260. }
  1261. } else if (encoding === "latin1") {
  1262. endPos = buffered;
  1263. for (let i$1 = 0; i$1 < data.length; i$1++) {
  1264. const cc = data.charCodeAt(i$1);
  1265. mem[endPos++] = cc;
  1266. }
  1267. } else endPos = buffered + mem.write(data, buffered, encoding);
  1268. else endPos = buffered + mem.write(data, buffered, encoding);
  1269. if (endPos < chunkSize) this.buffered = endPos;
  1270. else {
  1271. const l = endPos & ~(this.chunkSize - 1);
  1272. exports$1.update(l);
  1273. const newBuffered = endPos - l;
  1274. this.buffered = newBuffered;
  1275. if (newBuffered > 0) mem.copyWithin(0, l, endPos);
  1276. }
  1277. }
  1278. /**
  1279. * @param {Buffer} data data
  1280. * @returns {void}
  1281. */
  1282. _updateWithBuffer(data) {
  1283. const { exports: exports$1, buffered, mem } = this;
  1284. const length = data.length;
  1285. if (buffered + length < this.chunkSize) {
  1286. data.copy(mem, buffered, 0, length);
  1287. this.buffered += length;
  1288. } else {
  1289. const l = buffered + length & ~(this.chunkSize - 1);
  1290. if (l > 65536) {
  1291. let i$1 = 65536 - buffered;
  1292. data.copy(mem, buffered, 0, i$1);
  1293. exports$1.update(65536);
  1294. const stop = l - buffered - 65536;
  1295. while (i$1 < stop) {
  1296. data.copy(mem, 0, i$1, i$1 + 65536);
  1297. exports$1.update(65536);
  1298. i$1 += 65536;
  1299. }
  1300. data.copy(mem, 0, i$1, l - buffered);
  1301. exports$1.update(l - buffered - i$1);
  1302. } else {
  1303. data.copy(mem, buffered, 0, l - buffered);
  1304. exports$1.update(l);
  1305. }
  1306. const newBuffered = length + buffered - l;
  1307. this.buffered = newBuffered;
  1308. if (newBuffered > 0) data.copy(mem, 0, length - newBuffered, length);
  1309. }
  1310. }
  1311. digest(type) {
  1312. const { exports: exports$1, buffered, mem, digestSize } = this;
  1313. exports$1.final(buffered);
  1314. this.instancesPool.push(this);
  1315. const hex$1 = mem.toString("latin1", 0, digestSize);
  1316. if (type === "hex") return hex$1;
  1317. if (type === "binary" || !type) return Buffer.from(hex$1, "hex");
  1318. return Buffer.from(hex$1, "hex").toString(type);
  1319. }
  1320. };
  1321. const create$2 = (wasmModule, instancesPool, chunkSize, digestSize) => {
  1322. if (instancesPool.length > 0) {
  1323. const old = instancesPool.pop();
  1324. old.reset();
  1325. return old;
  1326. } else return new WasmHash(new WebAssembly.Instance(wasmModule), instancesPool, chunkSize, digestSize);
  1327. };
  1328. module.exports = create$2;
  1329. module.exports.MAX_SHORT_STRING = MAX_SHORT_STRING$1;
  1330. }) });
  1331. //#endregion
  1332. //#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/xxhash64.js
  1333. var require_xxhash64 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/xxhash64.js": ((exports, module) => {
  1334. const create$1 = require_wasm_hash();
  1335. const xxhash64 = new WebAssembly.Module(Buffer.from("AGFzbQEAAAABCAJgAX8AYAAAAwQDAQAABQMBAAEGGgV+AUIAC34BQgALfgFCAAt+AUIAC34BQgALByIEBGluaXQAAAZ1cGRhdGUAAQVmaW5hbAACBm1lbW9yeQIACrUIAzAAQtbrgu7q/Yn14AAkAELP1tO+0ser2UIkAUIAJAJC+erQ0OfJoeThACQDQgAkBAvUAQIBfwR+IABFBEAPCyMEIACtfCQEIwAhAiMBIQMjAiEEIwMhBQNAIAIgASkDAELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiECIAMgASkDCELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEDIAQgASkDEELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEEIAUgASkDGELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEFIAAgAUEgaiIBSw0ACyACJAAgAyQBIAQkAiAFJAMLqwYCAX8EfiMEQgBSBH4jACICQgGJIwEiA0IHiXwjAiIEQgyJfCMDIgVCEol8IAJCz9bTvtLHq9lCfkIfiUKHla+vmLbem55/foVCh5Wvr5i23puef35CnaO16oOxjYr6AH0gA0LP1tO+0ser2UJ+Qh+JQoeVr6+Ytt6bnn9+hUKHla+vmLbem55/fkKdo7Xqg7GNivoAfSAEQs/W077Sx6vZQn5CH4lCh5Wvr5i23puef36FQoeVr6+Ytt6bnn9+Qp2jteqDsY2K+gB9IAVCz9bTvtLHq9lCfkIfiUKHla+vmLbem55/foVCh5Wvr5i23puef35CnaO16oOxjYr6AH0FQsXP2bLx5brqJwsjBCAArXx8IQIDQCABQQhqIABNBEAgAiABKQMAQs/W077Sx6vZQn5CH4lCh5Wvr5i23puef36FQhuJQoeVr6+Ytt6bnn9+Qp2jteqDsY2K+gB9IQIgAUEIaiEBDAELCyABQQRqIABNBEACfyACIAE1AgBCh5Wvr5i23puef36FQheJQs/W077Sx6vZQn5C+fPd8Zn2masWfCECIAFBBGoLIQELA0AgACABRwRAIAIgATEAAELFz9my8eW66id+hUILiUKHla+vmLbem55/fiECIAFBAWohAQwBCwtBACACIAJCIYiFQs/W077Sx6vZQn4iAiACQh2IhUL5893xmfaZqxZ+IgIgAkIgiIUiAkIgiCIDQv//A4NCIIYgA0KAgPz/D4NCEIiEIgNC/4GAgPAfg0IQhiADQoD+g4CA4D+DQgiIhCIDQo+AvIDwgcAHg0IIhiADQvCBwIeAnoD4AINCBIiEIgNChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IANCsODAgYOGjJgwhHw3AwBBCCACQv////8PgyICQv//A4NCIIYgAkKAgPz/D4NCEIiEIgJC/4GAgPAfg0IQhiACQoD+g4CA4D+DQgiIhCICQo+AvIDwgcAHg0IIhiACQvCBwIeAnoD4AINCBIiEIgJChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IAJCsODAgYOGjJgwhHw3AwAL", "base64"));
  1336. module.exports = create$1.bind(null, xxhash64, [], 32, 16);
  1337. }) });
  1338. //#endregion
  1339. //#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/BatchedHash.js
  1340. var require_BatchedHash = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/BatchedHash.js": ((exports, module) => {
  1341. const MAX_SHORT_STRING = require_wasm_hash().MAX_SHORT_STRING;
  1342. var BatchedHash$1 = class {
  1343. constructor(hash$1) {
  1344. this.string = void 0;
  1345. this.encoding = void 0;
  1346. this.hash = hash$1;
  1347. }
  1348. /**
  1349. * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
  1350. * @param {string|Buffer} data data
  1351. * @param {string=} inputEncoding data encoding
  1352. * @returns {this} updated hash
  1353. */
  1354. update(data, inputEncoding) {
  1355. if (this.string !== void 0) {
  1356. if (typeof data === "string" && inputEncoding === this.encoding && this.string.length + data.length < MAX_SHORT_STRING) {
  1357. this.string += data;
  1358. return this;
  1359. }
  1360. this.hash.update(this.string, this.encoding);
  1361. this.string = void 0;
  1362. }
  1363. if (typeof data === "string") if (data.length < MAX_SHORT_STRING && (!inputEncoding || !inputEncoding.startsWith("ba"))) {
  1364. this.string = data;
  1365. this.encoding = inputEncoding;
  1366. } else this.hash.update(data, inputEncoding);
  1367. else this.hash.update(data);
  1368. return this;
  1369. }
  1370. /**
  1371. * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
  1372. * @param {string=} encoding encoding of the return value
  1373. * @returns {string|Buffer} digest
  1374. */
  1375. digest(encoding) {
  1376. if (this.string !== void 0) this.hash.update(this.string, this.encoding);
  1377. return this.hash.digest(encoding);
  1378. }
  1379. };
  1380. module.exports = BatchedHash$1;
  1381. }) });
  1382. //#endregion
  1383. //#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/md4.js
  1384. var require_md4 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/md4.js": ((exports, module) => {
  1385. const create = require_wasm_hash();
  1386. const md4 = new WebAssembly.Module(Buffer.from("AGFzbQEAAAABCAJgAX8AYAAAAwUEAQAAAAUDAQABBhoFfwFBAAt/AUEAC38BQQALfwFBAAt/AUEACwciBARpbml0AAAGdXBkYXRlAAIFZmluYWwAAwZtZW1vcnkCAAqFEAQmAEGBxpS6BiQBQYnXtv5+JAJB/rnrxXkkA0H2qMmBASQEQQAkAAvMCgEYfyMBIQojAiEGIwMhByMEIQgDQCAAIAVLBEAgBSgCCCINIAcgBiAFKAIEIgsgCCAHIAUoAgAiDCAKIAggBiAHIAhzcXNqakEDdyIDIAYgB3Nxc2pqQQd3IgEgAyAGc3FzampBC3chAiAFKAIUIg8gASACIAUoAhAiCSADIAEgBSgCDCIOIAYgAyACIAEgA3Nxc2pqQRN3IgQgASACc3FzampBA3ciAyACIARzcXNqakEHdyEBIAUoAiAiEiADIAEgBSgCHCIRIAQgAyAFKAIYIhAgAiAEIAEgAyAEc3FzampBC3ciAiABIANzcXNqakETdyIEIAEgAnNxc2pqQQN3IQMgBSgCLCIVIAQgAyAFKAIoIhQgAiAEIAUoAiQiEyABIAIgAyACIARzcXNqakEHdyIBIAMgBHNxc2pqQQt3IgIgASADc3FzampBE3chBCAPIBAgCSAVIBQgEyAFKAI4IhYgAiAEIAUoAjQiFyABIAIgBSgCMCIYIAMgASAEIAEgAnNxc2pqQQN3IgEgAiAEc3FzampBB3ciAiABIARzcXNqakELdyIDIAkgAiAMIAEgBSgCPCIJIAQgASADIAEgAnNxc2pqQRN3IgEgAiADcnEgAiADcXJqakGZ84nUBWpBA3ciAiABIANycSABIANxcmpqQZnzidQFakEFdyIEIAEgAnJxIAEgAnFyaiASakGZ84nUBWpBCXciAyAPIAQgCyACIBggASADIAIgBHJxIAIgBHFyampBmfOJ1AVqQQ13IgEgAyAEcnEgAyAEcXJqakGZ84nUBWpBA3ciAiABIANycSABIANxcmpqQZnzidQFakEFdyIEIAEgAnJxIAEgAnFyampBmfOJ1AVqQQl3IgMgECAEIAIgFyABIAMgAiAEcnEgAiAEcXJqakGZ84nUBWpBDXciASADIARycSADIARxcmogDWpBmfOJ1AVqQQN3IgIgASADcnEgASADcXJqakGZ84nUBWpBBXciBCABIAJycSABIAJxcmpqQZnzidQFakEJdyIDIBEgBCAOIAIgFiABIAMgAiAEcnEgAiAEcXJqakGZ84nUBWpBDXciASADIARycSADIARxcmpqQZnzidQFakEDdyICIAEgA3JxIAEgA3FyampBmfOJ1AVqQQV3IgQgASACcnEgASACcXJqakGZ84nUBWpBCXciAyAMIAIgAyAJIAEgAyACIARycSACIARxcmpqQZnzidQFakENdyIBcyAEc2pqQaHX5/YGakEDdyICIAQgASACcyADc2ogEmpBodfn9gZqQQl3IgRzIAFzampBodfn9gZqQQt3IgMgAiADIBggASADIARzIAJzampBodfn9gZqQQ93IgFzIARzaiANakGh1+f2BmpBA3ciAiAUIAQgASACcyADc2pqQaHX5/YGakEJdyIEcyABc2pqQaHX5/YGakELdyIDIAsgAiADIBYgASADIARzIAJzampBodfn9gZqQQ93IgFzIARzampBodfn9gZqQQN3IgIgEyAEIAEgAnMgA3NqakGh1+f2BmpBCXciBHMgAXNqakGh1+f2BmpBC3chAyAKIA4gAiADIBcgASADIARzIAJzampBodfn9gZqQQ93IgFzIARzampBodfn9gZqQQN3IgJqIQogBiAJIAEgESADIAIgFSAEIAEgAnMgA3NqakGh1+f2BmpBCXciBHMgAXNqakGh1+f2BmpBC3ciAyAEcyACc2pqQaHX5/YGakEPd2ohBiADIAdqIQcgBCAIaiEIIAVBQGshBQwBCwsgCiQBIAYkAiAHJAMgCCQECw0AIAAQASMAIABqJAAL/wQCA38BfiMAIABqrUIDhiEEIABByABqQUBxIgJBCGshAyAAIgFBAWohACABQYABOgAAA0AgACACSUEAIABBB3EbBEAgAEEAOgAAIABBAWohAAwBCwsDQCAAIAJJBEAgAEIANwMAIABBCGohAAwBCwsgAyAENwMAIAIQAUEAIwGtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEIIwKtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEQIwOtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEYIwStIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAAs=", "base64"));
  1387. module.exports = create.bind(null, md4, [], 64, 32);
  1388. }) });
  1389. //#endregion
  1390. //#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/BulkUpdateDecorator.js
  1391. var require_BulkUpdateDecorator = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/BulkUpdateDecorator.js": ((exports, module) => {
  1392. const BULK_SIZE = 2e3;
  1393. const digestCaches = {};
  1394. var BulkUpdateDecorator$1 = class {
  1395. /**
  1396. * @param {Hash | function(): Hash} hashOrFactory function to create a hash
  1397. * @param {string=} hashKey key for caching
  1398. */
  1399. constructor(hashOrFactory, hashKey) {
  1400. this.hashKey = hashKey;
  1401. if (typeof hashOrFactory === "function") {
  1402. this.hashFactory = hashOrFactory;
  1403. this.hash = void 0;
  1404. } else {
  1405. this.hashFactory = void 0;
  1406. this.hash = hashOrFactory;
  1407. }
  1408. this.buffer = "";
  1409. }
  1410. /**
  1411. * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
  1412. * @param {string|Buffer} data data
  1413. * @param {string=} inputEncoding data encoding
  1414. * @returns {this} updated hash
  1415. */
  1416. update(data, inputEncoding) {
  1417. if (inputEncoding !== void 0 || typeof data !== "string" || data.length > BULK_SIZE) {
  1418. if (this.hash === void 0) this.hash = this.hashFactory();
  1419. if (this.buffer.length > 0) {
  1420. this.hash.update(this.buffer);
  1421. this.buffer = "";
  1422. }
  1423. this.hash.update(data, inputEncoding);
  1424. } else {
  1425. this.buffer += data;
  1426. if (this.buffer.length > BULK_SIZE) {
  1427. if (this.hash === void 0) this.hash = this.hashFactory();
  1428. this.hash.update(this.buffer);
  1429. this.buffer = "";
  1430. }
  1431. }
  1432. return this;
  1433. }
  1434. /**
  1435. * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
  1436. * @param {string=} encoding encoding of the return value
  1437. * @returns {string|Buffer} digest
  1438. */
  1439. digest(encoding) {
  1440. let digestCache;
  1441. const buffer = this.buffer;
  1442. if (this.hash === void 0) {
  1443. const cacheKey = `${this.hashKey}-${encoding}`;
  1444. digestCache = digestCaches[cacheKey];
  1445. if (digestCache === void 0) digestCache = digestCaches[cacheKey] = /* @__PURE__ */ new Map();
  1446. const cacheEntry = digestCache.get(buffer);
  1447. if (cacheEntry !== void 0) return cacheEntry;
  1448. this.hash = this.hashFactory();
  1449. }
  1450. if (buffer.length > 0) this.hash.update(buffer);
  1451. const digestResult = this.hash.digest(encoding);
  1452. if (digestCache !== void 0) digestCache.set(buffer, digestResult);
  1453. return digestResult;
  1454. }
  1455. };
  1456. module.exports = BulkUpdateDecorator$1;
  1457. }) });
  1458. //#endregion
  1459. //#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/getHashDigest.js
  1460. var require_getHashDigest = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/getHashDigest.js": ((exports, module) => {
  1461. const baseEncodeTables = {
  1462. 26: "abcdefghijklmnopqrstuvwxyz",
  1463. 32: "123456789abcdefghjkmnpqrstuvwxyz",
  1464. 36: "0123456789abcdefghijklmnopqrstuvwxyz",
  1465. 49: "abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",
  1466. 52: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
  1467. 58: "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",
  1468. 62: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
  1469. 64: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_"
  1470. };
  1471. /**
  1472. * @param {Uint32Array} uint32Array Treated as a long base-0x100000000 number, little endian
  1473. * @param {number} divisor The divisor
  1474. * @return {number} Modulo (remainder) of the division
  1475. */
  1476. function divmod32(uint32Array, divisor) {
  1477. let carry = 0;
  1478. for (let i$1 = uint32Array.length - 1; i$1 >= 0; i$1--) {
  1479. const value = carry * 4294967296 + uint32Array[i$1];
  1480. carry = value % divisor;
  1481. uint32Array[i$1] = Math.floor(value / divisor);
  1482. }
  1483. return carry;
  1484. }
  1485. function encodeBufferToBase(buffer, base, length) {
  1486. const encodeTable = baseEncodeTables[base];
  1487. if (!encodeTable) throw new Error("Unknown encoding base" + base);
  1488. const limit = Math.ceil(buffer.length * 8 / Math.log2(base));
  1489. length = Math.min(length, limit);
  1490. const uint32Array = new Uint32Array(Math.ceil(buffer.length / 4));
  1491. buffer.copy(Buffer.from(uint32Array.buffer));
  1492. let output = "";
  1493. for (let i$1 = 0; i$1 < length; i$1++) output = encodeTable[divmod32(uint32Array, base)] + output;
  1494. return output;
  1495. }
  1496. let crypto = void 0;
  1497. let createXXHash64 = void 0;
  1498. let createMd4 = void 0;
  1499. let BatchedHash = void 0;
  1500. let BulkUpdateDecorator = void 0;
  1501. function getHashDigest$1(buffer, algorithm, digestType, maxLength) {
  1502. algorithm = algorithm || "xxhash64";
  1503. maxLength = maxLength || 9999;
  1504. let hash$1;
  1505. if (algorithm === "xxhash64") {
  1506. if (createXXHash64 === void 0) {
  1507. createXXHash64 = require_xxhash64();
  1508. if (BatchedHash === void 0) BatchedHash = require_BatchedHash();
  1509. }
  1510. hash$1 = new BatchedHash(createXXHash64());
  1511. } else if (algorithm === "md4") {
  1512. if (createMd4 === void 0) {
  1513. createMd4 = require_md4();
  1514. if (BatchedHash === void 0) BatchedHash = require_BatchedHash();
  1515. }
  1516. hash$1 = new BatchedHash(createMd4());
  1517. } else if (algorithm === "native-md4") {
  1518. if (typeof crypto === "undefined") {
  1519. crypto = __require("crypto");
  1520. if (BulkUpdateDecorator === void 0) BulkUpdateDecorator = require_BulkUpdateDecorator();
  1521. }
  1522. hash$1 = new BulkUpdateDecorator(() => crypto.createHash("md4"), "md4");
  1523. } else {
  1524. if (typeof crypto === "undefined") {
  1525. crypto = __require("crypto");
  1526. if (BulkUpdateDecorator === void 0) BulkUpdateDecorator = require_BulkUpdateDecorator();
  1527. }
  1528. hash$1 = new BulkUpdateDecorator(() => crypto.createHash(algorithm), algorithm);
  1529. }
  1530. hash$1.update(buffer);
  1531. if (digestType === "base26" || digestType === "base32" || digestType === "base36" || digestType === "base49" || digestType === "base52" || digestType === "base58" || digestType === "base62" || digestType === "base64safe") return encodeBufferToBase(hash$1.digest(), digestType === "base64safe" ? 64 : digestType.substr(4), maxLength);
  1532. return hash$1.digest(digestType || "hex").substr(0, maxLength);
  1533. }
  1534. module.exports = getHashDigest$1;
  1535. }) });
  1536. //#endregion
  1537. //#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/interpolateName.js
  1538. var require_interpolateName = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/interpolateName.js": ((exports, module) => {
  1539. const path$1 = __require("path");
  1540. const getHashDigest = require_getHashDigest();
  1541. function interpolateName$1(loaderContext, name, options = {}) {
  1542. let filename;
  1543. const hasQuery = loaderContext.resourceQuery && loaderContext.resourceQuery.length > 1;
  1544. if (typeof name === "function") filename = name(loaderContext.resourcePath, hasQuery ? loaderContext.resourceQuery : void 0);
  1545. else filename = name || "[hash].[ext]";
  1546. const context = options.context;
  1547. const content = options.content;
  1548. const regExp = options.regExp;
  1549. let ext = "bin";
  1550. let basename = "file";
  1551. let directory = "";
  1552. let folder = "";
  1553. let query = "";
  1554. if (loaderContext.resourcePath) {
  1555. const parsed = path$1.parse(loaderContext.resourcePath);
  1556. let resourcePath = loaderContext.resourcePath;
  1557. if (parsed.ext) ext = parsed.ext.substr(1);
  1558. if (parsed.dir) {
  1559. basename = parsed.name;
  1560. resourcePath = parsed.dir + path$1.sep;
  1561. }
  1562. if (typeof context !== "undefined") {
  1563. directory = path$1.relative(context, resourcePath + "_").replace(/\\/g, "/").replace(/\.\.(\/)?/g, "_$1");
  1564. directory = directory.substr(0, directory.length - 1);
  1565. } else directory = resourcePath.replace(/\\/g, "/").replace(/\.\.(\/)?/g, "_$1");
  1566. if (directory.length <= 1) directory = "";
  1567. else folder = path$1.basename(directory);
  1568. }
  1569. if (loaderContext.resourceQuery && loaderContext.resourceQuery.length > 1) {
  1570. query = loaderContext.resourceQuery;
  1571. const hashIdx = query.indexOf("#");
  1572. if (hashIdx >= 0) query = query.substr(0, hashIdx);
  1573. }
  1574. let url = filename;
  1575. if (content) url = url.replace(/\[(?:([^[:\]]+):)?(?:hash|contenthash)(?::([a-z]+\d*(?:safe)?))?(?::(\d+))?\]/gi, (all, hashType, digestType, maxLength) => getHashDigest(content, hashType, digestType, parseInt(maxLength, 10)));
  1576. url = url.replace(/\[ext\]/gi, () => ext).replace(/\[name\]/gi, () => basename).replace(/\[path\]/gi, () => directory).replace(/\[folder\]/gi, () => folder).replace(/\[query\]/gi, () => query);
  1577. if (regExp && loaderContext.resourcePath) {
  1578. const match = loaderContext.resourcePath.match(new RegExp(regExp));
  1579. match && match.forEach((matched, i$1) => {
  1580. url = url.replace(new RegExp("\\[" + i$1 + "\\]", "ig"), matched);
  1581. });
  1582. }
  1583. if (typeof loaderContext.options === "object" && typeof loaderContext.options.customInterpolateName === "function") url = loaderContext.options.customInterpolateName.call(loaderContext, url, name, options);
  1584. return url;
  1585. }
  1586. module.exports = interpolateName$1;
  1587. }) });
  1588. //#endregion
  1589. //#region ../../node_modules/.pnpm/generic-names@4.0.0/node_modules/generic-names/index.js
  1590. var require_generic_names = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/generic-names@4.0.0/node_modules/generic-names/index.js": ((exports, module) => {
  1591. var interpolateName = require_interpolateName();
  1592. var path = __require("path");
  1593. /**
  1594. * @param {string} pattern
  1595. * @param {object} options
  1596. * @param {string} options.context
  1597. * @param {string} options.hashPrefix
  1598. * @return {function}
  1599. */
  1600. module.exports = function createGenerator(pattern, options) {
  1601. options = options || {};
  1602. var context = options && typeof options.context === "string" ? options.context : process.cwd();
  1603. var hashPrefix = options && typeof options.hashPrefix === "string" ? options.hashPrefix : "";
  1604. /**
  1605. * @param {string} localName Usually a class name
  1606. * @param {string} filepath Absolute path
  1607. * @return {string}
  1608. */
  1609. return function generate(localName, filepath) {
  1610. var name = pattern.replace(/\[local\]/gi, localName);
  1611. var loaderContext = { resourcePath: filepath };
  1612. var loaderOptions = {
  1613. content: hashPrefix + path.relative(context, filepath).replace(/\\/g, "/") + "\0" + localName,
  1614. context
  1615. };
  1616. return interpolateName(loaderContext, name, loaderOptions).replace(new RegExp("[^a-zA-Z0-9\\-_\xA0-￿]", "g"), "-").replace(/^((-?[0-9])|--)/, "_$1");
  1617. };
  1618. };
  1619. }) });
  1620. //#endregion
  1621. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/util/unesc.js
  1622. var require_unesc = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/util/unesc.js": ((exports, module) => {
  1623. exports.__esModule = true;
  1624. exports["default"] = unesc;
  1625. /**
  1626. *
  1627. * @param {string} str
  1628. * @returns {[string, number]|undefined}
  1629. */
  1630. function gobbleHex(str$1) {
  1631. var lower = str$1.toLowerCase();
  1632. var hex$1 = "";
  1633. var spaceTerminated = false;
  1634. for (var i$1 = 0; i$1 < 6 && lower[i$1] !== void 0; i$1++) {
  1635. var code = lower.charCodeAt(i$1);
  1636. var valid = code >= 97 && code <= 102 || code >= 48 && code <= 57;
  1637. spaceTerminated = code === 32;
  1638. if (!valid) break;
  1639. hex$1 += lower[i$1];
  1640. }
  1641. if (hex$1.length === 0) return;
  1642. var codePoint = parseInt(hex$1, 16);
  1643. if (codePoint >= 55296 && codePoint <= 57343 || codePoint === 0 || codePoint > 1114111) return ["�", hex$1.length + (spaceTerminated ? 1 : 0)];
  1644. return [String.fromCodePoint(codePoint), hex$1.length + (spaceTerminated ? 1 : 0)];
  1645. }
  1646. var CONTAINS_ESCAPE = /\\/;
  1647. function unesc(str$1) {
  1648. if (!CONTAINS_ESCAPE.test(str$1)) return str$1;
  1649. var ret = "";
  1650. for (var i$1 = 0; i$1 < str$1.length; i$1++) {
  1651. if (str$1[i$1] === "\\") {
  1652. var gobbled = gobbleHex(str$1.slice(i$1 + 1, i$1 + 7));
  1653. if (gobbled !== void 0) {
  1654. ret += gobbled[0];
  1655. i$1 += gobbled[1];
  1656. continue;
  1657. }
  1658. if (str$1[i$1 + 1] === "\\") {
  1659. ret += "\\";
  1660. i$1++;
  1661. continue;
  1662. }
  1663. if (str$1.length === i$1 + 1) ret += str$1[i$1];
  1664. continue;
  1665. }
  1666. ret += str$1[i$1];
  1667. }
  1668. return ret;
  1669. }
  1670. module.exports = exports.default;
  1671. }) });
  1672. //#endregion
  1673. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/util/getProp.js
  1674. var require_getProp = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/util/getProp.js": ((exports, module) => {
  1675. exports.__esModule = true;
  1676. exports["default"] = getProp;
  1677. function getProp(obj) {
  1678. for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) props[_key - 1] = arguments[_key];
  1679. while (props.length > 0) {
  1680. var prop = props.shift();
  1681. if (!obj[prop]) return;
  1682. obj = obj[prop];
  1683. }
  1684. return obj;
  1685. }
  1686. module.exports = exports.default;
  1687. }) });
  1688. //#endregion
  1689. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/util/ensureObject.js
  1690. var require_ensureObject = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/util/ensureObject.js": ((exports, module) => {
  1691. exports.__esModule = true;
  1692. exports["default"] = ensureObject;
  1693. function ensureObject(obj) {
  1694. for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) props[_key - 1] = arguments[_key];
  1695. while (props.length > 0) {
  1696. var prop = props.shift();
  1697. if (!obj[prop]) obj[prop] = {};
  1698. obj = obj[prop];
  1699. }
  1700. }
  1701. module.exports = exports.default;
  1702. }) });
  1703. //#endregion
  1704. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/util/stripComments.js
  1705. var require_stripComments = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/util/stripComments.js": ((exports, module) => {
  1706. exports.__esModule = true;
  1707. exports["default"] = stripComments;
  1708. function stripComments(str$1) {
  1709. var s = "";
  1710. var commentStart = str$1.indexOf("/*");
  1711. var lastEnd = 0;
  1712. while (commentStart >= 0) {
  1713. s = s + str$1.slice(lastEnd, commentStart);
  1714. var commentEnd = str$1.indexOf("*/", commentStart + 2);
  1715. if (commentEnd < 0) return s;
  1716. lastEnd = commentEnd + 2;
  1717. commentStart = str$1.indexOf("/*", lastEnd);
  1718. }
  1719. s = s + str$1.slice(lastEnd);
  1720. return s;
  1721. }
  1722. module.exports = exports.default;
  1723. }) });
  1724. //#endregion
  1725. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/util/index.js
  1726. var require_util = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/util/index.js": ((exports) => {
  1727. exports.__esModule = true;
  1728. var _unesc$1 = _interopRequireDefault$20(require_unesc());
  1729. exports.unesc = _unesc$1["default"];
  1730. var _getProp = _interopRequireDefault$20(require_getProp());
  1731. exports.getProp = _getProp["default"];
  1732. var _ensureObject = _interopRequireDefault$20(require_ensureObject());
  1733. exports.ensureObject = _ensureObject["default"];
  1734. var _stripComments = _interopRequireDefault$20(require_stripComments());
  1735. exports.stripComments = _stripComments["default"];
  1736. function _interopRequireDefault$20(obj) {
  1737. return obj && obj.__esModule ? obj : { "default": obj };
  1738. }
  1739. }) });
  1740. //#endregion
  1741. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/node.js
  1742. var require_node$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/node.js": ((exports, module) => {
  1743. exports.__esModule = true;
  1744. exports["default"] = void 0;
  1745. var _util$3 = require_util();
  1746. function _defineProperties$6(target, props) {
  1747. for (var i$1 = 0; i$1 < props.length; i$1++) {
  1748. var descriptor = props[i$1];
  1749. descriptor.enumerable = descriptor.enumerable || false;
  1750. descriptor.configurable = true;
  1751. if ("value" in descriptor) descriptor.writable = true;
  1752. Object.defineProperty(target, descriptor.key, descriptor);
  1753. }
  1754. }
  1755. function _createClass$6(Constructor, protoProps, staticProps) {
  1756. if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
  1757. if (staticProps) _defineProperties$6(Constructor, staticProps);
  1758. Object.defineProperty(Constructor, "prototype", { writable: false });
  1759. return Constructor;
  1760. }
  1761. var cloneNode = function cloneNode$1(obj, parent) {
  1762. if (typeof obj !== "object" || obj === null) return obj;
  1763. var cloned = new obj.constructor();
  1764. for (var i$1 in obj) {
  1765. if (!obj.hasOwnProperty(i$1)) continue;
  1766. var value = obj[i$1];
  1767. if (i$1 === "parent" && typeof value === "object") {
  1768. if (parent) cloned[i$1] = parent;
  1769. } else if (value instanceof Array) cloned[i$1] = value.map(function(j) {
  1770. return cloneNode$1(j, cloned);
  1771. });
  1772. else cloned[i$1] = cloneNode$1(value, cloned);
  1773. }
  1774. return cloned;
  1775. };
  1776. var Node = /* @__PURE__ */ function() {
  1777. function Node$1(opts) {
  1778. if (opts === void 0) opts = {};
  1779. Object.assign(this, opts);
  1780. this.spaces = this.spaces || {};
  1781. this.spaces.before = this.spaces.before || "";
  1782. this.spaces.after = this.spaces.after || "";
  1783. }
  1784. var _proto = Node$1.prototype;
  1785. _proto.remove = function remove() {
  1786. if (this.parent) this.parent.removeChild(this);
  1787. this.parent = void 0;
  1788. return this;
  1789. };
  1790. _proto.replaceWith = function replaceWith() {
  1791. if (this.parent) {
  1792. for (var index in arguments) this.parent.insertBefore(this, arguments[index]);
  1793. this.remove();
  1794. }
  1795. return this;
  1796. };
  1797. _proto.next = function next() {
  1798. return this.parent.at(this.parent.index(this) + 1);
  1799. };
  1800. _proto.prev = function prev() {
  1801. return this.parent.at(this.parent.index(this) - 1);
  1802. };
  1803. _proto.clone = function clone(overrides) {
  1804. if (overrides === void 0) overrides = {};
  1805. var cloned = cloneNode(this);
  1806. for (var name in overrides) cloned[name] = overrides[name];
  1807. return cloned;
  1808. };
  1809. _proto.appendToPropertyAndEscape = function appendToPropertyAndEscape(name, value, valueEscaped) {
  1810. if (!this.raws) this.raws = {};
  1811. var originalValue = this[name];
  1812. var originalEscaped = this.raws[name];
  1813. this[name] = originalValue + value;
  1814. if (originalEscaped || valueEscaped !== value) this.raws[name] = (originalEscaped || originalValue) + valueEscaped;
  1815. else delete this.raws[name];
  1816. };
  1817. _proto.setPropertyAndEscape = function setPropertyAndEscape(name, value, valueEscaped) {
  1818. if (!this.raws) this.raws = {};
  1819. this[name] = value;
  1820. this.raws[name] = valueEscaped;
  1821. };
  1822. _proto.setPropertyWithoutEscape = function setPropertyWithoutEscape(name, value) {
  1823. this[name] = value;
  1824. if (this.raws) delete this.raws[name];
  1825. };
  1826. _proto.isAtPosition = function isAtPosition(line, column) {
  1827. if (this.source && this.source.start && this.source.end) {
  1828. if (this.source.start.line > line) return false;
  1829. if (this.source.end.line < line) return false;
  1830. if (this.source.start.line === line && this.source.start.column > column) return false;
  1831. if (this.source.end.line === line && this.source.end.column < column) return false;
  1832. return true;
  1833. }
  1834. };
  1835. _proto.stringifyProperty = function stringifyProperty(name) {
  1836. return this.raws && this.raws[name] || this[name];
  1837. };
  1838. _proto.valueToString = function valueToString() {
  1839. return String(this.stringifyProperty("value"));
  1840. };
  1841. _proto.toString = function toString$1() {
  1842. return [
  1843. this.rawSpaceBefore,
  1844. this.valueToString(),
  1845. this.rawSpaceAfter
  1846. ].join("");
  1847. };
  1848. _createClass$6(Node$1, [{
  1849. key: "rawSpaceBefore",
  1850. get: function get() {
  1851. var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.before;
  1852. if (rawSpace === void 0) rawSpace = this.spaces && this.spaces.before;
  1853. return rawSpace || "";
  1854. },
  1855. set: function set(raw) {
  1856. (0, _util$3.ensureObject)(this, "raws", "spaces");
  1857. this.raws.spaces.before = raw;
  1858. }
  1859. }, {
  1860. key: "rawSpaceAfter",
  1861. get: function get() {
  1862. var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.after;
  1863. if (rawSpace === void 0) rawSpace = this.spaces.after;
  1864. return rawSpace || "";
  1865. },
  1866. set: function set(raw) {
  1867. (0, _util$3.ensureObject)(this, "raws", "spaces");
  1868. this.raws.spaces.after = raw;
  1869. }
  1870. }]);
  1871. return Node$1;
  1872. }();
  1873. exports["default"] = Node;
  1874. module.exports = exports.default;
  1875. }) });
  1876. //#endregion
  1877. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/types.js
  1878. var require_types = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/types.js": ((exports) => {
  1879. exports.__esModule = true;
  1880. var TAG = "tag";
  1881. exports.TAG = TAG;
  1882. var STRING = "string";
  1883. exports.STRING = STRING;
  1884. var SELECTOR = "selector";
  1885. exports.SELECTOR = SELECTOR;
  1886. var ROOT = "root";
  1887. exports.ROOT = ROOT;
  1888. var PSEUDO = "pseudo";
  1889. exports.PSEUDO = PSEUDO;
  1890. var NESTING = "nesting";
  1891. exports.NESTING = NESTING;
  1892. var ID$1 = "id";
  1893. exports.ID = ID$1;
  1894. var COMMENT = "comment";
  1895. exports.COMMENT = COMMENT;
  1896. var COMBINATOR = "combinator";
  1897. exports.COMBINATOR = COMBINATOR;
  1898. var CLASS = "class";
  1899. exports.CLASS = CLASS;
  1900. var ATTRIBUTE = "attribute";
  1901. exports.ATTRIBUTE = ATTRIBUTE;
  1902. var UNIVERSAL = "universal";
  1903. exports.UNIVERSAL = UNIVERSAL;
  1904. }) });
  1905. //#endregion
  1906. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/container.js
  1907. var require_container = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/container.js": ((exports, module) => {
  1908. exports.__esModule = true;
  1909. exports["default"] = void 0;
  1910. var _node$7 = _interopRequireDefault$19(require_node$1());
  1911. var types$1 = _interopRequireWildcard$3(require_types());
  1912. function _getRequireWildcardCache$3(nodeInterop) {
  1913. if (typeof WeakMap !== "function") return null;
  1914. var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
  1915. var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
  1916. return (_getRequireWildcardCache$3 = function _getRequireWildcardCache$4(nodeInterop$1) {
  1917. return nodeInterop$1 ? cacheNodeInterop : cacheBabelInterop;
  1918. })(nodeInterop);
  1919. }
  1920. function _interopRequireWildcard$3(obj, nodeInterop) {
  1921. if (!nodeInterop && obj && obj.__esModule) return obj;
  1922. if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { "default": obj };
  1923. var cache = _getRequireWildcardCache$3(nodeInterop);
  1924. if (cache && cache.has(obj)) return cache.get(obj);
  1925. var newObj = {};
  1926. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  1927. for (var key in obj) if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
  1928. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  1929. if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
  1930. else newObj[key] = obj[key];
  1931. }
  1932. newObj["default"] = obj;
  1933. if (cache) cache.set(obj, newObj);
  1934. return newObj;
  1935. }
  1936. function _interopRequireDefault$19(obj) {
  1937. return obj && obj.__esModule ? obj : { "default": obj };
  1938. }
  1939. function _createForOfIteratorHelperLoose(o, allowArrayLike) {
  1940. var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
  1941. if (it) return (it = it.call(o)).next.bind(it);
  1942. if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
  1943. if (it) o = it;
  1944. var i$1 = 0;
  1945. return function() {
  1946. if (i$1 >= o.length) return { done: true };
  1947. return {
  1948. done: false,
  1949. value: o[i$1++]
  1950. };
  1951. };
  1952. }
  1953. throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  1954. }
  1955. function _unsupportedIterableToArray(o, minLen) {
  1956. if (!o) return;
  1957. if (typeof o === "string") return _arrayLikeToArray(o, minLen);
  1958. var n = Object.prototype.toString.call(o).slice(8, -1);
  1959. if (n === "Object" && o.constructor) n = o.constructor.name;
  1960. if (n === "Map" || n === "Set") return Array.from(o);
  1961. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
  1962. }
  1963. function _arrayLikeToArray(arr, len) {
  1964. if (len == null || len > arr.length) len = arr.length;
  1965. for (var i$1 = 0, arr2 = new Array(len); i$1 < len; i$1++) arr2[i$1] = arr[i$1];
  1966. return arr2;
  1967. }
  1968. function _defineProperties$5(target, props) {
  1969. for (var i$1 = 0; i$1 < props.length; i$1++) {
  1970. var descriptor = props[i$1];
  1971. descriptor.enumerable = descriptor.enumerable || false;
  1972. descriptor.configurable = true;
  1973. if ("value" in descriptor) descriptor.writable = true;
  1974. Object.defineProperty(target, descriptor.key, descriptor);
  1975. }
  1976. }
  1977. function _createClass$5(Constructor, protoProps, staticProps) {
  1978. if (protoProps) _defineProperties$5(Constructor.prototype, protoProps);
  1979. if (staticProps) _defineProperties$5(Constructor, staticProps);
  1980. Object.defineProperty(Constructor, "prototype", { writable: false });
  1981. return Constructor;
  1982. }
  1983. function _inheritsLoose$13(subClass, superClass) {
  1984. subClass.prototype = Object.create(superClass.prototype);
  1985. subClass.prototype.constructor = subClass;
  1986. _setPrototypeOf$13(subClass, superClass);
  1987. }
  1988. function _setPrototypeOf$13(o, p) {
  1989. _setPrototypeOf$13 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) {
  1990. o$1.__proto__ = p$1;
  1991. return o$1;
  1992. };
  1993. return _setPrototypeOf$13(o, p);
  1994. }
  1995. var Container = /* @__PURE__ */ function(_Node) {
  1996. _inheritsLoose$13(Container$1, _Node);
  1997. function Container$1(opts) {
  1998. var _this = _Node.call(this, opts) || this;
  1999. if (!_this.nodes) _this.nodes = [];
  2000. return _this;
  2001. }
  2002. var _proto = Container$1.prototype;
  2003. _proto.append = function append(selector$1) {
  2004. selector$1.parent = this;
  2005. this.nodes.push(selector$1);
  2006. return this;
  2007. };
  2008. _proto.prepend = function prepend(selector$1) {
  2009. selector$1.parent = this;
  2010. this.nodes.unshift(selector$1);
  2011. for (var id$1 in this.indexes) this.indexes[id$1]++;
  2012. return this;
  2013. };
  2014. _proto.at = function at$1(index) {
  2015. return this.nodes[index];
  2016. };
  2017. _proto.index = function index(child) {
  2018. if (typeof child === "number") return child;
  2019. return this.nodes.indexOf(child);
  2020. };
  2021. _proto.removeChild = function removeChild(child) {
  2022. child = this.index(child);
  2023. this.at(child).parent = void 0;
  2024. this.nodes.splice(child, 1);
  2025. var index;
  2026. for (var id$1 in this.indexes) {
  2027. index = this.indexes[id$1];
  2028. if (index >= child) this.indexes[id$1] = index - 1;
  2029. }
  2030. return this;
  2031. };
  2032. _proto.removeAll = function removeAll() {
  2033. for (var _iterator = _createForOfIteratorHelperLoose(this.nodes), _step; !(_step = _iterator()).done;) {
  2034. var node = _step.value;
  2035. node.parent = void 0;
  2036. }
  2037. this.nodes = [];
  2038. return this;
  2039. };
  2040. _proto.empty = function empty() {
  2041. return this.removeAll();
  2042. };
  2043. _proto.insertAfter = function insertAfter(oldNode, newNode) {
  2044. var _this$nodes;
  2045. newNode.parent = this;
  2046. var oldIndex = this.index(oldNode);
  2047. var resetNode = [];
  2048. for (var i$1 = 2; i$1 < arguments.length; i$1++) resetNode.push(arguments[i$1]);
  2049. (_this$nodes = this.nodes).splice.apply(_this$nodes, [
  2050. oldIndex + 1,
  2051. 0,
  2052. newNode
  2053. ].concat(resetNode));
  2054. newNode.parent = this;
  2055. var index;
  2056. for (var id$1 in this.indexes) {
  2057. index = this.indexes[id$1];
  2058. if (oldIndex < index) this.indexes[id$1] = index + arguments.length - 1;
  2059. }
  2060. return this;
  2061. };
  2062. _proto.insertBefore = function insertBefore(oldNode, newNode) {
  2063. var _this$nodes2;
  2064. newNode.parent = this;
  2065. var oldIndex = this.index(oldNode);
  2066. var resetNode = [];
  2067. for (var i$1 = 2; i$1 < arguments.length; i$1++) resetNode.push(arguments[i$1]);
  2068. (_this$nodes2 = this.nodes).splice.apply(_this$nodes2, [
  2069. oldIndex,
  2070. 0,
  2071. newNode
  2072. ].concat(resetNode));
  2073. newNode.parent = this;
  2074. var index;
  2075. for (var id$1 in this.indexes) {
  2076. index = this.indexes[id$1];
  2077. if (index >= oldIndex) this.indexes[id$1] = index + arguments.length - 1;
  2078. }
  2079. return this;
  2080. };
  2081. _proto._findChildAtPosition = function _findChildAtPosition(line, col) {
  2082. var found = void 0;
  2083. this.each(function(node) {
  2084. if (node.atPosition) {
  2085. var foundChild = node.atPosition(line, col);
  2086. if (foundChild) {
  2087. found = foundChild;
  2088. return false;
  2089. }
  2090. } else if (node.isAtPosition(line, col)) {
  2091. found = node;
  2092. return false;
  2093. }
  2094. });
  2095. return found;
  2096. };
  2097. _proto.atPosition = function atPosition(line, col) {
  2098. if (this.isAtPosition(line, col)) return this._findChildAtPosition(line, col) || this;
  2099. else return;
  2100. };
  2101. _proto._inferEndPosition = function _inferEndPosition() {
  2102. if (this.last && this.last.source && this.last.source.end) {
  2103. this.source = this.source || {};
  2104. this.source.end = this.source.end || {};
  2105. Object.assign(this.source.end, this.last.source.end);
  2106. }
  2107. };
  2108. _proto.each = function each(callback) {
  2109. if (!this.lastEach) this.lastEach = 0;
  2110. if (!this.indexes) this.indexes = {};
  2111. this.lastEach++;
  2112. var id$1 = this.lastEach;
  2113. this.indexes[id$1] = 0;
  2114. if (!this.length) return;
  2115. var index, result;
  2116. while (this.indexes[id$1] < this.length) {
  2117. index = this.indexes[id$1];
  2118. result = callback(this.at(index), index);
  2119. if (result === false) break;
  2120. this.indexes[id$1] += 1;
  2121. }
  2122. delete this.indexes[id$1];
  2123. if (result === false) return false;
  2124. };
  2125. _proto.walk = function walk(callback) {
  2126. return this.each(function(node, i$1) {
  2127. var result = callback(node, i$1);
  2128. if (result !== false && node.length) result = node.walk(callback);
  2129. if (result === false) return false;
  2130. });
  2131. };
  2132. _proto.walkAttributes = function walkAttributes(callback) {
  2133. var _this2 = this;
  2134. return this.walk(function(selector$1) {
  2135. if (selector$1.type === types$1.ATTRIBUTE) return callback.call(_this2, selector$1);
  2136. });
  2137. };
  2138. _proto.walkClasses = function walkClasses(callback) {
  2139. var _this3 = this;
  2140. return this.walk(function(selector$1) {
  2141. if (selector$1.type === types$1.CLASS) return callback.call(_this3, selector$1);
  2142. });
  2143. };
  2144. _proto.walkCombinators = function walkCombinators(callback) {
  2145. var _this4 = this;
  2146. return this.walk(function(selector$1) {
  2147. if (selector$1.type === types$1.COMBINATOR) return callback.call(_this4, selector$1);
  2148. });
  2149. };
  2150. _proto.walkComments = function walkComments(callback) {
  2151. var _this5 = this;
  2152. return this.walk(function(selector$1) {
  2153. if (selector$1.type === types$1.COMMENT) return callback.call(_this5, selector$1);
  2154. });
  2155. };
  2156. _proto.walkIds = function walkIds(callback) {
  2157. var _this6 = this;
  2158. return this.walk(function(selector$1) {
  2159. if (selector$1.type === types$1.ID) return callback.call(_this6, selector$1);
  2160. });
  2161. };
  2162. _proto.walkNesting = function walkNesting(callback) {
  2163. var _this7 = this;
  2164. return this.walk(function(selector$1) {
  2165. if (selector$1.type === types$1.NESTING) return callback.call(_this7, selector$1);
  2166. });
  2167. };
  2168. _proto.walkPseudos = function walkPseudos(callback) {
  2169. var _this8 = this;
  2170. return this.walk(function(selector$1) {
  2171. if (selector$1.type === types$1.PSEUDO) return callback.call(_this8, selector$1);
  2172. });
  2173. };
  2174. _proto.walkTags = function walkTags(callback) {
  2175. var _this9 = this;
  2176. return this.walk(function(selector$1) {
  2177. if (selector$1.type === types$1.TAG) return callback.call(_this9, selector$1);
  2178. });
  2179. };
  2180. _proto.walkUniversals = function walkUniversals(callback) {
  2181. var _this10 = this;
  2182. return this.walk(function(selector$1) {
  2183. if (selector$1.type === types$1.UNIVERSAL) return callback.call(_this10, selector$1);
  2184. });
  2185. };
  2186. _proto.split = function split(callback) {
  2187. var _this11 = this;
  2188. var current = [];
  2189. return this.reduce(function(memo, node, index) {
  2190. var split$1 = callback.call(_this11, node);
  2191. current.push(node);
  2192. if (split$1) {
  2193. memo.push(current);
  2194. current = [];
  2195. } else if (index === _this11.length - 1) memo.push(current);
  2196. return memo;
  2197. }, []);
  2198. };
  2199. _proto.map = function map(callback) {
  2200. return this.nodes.map(callback);
  2201. };
  2202. _proto.reduce = function reduce(callback, memo) {
  2203. return this.nodes.reduce(callback, memo);
  2204. };
  2205. _proto.every = function every(callback) {
  2206. return this.nodes.every(callback);
  2207. };
  2208. _proto.some = function some(callback) {
  2209. return this.nodes.some(callback);
  2210. };
  2211. _proto.filter = function filter(callback) {
  2212. return this.nodes.filter(callback);
  2213. };
  2214. _proto.sort = function sort(callback) {
  2215. return this.nodes.sort(callback);
  2216. };
  2217. _proto.toString = function toString$1() {
  2218. return this.map(String).join("");
  2219. };
  2220. _createClass$5(Container$1, [
  2221. {
  2222. key: "first",
  2223. get: function get() {
  2224. return this.at(0);
  2225. }
  2226. },
  2227. {
  2228. key: "last",
  2229. get: function get() {
  2230. return this.at(this.length - 1);
  2231. }
  2232. },
  2233. {
  2234. key: "length",
  2235. get: function get() {
  2236. return this.nodes.length;
  2237. }
  2238. }
  2239. ]);
  2240. return Container$1;
  2241. }(_node$7["default"]);
  2242. exports["default"] = Container;
  2243. module.exports = exports.default;
  2244. }) });
  2245. //#endregion
  2246. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/root.js
  2247. var require_root = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/root.js": ((exports, module) => {
  2248. exports.__esModule = true;
  2249. exports["default"] = void 0;
  2250. var _container$2 = _interopRequireDefault$18(require_container());
  2251. var _types$13 = require_types();
  2252. function _interopRequireDefault$18(obj) {
  2253. return obj && obj.__esModule ? obj : { "default": obj };
  2254. }
  2255. function _defineProperties$4(target, props) {
  2256. for (var i$1 = 0; i$1 < props.length; i$1++) {
  2257. var descriptor = props[i$1];
  2258. descriptor.enumerable = descriptor.enumerable || false;
  2259. descriptor.configurable = true;
  2260. if ("value" in descriptor) descriptor.writable = true;
  2261. Object.defineProperty(target, descriptor.key, descriptor);
  2262. }
  2263. }
  2264. function _createClass$4(Constructor, protoProps, staticProps) {
  2265. if (protoProps) _defineProperties$4(Constructor.prototype, protoProps);
  2266. if (staticProps) _defineProperties$4(Constructor, staticProps);
  2267. Object.defineProperty(Constructor, "prototype", { writable: false });
  2268. return Constructor;
  2269. }
  2270. function _inheritsLoose$12(subClass, superClass) {
  2271. subClass.prototype = Object.create(superClass.prototype);
  2272. subClass.prototype.constructor = subClass;
  2273. _setPrototypeOf$12(subClass, superClass);
  2274. }
  2275. function _setPrototypeOf$12(o, p) {
  2276. _setPrototypeOf$12 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) {
  2277. o$1.__proto__ = p$1;
  2278. return o$1;
  2279. };
  2280. return _setPrototypeOf$12(o, p);
  2281. }
  2282. var Root = /* @__PURE__ */ function(_Container) {
  2283. _inheritsLoose$12(Root$1, _Container);
  2284. function Root$1(opts) {
  2285. var _this = _Container.call(this, opts) || this;
  2286. _this.type = _types$13.ROOT;
  2287. return _this;
  2288. }
  2289. var _proto = Root$1.prototype;
  2290. _proto.toString = function toString$1() {
  2291. var str$1 = this.reduce(function(memo, selector$1) {
  2292. memo.push(String(selector$1));
  2293. return memo;
  2294. }, []).join(",");
  2295. return this.trailingComma ? str$1 + "," : str$1;
  2296. };
  2297. _proto.error = function error(message, options) {
  2298. if (this._error) return this._error(message, options);
  2299. else return new Error(message);
  2300. };
  2301. _createClass$4(Root$1, [{
  2302. key: "errorGenerator",
  2303. set: function set(handler) {
  2304. this._error = handler;
  2305. }
  2306. }]);
  2307. return Root$1;
  2308. }(_container$2["default"]);
  2309. exports["default"] = Root;
  2310. module.exports = exports.default;
  2311. }) });
  2312. //#endregion
  2313. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/selector.js
  2314. var require_selector = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/selector.js": ((exports, module) => {
  2315. exports.__esModule = true;
  2316. exports["default"] = void 0;
  2317. var _container$1 = _interopRequireDefault$17(require_container());
  2318. var _types$12 = require_types();
  2319. function _interopRequireDefault$17(obj) {
  2320. return obj && obj.__esModule ? obj : { "default": obj };
  2321. }
  2322. function _inheritsLoose$11(subClass, superClass) {
  2323. subClass.prototype = Object.create(superClass.prototype);
  2324. subClass.prototype.constructor = subClass;
  2325. _setPrototypeOf$11(subClass, superClass);
  2326. }
  2327. function _setPrototypeOf$11(o, p) {
  2328. _setPrototypeOf$11 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) {
  2329. o$1.__proto__ = p$1;
  2330. return o$1;
  2331. };
  2332. return _setPrototypeOf$11(o, p);
  2333. }
  2334. var Selector = /* @__PURE__ */ function(_Container) {
  2335. _inheritsLoose$11(Selector$1, _Container);
  2336. function Selector$1(opts) {
  2337. var _this = _Container.call(this, opts) || this;
  2338. _this.type = _types$12.SELECTOR;
  2339. return _this;
  2340. }
  2341. return Selector$1;
  2342. }(_container$1["default"]);
  2343. exports["default"] = Selector;
  2344. module.exports = exports.default;
  2345. }) });
  2346. //#endregion
  2347. //#region ../../node_modules/.pnpm/cssesc@3.0.0/node_modules/cssesc/cssesc.js
  2348. var require_cssesc = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cssesc@3.0.0/node_modules/cssesc/cssesc.js": ((exports, module) => {
  2349. var hasOwnProperty$1 = {}.hasOwnProperty;
  2350. var merge = function merge$1(options, defaults) {
  2351. if (!options) return defaults;
  2352. var result = {};
  2353. for (var key in defaults) result[key] = hasOwnProperty$1.call(options, key) ? options[key] : defaults[key];
  2354. return result;
  2355. };
  2356. var regexAnySingleEscape = /[ -,\.\/:-@\[-\^`\{-~]/;
  2357. var regexSingleEscape = /[ -,\.\/:-@\[\]\^`\{-~]/;
  2358. var regexExcessiveSpaces = /(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g;
  2359. var cssesc = function cssesc$1(string$1, options) {
  2360. options = merge(options, cssesc$1.options);
  2361. if (options.quotes != "single" && options.quotes != "double") options.quotes = "single";
  2362. var quote = options.quotes == "double" ? "\"" : "'";
  2363. var isIdentifier$1 = options.isIdentifier;
  2364. var firstChar = string$1.charAt(0);
  2365. var output = "";
  2366. var counter = 0;
  2367. var length = string$1.length;
  2368. while (counter < length) {
  2369. var character = string$1.charAt(counter++);
  2370. var codePoint = character.charCodeAt();
  2371. var value = void 0;
  2372. if (codePoint < 32 || codePoint > 126) {
  2373. if (codePoint >= 55296 && codePoint <= 56319 && counter < length) {
  2374. var extra = string$1.charCodeAt(counter++);
  2375. if ((extra & 64512) == 56320) codePoint = ((codePoint & 1023) << 10) + (extra & 1023) + 65536;
  2376. else counter--;
  2377. }
  2378. value = "\\" + codePoint.toString(16).toUpperCase() + " ";
  2379. } else if (options.escapeEverything) if (regexAnySingleEscape.test(character)) value = "\\" + character;
  2380. else value = "\\" + codePoint.toString(16).toUpperCase() + " ";
  2381. else if (/[\t\n\f\r\x0B]/.test(character)) value = "\\" + codePoint.toString(16).toUpperCase() + " ";
  2382. else if (character == "\\" || !isIdentifier$1 && (character == "\"" && quote == character || character == "'" && quote == character) || isIdentifier$1 && regexSingleEscape.test(character)) value = "\\" + character;
  2383. else value = character;
  2384. output += value;
  2385. }
  2386. if (isIdentifier$1) {
  2387. if (/^-[-\d]/.test(output)) output = "\\-" + output.slice(1);
  2388. else if (/\d/.test(firstChar)) output = "\\3" + firstChar + " " + output.slice(1);
  2389. }
  2390. output = output.replace(regexExcessiveSpaces, function($0, $1, $2) {
  2391. if ($1 && $1.length % 2) return $0;
  2392. return ($1 || "") + $2;
  2393. });
  2394. if (!isIdentifier$1 && options.wrap) return quote + output + quote;
  2395. return output;
  2396. };
  2397. cssesc.options = {
  2398. "escapeEverything": false,
  2399. "isIdentifier": false,
  2400. "quotes": "single",
  2401. "wrap": false
  2402. };
  2403. cssesc.version = "3.0.0";
  2404. module.exports = cssesc;
  2405. }) });
  2406. //#endregion
  2407. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/className.js
  2408. var require_className = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/className.js": ((exports, module) => {
  2409. exports.__esModule = true;
  2410. exports["default"] = void 0;
  2411. var _cssesc$2 = _interopRequireDefault$16(require_cssesc());
  2412. var _util$2 = require_util();
  2413. var _node$6 = _interopRequireDefault$16(require_node$1());
  2414. var _types$11 = require_types();
  2415. function _interopRequireDefault$16(obj) {
  2416. return obj && obj.__esModule ? obj : { "default": obj };
  2417. }
  2418. function _defineProperties$3(target, props) {
  2419. for (var i$1 = 0; i$1 < props.length; i$1++) {
  2420. var descriptor = props[i$1];
  2421. descriptor.enumerable = descriptor.enumerable || false;
  2422. descriptor.configurable = true;
  2423. if ("value" in descriptor) descriptor.writable = true;
  2424. Object.defineProperty(target, descriptor.key, descriptor);
  2425. }
  2426. }
  2427. function _createClass$3(Constructor, protoProps, staticProps) {
  2428. if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
  2429. if (staticProps) _defineProperties$3(Constructor, staticProps);
  2430. Object.defineProperty(Constructor, "prototype", { writable: false });
  2431. return Constructor;
  2432. }
  2433. function _inheritsLoose$10(subClass, superClass) {
  2434. subClass.prototype = Object.create(superClass.prototype);
  2435. subClass.prototype.constructor = subClass;
  2436. _setPrototypeOf$10(subClass, superClass);
  2437. }
  2438. function _setPrototypeOf$10(o, p) {
  2439. _setPrototypeOf$10 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) {
  2440. o$1.__proto__ = p$1;
  2441. return o$1;
  2442. };
  2443. return _setPrototypeOf$10(o, p);
  2444. }
  2445. var ClassName = /* @__PURE__ */ function(_Node) {
  2446. _inheritsLoose$10(ClassName$1, _Node);
  2447. function ClassName$1(opts) {
  2448. var _this = _Node.call(this, opts) || this;
  2449. _this.type = _types$11.CLASS;
  2450. _this._constructed = true;
  2451. return _this;
  2452. }
  2453. var _proto = ClassName$1.prototype;
  2454. _proto.valueToString = function valueToString() {
  2455. return "." + _Node.prototype.valueToString.call(this);
  2456. };
  2457. _createClass$3(ClassName$1, [{
  2458. key: "value",
  2459. get: function get() {
  2460. return this._value;
  2461. },
  2462. set: function set(v) {
  2463. if (this._constructed) {
  2464. var escaped = (0, _cssesc$2["default"])(v, { isIdentifier: true });
  2465. if (escaped !== v) {
  2466. (0, _util$2.ensureObject)(this, "raws");
  2467. this.raws.value = escaped;
  2468. } else if (this.raws) delete this.raws.value;
  2469. }
  2470. this._value = v;
  2471. }
  2472. }]);
  2473. return ClassName$1;
  2474. }(_node$6["default"]);
  2475. exports["default"] = ClassName;
  2476. module.exports = exports.default;
  2477. }) });
  2478. //#endregion
  2479. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/comment.js
  2480. var require_comment = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/comment.js": ((exports, module) => {
  2481. exports.__esModule = true;
  2482. exports["default"] = void 0;
  2483. var _node$5 = _interopRequireDefault$15(require_node$1());
  2484. var _types$10 = require_types();
  2485. function _interopRequireDefault$15(obj) {
  2486. return obj && obj.__esModule ? obj : { "default": obj };
  2487. }
  2488. function _inheritsLoose$9(subClass, superClass) {
  2489. subClass.prototype = Object.create(superClass.prototype);
  2490. subClass.prototype.constructor = subClass;
  2491. _setPrototypeOf$9(subClass, superClass);
  2492. }
  2493. function _setPrototypeOf$9(o, p) {
  2494. _setPrototypeOf$9 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) {
  2495. o$1.__proto__ = p$1;
  2496. return o$1;
  2497. };
  2498. return _setPrototypeOf$9(o, p);
  2499. }
  2500. var Comment = /* @__PURE__ */ function(_Node) {
  2501. _inheritsLoose$9(Comment$1, _Node);
  2502. function Comment$1(opts) {
  2503. var _this = _Node.call(this, opts) || this;
  2504. _this.type = _types$10.COMMENT;
  2505. return _this;
  2506. }
  2507. return Comment$1;
  2508. }(_node$5["default"]);
  2509. exports["default"] = Comment;
  2510. module.exports = exports.default;
  2511. }) });
  2512. //#endregion
  2513. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/id.js
  2514. var require_id = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/id.js": ((exports, module) => {
  2515. exports.__esModule = true;
  2516. exports["default"] = void 0;
  2517. var _node$4 = _interopRequireDefault$14(require_node$1());
  2518. var _types$9 = require_types();
  2519. function _interopRequireDefault$14(obj) {
  2520. return obj && obj.__esModule ? obj : { "default": obj };
  2521. }
  2522. function _inheritsLoose$8(subClass, superClass) {
  2523. subClass.prototype = Object.create(superClass.prototype);
  2524. subClass.prototype.constructor = subClass;
  2525. _setPrototypeOf$8(subClass, superClass);
  2526. }
  2527. function _setPrototypeOf$8(o, p) {
  2528. _setPrototypeOf$8 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) {
  2529. o$1.__proto__ = p$1;
  2530. return o$1;
  2531. };
  2532. return _setPrototypeOf$8(o, p);
  2533. }
  2534. var ID = /* @__PURE__ */ function(_Node) {
  2535. _inheritsLoose$8(ID$2, _Node);
  2536. function ID$2(opts) {
  2537. var _this = _Node.call(this, opts) || this;
  2538. _this.type = _types$9.ID;
  2539. return _this;
  2540. }
  2541. var _proto = ID$2.prototype;
  2542. _proto.valueToString = function valueToString() {
  2543. return "#" + _Node.prototype.valueToString.call(this);
  2544. };
  2545. return ID$2;
  2546. }(_node$4["default"]);
  2547. exports["default"] = ID;
  2548. module.exports = exports.default;
  2549. }) });
  2550. //#endregion
  2551. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/namespace.js
  2552. var require_namespace = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/namespace.js": ((exports, module) => {
  2553. exports.__esModule = true;
  2554. exports["default"] = void 0;
  2555. var _cssesc$1 = _interopRequireDefault$13(require_cssesc());
  2556. var _util$1 = require_util();
  2557. var _node$3 = _interopRequireDefault$13(require_node$1());
  2558. function _interopRequireDefault$13(obj) {
  2559. return obj && obj.__esModule ? obj : { "default": obj };
  2560. }
  2561. function _defineProperties$2(target, props) {
  2562. for (var i$1 = 0; i$1 < props.length; i$1++) {
  2563. var descriptor = props[i$1];
  2564. descriptor.enumerable = descriptor.enumerable || false;
  2565. descriptor.configurable = true;
  2566. if ("value" in descriptor) descriptor.writable = true;
  2567. Object.defineProperty(target, descriptor.key, descriptor);
  2568. }
  2569. }
  2570. function _createClass$2(Constructor, protoProps, staticProps) {
  2571. if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
  2572. if (staticProps) _defineProperties$2(Constructor, staticProps);
  2573. Object.defineProperty(Constructor, "prototype", { writable: false });
  2574. return Constructor;
  2575. }
  2576. function _inheritsLoose$7(subClass, superClass) {
  2577. subClass.prototype = Object.create(superClass.prototype);
  2578. subClass.prototype.constructor = subClass;
  2579. _setPrototypeOf$7(subClass, superClass);
  2580. }
  2581. function _setPrototypeOf$7(o, p) {
  2582. _setPrototypeOf$7 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) {
  2583. o$1.__proto__ = p$1;
  2584. return o$1;
  2585. };
  2586. return _setPrototypeOf$7(o, p);
  2587. }
  2588. var Namespace = /* @__PURE__ */ function(_Node) {
  2589. _inheritsLoose$7(Namespace$1, _Node);
  2590. function Namespace$1() {
  2591. return _Node.apply(this, arguments) || this;
  2592. }
  2593. var _proto = Namespace$1.prototype;
  2594. _proto.qualifiedName = function qualifiedName(value) {
  2595. if (this.namespace) return this.namespaceString + "|" + value;
  2596. else return value;
  2597. };
  2598. _proto.valueToString = function valueToString() {
  2599. return this.qualifiedName(_Node.prototype.valueToString.call(this));
  2600. };
  2601. _createClass$2(Namespace$1, [
  2602. {
  2603. key: "namespace",
  2604. get: function get() {
  2605. return this._namespace;
  2606. },
  2607. set: function set(namespace) {
  2608. if (namespace === true || namespace === "*" || namespace === "&") {
  2609. this._namespace = namespace;
  2610. if (this.raws) delete this.raws.namespace;
  2611. return;
  2612. }
  2613. var escaped = (0, _cssesc$1["default"])(namespace, { isIdentifier: true });
  2614. this._namespace = namespace;
  2615. if (escaped !== namespace) {
  2616. (0, _util$1.ensureObject)(this, "raws");
  2617. this.raws.namespace = escaped;
  2618. } else if (this.raws) delete this.raws.namespace;
  2619. }
  2620. },
  2621. {
  2622. key: "ns",
  2623. get: function get() {
  2624. return this._namespace;
  2625. },
  2626. set: function set(namespace) {
  2627. this.namespace = namespace;
  2628. }
  2629. },
  2630. {
  2631. key: "namespaceString",
  2632. get: function get() {
  2633. if (this.namespace) {
  2634. var ns = this.stringifyProperty("namespace");
  2635. if (ns === true) return "";
  2636. else return ns;
  2637. } else return "";
  2638. }
  2639. }
  2640. ]);
  2641. return Namespace$1;
  2642. }(_node$3["default"]);
  2643. exports["default"] = Namespace;
  2644. module.exports = exports.default;
  2645. }) });
  2646. //#endregion
  2647. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/tag.js
  2648. var require_tag = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/tag.js": ((exports, module) => {
  2649. exports.__esModule = true;
  2650. exports["default"] = void 0;
  2651. var _namespace$2 = _interopRequireDefault$12(require_namespace());
  2652. var _types$8 = require_types();
  2653. function _interopRequireDefault$12(obj) {
  2654. return obj && obj.__esModule ? obj : { "default": obj };
  2655. }
  2656. function _inheritsLoose$6(subClass, superClass) {
  2657. subClass.prototype = Object.create(superClass.prototype);
  2658. subClass.prototype.constructor = subClass;
  2659. _setPrototypeOf$6(subClass, superClass);
  2660. }
  2661. function _setPrototypeOf$6(o, p) {
  2662. _setPrototypeOf$6 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) {
  2663. o$1.__proto__ = p$1;
  2664. return o$1;
  2665. };
  2666. return _setPrototypeOf$6(o, p);
  2667. }
  2668. var Tag = /* @__PURE__ */ function(_Namespace) {
  2669. _inheritsLoose$6(Tag$1, _Namespace);
  2670. function Tag$1(opts) {
  2671. var _this = _Namespace.call(this, opts) || this;
  2672. _this.type = _types$8.TAG;
  2673. return _this;
  2674. }
  2675. return Tag$1;
  2676. }(_namespace$2["default"]);
  2677. exports["default"] = Tag;
  2678. module.exports = exports.default;
  2679. }) });
  2680. //#endregion
  2681. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/string.js
  2682. var require_string = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/string.js": ((exports, module) => {
  2683. exports.__esModule = true;
  2684. exports["default"] = void 0;
  2685. var _node$2 = _interopRequireDefault$11(require_node$1());
  2686. var _types$7 = require_types();
  2687. function _interopRequireDefault$11(obj) {
  2688. return obj && obj.__esModule ? obj : { "default": obj };
  2689. }
  2690. function _inheritsLoose$5(subClass, superClass) {
  2691. subClass.prototype = Object.create(superClass.prototype);
  2692. subClass.prototype.constructor = subClass;
  2693. _setPrototypeOf$5(subClass, superClass);
  2694. }
  2695. function _setPrototypeOf$5(o, p) {
  2696. _setPrototypeOf$5 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) {
  2697. o$1.__proto__ = p$1;
  2698. return o$1;
  2699. };
  2700. return _setPrototypeOf$5(o, p);
  2701. }
  2702. var String$1 = /* @__PURE__ */ function(_Node) {
  2703. _inheritsLoose$5(String$2, _Node);
  2704. function String$2(opts) {
  2705. var _this = _Node.call(this, opts) || this;
  2706. _this.type = _types$7.STRING;
  2707. return _this;
  2708. }
  2709. return String$2;
  2710. }(_node$2["default"]);
  2711. exports["default"] = String$1;
  2712. module.exports = exports.default;
  2713. }) });
  2714. //#endregion
  2715. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/pseudo.js
  2716. var require_pseudo = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/pseudo.js": ((exports, module) => {
  2717. exports.__esModule = true;
  2718. exports["default"] = void 0;
  2719. var _container = _interopRequireDefault$10(require_container());
  2720. var _types$6 = require_types();
  2721. function _interopRequireDefault$10(obj) {
  2722. return obj && obj.__esModule ? obj : { "default": obj };
  2723. }
  2724. function _inheritsLoose$4(subClass, superClass) {
  2725. subClass.prototype = Object.create(superClass.prototype);
  2726. subClass.prototype.constructor = subClass;
  2727. _setPrototypeOf$4(subClass, superClass);
  2728. }
  2729. function _setPrototypeOf$4(o, p) {
  2730. _setPrototypeOf$4 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) {
  2731. o$1.__proto__ = p$1;
  2732. return o$1;
  2733. };
  2734. return _setPrototypeOf$4(o, p);
  2735. }
  2736. var Pseudo = /* @__PURE__ */ function(_Container) {
  2737. _inheritsLoose$4(Pseudo$1, _Container);
  2738. function Pseudo$1(opts) {
  2739. var _this = _Container.call(this, opts) || this;
  2740. _this.type = _types$6.PSEUDO;
  2741. return _this;
  2742. }
  2743. var _proto = Pseudo$1.prototype;
  2744. _proto.toString = function toString$1() {
  2745. var params = this.length ? "(" + this.map(String).join(",") + ")" : "";
  2746. return [
  2747. this.rawSpaceBefore,
  2748. this.stringifyProperty("value"),
  2749. params,
  2750. this.rawSpaceAfter
  2751. ].join("");
  2752. };
  2753. return Pseudo$1;
  2754. }(_container["default"]);
  2755. exports["default"] = Pseudo;
  2756. module.exports = exports.default;
  2757. }) });
  2758. //#endregion
  2759. //#region ../../node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/node.js
  2760. var require_node = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/node.js": ((exports, module) => {
  2761. /**
  2762. * For Node.js, simply re-export the core `util.deprecate` function.
  2763. */
  2764. module.exports = __require("util").deprecate;
  2765. }) });
  2766. //#endregion
  2767. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/attribute.js
  2768. var require_attribute = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/attribute.js": ((exports) => {
  2769. exports.__esModule = true;
  2770. exports.unescapeValue = unescapeValue;
  2771. var _cssesc = _interopRequireDefault$9(require_cssesc());
  2772. var _unesc = _interopRequireDefault$9(require_unesc());
  2773. var _namespace$1 = _interopRequireDefault$9(require_namespace());
  2774. var _types$5 = require_types();
  2775. var _CSSESC_QUOTE_OPTIONS;
  2776. function _interopRequireDefault$9(obj) {
  2777. return obj && obj.__esModule ? obj : { "default": obj };
  2778. }
  2779. function _defineProperties$1(target, props) {
  2780. for (var i$1 = 0; i$1 < props.length; i$1++) {
  2781. var descriptor = props[i$1];
  2782. descriptor.enumerable = descriptor.enumerable || false;
  2783. descriptor.configurable = true;
  2784. if ("value" in descriptor) descriptor.writable = true;
  2785. Object.defineProperty(target, descriptor.key, descriptor);
  2786. }
  2787. }
  2788. function _createClass$1(Constructor, protoProps, staticProps) {
  2789. if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
  2790. if (staticProps) _defineProperties$1(Constructor, staticProps);
  2791. Object.defineProperty(Constructor, "prototype", { writable: false });
  2792. return Constructor;
  2793. }
  2794. function _inheritsLoose$3(subClass, superClass) {
  2795. subClass.prototype = Object.create(superClass.prototype);
  2796. subClass.prototype.constructor = subClass;
  2797. _setPrototypeOf$3(subClass, superClass);
  2798. }
  2799. function _setPrototypeOf$3(o, p) {
  2800. _setPrototypeOf$3 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) {
  2801. o$1.__proto__ = p$1;
  2802. return o$1;
  2803. };
  2804. return _setPrototypeOf$3(o, p);
  2805. }
  2806. var deprecate = require_node();
  2807. var WRAPPED_IN_QUOTES = /^('|")([^]*)\1$/;
  2808. var warnOfDeprecatedValueAssignment = deprecate(function() {}, "Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead.");
  2809. var warnOfDeprecatedQuotedAssignment = deprecate(function() {}, "Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead.");
  2810. var warnOfDeprecatedConstructor = deprecate(function() {}, "Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.");
  2811. function unescapeValue(value) {
  2812. var deprecatedUsage = false;
  2813. var quoteMark = null;
  2814. var unescaped = value;
  2815. var m = unescaped.match(WRAPPED_IN_QUOTES);
  2816. if (m) {
  2817. quoteMark = m[1];
  2818. unescaped = m[2];
  2819. }
  2820. unescaped = (0, _unesc["default"])(unescaped);
  2821. if (unescaped !== value) deprecatedUsage = true;
  2822. return {
  2823. deprecatedUsage,
  2824. unescaped,
  2825. quoteMark
  2826. };
  2827. }
  2828. function handleDeprecatedContructorOpts(opts) {
  2829. if (opts.quoteMark !== void 0) return opts;
  2830. if (opts.value === void 0) return opts;
  2831. warnOfDeprecatedConstructor();
  2832. var _unescapeValue = unescapeValue(opts.value), quoteMark = _unescapeValue.quoteMark, unescaped = _unescapeValue.unescaped;
  2833. if (!opts.raws) opts.raws = {};
  2834. if (opts.raws.value === void 0) opts.raws.value = opts.value;
  2835. opts.value = unescaped;
  2836. opts.quoteMark = quoteMark;
  2837. return opts;
  2838. }
  2839. var Attribute = /* @__PURE__ */ function(_Namespace) {
  2840. _inheritsLoose$3(Attribute$1, _Namespace);
  2841. function Attribute$1(opts) {
  2842. var _this;
  2843. if (opts === void 0) opts = {};
  2844. _this = _Namespace.call(this, handleDeprecatedContructorOpts(opts)) || this;
  2845. _this.type = _types$5.ATTRIBUTE;
  2846. _this.raws = _this.raws || {};
  2847. Object.defineProperty(_this.raws, "unquoted", {
  2848. get: deprecate(function() {
  2849. return _this.value;
  2850. }, "attr.raws.unquoted is deprecated. Call attr.value instead."),
  2851. set: deprecate(function() {
  2852. return _this.value;
  2853. }, "Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")
  2854. });
  2855. _this._constructed = true;
  2856. return _this;
  2857. }
  2858. /**
  2859. * Returns the Attribute's value quoted such that it would be legal to use
  2860. * in the value of a css file. The original value's quotation setting
  2861. * used for stringification is left unchanged. See `setValue(value, options)`
  2862. * if you want to control the quote settings of a new value for the attribute.
  2863. *
  2864. * You can also change the quotation used for the current value by setting quoteMark.
  2865. *
  2866. * Options:
  2867. * * quoteMark {'"' | "'" | null} - Use this value to quote the value. If this
  2868. * option is not set, the original value for quoteMark will be used. If
  2869. * indeterminate, a double quote is used. The legal values are:
  2870. * * `null` - the value will be unquoted and characters will be escaped as necessary.
  2871. * * `'` - the value will be quoted with a single quote and single quotes are escaped.
  2872. * * `"` - the value will be quoted with a double quote and double quotes are escaped.
  2873. * * preferCurrentQuoteMark {boolean} - if true, prefer the source quote mark
  2874. * over the quoteMark option value.
  2875. * * smart {boolean} - if true, will select a quote mark based on the value
  2876. * and the other options specified here. See the `smartQuoteMark()`
  2877. * method.
  2878. **/
  2879. var _proto = Attribute$1.prototype;
  2880. _proto.getQuotedValue = function getQuotedValue(options) {
  2881. if (options === void 0) options = {};
  2882. var quoteMark = this._determineQuoteMark(options);
  2883. var cssescopts = CSSESC_QUOTE_OPTIONS[quoteMark];
  2884. return (0, _cssesc["default"])(this._value, cssescopts);
  2885. };
  2886. _proto._determineQuoteMark = function _determineQuoteMark(options) {
  2887. return options.smart ? this.smartQuoteMark(options) : this.preferredQuoteMark(options);
  2888. };
  2889. _proto.setValue = function setValue(value, options) {
  2890. if (options === void 0) options = {};
  2891. this._value = value;
  2892. this._quoteMark = this._determineQuoteMark(options);
  2893. this._syncRawValue();
  2894. };
  2895. _proto.smartQuoteMark = function smartQuoteMark(options) {
  2896. var v = this.value;
  2897. var numSingleQuotes = v.replace(/[^']/g, "").length;
  2898. var numDoubleQuotes = v.replace(/[^"]/g, "").length;
  2899. if (numSingleQuotes + numDoubleQuotes === 0) {
  2900. var escaped = (0, _cssesc["default"])(v, { isIdentifier: true });
  2901. if (escaped === v) return Attribute$1.NO_QUOTE;
  2902. else {
  2903. var pref = this.preferredQuoteMark(options);
  2904. if (pref === Attribute$1.NO_QUOTE) {
  2905. var quote = this.quoteMark || options.quoteMark || Attribute$1.DOUBLE_QUOTE;
  2906. var opts = CSSESC_QUOTE_OPTIONS[quote];
  2907. if ((0, _cssesc["default"])(v, opts).length < escaped.length) return quote;
  2908. }
  2909. return pref;
  2910. }
  2911. } else if (numDoubleQuotes === numSingleQuotes) return this.preferredQuoteMark(options);
  2912. else if (numDoubleQuotes < numSingleQuotes) return Attribute$1.DOUBLE_QUOTE;
  2913. else return Attribute$1.SINGLE_QUOTE;
  2914. };
  2915. _proto.preferredQuoteMark = function preferredQuoteMark(options) {
  2916. var quoteMark = options.preferCurrentQuoteMark ? this.quoteMark : options.quoteMark;
  2917. if (quoteMark === void 0) quoteMark = options.preferCurrentQuoteMark ? options.quoteMark : this.quoteMark;
  2918. if (quoteMark === void 0) quoteMark = Attribute$1.DOUBLE_QUOTE;
  2919. return quoteMark;
  2920. };
  2921. _proto._syncRawValue = function _syncRawValue() {
  2922. var rawValue = (0, _cssesc["default"])(this._value, CSSESC_QUOTE_OPTIONS[this.quoteMark]);
  2923. if (rawValue === this._value) {
  2924. if (this.raws) delete this.raws.value;
  2925. } else this.raws.value = rawValue;
  2926. };
  2927. _proto._handleEscapes = function _handleEscapes(prop, value) {
  2928. if (this._constructed) {
  2929. var escaped = (0, _cssesc["default"])(value, { isIdentifier: true });
  2930. if (escaped !== value) this.raws[prop] = escaped;
  2931. else delete this.raws[prop];
  2932. }
  2933. };
  2934. _proto._spacesFor = function _spacesFor(name) {
  2935. var attrSpaces = {
  2936. before: "",
  2937. after: ""
  2938. };
  2939. var spaces = this.spaces[name] || {};
  2940. var rawSpaces = this.raws.spaces && this.raws.spaces[name] || {};
  2941. return Object.assign(attrSpaces, spaces, rawSpaces);
  2942. };
  2943. _proto._stringFor = function _stringFor(name, spaceName, concat) {
  2944. if (spaceName === void 0) spaceName = name;
  2945. if (concat === void 0) concat = defaultAttrConcat;
  2946. var attrSpaces = this._spacesFor(spaceName);
  2947. return concat(this.stringifyProperty(name), attrSpaces);
  2948. };
  2949. _proto.offsetOf = function offsetOf(name) {
  2950. var count = 1;
  2951. var attributeSpaces = this._spacesFor("attribute");
  2952. count += attributeSpaces.before.length;
  2953. if (name === "namespace" || name === "ns") return this.namespace ? count : -1;
  2954. if (name === "attributeNS") return count;
  2955. count += this.namespaceString.length;
  2956. if (this.namespace) count += 1;
  2957. if (name === "attribute") return count;
  2958. count += this.stringifyProperty("attribute").length;
  2959. count += attributeSpaces.after.length;
  2960. var operatorSpaces = this._spacesFor("operator");
  2961. count += operatorSpaces.before.length;
  2962. var operator = this.stringifyProperty("operator");
  2963. if (name === "operator") return operator ? count : -1;
  2964. count += operator.length;
  2965. count += operatorSpaces.after.length;
  2966. var valueSpaces = this._spacesFor("value");
  2967. count += valueSpaces.before.length;
  2968. var value = this.stringifyProperty("value");
  2969. if (name === "value") return value ? count : -1;
  2970. count += value.length;
  2971. count += valueSpaces.after.length;
  2972. var insensitiveSpaces = this._spacesFor("insensitive");
  2973. count += insensitiveSpaces.before.length;
  2974. if (name === "insensitive") return this.insensitive ? count : -1;
  2975. return -1;
  2976. };
  2977. _proto.toString = function toString$1() {
  2978. var _this2 = this;
  2979. var selector$1 = [this.rawSpaceBefore, "["];
  2980. selector$1.push(this._stringFor("qualifiedAttribute", "attribute"));
  2981. if (this.operator && (this.value || this.value === "")) {
  2982. selector$1.push(this._stringFor("operator"));
  2983. selector$1.push(this._stringFor("value"));
  2984. selector$1.push(this._stringFor("insensitiveFlag", "insensitive", function(attrValue, attrSpaces) {
  2985. if (attrValue.length > 0 && !_this2.quoted && attrSpaces.before.length === 0 && !(_this2.spaces.value && _this2.spaces.value.after)) attrSpaces.before = " ";
  2986. return defaultAttrConcat(attrValue, attrSpaces);
  2987. }));
  2988. }
  2989. selector$1.push("]");
  2990. selector$1.push(this.rawSpaceAfter);
  2991. return selector$1.join("");
  2992. };
  2993. _createClass$1(Attribute$1, [
  2994. {
  2995. key: "quoted",
  2996. get: function get() {
  2997. var qm = this.quoteMark;
  2998. return qm === "'" || qm === "\"";
  2999. },
  3000. set: function set(value) {
  3001. warnOfDeprecatedQuotedAssignment();
  3002. }
  3003. },
  3004. {
  3005. key: "quoteMark",
  3006. get: function get() {
  3007. return this._quoteMark;
  3008. },
  3009. set: function set(quoteMark) {
  3010. if (!this._constructed) {
  3011. this._quoteMark = quoteMark;
  3012. return;
  3013. }
  3014. if (this._quoteMark !== quoteMark) {
  3015. this._quoteMark = quoteMark;
  3016. this._syncRawValue();
  3017. }
  3018. }
  3019. },
  3020. {
  3021. key: "qualifiedAttribute",
  3022. get: function get() {
  3023. return this.qualifiedName(this.raws.attribute || this.attribute);
  3024. }
  3025. },
  3026. {
  3027. key: "insensitiveFlag",
  3028. get: function get() {
  3029. return this.insensitive ? "i" : "";
  3030. }
  3031. },
  3032. {
  3033. key: "value",
  3034. get: function get() {
  3035. return this._value;
  3036. },
  3037. set: function set(v) {
  3038. if (this._constructed) {
  3039. var _unescapeValue2 = unescapeValue(v), deprecatedUsage = _unescapeValue2.deprecatedUsage, unescaped = _unescapeValue2.unescaped, quoteMark = _unescapeValue2.quoteMark;
  3040. if (deprecatedUsage) warnOfDeprecatedValueAssignment();
  3041. if (unescaped === this._value && quoteMark === this._quoteMark) return;
  3042. this._value = unescaped;
  3043. this._quoteMark = quoteMark;
  3044. this._syncRawValue();
  3045. } else this._value = v;
  3046. }
  3047. },
  3048. {
  3049. key: "insensitive",
  3050. get: function get() {
  3051. return this._insensitive;
  3052. },
  3053. set: function set(insensitive) {
  3054. if (!insensitive) {
  3055. this._insensitive = false;
  3056. if (this.raws && (this.raws.insensitiveFlag === "I" || this.raws.insensitiveFlag === "i")) this.raws.insensitiveFlag = void 0;
  3057. }
  3058. this._insensitive = insensitive;
  3059. }
  3060. },
  3061. {
  3062. key: "attribute",
  3063. get: function get() {
  3064. return this._attribute;
  3065. },
  3066. set: function set(name) {
  3067. this._handleEscapes("attribute", name);
  3068. this._attribute = name;
  3069. }
  3070. }
  3071. ]);
  3072. return Attribute$1;
  3073. }(_namespace$1["default"]);
  3074. exports["default"] = Attribute;
  3075. Attribute.NO_QUOTE = null;
  3076. Attribute.SINGLE_QUOTE = "'";
  3077. Attribute.DOUBLE_QUOTE = "\"";
  3078. var CSSESC_QUOTE_OPTIONS = (_CSSESC_QUOTE_OPTIONS = {
  3079. "'": {
  3080. quotes: "single",
  3081. wrap: true
  3082. },
  3083. "\"": {
  3084. quotes: "double",
  3085. wrap: true
  3086. }
  3087. }, _CSSESC_QUOTE_OPTIONS[null] = { isIdentifier: true }, _CSSESC_QUOTE_OPTIONS);
  3088. function defaultAttrConcat(attrValue, attrSpaces) {
  3089. return "" + attrSpaces.before + attrValue + attrSpaces.after;
  3090. }
  3091. }) });
  3092. //#endregion
  3093. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/universal.js
  3094. var require_universal = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/universal.js": ((exports, module) => {
  3095. exports.__esModule = true;
  3096. exports["default"] = void 0;
  3097. var _namespace = _interopRequireDefault$8(require_namespace());
  3098. var _types$4 = require_types();
  3099. function _interopRequireDefault$8(obj) {
  3100. return obj && obj.__esModule ? obj : { "default": obj };
  3101. }
  3102. function _inheritsLoose$2(subClass, superClass) {
  3103. subClass.prototype = Object.create(superClass.prototype);
  3104. subClass.prototype.constructor = subClass;
  3105. _setPrototypeOf$2(subClass, superClass);
  3106. }
  3107. function _setPrototypeOf$2(o, p) {
  3108. _setPrototypeOf$2 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) {
  3109. o$1.__proto__ = p$1;
  3110. return o$1;
  3111. };
  3112. return _setPrototypeOf$2(o, p);
  3113. }
  3114. var Universal = /* @__PURE__ */ function(_Namespace) {
  3115. _inheritsLoose$2(Universal$1, _Namespace);
  3116. function Universal$1(opts) {
  3117. var _this = _Namespace.call(this, opts) || this;
  3118. _this.type = _types$4.UNIVERSAL;
  3119. _this.value = "*";
  3120. return _this;
  3121. }
  3122. return Universal$1;
  3123. }(_namespace["default"]);
  3124. exports["default"] = Universal;
  3125. module.exports = exports.default;
  3126. }) });
  3127. //#endregion
  3128. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/combinator.js
  3129. var require_combinator = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/combinator.js": ((exports, module) => {
  3130. exports.__esModule = true;
  3131. exports["default"] = void 0;
  3132. var _node$1 = _interopRequireDefault$7(require_node$1());
  3133. var _types$3 = require_types();
  3134. function _interopRequireDefault$7(obj) {
  3135. return obj && obj.__esModule ? obj : { "default": obj };
  3136. }
  3137. function _inheritsLoose$1(subClass, superClass) {
  3138. subClass.prototype = Object.create(superClass.prototype);
  3139. subClass.prototype.constructor = subClass;
  3140. _setPrototypeOf$1(subClass, superClass);
  3141. }
  3142. function _setPrototypeOf$1(o, p) {
  3143. _setPrototypeOf$1 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) {
  3144. o$1.__proto__ = p$1;
  3145. return o$1;
  3146. };
  3147. return _setPrototypeOf$1(o, p);
  3148. }
  3149. var Combinator = /* @__PURE__ */ function(_Node) {
  3150. _inheritsLoose$1(Combinator$1, _Node);
  3151. function Combinator$1(opts) {
  3152. var _this = _Node.call(this, opts) || this;
  3153. _this.type = _types$3.COMBINATOR;
  3154. return _this;
  3155. }
  3156. return Combinator$1;
  3157. }(_node$1["default"]);
  3158. exports["default"] = Combinator;
  3159. module.exports = exports.default;
  3160. }) });
  3161. //#endregion
  3162. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/nesting.js
  3163. var require_nesting = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/nesting.js": ((exports, module) => {
  3164. exports.__esModule = true;
  3165. exports["default"] = void 0;
  3166. var _node = _interopRequireDefault$6(require_node$1());
  3167. var _types$2 = require_types();
  3168. function _interopRequireDefault$6(obj) {
  3169. return obj && obj.__esModule ? obj : { "default": obj };
  3170. }
  3171. function _inheritsLoose(subClass, superClass) {
  3172. subClass.prototype = Object.create(superClass.prototype);
  3173. subClass.prototype.constructor = subClass;
  3174. _setPrototypeOf(subClass, superClass);
  3175. }
  3176. function _setPrototypeOf(o, p) {
  3177. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) {
  3178. o$1.__proto__ = p$1;
  3179. return o$1;
  3180. };
  3181. return _setPrototypeOf(o, p);
  3182. }
  3183. var Nesting = /* @__PURE__ */ function(_Node) {
  3184. _inheritsLoose(Nesting$1, _Node);
  3185. function Nesting$1(opts) {
  3186. var _this = _Node.call(this, opts) || this;
  3187. _this.type = _types$2.NESTING;
  3188. _this.value = "&";
  3189. return _this;
  3190. }
  3191. return Nesting$1;
  3192. }(_node["default"]);
  3193. exports["default"] = Nesting;
  3194. module.exports = exports.default;
  3195. }) });
  3196. //#endregion
  3197. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/sortAscending.js
  3198. var require_sortAscending = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/sortAscending.js": ((exports, module) => {
  3199. exports.__esModule = true;
  3200. exports["default"] = sortAscending;
  3201. function sortAscending(list) {
  3202. return list.sort(function(a, b) {
  3203. return a - b;
  3204. });
  3205. }
  3206. module.exports = exports.default;
  3207. }) });
  3208. //#endregion
  3209. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/tokenTypes.js
  3210. var require_tokenTypes = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/tokenTypes.js": ((exports) => {
  3211. exports.__esModule = true;
  3212. var ampersand = 38;
  3213. exports.ampersand = ampersand;
  3214. var asterisk = 42;
  3215. exports.asterisk = asterisk;
  3216. var at = 64;
  3217. exports.at = at;
  3218. var comma = 44;
  3219. exports.comma = comma;
  3220. var colon = 58;
  3221. exports.colon = colon;
  3222. var semicolon = 59;
  3223. exports.semicolon = semicolon;
  3224. var openParenthesis = 40;
  3225. exports.openParenthesis = openParenthesis;
  3226. var closeParenthesis = 41;
  3227. exports.closeParenthesis = closeParenthesis;
  3228. var openSquare = 91;
  3229. exports.openSquare = openSquare;
  3230. var closeSquare = 93;
  3231. exports.closeSquare = closeSquare;
  3232. var dollar = 36;
  3233. exports.dollar = dollar;
  3234. var tilde = 126;
  3235. exports.tilde = tilde;
  3236. var caret = 94;
  3237. exports.caret = caret;
  3238. var plus = 43;
  3239. exports.plus = plus;
  3240. var equals = 61;
  3241. exports.equals = equals;
  3242. var pipe = 124;
  3243. exports.pipe = pipe;
  3244. var greaterThan = 62;
  3245. exports.greaterThan = greaterThan;
  3246. var space = 32;
  3247. exports.space = space;
  3248. var singleQuote = 39;
  3249. exports.singleQuote = singleQuote;
  3250. var doubleQuote = 34;
  3251. exports.doubleQuote = doubleQuote;
  3252. var slash = 47;
  3253. exports.slash = slash;
  3254. var bang = 33;
  3255. exports.bang = bang;
  3256. var backslash = 92;
  3257. exports.backslash = backslash;
  3258. var cr = 13;
  3259. exports.cr = cr;
  3260. var feed = 12;
  3261. exports.feed = feed;
  3262. var newline = 10;
  3263. exports.newline = newline;
  3264. var tab = 9;
  3265. exports.tab = tab;
  3266. var str = singleQuote;
  3267. exports.str = str;
  3268. var comment$1 = -1;
  3269. exports.comment = comment$1;
  3270. var word = -2;
  3271. exports.word = word;
  3272. var combinator$1 = -3;
  3273. exports.combinator = combinator$1;
  3274. }) });
  3275. //#endregion
  3276. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/tokenize.js
  3277. var require_tokenize = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/tokenize.js": ((exports) => {
  3278. exports.__esModule = true;
  3279. exports["default"] = tokenize;
  3280. var t = _interopRequireWildcard$2(require_tokenTypes());
  3281. var _unescapable, _wordDelimiters;
  3282. function _getRequireWildcardCache$2(nodeInterop) {
  3283. if (typeof WeakMap !== "function") return null;
  3284. var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
  3285. var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
  3286. return (_getRequireWildcardCache$2 = function _getRequireWildcardCache$4(nodeInterop$1) {
  3287. return nodeInterop$1 ? cacheNodeInterop : cacheBabelInterop;
  3288. })(nodeInterop);
  3289. }
  3290. function _interopRequireWildcard$2(obj, nodeInterop) {
  3291. if (!nodeInterop && obj && obj.__esModule) return obj;
  3292. if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { "default": obj };
  3293. var cache = _getRequireWildcardCache$2(nodeInterop);
  3294. if (cache && cache.has(obj)) return cache.get(obj);
  3295. var newObj = {};
  3296. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  3297. for (var key in obj) if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
  3298. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  3299. if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
  3300. else newObj[key] = obj[key];
  3301. }
  3302. newObj["default"] = obj;
  3303. if (cache) cache.set(obj, newObj);
  3304. return newObj;
  3305. }
  3306. var unescapable = (_unescapable = {}, _unescapable[t.tab] = true, _unescapable[t.newline] = true, _unescapable[t.cr] = true, _unescapable[t.feed] = true, _unescapable);
  3307. var wordDelimiters = (_wordDelimiters = {}, _wordDelimiters[t.space] = true, _wordDelimiters[t.tab] = true, _wordDelimiters[t.newline] = true, _wordDelimiters[t.cr] = true, _wordDelimiters[t.feed] = true, _wordDelimiters[t.ampersand] = true, _wordDelimiters[t.asterisk] = true, _wordDelimiters[t.bang] = true, _wordDelimiters[t.comma] = true, _wordDelimiters[t.colon] = true, _wordDelimiters[t.semicolon] = true, _wordDelimiters[t.openParenthesis] = true, _wordDelimiters[t.closeParenthesis] = true, _wordDelimiters[t.openSquare] = true, _wordDelimiters[t.closeSquare] = true, _wordDelimiters[t.singleQuote] = true, _wordDelimiters[t.doubleQuote] = true, _wordDelimiters[t.plus] = true, _wordDelimiters[t.pipe] = true, _wordDelimiters[t.tilde] = true, _wordDelimiters[t.greaterThan] = true, _wordDelimiters[t.equals] = true, _wordDelimiters[t.dollar] = true, _wordDelimiters[t.caret] = true, _wordDelimiters[t.slash] = true, _wordDelimiters);
  3308. var hex = {};
  3309. var hexChars = "0123456789abcdefABCDEF";
  3310. for (var i = 0; i < hexChars.length; i++) hex[hexChars.charCodeAt(i)] = true;
  3311. /**
  3312. * Returns the last index of the bar css word
  3313. * @param {string} css The string in which the word begins
  3314. * @param {number} start The index into the string where word's first letter occurs
  3315. */
  3316. function consumeWord(css, start) {
  3317. var next = start;
  3318. var code;
  3319. do {
  3320. code = css.charCodeAt(next);
  3321. if (wordDelimiters[code]) return next - 1;
  3322. else if (code === t.backslash) next = consumeEscape(css, next) + 1;
  3323. else next++;
  3324. } while (next < css.length);
  3325. return next - 1;
  3326. }
  3327. /**
  3328. * Returns the last index of the escape sequence
  3329. * @param {string} css The string in which the sequence begins
  3330. * @param {number} start The index into the string where escape character (`\`) occurs.
  3331. */
  3332. function consumeEscape(css, start) {
  3333. var next = start;
  3334. var code = css.charCodeAt(next + 1);
  3335. if (unescapable[code]) {} else if (hex[code]) {
  3336. var hexDigits = 0;
  3337. do {
  3338. next++;
  3339. hexDigits++;
  3340. code = css.charCodeAt(next + 1);
  3341. } while (hex[code] && hexDigits < 6);
  3342. if (hexDigits < 6 && code === t.space) next++;
  3343. } else next++;
  3344. return next;
  3345. }
  3346. var FIELDS = {
  3347. TYPE: 0,
  3348. START_LINE: 1,
  3349. START_COL: 2,
  3350. END_LINE: 3,
  3351. END_COL: 4,
  3352. START_POS: 5,
  3353. END_POS: 6
  3354. };
  3355. exports.FIELDS = FIELDS;
  3356. function tokenize(input) {
  3357. var tokens$1 = [];
  3358. var css = input.css.valueOf();
  3359. var length = css.length;
  3360. var offset = -1;
  3361. var line = 1;
  3362. var start = 0;
  3363. var end = 0;
  3364. var code, content, endColumn, endLine, escaped, escapePos, last, lines, next, nextLine, nextOffset, quote, tokenType;
  3365. function unclosed(what, fix) {
  3366. if (input.safe) {
  3367. css += fix;
  3368. next = css.length - 1;
  3369. } else throw input.error("Unclosed " + what, line, start - offset, start);
  3370. }
  3371. while (start < length) {
  3372. code = css.charCodeAt(start);
  3373. if (code === t.newline) {
  3374. offset = start;
  3375. line += 1;
  3376. }
  3377. switch (code) {
  3378. case t.space:
  3379. case t.tab:
  3380. case t.newline:
  3381. case t.cr:
  3382. case t.feed:
  3383. next = start;
  3384. do {
  3385. next += 1;
  3386. code = css.charCodeAt(next);
  3387. if (code === t.newline) {
  3388. offset = next;
  3389. line += 1;
  3390. }
  3391. } while (code === t.space || code === t.newline || code === t.tab || code === t.cr || code === t.feed);
  3392. tokenType = t.space;
  3393. endLine = line;
  3394. endColumn = next - offset - 1;
  3395. end = next;
  3396. break;
  3397. case t.plus:
  3398. case t.greaterThan:
  3399. case t.tilde:
  3400. case t.pipe:
  3401. next = start;
  3402. do {
  3403. next += 1;
  3404. code = css.charCodeAt(next);
  3405. } while (code === t.plus || code === t.greaterThan || code === t.tilde || code === t.pipe);
  3406. tokenType = t.combinator;
  3407. endLine = line;
  3408. endColumn = start - offset;
  3409. end = next;
  3410. break;
  3411. case t.asterisk:
  3412. case t.ampersand:
  3413. case t.bang:
  3414. case t.comma:
  3415. case t.equals:
  3416. case t.dollar:
  3417. case t.caret:
  3418. case t.openSquare:
  3419. case t.closeSquare:
  3420. case t.colon:
  3421. case t.semicolon:
  3422. case t.openParenthesis:
  3423. case t.closeParenthesis:
  3424. next = start;
  3425. tokenType = code;
  3426. endLine = line;
  3427. endColumn = start - offset;
  3428. end = next + 1;
  3429. break;
  3430. case t.singleQuote:
  3431. case t.doubleQuote:
  3432. quote = code === t.singleQuote ? "'" : "\"";
  3433. next = start;
  3434. do {
  3435. escaped = false;
  3436. next = css.indexOf(quote, next + 1);
  3437. if (next === -1) unclosed("quote", quote);
  3438. escapePos = next;
  3439. while (css.charCodeAt(escapePos - 1) === t.backslash) {
  3440. escapePos -= 1;
  3441. escaped = !escaped;
  3442. }
  3443. } while (escaped);
  3444. tokenType = t.str;
  3445. endLine = line;
  3446. endColumn = start - offset;
  3447. end = next + 1;
  3448. break;
  3449. default:
  3450. if (code === t.slash && css.charCodeAt(start + 1) === t.asterisk) {
  3451. next = css.indexOf("*/", start + 2) + 1;
  3452. if (next === 0) unclosed("comment", "*/");
  3453. content = css.slice(start, next + 1);
  3454. lines = content.split("\n");
  3455. last = lines.length - 1;
  3456. if (last > 0) {
  3457. nextLine = line + last;
  3458. nextOffset = next - lines[last].length;
  3459. } else {
  3460. nextLine = line;
  3461. nextOffset = offset;
  3462. }
  3463. tokenType = t.comment;
  3464. line = nextLine;
  3465. endLine = nextLine;
  3466. endColumn = next - nextOffset;
  3467. } else if (code === t.slash) {
  3468. next = start;
  3469. tokenType = code;
  3470. endLine = line;
  3471. endColumn = start - offset;
  3472. end = next + 1;
  3473. } else {
  3474. next = consumeWord(css, start);
  3475. tokenType = t.word;
  3476. endLine = line;
  3477. endColumn = next - offset;
  3478. }
  3479. end = next + 1;
  3480. break;
  3481. }
  3482. tokens$1.push([
  3483. tokenType,
  3484. line,
  3485. start - offset,
  3486. endLine,
  3487. endColumn,
  3488. start,
  3489. end
  3490. ]);
  3491. if (nextOffset) {
  3492. offset = nextOffset;
  3493. nextOffset = null;
  3494. }
  3495. start = end;
  3496. }
  3497. return tokens$1;
  3498. }
  3499. }) });
  3500. //#endregion
  3501. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/parser.js
  3502. var require_parser = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/parser.js": ((exports, module) => {
  3503. exports.__esModule = true;
  3504. exports["default"] = void 0;
  3505. var _root$1 = _interopRequireDefault$5(require_root());
  3506. var _selector$1 = _interopRequireDefault$5(require_selector());
  3507. var _className$1 = _interopRequireDefault$5(require_className());
  3508. var _comment$1 = _interopRequireDefault$5(require_comment());
  3509. var _id$1 = _interopRequireDefault$5(require_id());
  3510. var _tag$1 = _interopRequireDefault$5(require_tag());
  3511. var _string$1 = _interopRequireDefault$5(require_string());
  3512. var _pseudo$1 = _interopRequireDefault$5(require_pseudo());
  3513. var _attribute$1 = _interopRequireWildcard$1(require_attribute());
  3514. var _universal$1 = _interopRequireDefault$5(require_universal());
  3515. var _combinator$1 = _interopRequireDefault$5(require_combinator());
  3516. var _nesting$1 = _interopRequireDefault$5(require_nesting());
  3517. var _sortAscending = _interopRequireDefault$5(require_sortAscending());
  3518. var _tokenize = _interopRequireWildcard$1(require_tokenize());
  3519. var tokens = _interopRequireWildcard$1(require_tokenTypes());
  3520. var types = _interopRequireWildcard$1(require_types());
  3521. var _util = require_util();
  3522. var _WHITESPACE_TOKENS, _Object$assign;
  3523. function _getRequireWildcardCache$1(nodeInterop) {
  3524. if (typeof WeakMap !== "function") return null;
  3525. var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
  3526. var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
  3527. return (_getRequireWildcardCache$1 = function _getRequireWildcardCache$4(nodeInterop$1) {
  3528. return nodeInterop$1 ? cacheNodeInterop : cacheBabelInterop;
  3529. })(nodeInterop);
  3530. }
  3531. function _interopRequireWildcard$1(obj, nodeInterop) {
  3532. if (!nodeInterop && obj && obj.__esModule) return obj;
  3533. if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { "default": obj };
  3534. var cache = _getRequireWildcardCache$1(nodeInterop);
  3535. if (cache && cache.has(obj)) return cache.get(obj);
  3536. var newObj = {};
  3537. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  3538. for (var key in obj) if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
  3539. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  3540. if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
  3541. else newObj[key] = obj[key];
  3542. }
  3543. newObj["default"] = obj;
  3544. if (cache) cache.set(obj, newObj);
  3545. return newObj;
  3546. }
  3547. function _interopRequireDefault$5(obj) {
  3548. return obj && obj.__esModule ? obj : { "default": obj };
  3549. }
  3550. function _defineProperties(target, props) {
  3551. for (var i$1 = 0; i$1 < props.length; i$1++) {
  3552. var descriptor = props[i$1];
  3553. descriptor.enumerable = descriptor.enumerable || false;
  3554. descriptor.configurable = true;
  3555. if ("value" in descriptor) descriptor.writable = true;
  3556. Object.defineProperty(target, descriptor.key, descriptor);
  3557. }
  3558. }
  3559. function _createClass(Constructor, protoProps, staticProps) {
  3560. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  3561. if (staticProps) _defineProperties(Constructor, staticProps);
  3562. Object.defineProperty(Constructor, "prototype", { writable: false });
  3563. return Constructor;
  3564. }
  3565. var WHITESPACE_TOKENS = (_WHITESPACE_TOKENS = {}, _WHITESPACE_TOKENS[tokens.space] = true, _WHITESPACE_TOKENS[tokens.cr] = true, _WHITESPACE_TOKENS[tokens.feed] = true, _WHITESPACE_TOKENS[tokens.newline] = true, _WHITESPACE_TOKENS[tokens.tab] = true, _WHITESPACE_TOKENS);
  3566. var WHITESPACE_EQUIV_TOKENS = Object.assign({}, WHITESPACE_TOKENS, (_Object$assign = {}, _Object$assign[tokens.comment] = true, _Object$assign));
  3567. function tokenStart(token) {
  3568. return {
  3569. line: token[_tokenize.FIELDS.START_LINE],
  3570. column: token[_tokenize.FIELDS.START_COL]
  3571. };
  3572. }
  3573. function tokenEnd(token) {
  3574. return {
  3575. line: token[_tokenize.FIELDS.END_LINE],
  3576. column: token[_tokenize.FIELDS.END_COL]
  3577. };
  3578. }
  3579. function getSource(startLine, startColumn, endLine, endColumn) {
  3580. return {
  3581. start: {
  3582. line: startLine,
  3583. column: startColumn
  3584. },
  3585. end: {
  3586. line: endLine,
  3587. column: endColumn
  3588. }
  3589. };
  3590. }
  3591. function getTokenSource(token) {
  3592. return getSource(token[_tokenize.FIELDS.START_LINE], token[_tokenize.FIELDS.START_COL], token[_tokenize.FIELDS.END_LINE], token[_tokenize.FIELDS.END_COL]);
  3593. }
  3594. function getTokenSourceSpan(startToken, endToken) {
  3595. if (!startToken) return;
  3596. return getSource(startToken[_tokenize.FIELDS.START_LINE], startToken[_tokenize.FIELDS.START_COL], endToken[_tokenize.FIELDS.END_LINE], endToken[_tokenize.FIELDS.END_COL]);
  3597. }
  3598. function unescapeProp(node, prop) {
  3599. var value = node[prop];
  3600. if (typeof value !== "string") return;
  3601. if (value.indexOf("\\") !== -1) {
  3602. (0, _util.ensureObject)(node, "raws");
  3603. node[prop] = (0, _util.unesc)(value);
  3604. if (node.raws[prop] === void 0) node.raws[prop] = value;
  3605. }
  3606. return node;
  3607. }
  3608. function indexesOf(array, item) {
  3609. var i$1 = -1;
  3610. var indexes = [];
  3611. while ((i$1 = array.indexOf(item, i$1 + 1)) !== -1) indexes.push(i$1);
  3612. return indexes;
  3613. }
  3614. function uniqs() {
  3615. var list = Array.prototype.concat.apply([], arguments);
  3616. return list.filter(function(item, i$1) {
  3617. return i$1 === list.indexOf(item);
  3618. });
  3619. }
  3620. var Parser = /* @__PURE__ */ function() {
  3621. function Parser$2(rule, options) {
  3622. if (options === void 0) options = {};
  3623. this.rule = rule;
  3624. this.options = Object.assign({
  3625. lossy: false,
  3626. safe: false
  3627. }, options);
  3628. this.position = 0;
  3629. this.css = typeof this.rule === "string" ? this.rule : this.rule.selector;
  3630. this.tokens = (0, _tokenize["default"])({
  3631. css: this.css,
  3632. error: this._errorGenerator(),
  3633. safe: this.options.safe
  3634. });
  3635. var rootSource = getTokenSourceSpan(this.tokens[0], this.tokens[this.tokens.length - 1]);
  3636. this.root = new _root$1["default"]({ source: rootSource });
  3637. this.root.errorGenerator = this._errorGenerator();
  3638. var selector$1 = new _selector$1["default"]({
  3639. source: { start: {
  3640. line: 1,
  3641. column: 1
  3642. } },
  3643. sourceIndex: 0
  3644. });
  3645. this.root.append(selector$1);
  3646. this.current = selector$1;
  3647. this.loop();
  3648. }
  3649. var _proto = Parser$2.prototype;
  3650. _proto._errorGenerator = function _errorGenerator() {
  3651. var _this = this;
  3652. return function(message, errorOptions) {
  3653. if (typeof _this.rule === "string") return new Error(message);
  3654. return _this.rule.error(message, errorOptions);
  3655. };
  3656. };
  3657. _proto.attribute = function attribute$1() {
  3658. var attr = [];
  3659. var startingToken = this.currToken;
  3660. this.position++;
  3661. while (this.position < this.tokens.length && this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) {
  3662. attr.push(this.currToken);
  3663. this.position++;
  3664. }
  3665. if (this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) return this.expected("closing square bracket", this.currToken[_tokenize.FIELDS.START_POS]);
  3666. var len = attr.length;
  3667. var node = {
  3668. source: getSource(startingToken[1], startingToken[2], this.currToken[3], this.currToken[4]),
  3669. sourceIndex: startingToken[_tokenize.FIELDS.START_POS]
  3670. };
  3671. if (len === 1 && !~[tokens.word].indexOf(attr[0][_tokenize.FIELDS.TYPE])) return this.expected("attribute", attr[0][_tokenize.FIELDS.START_POS]);
  3672. var pos = 0;
  3673. var spaceBefore = "";
  3674. var commentBefore = "";
  3675. var lastAdded = null;
  3676. var spaceAfterMeaningfulToken = false;
  3677. while (pos < len) {
  3678. var token = attr[pos];
  3679. var content = this.content(token);
  3680. var next = attr[pos + 1];
  3681. switch (token[_tokenize.FIELDS.TYPE]) {
  3682. case tokens.space:
  3683. spaceAfterMeaningfulToken = true;
  3684. if (this.options.lossy) break;
  3685. if (lastAdded) {
  3686. (0, _util.ensureObject)(node, "spaces", lastAdded);
  3687. var prevContent = node.spaces[lastAdded].after || "";
  3688. node.spaces[lastAdded].after = prevContent + content;
  3689. var existingComment = (0, _util.getProp)(node, "raws", "spaces", lastAdded, "after") || null;
  3690. if (existingComment) node.raws.spaces[lastAdded].after = existingComment + content;
  3691. } else {
  3692. spaceBefore = spaceBefore + content;
  3693. commentBefore = commentBefore + content;
  3694. }
  3695. break;
  3696. case tokens.asterisk:
  3697. if (next[_tokenize.FIELDS.TYPE] === tokens.equals) {
  3698. node.operator = content;
  3699. lastAdded = "operator";
  3700. } else if ((!node.namespace || lastAdded === "namespace" && !spaceAfterMeaningfulToken) && next) {
  3701. if (spaceBefore) {
  3702. (0, _util.ensureObject)(node, "spaces", "attribute");
  3703. node.spaces.attribute.before = spaceBefore;
  3704. spaceBefore = "";
  3705. }
  3706. if (commentBefore) {
  3707. (0, _util.ensureObject)(node, "raws", "spaces", "attribute");
  3708. node.raws.spaces.attribute.before = spaceBefore;
  3709. commentBefore = "";
  3710. }
  3711. node.namespace = (node.namespace || "") + content;
  3712. if ((0, _util.getProp)(node, "raws", "namespace") || null) node.raws.namespace += content;
  3713. lastAdded = "namespace";
  3714. }
  3715. spaceAfterMeaningfulToken = false;
  3716. break;
  3717. case tokens.dollar: if (lastAdded === "value") {
  3718. var oldRawValue = (0, _util.getProp)(node, "raws", "value");
  3719. node.value += "$";
  3720. if (oldRawValue) node.raws.value = oldRawValue + "$";
  3721. break;
  3722. }
  3723. case tokens.caret:
  3724. if (next[_tokenize.FIELDS.TYPE] === tokens.equals) {
  3725. node.operator = content;
  3726. lastAdded = "operator";
  3727. }
  3728. spaceAfterMeaningfulToken = false;
  3729. break;
  3730. case tokens.combinator:
  3731. if (content === "~" && next[_tokenize.FIELDS.TYPE] === tokens.equals) {
  3732. node.operator = content;
  3733. lastAdded = "operator";
  3734. }
  3735. if (content !== "|") {
  3736. spaceAfterMeaningfulToken = false;
  3737. break;
  3738. }
  3739. if (next[_tokenize.FIELDS.TYPE] === tokens.equals) {
  3740. node.operator = content;
  3741. lastAdded = "operator";
  3742. } else if (!node.namespace && !node.attribute) node.namespace = true;
  3743. spaceAfterMeaningfulToken = false;
  3744. break;
  3745. case tokens.word:
  3746. if (next && this.content(next) === "|" && attr[pos + 2] && attr[pos + 2][_tokenize.FIELDS.TYPE] !== tokens.equals && !node.operator && !node.namespace) {
  3747. node.namespace = content;
  3748. lastAdded = "namespace";
  3749. } else if (!node.attribute || lastAdded === "attribute" && !spaceAfterMeaningfulToken) {
  3750. if (spaceBefore) {
  3751. (0, _util.ensureObject)(node, "spaces", "attribute");
  3752. node.spaces.attribute.before = spaceBefore;
  3753. spaceBefore = "";
  3754. }
  3755. if (commentBefore) {
  3756. (0, _util.ensureObject)(node, "raws", "spaces", "attribute");
  3757. node.raws.spaces.attribute.before = commentBefore;
  3758. commentBefore = "";
  3759. }
  3760. node.attribute = (node.attribute || "") + content;
  3761. if ((0, _util.getProp)(node, "raws", "attribute") || null) node.raws.attribute += content;
  3762. lastAdded = "attribute";
  3763. } else if (!node.value && node.value !== "" || lastAdded === "value" && !(spaceAfterMeaningfulToken || node.quoteMark)) {
  3764. var _unescaped = (0, _util.unesc)(content);
  3765. var _oldRawValue = (0, _util.getProp)(node, "raws", "value") || "";
  3766. var oldValue = node.value || "";
  3767. node.value = oldValue + _unescaped;
  3768. node.quoteMark = null;
  3769. if (_unescaped !== content || _oldRawValue) {
  3770. (0, _util.ensureObject)(node, "raws");
  3771. node.raws.value = (_oldRawValue || oldValue) + content;
  3772. }
  3773. lastAdded = "value";
  3774. } else {
  3775. var insensitive = content === "i" || content === "I";
  3776. if ((node.value || node.value === "") && (node.quoteMark || spaceAfterMeaningfulToken)) {
  3777. node.insensitive = insensitive;
  3778. if (!insensitive || content === "I") {
  3779. (0, _util.ensureObject)(node, "raws");
  3780. node.raws.insensitiveFlag = content;
  3781. }
  3782. lastAdded = "insensitive";
  3783. if (spaceBefore) {
  3784. (0, _util.ensureObject)(node, "spaces", "insensitive");
  3785. node.spaces.insensitive.before = spaceBefore;
  3786. spaceBefore = "";
  3787. }
  3788. if (commentBefore) {
  3789. (0, _util.ensureObject)(node, "raws", "spaces", "insensitive");
  3790. node.raws.spaces.insensitive.before = commentBefore;
  3791. commentBefore = "";
  3792. }
  3793. } else if (node.value || node.value === "") {
  3794. lastAdded = "value";
  3795. node.value += content;
  3796. if (node.raws.value) node.raws.value += content;
  3797. }
  3798. }
  3799. spaceAfterMeaningfulToken = false;
  3800. break;
  3801. case tokens.str:
  3802. if (!node.attribute || !node.operator) return this.error("Expected an attribute followed by an operator preceding the string.", { index: token[_tokenize.FIELDS.START_POS] });
  3803. var _unescapeValue = (0, _attribute$1.unescapeValue)(content), unescaped = _unescapeValue.unescaped, quoteMark = _unescapeValue.quoteMark;
  3804. node.value = unescaped;
  3805. node.quoteMark = quoteMark;
  3806. lastAdded = "value";
  3807. (0, _util.ensureObject)(node, "raws");
  3808. node.raws.value = content;
  3809. spaceAfterMeaningfulToken = false;
  3810. break;
  3811. case tokens.equals:
  3812. if (!node.attribute) return this.expected("attribute", token[_tokenize.FIELDS.START_POS], content);
  3813. if (node.value) return this.error("Unexpected \"=\" found; an operator was already defined.", { index: token[_tokenize.FIELDS.START_POS] });
  3814. node.operator = node.operator ? node.operator + content : content;
  3815. lastAdded = "operator";
  3816. spaceAfterMeaningfulToken = false;
  3817. break;
  3818. case tokens.comment:
  3819. if (lastAdded) if (spaceAfterMeaningfulToken || next && next[_tokenize.FIELDS.TYPE] === tokens.space || lastAdded === "insensitive") {
  3820. var lastComment = (0, _util.getProp)(node, "spaces", lastAdded, "after") || "";
  3821. var rawLastComment = (0, _util.getProp)(node, "raws", "spaces", lastAdded, "after") || lastComment;
  3822. (0, _util.ensureObject)(node, "raws", "spaces", lastAdded);
  3823. node.raws.spaces[lastAdded].after = rawLastComment + content;
  3824. } else {
  3825. var lastValue = node[lastAdded] || "";
  3826. var rawLastValue = (0, _util.getProp)(node, "raws", lastAdded) || lastValue;
  3827. (0, _util.ensureObject)(node, "raws");
  3828. node.raws[lastAdded] = rawLastValue + content;
  3829. }
  3830. else commentBefore = commentBefore + content;
  3831. break;
  3832. default: return this.error("Unexpected \"" + content + "\" found.", { index: token[_tokenize.FIELDS.START_POS] });
  3833. }
  3834. pos++;
  3835. }
  3836. unescapeProp(node, "attribute");
  3837. unescapeProp(node, "namespace");
  3838. this.newNode(new _attribute$1["default"](node));
  3839. this.position++;
  3840. };
  3841. _proto.parseWhitespaceEquivalentTokens = function parseWhitespaceEquivalentTokens(stopPosition) {
  3842. if (stopPosition < 0) stopPosition = this.tokens.length;
  3843. var startPosition = this.position;
  3844. var nodes = [];
  3845. var space$1 = "";
  3846. var lastComment = void 0;
  3847. do
  3848. if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) {
  3849. if (!this.options.lossy) space$1 += this.content();
  3850. } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.comment) {
  3851. var spaces = {};
  3852. if (space$1) {
  3853. spaces.before = space$1;
  3854. space$1 = "";
  3855. }
  3856. lastComment = new _comment$1["default"]({
  3857. value: this.content(),
  3858. source: getTokenSource(this.currToken),
  3859. sourceIndex: this.currToken[_tokenize.FIELDS.START_POS],
  3860. spaces
  3861. });
  3862. nodes.push(lastComment);
  3863. }
  3864. while (++this.position < stopPosition);
  3865. if (space$1) {
  3866. if (lastComment) lastComment.spaces.after = space$1;
  3867. else if (!this.options.lossy) {
  3868. var firstToken = this.tokens[startPosition];
  3869. var lastToken = this.tokens[this.position - 1];
  3870. nodes.push(new _string$1["default"]({
  3871. value: "",
  3872. source: getSource(firstToken[_tokenize.FIELDS.START_LINE], firstToken[_tokenize.FIELDS.START_COL], lastToken[_tokenize.FIELDS.END_LINE], lastToken[_tokenize.FIELDS.END_COL]),
  3873. sourceIndex: firstToken[_tokenize.FIELDS.START_POS],
  3874. spaces: {
  3875. before: space$1,
  3876. after: ""
  3877. }
  3878. }));
  3879. }
  3880. }
  3881. return nodes;
  3882. };
  3883. _proto.convertWhitespaceNodesToSpace = function convertWhitespaceNodesToSpace(nodes, requiredSpace) {
  3884. var _this2 = this;
  3885. if (requiredSpace === void 0) requiredSpace = false;
  3886. var space$1 = "";
  3887. var rawSpace = "";
  3888. nodes.forEach(function(n) {
  3889. var spaceBefore = _this2.lossySpace(n.spaces.before, requiredSpace);
  3890. var rawSpaceBefore = _this2.lossySpace(n.rawSpaceBefore, requiredSpace);
  3891. space$1 += spaceBefore + _this2.lossySpace(n.spaces.after, requiredSpace && spaceBefore.length === 0);
  3892. rawSpace += spaceBefore + n.value + _this2.lossySpace(n.rawSpaceAfter, requiredSpace && rawSpaceBefore.length === 0);
  3893. });
  3894. if (rawSpace === space$1) rawSpace = void 0;
  3895. return {
  3896. space: space$1,
  3897. rawSpace
  3898. };
  3899. };
  3900. _proto.isNamedCombinator = function isNamedCombinator(position) {
  3901. if (position === void 0) position = this.position;
  3902. return this.tokens[position + 0] && this.tokens[position + 0][_tokenize.FIELDS.TYPE] === tokens.slash && this.tokens[position + 1] && this.tokens[position + 1][_tokenize.FIELDS.TYPE] === tokens.word && this.tokens[position + 2] && this.tokens[position + 2][_tokenize.FIELDS.TYPE] === tokens.slash;
  3903. };
  3904. _proto.namedCombinator = function namedCombinator() {
  3905. if (this.isNamedCombinator()) {
  3906. var nameRaw = this.content(this.tokens[this.position + 1]);
  3907. var name = (0, _util.unesc)(nameRaw).toLowerCase();
  3908. var raws = {};
  3909. if (name !== nameRaw) raws.value = "/" + nameRaw + "/";
  3910. var node = new _combinator$1["default"]({
  3911. value: "/" + name + "/",
  3912. source: getSource(this.currToken[_tokenize.FIELDS.START_LINE], this.currToken[_tokenize.FIELDS.START_COL], this.tokens[this.position + 2][_tokenize.FIELDS.END_LINE], this.tokens[this.position + 2][_tokenize.FIELDS.END_COL]),
  3913. sourceIndex: this.currToken[_tokenize.FIELDS.START_POS],
  3914. raws
  3915. });
  3916. this.position = this.position + 3;
  3917. return node;
  3918. } else this.unexpected();
  3919. };
  3920. _proto.combinator = function combinator$2() {
  3921. var _this3 = this;
  3922. if (this.content() === "|") return this.namespace();
  3923. var nextSigTokenPos = this.locateNextMeaningfulToken(this.position);
  3924. if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.comma || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) {
  3925. var nodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos);
  3926. if (nodes.length > 0) {
  3927. var last = this.current.last;
  3928. if (last) {
  3929. var _this$convertWhitespa = this.convertWhitespaceNodesToSpace(nodes), space$1 = _this$convertWhitespa.space, rawSpace = _this$convertWhitespa.rawSpace;
  3930. if (rawSpace !== void 0) last.rawSpaceAfter += rawSpace;
  3931. last.spaces.after += space$1;
  3932. } else nodes.forEach(function(n) {
  3933. return _this3.newNode(n);
  3934. });
  3935. }
  3936. return;
  3937. }
  3938. var firstToken = this.currToken;
  3939. var spaceOrDescendantSelectorNodes = void 0;
  3940. if (nextSigTokenPos > this.position) spaceOrDescendantSelectorNodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos);
  3941. var node;
  3942. if (this.isNamedCombinator()) node = this.namedCombinator();
  3943. else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.combinator) {
  3944. node = new _combinator$1["default"]({
  3945. value: this.content(),
  3946. source: getTokenSource(this.currToken),
  3947. sourceIndex: this.currToken[_tokenize.FIELDS.START_POS]
  3948. });
  3949. this.position++;
  3950. } else if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) {} else if (!spaceOrDescendantSelectorNodes) this.unexpected();
  3951. if (node) {
  3952. if (spaceOrDescendantSelectorNodes) {
  3953. var _this$convertWhitespa2 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes), _space = _this$convertWhitespa2.space, _rawSpace = _this$convertWhitespa2.rawSpace;
  3954. node.spaces.before = _space;
  3955. node.rawSpaceBefore = _rawSpace;
  3956. }
  3957. } else {
  3958. var _this$convertWhitespa3 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes, true), _space2 = _this$convertWhitespa3.space, _rawSpace2 = _this$convertWhitespa3.rawSpace;
  3959. if (!_rawSpace2) _rawSpace2 = _space2;
  3960. var spaces = {};
  3961. var raws = { spaces: {} };
  3962. if (_space2.endsWith(" ") && _rawSpace2.endsWith(" ")) {
  3963. spaces.before = _space2.slice(0, _space2.length - 1);
  3964. raws.spaces.before = _rawSpace2.slice(0, _rawSpace2.length - 1);
  3965. } else if (_space2.startsWith(" ") && _rawSpace2.startsWith(" ")) {
  3966. spaces.after = _space2.slice(1);
  3967. raws.spaces.after = _rawSpace2.slice(1);
  3968. } else raws.value = _rawSpace2;
  3969. node = new _combinator$1["default"]({
  3970. value: " ",
  3971. source: getTokenSourceSpan(firstToken, this.tokens[this.position - 1]),
  3972. sourceIndex: firstToken[_tokenize.FIELDS.START_POS],
  3973. spaces,
  3974. raws
  3975. });
  3976. }
  3977. if (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.space) {
  3978. node.spaces.after = this.optionalSpace(this.content());
  3979. this.position++;
  3980. }
  3981. return this.newNode(node);
  3982. };
  3983. _proto.comma = function comma$1() {
  3984. if (this.position === this.tokens.length - 1) {
  3985. this.root.trailingComma = true;
  3986. this.position++;
  3987. return;
  3988. }
  3989. this.current._inferEndPosition();
  3990. var selector$1 = new _selector$1["default"]({
  3991. source: { start: tokenStart(this.tokens[this.position + 1]) },
  3992. sourceIndex: this.tokens[this.position + 1][_tokenize.FIELDS.START_POS]
  3993. });
  3994. this.current.parent.append(selector$1);
  3995. this.current = selector$1;
  3996. this.position++;
  3997. };
  3998. _proto.comment = function comment$2() {
  3999. var current = this.currToken;
  4000. this.newNode(new _comment$1["default"]({
  4001. value: this.content(),
  4002. source: getTokenSource(current),
  4003. sourceIndex: current[_tokenize.FIELDS.START_POS]
  4004. }));
  4005. this.position++;
  4006. };
  4007. _proto.error = function error(message, opts) {
  4008. throw this.root.error(message, opts);
  4009. };
  4010. _proto.missingBackslash = function missingBackslash() {
  4011. return this.error("Expected a backslash preceding the semicolon.", { index: this.currToken[_tokenize.FIELDS.START_POS] });
  4012. };
  4013. _proto.missingParenthesis = function missingParenthesis() {
  4014. return this.expected("opening parenthesis", this.currToken[_tokenize.FIELDS.START_POS]);
  4015. };
  4016. _proto.missingSquareBracket = function missingSquareBracket() {
  4017. return this.expected("opening square bracket", this.currToken[_tokenize.FIELDS.START_POS]);
  4018. };
  4019. _proto.unexpected = function unexpected() {
  4020. return this.error("Unexpected '" + this.content() + "'. Escaping special characters with \\ may help.", this.currToken[_tokenize.FIELDS.START_POS]);
  4021. };
  4022. _proto.unexpectedPipe = function unexpectedPipe() {
  4023. return this.error("Unexpected '|'.", this.currToken[_tokenize.FIELDS.START_POS]);
  4024. };
  4025. _proto.namespace = function namespace() {
  4026. var before = this.prevToken && this.content(this.prevToken) || true;
  4027. if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.word) {
  4028. this.position++;
  4029. return this.word(before);
  4030. } else if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.asterisk) {
  4031. this.position++;
  4032. return this.universal(before);
  4033. }
  4034. this.unexpectedPipe();
  4035. };
  4036. _proto.nesting = function nesting$1() {
  4037. if (this.nextToken) {
  4038. if (this.content(this.nextToken) === "|") {
  4039. this.position++;
  4040. return;
  4041. }
  4042. }
  4043. var current = this.currToken;
  4044. this.newNode(new _nesting$1["default"]({
  4045. value: this.content(),
  4046. source: getTokenSource(current),
  4047. sourceIndex: current[_tokenize.FIELDS.START_POS]
  4048. }));
  4049. this.position++;
  4050. };
  4051. _proto.parentheses = function parentheses() {
  4052. var last = this.current.last;
  4053. var unbalanced = 1;
  4054. this.position++;
  4055. if (last && last.type === types.PSEUDO) {
  4056. var selector$1 = new _selector$1["default"]({
  4057. source: { start: tokenStart(this.tokens[this.position]) },
  4058. sourceIndex: this.tokens[this.position][_tokenize.FIELDS.START_POS]
  4059. });
  4060. var cache = this.current;
  4061. last.append(selector$1);
  4062. this.current = selector$1;
  4063. while (this.position < this.tokens.length && unbalanced) {
  4064. if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) unbalanced++;
  4065. if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) unbalanced--;
  4066. if (unbalanced) this.parse();
  4067. else {
  4068. this.current.source.end = tokenEnd(this.currToken);
  4069. this.current.parent.source.end = tokenEnd(this.currToken);
  4070. this.position++;
  4071. }
  4072. }
  4073. this.current = cache;
  4074. } else {
  4075. var parenStart = this.currToken;
  4076. var parenValue = "(";
  4077. var parenEnd;
  4078. while (this.position < this.tokens.length && unbalanced) {
  4079. if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) unbalanced++;
  4080. if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) unbalanced--;
  4081. parenEnd = this.currToken;
  4082. parenValue += this.parseParenthesisToken(this.currToken);
  4083. this.position++;
  4084. }
  4085. if (last) last.appendToPropertyAndEscape("value", parenValue, parenValue);
  4086. else this.newNode(new _string$1["default"]({
  4087. value: parenValue,
  4088. source: getSource(parenStart[_tokenize.FIELDS.START_LINE], parenStart[_tokenize.FIELDS.START_COL], parenEnd[_tokenize.FIELDS.END_LINE], parenEnd[_tokenize.FIELDS.END_COL]),
  4089. sourceIndex: parenStart[_tokenize.FIELDS.START_POS]
  4090. }));
  4091. }
  4092. if (unbalanced) return this.expected("closing parenthesis", this.currToken[_tokenize.FIELDS.START_POS]);
  4093. };
  4094. _proto.pseudo = function pseudo$1() {
  4095. var _this4 = this;
  4096. var pseudoStr = "";
  4097. var startingToken = this.currToken;
  4098. while (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.colon) {
  4099. pseudoStr += this.content();
  4100. this.position++;
  4101. }
  4102. if (!this.currToken) return this.expected(["pseudo-class", "pseudo-element"], this.position - 1);
  4103. if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.word) this.splitWord(false, function(first, length) {
  4104. pseudoStr += first;
  4105. _this4.newNode(new _pseudo$1["default"]({
  4106. value: pseudoStr,
  4107. source: getTokenSourceSpan(startingToken, _this4.currToken),
  4108. sourceIndex: startingToken[_tokenize.FIELDS.START_POS]
  4109. }));
  4110. if (length > 1 && _this4.nextToken && _this4.nextToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) _this4.error("Misplaced parenthesis.", { index: _this4.nextToken[_tokenize.FIELDS.START_POS] });
  4111. });
  4112. else return this.expected(["pseudo-class", "pseudo-element"], this.currToken[_tokenize.FIELDS.START_POS]);
  4113. };
  4114. _proto.space = function space$1() {
  4115. var content = this.content();
  4116. if (this.position === 0 || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis || this.current.nodes.every(function(node) {
  4117. return node.type === "comment";
  4118. })) {
  4119. this.spaces = this.optionalSpace(content);
  4120. this.position++;
  4121. } else if (this.position === this.tokens.length - 1 || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) {
  4122. this.current.last.spaces.after = this.optionalSpace(content);
  4123. this.position++;
  4124. } else this.combinator();
  4125. };
  4126. _proto.string = function string$1() {
  4127. var current = this.currToken;
  4128. this.newNode(new _string$1["default"]({
  4129. value: this.content(),
  4130. source: getTokenSource(current),
  4131. sourceIndex: current[_tokenize.FIELDS.START_POS]
  4132. }));
  4133. this.position++;
  4134. };
  4135. _proto.universal = function universal$1(namespace) {
  4136. var nextToken = this.nextToken;
  4137. if (nextToken && this.content(nextToken) === "|") {
  4138. this.position++;
  4139. return this.namespace();
  4140. }
  4141. var current = this.currToken;
  4142. this.newNode(new _universal$1["default"]({
  4143. value: this.content(),
  4144. source: getTokenSource(current),
  4145. sourceIndex: current[_tokenize.FIELDS.START_POS]
  4146. }), namespace);
  4147. this.position++;
  4148. };
  4149. _proto.splitWord = function splitWord(namespace, firstCallback) {
  4150. var _this5 = this;
  4151. var nextToken = this.nextToken;
  4152. var word$1 = this.content();
  4153. while (nextToken && ~[
  4154. tokens.dollar,
  4155. tokens.caret,
  4156. tokens.equals,
  4157. tokens.word
  4158. ].indexOf(nextToken[_tokenize.FIELDS.TYPE])) {
  4159. this.position++;
  4160. var current = this.content();
  4161. word$1 += current;
  4162. if (current.lastIndexOf("\\") === current.length - 1) {
  4163. var next = this.nextToken;
  4164. if (next && next[_tokenize.FIELDS.TYPE] === tokens.space) {
  4165. word$1 += this.requiredSpace(this.content(next));
  4166. this.position++;
  4167. }
  4168. }
  4169. nextToken = this.nextToken;
  4170. }
  4171. var hasClass = indexesOf(word$1, ".").filter(function(i$1) {
  4172. var escapedDot = word$1[i$1 - 1] === "\\";
  4173. var isKeyframesPercent = /^\d+\.\d+%$/.test(word$1);
  4174. return !escapedDot && !isKeyframesPercent;
  4175. });
  4176. var hasId = indexesOf(word$1, "#").filter(function(i$1) {
  4177. return word$1[i$1 - 1] !== "\\";
  4178. });
  4179. var interpolations = indexesOf(word$1, "#{");
  4180. if (interpolations.length) hasId = hasId.filter(function(hashIndex) {
  4181. return !~interpolations.indexOf(hashIndex);
  4182. });
  4183. var indices = (0, _sortAscending["default"])(uniqs([0].concat(hasClass, hasId)));
  4184. indices.forEach(function(ind, i$1) {
  4185. var index = indices[i$1 + 1] || word$1.length;
  4186. var value = word$1.slice(ind, index);
  4187. if (i$1 === 0 && firstCallback) return firstCallback.call(_this5, value, indices.length);
  4188. var node;
  4189. var current$1 = _this5.currToken;
  4190. var sourceIndex = current$1[_tokenize.FIELDS.START_POS] + indices[i$1];
  4191. var source = getSource(current$1[1], current$1[2] + ind, current$1[3], current$1[2] + (index - 1));
  4192. if (~hasClass.indexOf(ind)) {
  4193. var classNameOpts = {
  4194. value: value.slice(1),
  4195. source,
  4196. sourceIndex
  4197. };
  4198. node = new _className$1["default"](unescapeProp(classNameOpts, "value"));
  4199. } else if (~hasId.indexOf(ind)) {
  4200. var idOpts = {
  4201. value: value.slice(1),
  4202. source,
  4203. sourceIndex
  4204. };
  4205. node = new _id$1["default"](unescapeProp(idOpts, "value"));
  4206. } else {
  4207. var tagOpts = {
  4208. value,
  4209. source,
  4210. sourceIndex
  4211. };
  4212. unescapeProp(tagOpts, "value");
  4213. node = new _tag$1["default"](tagOpts);
  4214. }
  4215. _this5.newNode(node, namespace);
  4216. namespace = null;
  4217. });
  4218. this.position++;
  4219. };
  4220. _proto.word = function word$1(namespace) {
  4221. var nextToken = this.nextToken;
  4222. if (nextToken && this.content(nextToken) === "|") {
  4223. this.position++;
  4224. return this.namespace();
  4225. }
  4226. return this.splitWord(namespace);
  4227. };
  4228. _proto.loop = function loop() {
  4229. while (this.position < this.tokens.length) this.parse(true);
  4230. this.current._inferEndPosition();
  4231. return this.root;
  4232. };
  4233. _proto.parse = function parse(throwOnParenthesis) {
  4234. switch (this.currToken[_tokenize.FIELDS.TYPE]) {
  4235. case tokens.space:
  4236. this.space();
  4237. break;
  4238. case tokens.comment:
  4239. this.comment();
  4240. break;
  4241. case tokens.openParenthesis:
  4242. this.parentheses();
  4243. break;
  4244. case tokens.closeParenthesis:
  4245. if (throwOnParenthesis) this.missingParenthesis();
  4246. break;
  4247. case tokens.openSquare:
  4248. this.attribute();
  4249. break;
  4250. case tokens.dollar:
  4251. case tokens.caret:
  4252. case tokens.equals:
  4253. case tokens.word:
  4254. this.word();
  4255. break;
  4256. case tokens.colon:
  4257. this.pseudo();
  4258. break;
  4259. case tokens.comma:
  4260. this.comma();
  4261. break;
  4262. case tokens.asterisk:
  4263. this.universal();
  4264. break;
  4265. case tokens.ampersand:
  4266. this.nesting();
  4267. break;
  4268. case tokens.slash:
  4269. case tokens.combinator:
  4270. this.combinator();
  4271. break;
  4272. case tokens.str:
  4273. this.string();
  4274. break;
  4275. case tokens.closeSquare: this.missingSquareBracket();
  4276. case tokens.semicolon: this.missingBackslash();
  4277. default: this.unexpected();
  4278. }
  4279. };
  4280. _proto.expected = function expected(description, index, found) {
  4281. if (Array.isArray(description)) {
  4282. var last = description.pop();
  4283. description = description.join(", ") + " or " + last;
  4284. }
  4285. var an = /^[aeiou]/.test(description[0]) ? "an" : "a";
  4286. if (!found) return this.error("Expected " + an + " " + description + ".", { index });
  4287. return this.error("Expected " + an + " " + description + ", found \"" + found + "\" instead.", { index });
  4288. };
  4289. _proto.requiredSpace = function requiredSpace(space$1) {
  4290. return this.options.lossy ? " " : space$1;
  4291. };
  4292. _proto.optionalSpace = function optionalSpace(space$1) {
  4293. return this.options.lossy ? "" : space$1;
  4294. };
  4295. _proto.lossySpace = function lossySpace(space$1, required) {
  4296. if (this.options.lossy) return required ? " " : "";
  4297. else return space$1;
  4298. };
  4299. _proto.parseParenthesisToken = function parseParenthesisToken(token) {
  4300. var content = this.content(token);
  4301. if (token[_tokenize.FIELDS.TYPE] === tokens.space) return this.requiredSpace(content);
  4302. else return content;
  4303. };
  4304. _proto.newNode = function newNode(node, namespace) {
  4305. if (namespace) {
  4306. if (/^ +$/.test(namespace)) {
  4307. if (!this.options.lossy) this.spaces = (this.spaces || "") + namespace;
  4308. namespace = true;
  4309. }
  4310. node.namespace = namespace;
  4311. unescapeProp(node, "namespace");
  4312. }
  4313. if (this.spaces) {
  4314. node.spaces.before = this.spaces;
  4315. this.spaces = "";
  4316. }
  4317. return this.current.append(node);
  4318. };
  4319. _proto.content = function content(token) {
  4320. if (token === void 0) token = this.currToken;
  4321. return this.css.slice(token[_tokenize.FIELDS.START_POS], token[_tokenize.FIELDS.END_POS]);
  4322. };
  4323. /**
  4324. * returns the index of the next non-whitespace, non-comment token.
  4325. * returns -1 if no meaningful token is found.
  4326. */
  4327. _proto.locateNextMeaningfulToken = function locateNextMeaningfulToken(startPosition) {
  4328. if (startPosition === void 0) startPosition = this.position + 1;
  4329. var searchPosition = startPosition;
  4330. while (searchPosition < this.tokens.length) if (WHITESPACE_EQUIV_TOKENS[this.tokens[searchPosition][_tokenize.FIELDS.TYPE]]) {
  4331. searchPosition++;
  4332. continue;
  4333. } else return searchPosition;
  4334. return -1;
  4335. };
  4336. _createClass(Parser$2, [
  4337. {
  4338. key: "currToken",
  4339. get: function get() {
  4340. return this.tokens[this.position];
  4341. }
  4342. },
  4343. {
  4344. key: "nextToken",
  4345. get: function get() {
  4346. return this.tokens[this.position + 1];
  4347. }
  4348. },
  4349. {
  4350. key: "prevToken",
  4351. get: function get() {
  4352. return this.tokens[this.position - 1];
  4353. }
  4354. }
  4355. ]);
  4356. return Parser$2;
  4357. }();
  4358. exports["default"] = Parser;
  4359. module.exports = exports.default;
  4360. }) });
  4361. //#endregion
  4362. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/processor.js
  4363. var require_processor = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/processor.js": ((exports, module) => {
  4364. exports.__esModule = true;
  4365. exports["default"] = void 0;
  4366. var _parser = _interopRequireDefault$4(require_parser());
  4367. function _interopRequireDefault$4(obj) {
  4368. return obj && obj.__esModule ? obj : { "default": obj };
  4369. }
  4370. var Processor = /* @__PURE__ */ function() {
  4371. function Processor$1(func, options) {
  4372. this.func = func || function noop() {};
  4373. this.funcRes = null;
  4374. this.options = options;
  4375. }
  4376. var _proto = Processor$1.prototype;
  4377. _proto._shouldUpdateSelector = function _shouldUpdateSelector(rule, options) {
  4378. if (options === void 0) options = {};
  4379. if (Object.assign({}, this.options, options).updateSelector === false) return false;
  4380. else return typeof rule !== "string";
  4381. };
  4382. _proto._isLossy = function _isLossy(options) {
  4383. if (options === void 0) options = {};
  4384. if (Object.assign({}, this.options, options).lossless === false) return true;
  4385. else return false;
  4386. };
  4387. _proto._root = function _root$2(rule, options) {
  4388. if (options === void 0) options = {};
  4389. return new _parser["default"](rule, this._parseOptions(options)).root;
  4390. };
  4391. _proto._parseOptions = function _parseOptions(options) {
  4392. return { lossy: this._isLossy(options) };
  4393. };
  4394. _proto._run = function _run(rule, options) {
  4395. var _this = this;
  4396. if (options === void 0) options = {};
  4397. return new Promise(function(resolve, reject) {
  4398. try {
  4399. var root$2 = _this._root(rule, options);
  4400. Promise.resolve(_this.func(root$2)).then(function(transform) {
  4401. var string$1 = void 0;
  4402. if (_this._shouldUpdateSelector(rule, options)) {
  4403. string$1 = root$2.toString();
  4404. rule.selector = string$1;
  4405. }
  4406. return {
  4407. transform,
  4408. root: root$2,
  4409. string: string$1
  4410. };
  4411. }).then(resolve, reject);
  4412. } catch (e) {
  4413. reject(e);
  4414. return;
  4415. }
  4416. });
  4417. };
  4418. _proto._runSync = function _runSync(rule, options) {
  4419. if (options === void 0) options = {};
  4420. var root$2 = this._root(rule, options);
  4421. var transform = this.func(root$2);
  4422. if (transform && typeof transform.then === "function") throw new Error("Selector processor returned a promise to a synchronous call.");
  4423. var string$1 = void 0;
  4424. if (options.updateSelector && typeof rule !== "string") {
  4425. string$1 = root$2.toString();
  4426. rule.selector = string$1;
  4427. }
  4428. return {
  4429. transform,
  4430. root: root$2,
  4431. string: string$1
  4432. };
  4433. };
  4434. _proto.ast = function ast(rule, options) {
  4435. return this._run(rule, options).then(function(result) {
  4436. return result.root;
  4437. });
  4438. };
  4439. _proto.astSync = function astSync(rule, options) {
  4440. return this._runSync(rule, options).root;
  4441. };
  4442. _proto.transform = function transform(rule, options) {
  4443. return this._run(rule, options).then(function(result) {
  4444. return result.transform;
  4445. });
  4446. };
  4447. _proto.transformSync = function transformSync(rule, options) {
  4448. return this._runSync(rule, options).transform;
  4449. };
  4450. _proto.process = function process$1(rule, options) {
  4451. return this._run(rule, options).then(function(result) {
  4452. return result.string || result.root.toString();
  4453. });
  4454. };
  4455. _proto.processSync = function processSync(rule, options) {
  4456. var result = this._runSync(rule, options);
  4457. return result.string || result.root.toString();
  4458. };
  4459. return Processor$1;
  4460. }();
  4461. exports["default"] = Processor;
  4462. module.exports = exports.default;
  4463. }) });
  4464. //#endregion
  4465. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/constructors.js
  4466. var require_constructors = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/constructors.js": ((exports) => {
  4467. exports.__esModule = true;
  4468. var _attribute = _interopRequireDefault$3(require_attribute());
  4469. var _className = _interopRequireDefault$3(require_className());
  4470. var _combinator = _interopRequireDefault$3(require_combinator());
  4471. var _comment = _interopRequireDefault$3(require_comment());
  4472. var _id = _interopRequireDefault$3(require_id());
  4473. var _nesting = _interopRequireDefault$3(require_nesting());
  4474. var _pseudo = _interopRequireDefault$3(require_pseudo());
  4475. var _root = _interopRequireDefault$3(require_root());
  4476. var _selector = _interopRequireDefault$3(require_selector());
  4477. var _string = _interopRequireDefault$3(require_string());
  4478. var _tag = _interopRequireDefault$3(require_tag());
  4479. var _universal = _interopRequireDefault$3(require_universal());
  4480. function _interopRequireDefault$3(obj) {
  4481. return obj && obj.__esModule ? obj : { "default": obj };
  4482. }
  4483. var attribute = function attribute$1(opts) {
  4484. return new _attribute["default"](opts);
  4485. };
  4486. exports.attribute = attribute;
  4487. var className = function className$1(opts) {
  4488. return new _className["default"](opts);
  4489. };
  4490. exports.className = className;
  4491. var combinator = function combinator$2(opts) {
  4492. return new _combinator["default"](opts);
  4493. };
  4494. exports.combinator = combinator;
  4495. var comment = function comment$2(opts) {
  4496. return new _comment["default"](opts);
  4497. };
  4498. exports.comment = comment;
  4499. var id = function id$1(opts) {
  4500. return new _id["default"](opts);
  4501. };
  4502. exports.id = id;
  4503. var nesting = function nesting$1(opts) {
  4504. return new _nesting["default"](opts);
  4505. };
  4506. exports.nesting = nesting;
  4507. var pseudo = function pseudo$1(opts) {
  4508. return new _pseudo["default"](opts);
  4509. };
  4510. exports.pseudo = pseudo;
  4511. var root = function root$2(opts) {
  4512. return new _root["default"](opts);
  4513. };
  4514. exports.root = root;
  4515. var selector = function selector$1(opts) {
  4516. return new _selector["default"](opts);
  4517. };
  4518. exports.selector = selector;
  4519. var string = function string$1(opts) {
  4520. return new _string["default"](opts);
  4521. };
  4522. exports.string = string;
  4523. var tag = function tag$1(opts) {
  4524. return new _tag["default"](opts);
  4525. };
  4526. exports.tag = tag;
  4527. var universal = function universal$1(opts) {
  4528. return new _universal["default"](opts);
  4529. };
  4530. exports.universal = universal;
  4531. }) });
  4532. //#endregion
  4533. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/guards.js
  4534. var require_guards = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/guards.js": ((exports) => {
  4535. exports.__esModule = true;
  4536. exports.isContainer = isContainer;
  4537. exports.isNamespace = isNamespace;
  4538. exports.isNode = isNode;
  4539. exports.isPseudoClass = isPseudoClass;
  4540. exports.isPseudoElement = isPseudoElement;
  4541. var _types$1 = require_types();
  4542. var _IS_TYPE;
  4543. var IS_TYPE = (_IS_TYPE = {}, _IS_TYPE[_types$1.ATTRIBUTE] = true, _IS_TYPE[_types$1.CLASS] = true, _IS_TYPE[_types$1.COMBINATOR] = true, _IS_TYPE[_types$1.COMMENT] = true, _IS_TYPE[_types$1.ID] = true, _IS_TYPE[_types$1.NESTING] = true, _IS_TYPE[_types$1.PSEUDO] = true, _IS_TYPE[_types$1.ROOT] = true, _IS_TYPE[_types$1.SELECTOR] = true, _IS_TYPE[_types$1.STRING] = true, _IS_TYPE[_types$1.TAG] = true, _IS_TYPE[_types$1.UNIVERSAL] = true, _IS_TYPE);
  4544. function isNode(node) {
  4545. return typeof node === "object" && IS_TYPE[node.type];
  4546. }
  4547. function isNodeType(type, node) {
  4548. return isNode(node) && node.type === type;
  4549. }
  4550. var isAttribute = isNodeType.bind(null, _types$1.ATTRIBUTE);
  4551. exports.isAttribute = isAttribute;
  4552. var isClassName = isNodeType.bind(null, _types$1.CLASS);
  4553. exports.isClassName = isClassName;
  4554. var isCombinator = isNodeType.bind(null, _types$1.COMBINATOR);
  4555. exports.isCombinator = isCombinator;
  4556. var isComment = isNodeType.bind(null, _types$1.COMMENT);
  4557. exports.isComment = isComment;
  4558. var isIdentifier = isNodeType.bind(null, _types$1.ID);
  4559. exports.isIdentifier = isIdentifier;
  4560. var isNesting = isNodeType.bind(null, _types$1.NESTING);
  4561. exports.isNesting = isNesting;
  4562. var isPseudo = isNodeType.bind(null, _types$1.PSEUDO);
  4563. exports.isPseudo = isPseudo;
  4564. var isRoot = isNodeType.bind(null, _types$1.ROOT);
  4565. exports.isRoot = isRoot;
  4566. var isSelector = isNodeType.bind(null, _types$1.SELECTOR);
  4567. exports.isSelector = isSelector;
  4568. var isString = isNodeType.bind(null, _types$1.STRING);
  4569. exports.isString = isString;
  4570. var isTag = isNodeType.bind(null, _types$1.TAG);
  4571. exports.isTag = isTag;
  4572. var isUniversal = isNodeType.bind(null, _types$1.UNIVERSAL);
  4573. exports.isUniversal = isUniversal;
  4574. function isPseudoElement(node) {
  4575. return isPseudo(node) && node.value && (node.value.startsWith("::") || node.value.toLowerCase() === ":before" || node.value.toLowerCase() === ":after" || node.value.toLowerCase() === ":first-letter" || node.value.toLowerCase() === ":first-line");
  4576. }
  4577. function isPseudoClass(node) {
  4578. return isPseudo(node) && !isPseudoElement(node);
  4579. }
  4580. function isContainer(node) {
  4581. return !!(isNode(node) && node.walk);
  4582. }
  4583. function isNamespace(node) {
  4584. return isAttribute(node) || isTag(node);
  4585. }
  4586. }) });
  4587. //#endregion
  4588. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/index.js
  4589. var require_selectors = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/index.js": ((exports) => {
  4590. exports.__esModule = true;
  4591. var _types = require_types();
  4592. Object.keys(_types).forEach(function(key) {
  4593. if (key === "default" || key === "__esModule") return;
  4594. if (key in exports && exports[key] === _types[key]) return;
  4595. exports[key] = _types[key];
  4596. });
  4597. var _constructors = require_constructors();
  4598. Object.keys(_constructors).forEach(function(key) {
  4599. if (key === "default" || key === "__esModule") return;
  4600. if (key in exports && exports[key] === _constructors[key]) return;
  4601. exports[key] = _constructors[key];
  4602. });
  4603. var _guards = require_guards();
  4604. Object.keys(_guards).forEach(function(key) {
  4605. if (key === "default" || key === "__esModule") return;
  4606. if (key in exports && exports[key] === _guards[key]) return;
  4607. exports[key] = _guards[key];
  4608. });
  4609. }) });
  4610. //#endregion
  4611. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/index.js
  4612. var require_dist = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/index.js": ((exports, module) => {
  4613. exports.__esModule = true;
  4614. exports["default"] = void 0;
  4615. var _processor = _interopRequireDefault$2(require_processor());
  4616. var selectors = _interopRequireWildcard(require_selectors());
  4617. function _getRequireWildcardCache(nodeInterop) {
  4618. if (typeof WeakMap !== "function") return null;
  4619. var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
  4620. var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
  4621. return (_getRequireWildcardCache = function _getRequireWildcardCache$4(nodeInterop$1) {
  4622. return nodeInterop$1 ? cacheNodeInterop : cacheBabelInterop;
  4623. })(nodeInterop);
  4624. }
  4625. function _interopRequireWildcard(obj, nodeInterop) {
  4626. if (!nodeInterop && obj && obj.__esModule) return obj;
  4627. if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { "default": obj };
  4628. var cache = _getRequireWildcardCache(nodeInterop);
  4629. if (cache && cache.has(obj)) return cache.get(obj);
  4630. var newObj = {};
  4631. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  4632. for (var key in obj) if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
  4633. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  4634. if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
  4635. else newObj[key] = obj[key];
  4636. }
  4637. newObj["default"] = obj;
  4638. if (cache) cache.set(obj, newObj);
  4639. return newObj;
  4640. }
  4641. function _interopRequireDefault$2(obj) {
  4642. return obj && obj.__esModule ? obj : { "default": obj };
  4643. }
  4644. var parser = function parser$1(processor) {
  4645. return new _processor["default"](processor);
  4646. };
  4647. Object.assign(parser, selectors);
  4648. var _default = parser;
  4649. exports["default"] = _default;
  4650. module.exports = exports.default;
  4651. }) });
  4652. //#endregion
  4653. //#region ../../node_modules/.pnpm/postcss-modules-local-by-default@4.2.0_postcss@8.5.6/node_modules/postcss-modules-local-by-default/src/index.js
  4654. var require_src$2 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-modules-local-by-default@4.2.0_postcss@8.5.6/node_modules/postcss-modules-local-by-default/src/index.js": ((exports, module) => {
  4655. const selectorParser$1 = require_dist();
  4656. const valueParser = require_lib();
  4657. const { extractICSS } = require_src$4();
  4658. const IGNORE_FILE_MARKER = "cssmodules-pure-no-check";
  4659. const IGNORE_NEXT_LINE_MARKER = "cssmodules-pure-ignore";
  4660. const isSpacing = (node) => node.type === "combinator" && node.value === " ";
  4661. const isPureCheckDisabled = (root$2) => {
  4662. for (const node of root$2.nodes) {
  4663. if (node.type !== "comment") return false;
  4664. if (node.text.trim().startsWith(IGNORE_FILE_MARKER)) return true;
  4665. }
  4666. return false;
  4667. };
  4668. function getIgnoreComment(node) {
  4669. if (!node.parent) return;
  4670. const indexInParent = node.parent.index(node);
  4671. for (let i$1 = indexInParent - 1; i$1 >= 0; i$1--) {
  4672. const prevNode = node.parent.nodes[i$1];
  4673. if (prevNode.type === "comment") {
  4674. if (prevNode.text.trimStart().startsWith(IGNORE_NEXT_LINE_MARKER)) return prevNode;
  4675. } else break;
  4676. }
  4677. }
  4678. function normalizeNodeArray(nodes) {
  4679. const array = [];
  4680. nodes.forEach((x) => {
  4681. if (Array.isArray(x)) normalizeNodeArray(x).forEach((item) => {
  4682. array.push(item);
  4683. });
  4684. else if (x) array.push(x);
  4685. });
  4686. if (array.length > 0 && isSpacing(array[array.length - 1])) array.pop();
  4687. return array;
  4688. }
  4689. const isPureSelectorSymbol = Symbol("is-pure-selector");
  4690. function localizeNode(rule, mode, localAliasMap) {
  4691. const transform = (node, context) => {
  4692. if (context.ignoreNextSpacing && !isSpacing(node)) throw new Error("Missing whitespace after " + context.ignoreNextSpacing);
  4693. if (context.enforceNoSpacing && isSpacing(node)) throw new Error("Missing whitespace before " + context.enforceNoSpacing);
  4694. let newNodes;
  4695. switch (node.type) {
  4696. case "root": {
  4697. let resultingGlobal;
  4698. context.hasPureGlobals = false;
  4699. newNodes = node.nodes.map((n) => {
  4700. const nContext = {
  4701. global: context.global,
  4702. lastWasSpacing: true,
  4703. hasLocals: false,
  4704. explicit: false
  4705. };
  4706. n = transform(n, nContext);
  4707. if (typeof resultingGlobal === "undefined") resultingGlobal = nContext.global;
  4708. else if (resultingGlobal !== nContext.global) throw new Error("Inconsistent rule global/local result in rule \"" + node + "\" (multiple selectors must result in the same mode for the rule)");
  4709. if (!nContext.hasLocals) context.hasPureGlobals = true;
  4710. return n;
  4711. });
  4712. context.global = resultingGlobal;
  4713. node.nodes = normalizeNodeArray(newNodes);
  4714. break;
  4715. }
  4716. case "selector":
  4717. newNodes = node.map((childNode) => transform(childNode, context));
  4718. node = node.clone();
  4719. node.nodes = normalizeNodeArray(newNodes);
  4720. break;
  4721. case "combinator":
  4722. if (isSpacing(node)) {
  4723. if (context.ignoreNextSpacing) {
  4724. context.ignoreNextSpacing = false;
  4725. context.lastWasSpacing = false;
  4726. context.enforceNoSpacing = false;
  4727. return null;
  4728. }
  4729. context.lastWasSpacing = true;
  4730. return node;
  4731. }
  4732. break;
  4733. case "pseudo": {
  4734. let childContext;
  4735. const isNested = !!node.length;
  4736. const isScoped = node.value === ":local" || node.value === ":global";
  4737. if (node.value === ":import" || node.value === ":export") context.hasLocals = true;
  4738. else if (isNested) {
  4739. if (isScoped) {
  4740. if (node.nodes.length === 0) throw new Error(`${node.value}() can't be empty`);
  4741. if (context.inside) throw new Error(`A ${node.value} is not allowed inside of a ${context.inside}(...)`);
  4742. childContext = {
  4743. global: node.value === ":global",
  4744. inside: node.value,
  4745. hasLocals: false,
  4746. explicit: true
  4747. };
  4748. newNodes = node.map((childNode) => transform(childNode, childContext)).reduce((acc, next) => acc.concat(next.nodes), []);
  4749. if (newNodes.length) {
  4750. const { before, after } = node.spaces;
  4751. const first = newNodes[0];
  4752. const last = newNodes[newNodes.length - 1];
  4753. first.spaces = {
  4754. before,
  4755. after: first.spaces.after
  4756. };
  4757. last.spaces = {
  4758. before: last.spaces.before,
  4759. after
  4760. };
  4761. }
  4762. node = newNodes;
  4763. break;
  4764. } else {
  4765. childContext = {
  4766. global: context.global,
  4767. inside: context.inside,
  4768. lastWasSpacing: true,
  4769. hasLocals: false,
  4770. explicit: context.explicit
  4771. };
  4772. newNodes = node.map((childNode) => {
  4773. const newContext = {
  4774. ...childContext,
  4775. enforceNoSpacing: false
  4776. };
  4777. const result = transform(childNode, newContext);
  4778. childContext.global = newContext.global;
  4779. childContext.hasLocals = newContext.hasLocals;
  4780. return result;
  4781. });
  4782. node = node.clone();
  4783. node.nodes = normalizeNodeArray(newNodes);
  4784. if (childContext.hasLocals) context.hasLocals = true;
  4785. }
  4786. break;
  4787. } else if (isScoped) {
  4788. if (context.inside) throw new Error(`A ${node.value} is not allowed inside of a ${context.inside}(...)`);
  4789. const addBackSpacing = !!node.spaces.before;
  4790. context.ignoreNextSpacing = context.lastWasSpacing ? node.value : false;
  4791. context.enforceNoSpacing = context.lastWasSpacing ? false : node.value;
  4792. context.global = node.value === ":global";
  4793. context.explicit = true;
  4794. return addBackSpacing ? selectorParser$1.combinator({ value: " " }) : null;
  4795. }
  4796. break;
  4797. }
  4798. case "id":
  4799. case "class": {
  4800. if (!node.value) throw new Error("Invalid class or id selector syntax");
  4801. if (context.global) break;
  4802. const isImportedValue = localAliasMap.has(node.value);
  4803. if (!isImportedValue || isImportedValue && context.explicit) {
  4804. const innerNode = node.clone();
  4805. innerNode.spaces = {
  4806. before: "",
  4807. after: ""
  4808. };
  4809. node = selectorParser$1.pseudo({
  4810. value: ":local",
  4811. nodes: [innerNode],
  4812. spaces: node.spaces
  4813. });
  4814. context.hasLocals = true;
  4815. }
  4816. break;
  4817. }
  4818. case "nesting": if (node.value === "&") context.hasLocals = rule.parent[isPureSelectorSymbol];
  4819. }
  4820. context.lastWasSpacing = false;
  4821. context.ignoreNextSpacing = false;
  4822. context.enforceNoSpacing = false;
  4823. return node;
  4824. };
  4825. const rootContext = {
  4826. global: mode === "global",
  4827. hasPureGlobals: false
  4828. };
  4829. rootContext.selector = selectorParser$1((root$2) => {
  4830. transform(root$2, rootContext);
  4831. }).processSync(rule, {
  4832. updateSelector: false,
  4833. lossless: true
  4834. });
  4835. return rootContext;
  4836. }
  4837. function localizeDeclNode(node, context) {
  4838. switch (node.type) {
  4839. case "word":
  4840. if (context.localizeNextItem) {
  4841. if (!context.localAliasMap.has(node.value)) {
  4842. node.value = ":local(" + node.value + ")";
  4843. context.localizeNextItem = false;
  4844. }
  4845. }
  4846. break;
  4847. case "function":
  4848. if (context.options && context.options.rewriteUrl && node.value.toLowerCase() === "url") node.nodes.map((nestedNode) => {
  4849. if (nestedNode.type !== "string" && nestedNode.type !== "word") return;
  4850. let newUrl = context.options.rewriteUrl(context.global, nestedNode.value);
  4851. switch (nestedNode.type) {
  4852. case "string":
  4853. if (nestedNode.quote === "'") newUrl = newUrl.replace(/(\\)/g, "\\$1").replace(/'/g, "\\'");
  4854. if (nestedNode.quote === "\"") newUrl = newUrl.replace(/(\\)/g, "\\$1").replace(/"/g, "\\\"");
  4855. break;
  4856. case "word":
  4857. newUrl = newUrl.replace(/("|'|\)|\\)/g, "\\$1");
  4858. break;
  4859. }
  4860. nestedNode.value = newUrl;
  4861. });
  4862. break;
  4863. }
  4864. return node;
  4865. }
  4866. const specialKeywords = [
  4867. "none",
  4868. "inherit",
  4869. "initial",
  4870. "revert",
  4871. "revert-layer",
  4872. "unset"
  4873. ];
  4874. function localizeDeclarationValues(localize, declaration, context) {
  4875. const valueNodes = valueParser(declaration.value);
  4876. valueNodes.walk((node, index, nodes) => {
  4877. if (node.type === "function" && (node.value.toLowerCase() === "var" || node.value.toLowerCase() === "env")) return false;
  4878. if (node.type === "word" && specialKeywords.includes(node.value.toLowerCase())) return;
  4879. nodes[index] = localizeDeclNode(node, {
  4880. options: context.options,
  4881. global: context.global,
  4882. localizeNextItem: localize && !context.global,
  4883. localAliasMap: context.localAliasMap
  4884. });
  4885. });
  4886. declaration.value = valueNodes.toString();
  4887. }
  4888. const validIdent = /^-?([a-z\u0080-\uFFFF_]|(\\[^\r\n\f])|-(?![0-9]))((\\[^\r\n\f])|[a-z\u0080-\uFFFF_0-9-])*$/i;
  4889. const animationKeywords = {
  4890. $normal: 1,
  4891. $reverse: 1,
  4892. $alternate: 1,
  4893. "$alternate-reverse": 1,
  4894. $forwards: 1,
  4895. $backwards: 1,
  4896. $both: 1,
  4897. $infinite: 1,
  4898. $paused: 1,
  4899. $running: 1,
  4900. $ease: 1,
  4901. "$ease-in": 1,
  4902. "$ease-out": 1,
  4903. "$ease-in-out": 1,
  4904. $linear: 1,
  4905. "$step-end": 1,
  4906. "$step-start": 1,
  4907. $none: Infinity,
  4908. $initial: Infinity,
  4909. $inherit: Infinity,
  4910. $unset: Infinity,
  4911. $revert: Infinity,
  4912. "$revert-layer": Infinity
  4913. };
  4914. function localizeDeclaration(declaration, context) {
  4915. if (/animation(-name)?$/i.test(declaration.prop)) {
  4916. let parsedAnimationKeywords = {};
  4917. declaration.value = valueParser(declaration.value).walk((node) => {
  4918. if (node.type === "div") {
  4919. parsedAnimationKeywords = {};
  4920. return;
  4921. } else if (node.type === "function" && node.value.toLowerCase() === "local" && node.nodes.length === 1) {
  4922. node.type = "word";
  4923. node.value = node.nodes[0].value;
  4924. return localizeDeclNode(node, {
  4925. options: context.options,
  4926. global: context.global,
  4927. localizeNextItem: true,
  4928. localAliasMap: context.localAliasMap
  4929. });
  4930. } else if (node.type === "function") {
  4931. if (node.value.toLowerCase() === "global" && node.nodes.length === 1) {
  4932. node.type = "word";
  4933. node.value = node.nodes[0].value;
  4934. }
  4935. return false;
  4936. } else if (node.type !== "word") return;
  4937. const value = node.type === "word" ? node.value.toLowerCase() : null;
  4938. let shouldParseAnimationName = false;
  4939. if (value && validIdent.test(value)) if ("$" + value in animationKeywords) {
  4940. parsedAnimationKeywords["$" + value] = "$" + value in parsedAnimationKeywords ? parsedAnimationKeywords["$" + value] + 1 : 0;
  4941. shouldParseAnimationName = parsedAnimationKeywords["$" + value] >= animationKeywords["$" + value];
  4942. } else shouldParseAnimationName = true;
  4943. return localizeDeclNode(node, {
  4944. options: context.options,
  4945. global: context.global,
  4946. localizeNextItem: shouldParseAnimationName && !context.global,
  4947. localAliasMap: context.localAliasMap
  4948. });
  4949. }).toString();
  4950. return;
  4951. }
  4952. if (/url\(/i.test(declaration.value)) return localizeDeclarationValues(false, declaration, context);
  4953. }
  4954. const isPureSelector = (context, rule) => {
  4955. if (!rule.parent || rule.type === "root") return !context.hasPureGlobals;
  4956. if (rule.type === "rule" && rule[isPureSelectorSymbol]) return rule[isPureSelectorSymbol] || isPureSelector(context, rule.parent);
  4957. return !context.hasPureGlobals || isPureSelector(context, rule.parent);
  4958. };
  4959. const isNodeWithoutDeclarations = (rule) => {
  4960. if (rule.nodes.length > 0) return !rule.nodes.every((item) => item.type === "rule" || item.type === "atrule" && !isNodeWithoutDeclarations(item));
  4961. return true;
  4962. };
  4963. module.exports = (options = {}) => {
  4964. if (options && options.mode && options.mode !== "global" && options.mode !== "local" && options.mode !== "pure") throw new Error("options.mode must be either \"global\", \"local\" or \"pure\" (default \"local\")");
  4965. const pureMode = options && options.mode === "pure";
  4966. const globalMode = options && options.mode === "global";
  4967. return {
  4968. postcssPlugin: "postcss-modules-local-by-default",
  4969. prepare() {
  4970. const localAliasMap = /* @__PURE__ */ new Map();
  4971. return { Once(root$2) {
  4972. const { icssImports } = extractICSS(root$2, false);
  4973. const enforcePureMode = pureMode && !isPureCheckDisabled(root$2);
  4974. Object.keys(icssImports).forEach((key) => {
  4975. Object.keys(icssImports[key]).forEach((prop) => {
  4976. localAliasMap.set(prop, icssImports[key][prop]);
  4977. });
  4978. });
  4979. root$2.walkAtRules((atRule) => {
  4980. if (/keyframes$/i.test(atRule.name)) {
  4981. const globalMatch = /^\s*:global\s*\((.+)\)\s*$/.exec(atRule.params);
  4982. const localMatch = /^\s*:local\s*\((.+)\)\s*$/.exec(atRule.params);
  4983. let globalKeyframes = globalMode;
  4984. if (globalMatch) {
  4985. if (enforcePureMode) {
  4986. const ignoreComment = getIgnoreComment(atRule);
  4987. if (!ignoreComment) throw atRule.error("@keyframes :global(...) is not allowed in pure mode");
  4988. else ignoreComment.remove();
  4989. }
  4990. atRule.params = globalMatch[1];
  4991. globalKeyframes = true;
  4992. } else if (localMatch) {
  4993. atRule.params = localMatch[0];
  4994. globalKeyframes = false;
  4995. } else if (atRule.params && !globalMode && !localAliasMap.has(atRule.params)) atRule.params = ":local(" + atRule.params + ")";
  4996. atRule.walkDecls((declaration) => {
  4997. localizeDeclaration(declaration, {
  4998. localAliasMap,
  4999. options,
  5000. global: globalKeyframes
  5001. });
  5002. });
  5003. } else if (/scope$/i.test(atRule.name)) {
  5004. if (atRule.params) {
  5005. const ignoreComment = pureMode ? getIgnoreComment(atRule) : void 0;
  5006. if (ignoreComment) ignoreComment.remove();
  5007. atRule.params = atRule.params.split("to").map((item) => {
  5008. const selector$1 = item.trim().slice(1, -1).trim();
  5009. const context = localizeNode(selector$1, options.mode, localAliasMap);
  5010. context.options = options;
  5011. context.localAliasMap = localAliasMap;
  5012. if (enforcePureMode && context.hasPureGlobals && !ignoreComment) throw atRule.error("Selector in at-rule\"" + selector$1 + "\" is not pure (pure selectors must contain at least one local class or id)");
  5013. return `(${context.selector})`;
  5014. }).join(" to ");
  5015. }
  5016. atRule.nodes.forEach((declaration) => {
  5017. if (declaration.type === "decl") localizeDeclaration(declaration, {
  5018. localAliasMap,
  5019. options,
  5020. global: globalMode
  5021. });
  5022. });
  5023. } else if (atRule.nodes) atRule.nodes.forEach((declaration) => {
  5024. if (declaration.type === "decl") localizeDeclaration(declaration, {
  5025. localAliasMap,
  5026. options,
  5027. global: globalMode
  5028. });
  5029. });
  5030. });
  5031. root$2.walkRules((rule) => {
  5032. if (rule.parent && rule.parent.type === "atrule" && /keyframes$/i.test(rule.parent.name)) return;
  5033. const context = localizeNode(rule, options.mode, localAliasMap);
  5034. context.options = options;
  5035. context.localAliasMap = localAliasMap;
  5036. const ignoreComment = enforcePureMode ? getIgnoreComment(rule) : void 0;
  5037. const isNotPure = enforcePureMode && !isPureSelector(context, rule);
  5038. if (isNotPure && isNodeWithoutDeclarations(rule) && !ignoreComment) throw rule.error("Selector \"" + rule.selector + "\" is not pure (pure selectors must contain at least one local class or id)");
  5039. else if (ignoreComment) ignoreComment.remove();
  5040. if (pureMode) rule[isPureSelectorSymbol] = !isNotPure;
  5041. rule.selector = context.selector;
  5042. if (rule.nodes) rule.nodes.forEach((declaration) => localizeDeclaration(declaration, context));
  5043. });
  5044. } };
  5045. }
  5046. };
  5047. };
  5048. module.exports.postcss = true;
  5049. }) });
  5050. //#endregion
  5051. //#region ../../node_modules/.pnpm/postcss-modules-scope@3.2.1_postcss@8.5.6/node_modules/postcss-modules-scope/src/index.js
  5052. var require_src$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-modules-scope@3.2.1_postcss@8.5.6/node_modules/postcss-modules-scope/src/index.js": ((exports, module) => {
  5053. const selectorParser = require_dist();
  5054. const hasOwnProperty = Object.prototype.hasOwnProperty;
  5055. function isNestedRule(rule) {
  5056. if (!rule.parent || rule.parent.type === "root") return false;
  5057. if (rule.parent.type === "rule") return true;
  5058. return isNestedRule(rule.parent);
  5059. }
  5060. function getSingleLocalNamesForComposes(root$2, rule) {
  5061. if (isNestedRule(rule)) throw new Error(`composition is not allowed in nested rule \n\n${rule}`);
  5062. return root$2.nodes.map((node) => {
  5063. if (node.type !== "selector" || node.nodes.length !== 1) throw new Error(`composition is only allowed when selector is single :local class name not in "${root$2}"`);
  5064. node = node.nodes[0];
  5065. if (node.type !== "pseudo" || node.value !== ":local" || node.nodes.length !== 1) throw new Error("composition is only allowed when selector is single :local class name not in \"" + root$2 + "\", \"" + node + "\" is weird");
  5066. node = node.first;
  5067. if (node.type !== "selector" || node.length !== 1) throw new Error("composition is only allowed when selector is single :local class name not in \"" + root$2 + "\", \"" + node + "\" is weird");
  5068. node = node.first;
  5069. if (node.type !== "class") throw new Error("composition is only allowed when selector is single :local class name not in \"" + root$2 + "\", \"" + node + "\" is weird");
  5070. return node.value;
  5071. });
  5072. }
  5073. const unescapeRegExp = new RegExp("\\\\([\\da-f]{1,6}[\\x20\\t\\r\\n\\f]?|([\\x20\\t\\r\\n\\f])|.)", "ig");
  5074. function unescape(str$1) {
  5075. return str$1.replace(unescapeRegExp, (_, escaped, escapedWhitespace) => {
  5076. const high = "0x" + escaped - 65536;
  5077. return high !== high || escapedWhitespace ? escaped : high < 0 ? String.fromCharCode(high + 65536) : String.fromCharCode(high >> 10 | 55296, high & 1023 | 56320);
  5078. });
  5079. }
  5080. const plugin = (options = {}) => {
  5081. const generateScopedName = options && options.generateScopedName || plugin.generateScopedName;
  5082. const generateExportEntry = options && options.generateExportEntry || plugin.generateExportEntry;
  5083. const exportGlobals = options && options.exportGlobals;
  5084. return {
  5085. postcssPlugin: "postcss-modules-scope",
  5086. Once(root$2, { rule }) {
  5087. const exports$1 = Object.create(null);
  5088. function exportScopedName(name, rawName, node) {
  5089. const scopedName = generateScopedName(rawName ? rawName : name, root$2.source.input.from, root$2.source.input.css, node);
  5090. const { key, value } = generateExportEntry(rawName ? rawName : name, scopedName, root$2.source.input.from, root$2.source.input.css, node);
  5091. exports$1[key] = exports$1[key] || [];
  5092. if (exports$1[key].indexOf(value) < 0) exports$1[key].push(value);
  5093. return scopedName;
  5094. }
  5095. function localizeNode$1(node) {
  5096. switch (node.type) {
  5097. case "selector":
  5098. node.nodes = node.map((item) => localizeNode$1(item));
  5099. return node;
  5100. case "class": return selectorParser.className({ value: exportScopedName(node.value, node.raws && node.raws.value ? node.raws.value : null, node) });
  5101. case "id": return selectorParser.id({ value: exportScopedName(node.value, node.raws && node.raws.value ? node.raws.value : null, node) });
  5102. case "attribute": if (node.attribute === "class" && node.operator === "=") return selectorParser.attribute({
  5103. attribute: node.attribute,
  5104. operator: node.operator,
  5105. quoteMark: "'",
  5106. value: exportScopedName(node.value, null, null)
  5107. });
  5108. }
  5109. throw new Error(`${node.type} ("${node}") is not allowed in a :local block`);
  5110. }
  5111. function traverseNode(node) {
  5112. switch (node.type) {
  5113. case "pseudo": if (node.value === ":local") {
  5114. if (node.nodes.length !== 1) throw new Error("Unexpected comma (\",\") in :local block");
  5115. const selector$1 = localizeNode$1(node.first);
  5116. selector$1.first.spaces = node.spaces;
  5117. const nextNode = node.next();
  5118. if (nextNode && nextNode.type === "combinator" && nextNode.value === " " && /\\[A-F0-9]{1,6}$/.test(selector$1.last.value)) selector$1.last.spaces.after = " ";
  5119. node.replaceWith(selector$1);
  5120. return;
  5121. }
  5122. case "root":
  5123. case "selector":
  5124. node.each((item) => traverseNode(item));
  5125. break;
  5126. case "id":
  5127. case "class":
  5128. if (exportGlobals) exports$1[node.value] = [node.value];
  5129. break;
  5130. }
  5131. return node;
  5132. }
  5133. const importedNames = {};
  5134. root$2.walkRules(/^:import\(.+\)$/, (rule$1) => {
  5135. rule$1.walkDecls((decl) => {
  5136. importedNames[decl.prop] = true;
  5137. });
  5138. });
  5139. root$2.walkRules((rule$1) => {
  5140. let parsedSelector = selectorParser().astSync(rule$1);
  5141. rule$1.selector = traverseNode(parsedSelector.clone()).toString();
  5142. rule$1.walkDecls(/^(composes|compose-with)$/i, (decl) => {
  5143. const localNames = getSingleLocalNamesForComposes(parsedSelector, decl.parent);
  5144. decl.value.split(",").forEach((value) => {
  5145. value.trim().split(/\s+/).forEach((className$1) => {
  5146. const global$1 = /^global\(([^)]+)\)$/.exec(className$1);
  5147. if (global$1) localNames.forEach((exportedName) => {
  5148. exports$1[exportedName].push(global$1[1]);
  5149. });
  5150. else if (hasOwnProperty.call(importedNames, className$1)) localNames.forEach((exportedName) => {
  5151. exports$1[exportedName].push(className$1);
  5152. });
  5153. else if (hasOwnProperty.call(exports$1, className$1)) localNames.forEach((exportedName) => {
  5154. exports$1[className$1].forEach((item) => {
  5155. exports$1[exportedName].push(item);
  5156. });
  5157. });
  5158. else throw decl.error(`referenced class name "${className$1}" in ${decl.prop} not found`);
  5159. });
  5160. });
  5161. decl.remove();
  5162. });
  5163. rule$1.walkDecls((decl) => {
  5164. if (!/:local\s*\((.+?)\)/.test(decl.value)) return;
  5165. let tokens$1 = decl.value.split(/(,|'[^']*'|"[^"]*")/);
  5166. tokens$1 = tokens$1.map((token, idx) => {
  5167. if (idx === 0 || tokens$1[idx - 1] === ",") {
  5168. let result = token;
  5169. const localMatch = /:local\s*\((.+?)\)/.exec(token);
  5170. if (localMatch) {
  5171. const input = localMatch.input;
  5172. const matchPattern = localMatch[0];
  5173. const matchVal = localMatch[1];
  5174. const newVal = exportScopedName(matchVal);
  5175. result = input.replace(matchPattern, newVal);
  5176. } else return token;
  5177. return result;
  5178. } else return token;
  5179. });
  5180. decl.value = tokens$1.join("");
  5181. });
  5182. });
  5183. root$2.walkAtRules(/keyframes$/i, (atRule) => {
  5184. const localMatch = /^\s*:local\s*\((.+?)\)\s*$/.exec(atRule.params);
  5185. if (!localMatch) return;
  5186. atRule.params = exportScopedName(localMatch[1]);
  5187. });
  5188. root$2.walkAtRules(/scope$/i, (atRule) => {
  5189. if (atRule.params) atRule.params = atRule.params.split("to").map((item) => {
  5190. const selector$1 = item.trim().slice(1, -1).trim();
  5191. if (!/^\s*:local\s*\((.+?)\)\s*$/.exec(selector$1)) return `(${selector$1})`;
  5192. let parsedSelector = selectorParser().astSync(selector$1);
  5193. return `(${traverseNode(parsedSelector).toString()})`;
  5194. }).join(" to ");
  5195. });
  5196. const exportedNames = Object.keys(exports$1);
  5197. if (exportedNames.length > 0) {
  5198. const exportRule = rule({ selector: ":export" });
  5199. exportedNames.forEach((exportedName) => exportRule.append({
  5200. prop: exportedName,
  5201. value: exports$1[exportedName].join(" "),
  5202. raws: { before: "\n " }
  5203. }));
  5204. root$2.append(exportRule);
  5205. }
  5206. }
  5207. };
  5208. };
  5209. plugin.postcss = true;
  5210. plugin.generateScopedName = function(name, path$2) {
  5211. return `_${path$2.replace(/\.[^./\\]+$/, "").replace(/[\W_]+/g, "_").replace(/^_|_$/g, "")}__${name}`.trim();
  5212. };
  5213. plugin.generateExportEntry = function(name, scopedName) {
  5214. return {
  5215. key: unescape(name),
  5216. value: unescape(scopedName)
  5217. };
  5218. };
  5219. module.exports = plugin;
  5220. }) });
  5221. //#endregion
  5222. //#region ../../node_modules/.pnpm/string-hash@1.1.3/node_modules/string-hash/index.js
  5223. var require_string_hash = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/string-hash@1.1.3/node_modules/string-hash/index.js": ((exports, module) => {
  5224. function hash(str$1) {
  5225. var hash$1 = 5381, i$1 = str$1.length;
  5226. while (i$1) hash$1 = hash$1 * 33 ^ str$1.charCodeAt(--i$1);
  5227. return hash$1 >>> 0;
  5228. }
  5229. module.exports = hash;
  5230. }) });
  5231. //#endregion
  5232. //#region ../../node_modules/.pnpm/postcss-modules-values@4.0.0_postcss@8.5.6/node_modules/postcss-modules-values/src/index.js
  5233. var require_src = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-modules-values@4.0.0_postcss@8.5.6/node_modules/postcss-modules-values/src/index.js": ((exports, module) => {
  5234. const ICSSUtils = require_src$4();
  5235. const matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/;
  5236. const matchValueDefinition = /(?:\s+|^)([\w-]+):?(.*?)$/;
  5237. const matchImport = /^([\w-]+)(?:\s+as\s+([\w-]+))?/;
  5238. module.exports = (options) => {
  5239. let importIndex = 0;
  5240. const createImportedName = options && options.createImportedName || ((importName) => `i__const_${importName.replace(/\W/g, "_")}_${importIndex++}`);
  5241. return {
  5242. postcssPlugin: "postcss-modules-values",
  5243. prepare(result) {
  5244. const importAliases = [];
  5245. const definitions = {};
  5246. return { Once(root$2, postcss) {
  5247. root$2.walkAtRules(/value/i, (atRule) => {
  5248. const matches = atRule.params.match(matchImports);
  5249. if (matches) {
  5250. let [, aliases, path$2] = matches;
  5251. if (definitions[path$2]) path$2 = definitions[path$2];
  5252. const imports = aliases.replace(/^\(\s*([\s\S]+)\s*\)$/, "$1").split(/\s*,\s*/).map((alias) => {
  5253. const tokens$1 = matchImport.exec(alias);
  5254. if (tokens$1) {
  5255. const [, theirName, myName = theirName] = tokens$1;
  5256. const importedName = createImportedName(myName);
  5257. definitions[myName] = importedName;
  5258. return {
  5259. theirName,
  5260. importedName
  5261. };
  5262. } else throw new Error(`@import statement "${alias}" is invalid!`);
  5263. });
  5264. importAliases.push({
  5265. path: path$2,
  5266. imports
  5267. });
  5268. atRule.remove();
  5269. return;
  5270. }
  5271. if (atRule.params.indexOf("@value") !== -1) result.warn("Invalid value definition: " + atRule.params);
  5272. let [, key, value] = `${atRule.params}${atRule.raws.between}`.match(matchValueDefinition);
  5273. const normalizedValue = value.replace(/\/\*((?!\*\/).*?)\*\//g, "");
  5274. if (normalizedValue.length === 0) {
  5275. result.warn("Invalid value definition: " + atRule.params);
  5276. atRule.remove();
  5277. return;
  5278. }
  5279. if (!/^\s+$/.test(normalizedValue)) value = value.trim();
  5280. definitions[key] = ICSSUtils.replaceValueSymbols(value, definitions);
  5281. atRule.remove();
  5282. });
  5283. if (!Object.keys(definitions).length) return;
  5284. ICSSUtils.replaceSymbols(root$2, definitions);
  5285. const exportDeclarations = Object.keys(definitions).map((key) => postcss.decl({
  5286. value: definitions[key],
  5287. prop: key,
  5288. raws: { before: "\n " }
  5289. }));
  5290. if (exportDeclarations.length > 0) {
  5291. const exportRule = postcss.rule({
  5292. selector: ":export",
  5293. raws: { after: "\n" }
  5294. });
  5295. exportRule.append(exportDeclarations);
  5296. root$2.prepend(exportRule);
  5297. }
  5298. importAliases.reverse().forEach(({ path: path$2, imports }) => {
  5299. const importRule = postcss.rule({
  5300. selector: `:import(${path$2})`,
  5301. raws: { after: "\n" }
  5302. });
  5303. imports.forEach(({ theirName, importedName }) => {
  5304. importRule.append({
  5305. value: theirName,
  5306. prop: importedName,
  5307. raws: { before: "\n " }
  5308. });
  5309. });
  5310. root$2.prepend(importRule);
  5311. });
  5312. } };
  5313. }
  5314. };
  5315. };
  5316. module.exports.postcss = true;
  5317. }) });
  5318. //#endregion
  5319. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/scoping.js
  5320. var require_scoping = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/scoping.js": ((exports) => {
  5321. Object.defineProperty(exports, "__esModule", { value: true });
  5322. exports.getDefaultPlugins = getDefaultPlugins;
  5323. exports.getDefaultScopeBehaviour = getDefaultScopeBehaviour;
  5324. exports.getScopedNameGenerator = getScopedNameGenerator;
  5325. var _postcssModulesExtractImports = _interopRequireDefault$1(require_src$3());
  5326. var _genericNames = _interopRequireDefault$1(require_generic_names());
  5327. var _postcssModulesLocalByDefault = _interopRequireDefault$1(require_src$2());
  5328. var _postcssModulesScope = _interopRequireDefault$1(require_src$1());
  5329. var _stringHash = _interopRequireDefault$1(require_string_hash());
  5330. var _postcssModulesValues = _interopRequireDefault$1(require_src());
  5331. function _interopRequireDefault$1(obj) {
  5332. return obj && obj.__esModule ? obj : { default: obj };
  5333. }
  5334. const behaviours = {
  5335. LOCAL: "local",
  5336. GLOBAL: "global"
  5337. };
  5338. exports.behaviours = behaviours;
  5339. function getDefaultPlugins({ behaviour, generateScopedName, exportGlobals }) {
  5340. const scope = (0, _postcssModulesScope.default)({
  5341. generateScopedName,
  5342. exportGlobals
  5343. });
  5344. return {
  5345. [behaviours.LOCAL]: [
  5346. _postcssModulesValues.default,
  5347. (0, _postcssModulesLocalByDefault.default)({ mode: "local" }),
  5348. _postcssModulesExtractImports.default,
  5349. scope
  5350. ],
  5351. [behaviours.GLOBAL]: [
  5352. _postcssModulesValues.default,
  5353. (0, _postcssModulesLocalByDefault.default)({ mode: "global" }),
  5354. _postcssModulesExtractImports.default,
  5355. scope
  5356. ]
  5357. }[behaviour];
  5358. }
  5359. function isValidBehaviour(behaviour) {
  5360. return Object.keys(behaviours).map((key) => behaviours[key]).indexOf(behaviour) > -1;
  5361. }
  5362. function getDefaultScopeBehaviour(scopeBehaviour) {
  5363. return scopeBehaviour && isValidBehaviour(scopeBehaviour) ? scopeBehaviour : behaviours.LOCAL;
  5364. }
  5365. function generateScopedNameDefault(name, filename, css) {
  5366. const i$1 = css.indexOf(`.${name}`);
  5367. const lineNumber = css.substr(0, i$1).split(/[\r\n]/).length;
  5368. const hash$1 = (0, _stringHash.default)(css).toString(36).substr(0, 5);
  5369. return `_${name}_${hash$1}_${lineNumber}`;
  5370. }
  5371. function getScopedNameGenerator(generateScopedName, hashPrefix) {
  5372. const scopedNameGenerator = generateScopedName || generateScopedNameDefault;
  5373. if (typeof scopedNameGenerator === "function") return scopedNameGenerator;
  5374. return (0, _genericNames.default)(scopedNameGenerator, {
  5375. context: process.cwd(),
  5376. hashPrefix
  5377. });
  5378. }
  5379. }) });
  5380. //#endregion
  5381. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/pluginFactory.js
  5382. var require_pluginFactory = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/pluginFactory.js": ((exports) => {
  5383. Object.defineProperty(exports, "__esModule", { value: true });
  5384. exports.makePlugin = makePlugin;
  5385. var _postcss = _interopRequireDefault(__require("postcss"));
  5386. var _unquote = _interopRequireDefault(require_unquote());
  5387. var _Parser = _interopRequireDefault(require_Parser());
  5388. var _saveJSON = _interopRequireDefault(require_saveJSON());
  5389. var _localsConvention = require_localsConvention();
  5390. var _FileSystemLoader = _interopRequireDefault(require_FileSystemLoader());
  5391. var _scoping = require_scoping();
  5392. function _interopRequireDefault(obj) {
  5393. return obj && obj.__esModule ? obj : { default: obj };
  5394. }
  5395. const PLUGIN_NAME = "postcss-modules";
  5396. function isGlobalModule(globalModules, inputFile) {
  5397. return globalModules.some((regex) => inputFile.match(regex));
  5398. }
  5399. function getDefaultPluginsList(opts, inputFile) {
  5400. const globalModulesList = opts.globalModulePaths || null;
  5401. const exportGlobals = opts.exportGlobals || false;
  5402. const defaultBehaviour = (0, _scoping.getDefaultScopeBehaviour)(opts.scopeBehaviour);
  5403. const generateScopedName = (0, _scoping.getScopedNameGenerator)(opts.generateScopedName, opts.hashPrefix);
  5404. if (globalModulesList && isGlobalModule(globalModulesList, inputFile)) return (0, _scoping.getDefaultPlugins)({
  5405. behaviour: _scoping.behaviours.GLOBAL,
  5406. generateScopedName,
  5407. exportGlobals
  5408. });
  5409. return (0, _scoping.getDefaultPlugins)({
  5410. behaviour: defaultBehaviour,
  5411. generateScopedName,
  5412. exportGlobals
  5413. });
  5414. }
  5415. function getLoader(opts, plugins) {
  5416. const root$2 = typeof opts.root === "undefined" ? "/" : opts.root;
  5417. return typeof opts.Loader === "function" ? new opts.Loader(root$2, plugins, opts.resolve) : new _FileSystemLoader.default(root$2, plugins, opts.resolve);
  5418. }
  5419. function isOurPlugin(plugin$1) {
  5420. return plugin$1.postcssPlugin === PLUGIN_NAME;
  5421. }
  5422. function makePlugin(opts) {
  5423. return {
  5424. postcssPlugin: PLUGIN_NAME,
  5425. async OnceExit(css, { result }) {
  5426. const getJSON = opts.getJSON || _saveJSON.default;
  5427. const inputFile = css.source.input.file;
  5428. const pluginList = getDefaultPluginsList(opts, inputFile);
  5429. const resultPluginIndex = result.processor.plugins.findIndex((plugin$1) => isOurPlugin(plugin$1));
  5430. if (resultPluginIndex === -1) throw new Error("Plugin missing from options.");
  5431. const loaderPlugins = [...result.processor.plugins.slice(0, resultPluginIndex), ...pluginList];
  5432. const loader = getLoader(opts, loaderPlugins);
  5433. const fetcher = async (file, relativeTo, depTrace) => {
  5434. const unquoteFile = (0, _unquote.default)(file);
  5435. return loader.fetch.call(loader, unquoteFile, relativeTo, depTrace);
  5436. };
  5437. const parser$1 = new _Parser.default(fetcher);
  5438. await (0, _postcss.default)([...pluginList, parser$1.plugin()]).process(css, { from: inputFile });
  5439. const out = loader.finalSource;
  5440. if (out) css.prepend(out);
  5441. if (opts.localsConvention) {
  5442. const reducer = (0, _localsConvention.makeLocalsConventionReducer)(opts.localsConvention, inputFile);
  5443. parser$1.exportTokens = Object.entries(parser$1.exportTokens).reduce(reducer, {});
  5444. }
  5445. result.messages.push({
  5446. type: "export",
  5447. plugin: "postcss-modules",
  5448. exportTokens: parser$1.exportTokens
  5449. });
  5450. return getJSON(css.source.input.file, parser$1.exportTokens, result.opts.to);
  5451. }
  5452. };
  5453. }
  5454. }) });
  5455. //#endregion
  5456. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/index.js
  5457. var require_build = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/index.js": ((exports, module) => {
  5458. var _fs = __require("fs");
  5459. var _fs2 = require_fs();
  5460. var _pluginFactory = require_pluginFactory();
  5461. (0, _fs2.setFileSystem)({
  5462. readFile: _fs.readFile,
  5463. writeFile: _fs.writeFile
  5464. });
  5465. module.exports = (opts = {}) => (0, _pluginFactory.makePlugin)(opts);
  5466. module.exports.postcss = true;
  5467. }) });
  5468. //#endregion
  5469. export default require_build();
  5470. export { };