weapp-tailwindcss 5.0.0-next.25 → 5.0.0-next.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/{auto-B11j1XiD.js → auto-DP-qtQzE.js} +5 -7
  2. package/dist/{auto-AduSz49t.mjs → auto-XyKTOP7B.mjs} +4 -6
  3. package/dist/{bundle-state-CBouNDzi.mjs → bundle-state-7DRnJcJp.mjs} +1 -2
  4. package/dist/{bundle-state-BY7PWHAc.js → bundle-state-Nn90UQDa.js} +3 -4
  5. package/dist/bundlers/vite/index.d.ts +5 -2
  6. package/dist/bundlers/vite/serve-css-generation.d.ts +11 -0
  7. package/dist/bundlers/vite/source-candidates.d.ts +3 -0
  8. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5.d.ts +1 -1
  9. package/dist/cli.js +9 -11
  10. package/dist/cli.mjs +9 -11
  11. package/dist/core.js +1 -2
  12. package/dist/core.mjs +1 -1
  13. package/dist/css-macro/postcss.js +1 -1
  14. package/dist/css-macro/postcss.mjs +1 -1
  15. package/dist/css-macro.js +4 -4
  16. package/dist/css-macro.mjs +3 -3
  17. package/dist/{defaults-B-1EEhdL.mjs → defaults-8xrgzxFY.mjs} +1 -1
  18. package/dist/{defaults-C10hYUch.js → defaults-C5w9OOrj.js} +1 -2
  19. package/dist/defaults.js +1 -1
  20. package/dist/defaults.mjs +1 -1
  21. package/dist/{generator-CtqzN9L-.mjs → generator-CbpjNxJh.mjs} +1 -1
  22. package/dist/{generator-DTPePQZ9.js → generator-DRNbzjx5.js} +2 -2
  23. package/dist/generator.js +2 -3
  24. package/dist/generator.mjs +2 -2
  25. package/dist/gulp.js +6 -6
  26. package/dist/gulp.mjs +5 -5
  27. package/dist/{incremental-runtime-class-set-CERcE0fP.js → incremental-runtime-class-set-BQPhkSov.js} +48 -14
  28. package/dist/{incremental-runtime-class-set-BlJ86j-A.mjs → incremental-runtime-class-set-C4JgSgRY.mjs} +48 -14
  29. package/dist/index.d.ts +1 -1
  30. package/dist/index.js +4 -6
  31. package/dist/index.mjs +5 -5
  32. package/dist/{postcss-BAO9tGi5.js → postcss-Br1eOaFd.js} +3 -3
  33. package/dist/{postcss-DYktK8_T.mjs → postcss-C7BMYpEF.mjs} +4 -4
  34. package/dist/{postcss-DXkxsPNg.js → postcss-CiYLsqZn.js} +4 -4
  35. package/dist/{postcss-CYPHxj7a.mjs → postcss-YetooK6S.mjs} +2 -2
  36. package/dist/postcss-html-transform.js +1 -1
  37. package/dist/postcss.js +1 -1
  38. package/dist/postcss.mjs +1 -1
  39. package/dist/{precheck-ezN3ovAq.js → precheck-B6xigu7s.js} +2005 -13
  40. package/dist/{precheck-B4CpMt_w.mjs → precheck-uG16Cqaj.mjs} +1998 -12
  41. package/dist/presets/index.d.ts +1 -0
  42. package/dist/presets.js +19 -6
  43. package/dist/presets.mjs +17 -6
  44. package/dist/reset.js +1 -1
  45. package/dist/{source-candidates-DoyOltpZ.mjs → source-candidates-CX2ozpKM.mjs} +49 -7
  46. package/dist/{source-candidates-0jPRIPmC.js → source-candidates-DeK5b9i9.js} +50 -8
  47. package/dist/{tailwindcss-ujlr9Iad.mjs → tailwindcss-C7dJHZ0G.mjs} +2 -2
  48. package/dist/{tailwindcss-nQetCaPp.js → tailwindcss-DEEtJf4u.js} +3 -3
  49. package/dist/{utils-CSA174-I.js → utils-nta4tfFs.js} +1 -1
  50. package/dist/{v3-engine-Bbsrez2w.js → v3-engine-B_33V3Lu.js} +12 -4
  51. package/dist/{v3-engine-COw08vWd.mjs → v3-engine-DcvCCHfs.mjs} +11 -3
  52. package/dist/{vite-DE8Vfzal.js → vite-Bg18XZZc.js} +169 -22
  53. package/dist/{vite-hZsQAY1a.mjs → vite-DOmiMftw.mjs} +168 -21
  54. package/dist/vite.js +1 -1
  55. package/dist/vite.mjs +1 -1
  56. package/dist/weapp-tw-css-import-rewrite-loader.js +53 -22
  57. package/dist/weapp-tw-runtime-classset-loader.js +1 -1
  58. package/dist/{webpack-c2WJnCJI.mjs → webpack-BdrjJf41.mjs} +17 -13
  59. package/dist/{webpack-CTJcw_sX.js → webpack-BzPDhzSz.js} +18 -14
  60. package/dist/webpack.d.ts +1 -3
  61. package/dist/webpack.js +3 -4
  62. package/dist/webpack.mjs +2 -2
  63. package/package.json +9 -7
  64. /package/dist/{chunk-8l464Juk.js → chunk-D6vf50IK.js} +0 -0
  65. /package/dist/{logger-Dr7IvyH2.mjs → logger-BNzxZbZj.mjs} +0 -0
  66. /package/dist/{logger-Cdzl3p8j.js → logger-TlKT3xmR.js} +0 -0
  67. /package/dist/{runtime-registry-CdCV3Opt.js → runtime-registry-DpcR3IHI.js} +0 -0
  68. /package/dist/{utils-B2SJgA1L.mjs → utils-DsaS975I.mjs} +0 -0
@@ -1,7 +1,7 @@
1
- import { B as createDebug, C as createTailwindV4Engine, K as resolveBooleanObjectOption, c as getRuntimeClassSetCacheEntry, d as invalidateRuntimeClassSet, q as omitUndefined, s as ensureTailwindcssRuntimePatch, u as getRuntimeClassSetSignatureWithSources, x as resolveTailwindV4SourceFromPatcher } from "./v3-engine-COw08vWd.mjs";
2
- import { a as resolveDefaultCssPreflight, i as getDefaultOptions, o as DEFAULT_PARSE_CACHE_MAX_SOURCE_LENGTH, s as HARD_PARSE_CACHE_MAX_ENTRIES } from "./defaults-B-1EEhdL.mjs";
3
- import { i as isMap, n as defuOverrideArray } from "./utils-B2SJgA1L.mjs";
4
- import { a as applyV4CssCalcDefaults, i as resolveUniAppXOptions, o as warnMissingCssEntries, t as createTailwindcssPatcherFromContext } from "./tailwindcss-ujlr9Iad.mjs";
1
+ import { B as createDebug, C as createTailwindV4Engine, K as resolveBooleanObjectOption, c as getRuntimeClassSetCacheEntry, d as invalidateRuntimeClassSet, q as omitUndefined, s as ensureTailwindcssRuntimePatch, u as getRuntimeClassSetSignatureWithSources, x as resolveTailwindV4SourceFromPatcher } from "./v3-engine-DcvCCHfs.mjs";
2
+ import { a as resolveDefaultCssPreflight, i as getDefaultOptions, o as DEFAULT_PARSE_CACHE_MAX_SOURCE_LENGTH, s as HARD_PARSE_CACHE_MAX_ENTRIES } from "./defaults-8xrgzxFY.mjs";
3
+ import { i as isMap, n as defuOverrideArray } from "./utils-DsaS975I.mjs";
4
+ import { a as applyV4CssCalcDefaults, i as resolveUniAppXOptions, o as warnMissingCssEntries, t as createTailwindcssPatcherFromContext } from "./tailwindcss-C7dJHZ0G.mjs";
5
5
  import path from "node:path";
6
6
  import process from "node:process";
7
7
  import { logger, pc } from "@weapp-tailwindcss/logger";
@@ -17,7 +17,6 @@ import MagicString from "magic-string";
17
17
  import { jsStringEscape } from "@ast-core/escape";
18
18
  import { splitCode } from "@weapp-tailwindcss/shared/extractors";
19
19
  import * as t from "@babel/types";
20
- import { Parser } from "htmlparser2";
21
20
  //#region src/cache/index.ts
22
21
  function isProcessResult(value) {
23
22
  return typeof value === "object" && value !== null && "result" in value;
@@ -1224,7 +1223,7 @@ function walkEvalExpression(path, options, updater, handler) {
1224
1223
  }
1225
1224
  }
1226
1225
  //#endregion
1227
- //#region \0@oxc-project+runtime@0.129.0/helpers/typeof.js
1226
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/typeof.js
1228
1227
  function _typeof(o) {
1229
1228
  "@babel/helpers - typeof";
1230
1229
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -1234,7 +1233,7 @@ function _typeof(o) {
1234
1233
  }, _typeof(o);
1235
1234
  }
1236
1235
  //#endregion
1237
- //#region \0@oxc-project+runtime@0.129.0/helpers/toPrimitive.js
1236
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/toPrimitive.js
1238
1237
  function toPrimitive(t, r) {
1239
1238
  if ("object" != _typeof(t) || !t) return t;
1240
1239
  var e = t[Symbol.toPrimitive];
@@ -1246,13 +1245,13 @@ function toPrimitive(t, r) {
1246
1245
  return ("string" === r ? String : Number)(t);
1247
1246
  }
1248
1247
  //#endregion
1249
- //#region \0@oxc-project+runtime@0.129.0/helpers/toPropertyKey.js
1248
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/toPropertyKey.js
1250
1249
  function toPropertyKey(t) {
1251
1250
  var i = toPrimitive(t, "string");
1252
1251
  return "symbol" == _typeof(i) ? i : i + "";
1253
1252
  }
1254
1253
  //#endregion
1255
- //#region \0@oxc-project+runtime@0.129.0/helpers/defineProperty.js
1254
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/defineProperty.js
1256
1255
  function _defineProperty(e, r, t) {
1257
1256
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
1258
1257
  value: t,
@@ -1971,9 +1970,8 @@ function jsHandler(rawSource, options) {
1971
1970
  if (shouldWrapExpression) {
1972
1971
  const start = 0;
1973
1972
  const end = source.length;
1974
- const prefixLength = 2;
1975
1973
  const suffixLength = 2;
1976
- ms.remove(start, start + prefixLength);
1974
+ ms.remove(start, 2);
1977
1975
  ms.remove(end - suffixLength, end);
1978
1976
  }
1979
1977
  const result = { code: ms.toString() };
@@ -2226,6 +2224,1994 @@ function generateCode(match, options = {}) {
2226
2224
  }
2227
2225
  }
2228
2226
  //#endregion
2227
+ //#region ../../node_modules/.pnpm/entities@8.0.0/node_modules/entities/dist/decode-codepoint.js
2228
+ const decodeMap = new Map([
2229
+ [0, 65533],
2230
+ [128, 8364],
2231
+ [130, 8218],
2232
+ [131, 402],
2233
+ [132, 8222],
2234
+ [133, 8230],
2235
+ [134, 8224],
2236
+ [135, 8225],
2237
+ [136, 710],
2238
+ [137, 8240],
2239
+ [138, 352],
2240
+ [139, 8249],
2241
+ [140, 338],
2242
+ [142, 381],
2243
+ [145, 8216],
2244
+ [146, 8217],
2245
+ [147, 8220],
2246
+ [148, 8221],
2247
+ [149, 8226],
2248
+ [150, 8211],
2249
+ [151, 8212],
2250
+ [152, 732],
2251
+ [153, 8482],
2252
+ [154, 353],
2253
+ [155, 8250],
2254
+ [156, 339],
2255
+ [158, 382],
2256
+ [159, 376]
2257
+ ]);
2258
+ /**
2259
+ * Replace the given code point with a replacement character if it is a
2260
+ * surrogate or is outside the valid range. Otherwise return the code
2261
+ * point unchanged.
2262
+ * @param codePoint Unicode code point to convert.
2263
+ */
2264
+ function replaceCodePoint(codePoint) {
2265
+ if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) return 65533;
2266
+ return decodeMap.get(codePoint) ?? codePoint;
2267
+ }
2268
+ //#endregion
2269
+ //#region ../../node_modules/.pnpm/entities@8.0.0/node_modules/entities/dist/internal/decode-shared.js
2270
+ /**
2271
+ * Shared base64 decode helper for generated decode data.
2272
+ * Assumes global atob is available.
2273
+ * @param input Input string to encode or decode.
2274
+ */
2275
+ function decodeBase64(input) {
2276
+ const binary = atob(input);
2277
+ const evenLength = binary.length & -2;
2278
+ const out = new Uint16Array(evenLength / 2);
2279
+ for (let index = 0, outIndex = 0; index < evenLength; index += 2) {
2280
+ const lo = binary.charCodeAt(index);
2281
+ const hi = binary.charCodeAt(index + 1);
2282
+ out[outIndex++] = lo | hi << 8;
2283
+ }
2284
+ return out;
2285
+ }
2286
+ //#endregion
2287
+ //#region ../../node_modules/.pnpm/entities@8.0.0/node_modules/entities/dist/generated/decode-data-html.js
2288
+ /** Packed HTML decode trie data. */
2289
+ const htmlDecodeTree = /* #__PURE__ */ decodeBase64("QR08ALkAAgH6AYsDNQR2BO0EPgXZBQEGLAbdBxMISQrvCmQLfQurDKQNLw4fD4YPpA+6D/IPAAAAAAAAAAAAAAAAKhBMEY8TmxUWF2EYLBkxGuAa3RsJHDscWR8YIC8jSCSIJcMl6ie3Ku8rEC0CLjoupS7kLgAIRU1hYmNmZ2xtbm9wcnN0dVQAWgBeAGUAaQBzAHcAfgCBAIQAhwCSAJoAoACsALMAbABpAGcAO4DGAMZAUAA7gCYAJkBjAHUAdABlADuAwQDBQHIiZXZlAAJhAAFpeW0AcgByAGMAO4DCAMJAEGRyAADgNdgE3XIAYQB2AGUAO4DAAMBA8CFoYZFj4SFjcgBhZAAAoF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BIAAUFhiy6OLnIA8gDuAnIA8gCaBwABY3GVLgoScgAA4DXYzdwAAXB0nS6hLmwAdQDzACUScgDpACASAARhY2VmaW9zdbEuvC7ELsguzC7PLtQu2S5jAAABdXm2LrsudABlADuA/QD9QE9kAAFpecAuwy5yAGMAd2FLZG4AO4ClAKVAcgAA4DXYNt1jAHkAV2RwAGYAAOA12GrdYwByAADgNdjO3AABY23dLt8ueQBOZGwAO4D/AP9AAAVhY2RlZmhpb3N38y73Lv8uAi8MLxAvEy8YLx0vIi9jInV0ZQB6YQABYXn7Lv4u8iFvbn5hN2RvAHQAfGEAAWV0Bi8KL3QAcgDmAB8QYQC2Y3IAAOA12DfdYwB5ADZk5yJyYXJyAKDdIXAAZgAA4DXYa91jAHIAAOA12M/cAAFqbiYvKC8AoA0gagAAoAwg");
2290
+ //#endregion
2291
+ //#region ../../node_modules/.pnpm/entities@8.0.0/node_modules/entities/dist/generated/decode-data-xml.js
2292
+ /** Packed XML decode trie data. */
2293
+ const xmlDecodeTree = /* #__PURE__ */ decodeBase64("AAJhZ2xxBwARABMAFQBtAg0AAAAAAA8AcAAmYG8AcwAnYHQAPmB0ADxg9SFvdCJg");
2294
+ //#endregion
2295
+ //#region ../../node_modules/.pnpm/entities@8.0.0/node_modules/entities/dist/internal/bin-trie-flags.js
2296
+ /**
2297
+ * Bit flags & masks for the binary trie encoding used for entity decoding.
2298
+ *
2299
+ * Bit layout (16 bits total):
2300
+ * 15..14 VALUE_LENGTH (+1 encoding; 0 => no value)
2301
+ * 13 FLAG13. If valueLength>0: semicolon required flag (implicit ';').
2302
+ * If valueLength==0: compact run flag.
2303
+ * 12..7 BRANCH_LENGTH Branch length (0 => single branch in 6..0 if jumpOffset==char) OR run length (when compact run)
2304
+ * 6..0 JUMP_TABLE Jump offset (jump table) OR single-branch char code OR first run char
2305
+ */
2306
+ var BinTrieFlags;
2307
+ (function(BinTrieFlags) {
2308
+ BinTrieFlags[BinTrieFlags["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH";
2309
+ BinTrieFlags[BinTrieFlags["FLAG13"] = 8192] = "FLAG13";
2310
+ BinTrieFlags[BinTrieFlags["BRANCH_LENGTH"] = 8064] = "BRANCH_LENGTH";
2311
+ BinTrieFlags[BinTrieFlags["JUMP_TABLE"] = 127] = "JUMP_TABLE";
2312
+ })(BinTrieFlags || (BinTrieFlags = {}));
2313
+ //#endregion
2314
+ //#region ../../node_modules/.pnpm/entities@8.0.0/node_modules/entities/dist/decode.js
2315
+ var CharCodes$1;
2316
+ (function(CharCodes) {
2317
+ CharCodes[CharCodes["NUM"] = 35] = "NUM";
2318
+ CharCodes[CharCodes["SEMI"] = 59] = "SEMI";
2319
+ CharCodes[CharCodes["EQUALS"] = 61] = "EQUALS";
2320
+ CharCodes[CharCodes["ZERO"] = 48] = "ZERO";
2321
+ CharCodes[CharCodes["NINE"] = 57] = "NINE";
2322
+ CharCodes[CharCodes["LOWER_A"] = 97] = "LOWER_A";
2323
+ CharCodes[CharCodes["LOWER_F"] = 102] = "LOWER_F";
2324
+ CharCodes[CharCodes["LOWER_X"] = 120] = "LOWER_X";
2325
+ CharCodes[CharCodes["LOWER_Z"] = 122] = "LOWER_Z";
2326
+ CharCodes[CharCodes["UPPER_A"] = 65] = "UPPER_A";
2327
+ CharCodes[CharCodes["UPPER_F"] = 70] = "UPPER_F";
2328
+ CharCodes[CharCodes["UPPER_Z"] = 90] = "UPPER_Z";
2329
+ })(CharCodes$1 || (CharCodes$1 = {}));
2330
+ /** Bit that needs to be set to convert an upper case ASCII character to lower case */
2331
+ const TO_LOWER_BIT = 32;
2332
+ function isNumber(code) {
2333
+ return code >= CharCodes$1.ZERO && code <= CharCodes$1.NINE;
2334
+ }
2335
+ function isHexadecimalCharacter(code) {
2336
+ return code >= CharCodes$1.UPPER_A && code <= CharCodes$1.UPPER_F || code >= CharCodes$1.LOWER_A && code <= CharCodes$1.LOWER_F;
2337
+ }
2338
+ function isAsciiAlphaNumeric(code) {
2339
+ return code >= CharCodes$1.UPPER_A && code <= CharCodes$1.UPPER_Z || code >= CharCodes$1.LOWER_A && code <= CharCodes$1.LOWER_Z || isNumber(code);
2340
+ }
2341
+ /**
2342
+ * Checks if the given character is a valid end character for an entity in an attribute.
2343
+ *
2344
+ * Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error.
2345
+ * See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state
2346
+ * @param code Code point to decode.
2347
+ */
2348
+ function isEntityInAttributeInvalidEnd(code) {
2349
+ return code === CharCodes$1.EQUALS || isAsciiAlphaNumeric(code);
2350
+ }
2351
+ var EntityDecoderState;
2352
+ (function(EntityDecoderState) {
2353
+ EntityDecoderState[EntityDecoderState["EntityStart"] = 0] = "EntityStart";
2354
+ EntityDecoderState[EntityDecoderState["NumericStart"] = 1] = "NumericStart";
2355
+ EntityDecoderState[EntityDecoderState["NumericDecimal"] = 2] = "NumericDecimal";
2356
+ EntityDecoderState[EntityDecoderState["NumericHex"] = 3] = "NumericHex";
2357
+ EntityDecoderState[EntityDecoderState["NamedEntity"] = 4] = "NamedEntity";
2358
+ })(EntityDecoderState || (EntityDecoderState = {}));
2359
+ /**
2360
+ * Decoding mode for named entities.
2361
+ */
2362
+ var DecodingMode;
2363
+ (function(DecodingMode) {
2364
+ /** Entities in text nodes that can end with any character. */
2365
+ DecodingMode[DecodingMode["Legacy"] = 0] = "Legacy";
2366
+ /** Only allow entities terminated with a semicolon. */
2367
+ DecodingMode[DecodingMode["Strict"] = 1] = "Strict";
2368
+ /** Entities in attributes have limitations on ending characters. */
2369
+ DecodingMode[DecodingMode["Attribute"] = 2] = "Attribute";
2370
+ })(DecodingMode || (DecodingMode = {}));
2371
+ /**
2372
+ * Token decoder with support of writing partial entities.
2373
+ */
2374
+ var EntityDecoder = class {
2375
+ constructor(decodeTree, emitCodePoint, errors) {
2376
+ _defineProperty(this, "decodeTree", void 0);
2377
+ _defineProperty(this, "emitCodePoint", void 0);
2378
+ _defineProperty(this, "errors", void 0);
2379
+ _defineProperty(
2380
+ this,
2381
+ /** The current state of the decoder. */
2382
+ "state",
2383
+ EntityDecoderState.EntityStart
2384
+ );
2385
+ _defineProperty(
2386
+ this,
2387
+ /** Characters that were consumed while parsing an entity. */
2388
+ "consumed",
2389
+ 1
2390
+ );
2391
+ _defineProperty(
2392
+ this,
2393
+ /**
2394
+ * The result of the entity.
2395
+ *
2396
+ * Either the result index of a numeric entity, or the codepoint of a
2397
+ * numeric entity.
2398
+ */
2399
+ "result",
2400
+ 0
2401
+ );
2402
+ _defineProperty(
2403
+ this,
2404
+ /** The current index in the decode tree. */
2405
+ "treeIndex",
2406
+ 0
2407
+ );
2408
+ _defineProperty(
2409
+ this,
2410
+ /** The number of characters that were consumed in excess. */
2411
+ "excess",
2412
+ 1
2413
+ );
2414
+ _defineProperty(
2415
+ this,
2416
+ /** The mode in which the decoder is operating. */
2417
+ "decodeMode",
2418
+ DecodingMode.Strict
2419
+ );
2420
+ _defineProperty(
2421
+ this,
2422
+ /** The number of characters that have been consumed in the current run. */
2423
+ "runConsumed",
2424
+ 0
2425
+ );
2426
+ this.decodeTree = decodeTree;
2427
+ this.emitCodePoint = emitCodePoint;
2428
+ this.errors = errors;
2429
+ }
2430
+ /**
2431
+ * Resets the instance to make it reusable.
2432
+ * @param decodeMode Entity decoding mode to use.
2433
+ */
2434
+ startEntity(decodeMode) {
2435
+ this.decodeMode = decodeMode;
2436
+ this.state = EntityDecoderState.EntityStart;
2437
+ this.result = 0;
2438
+ this.treeIndex = 0;
2439
+ this.excess = 1;
2440
+ this.consumed = 1;
2441
+ this.runConsumed = 0;
2442
+ }
2443
+ /**
2444
+ * Write an entity to the decoder. This can be called multiple times with partial entities.
2445
+ * If the entity is incomplete, the decoder will return -1.
2446
+ *
2447
+ * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the
2448
+ * entity is incomplete, and resume when the next string is written.
2449
+ * @param input The string containing the entity (or a continuation of the entity).
2450
+ * @param offset The offset at which the entity begins. Should be 0 if this is not the first call.
2451
+ * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
2452
+ */
2453
+ write(input, offset) {
2454
+ switch (this.state) {
2455
+ case EntityDecoderState.EntityStart:
2456
+ if (input.charCodeAt(offset) === CharCodes$1.NUM) {
2457
+ this.state = EntityDecoderState.NumericStart;
2458
+ this.consumed += 1;
2459
+ return this.stateNumericStart(input, offset + 1);
2460
+ }
2461
+ this.state = EntityDecoderState.NamedEntity;
2462
+ return this.stateNamedEntity(input, offset);
2463
+ case EntityDecoderState.NumericStart: return this.stateNumericStart(input, offset);
2464
+ case EntityDecoderState.NumericDecimal: return this.stateNumericDecimal(input, offset);
2465
+ case EntityDecoderState.NumericHex: return this.stateNumericHex(input, offset);
2466
+ case EntityDecoderState.NamedEntity: return this.stateNamedEntity(input, offset);
2467
+ }
2468
+ }
2469
+ /**
2470
+ * Switches between the numeric decimal and hexadecimal states.
2471
+ *
2472
+ * Equivalent to the `Numeric character reference state` in the HTML spec.
2473
+ * @param input The string containing the entity (or a continuation of the entity).
2474
+ * @param offset The current offset.
2475
+ * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
2476
+ */
2477
+ stateNumericStart(input, offset) {
2478
+ if (offset >= input.length) return -1;
2479
+ if ((input.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes$1.LOWER_X) {
2480
+ this.state = EntityDecoderState.NumericHex;
2481
+ this.consumed += 1;
2482
+ return this.stateNumericHex(input, offset + 1);
2483
+ }
2484
+ this.state = EntityDecoderState.NumericDecimal;
2485
+ return this.stateNumericDecimal(input, offset);
2486
+ }
2487
+ /**
2488
+ * Parses a hexadecimal numeric entity.
2489
+ *
2490
+ * Equivalent to the `Hexademical character reference state` in the HTML spec.
2491
+ * @param input The string containing the entity (or a continuation of the entity).
2492
+ * @param offset The current offset.
2493
+ * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
2494
+ */
2495
+ stateNumericHex(input, offset) {
2496
+ while (offset < input.length) {
2497
+ const char = input.charCodeAt(offset);
2498
+ if (isNumber(char) || isHexadecimalCharacter(char)) {
2499
+ const digit = char <= CharCodes$1.NINE ? char - CharCodes$1.ZERO : (char | TO_LOWER_BIT) - CharCodes$1.LOWER_A + 10;
2500
+ this.result = this.result * 16 + digit;
2501
+ this.consumed++;
2502
+ offset++;
2503
+ } else return this.emitNumericEntity(char, 3);
2504
+ }
2505
+ return -1;
2506
+ }
2507
+ /**
2508
+ * Parses a decimal numeric entity.
2509
+ *
2510
+ * Equivalent to the `Decimal character reference state` in the HTML spec.
2511
+ * @param input The string containing the entity (or a continuation of the entity).
2512
+ * @param offset The current offset.
2513
+ * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
2514
+ */
2515
+ stateNumericDecimal(input, offset) {
2516
+ while (offset < input.length) {
2517
+ const char = input.charCodeAt(offset);
2518
+ if (isNumber(char)) {
2519
+ this.result = this.result * 10 + (char - CharCodes$1.ZERO);
2520
+ this.consumed++;
2521
+ offset++;
2522
+ } else return this.emitNumericEntity(char, 2);
2523
+ }
2524
+ return -1;
2525
+ }
2526
+ /**
2527
+ * Validate and emit a numeric entity.
2528
+ *
2529
+ * Implements the logic from the `Hexademical character reference start
2530
+ * state` and `Numeric character reference end state` in the HTML spec.
2531
+ * @param lastCp The last code point of the entity. Used to see if the
2532
+ * entity was terminated with a semicolon.
2533
+ * @param expectedLength The minimum number of characters that should be
2534
+ * consumed. Used to validate that at least one digit
2535
+ * was consumed.
2536
+ * @returns The number of characters that were consumed.
2537
+ */
2538
+ emitNumericEntity(lastCp, expectedLength) {
2539
+ if (this.consumed <= expectedLength) {
2540
+ this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed);
2541
+ return 0;
2542
+ }
2543
+ if (lastCp === CharCodes$1.SEMI) this.consumed += 1;
2544
+ else if (this.decodeMode === DecodingMode.Strict) return 0;
2545
+ this.emitCodePoint(replaceCodePoint(this.result), this.consumed);
2546
+ if (this.errors) {
2547
+ if (lastCp !== CharCodes$1.SEMI) this.errors.missingSemicolonAfterCharacterReference();
2548
+ this.errors.validateNumericCharacterReference(this.result);
2549
+ }
2550
+ return this.consumed;
2551
+ }
2552
+ /**
2553
+ * Parses a named entity.
2554
+ *
2555
+ * Equivalent to the `Named character reference state` in the HTML spec.
2556
+ * @param input The string containing the entity (or a continuation of the entity).
2557
+ * @param offset The current offset.
2558
+ * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
2559
+ */
2560
+ stateNamedEntity(input, offset) {
2561
+ const { decodeTree } = this;
2562
+ let current = decodeTree[this.treeIndex];
2563
+ let valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
2564
+ while (offset < input.length) {
2565
+ if (valueLength === 0 && (current & BinTrieFlags.FLAG13) !== 0) {
2566
+ const runLength = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;
2567
+ if (this.runConsumed === 0) {
2568
+ const firstChar = current & BinTrieFlags.JUMP_TABLE;
2569
+ if (input.charCodeAt(offset) !== firstChar) return this.result === 0 ? 0 : this.emitNotTerminatedNamedEntity();
2570
+ offset++;
2571
+ this.excess++;
2572
+ this.runConsumed++;
2573
+ }
2574
+ while (this.runConsumed < runLength) {
2575
+ if (offset >= input.length) return -1;
2576
+ const charIndexInPacked = this.runConsumed - 1;
2577
+ const packedWord = decodeTree[this.treeIndex + 1 + (charIndexInPacked >> 1)];
2578
+ const expectedChar = charIndexInPacked % 2 === 0 ? packedWord & 255 : packedWord >> 8 & 255;
2579
+ if (input.charCodeAt(offset) !== expectedChar) {
2580
+ this.runConsumed = 0;
2581
+ return this.result === 0 ? 0 : this.emitNotTerminatedNamedEntity();
2582
+ }
2583
+ offset++;
2584
+ this.excess++;
2585
+ this.runConsumed++;
2586
+ }
2587
+ this.runConsumed = 0;
2588
+ this.treeIndex += 1 + (runLength >> 1);
2589
+ current = decodeTree[this.treeIndex];
2590
+ valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
2591
+ }
2592
+ if (offset >= input.length) break;
2593
+ const char = input.charCodeAt(offset);
2594
+ if (char === CharCodes$1.SEMI && valueLength !== 0 && (current & BinTrieFlags.FLAG13) !== 0) return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess);
2595
+ this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char);
2596
+ if (this.treeIndex < 0) return this.result === 0 || this.decodeMode === DecodingMode.Attribute && (valueLength === 0 || isEntityInAttributeInvalidEnd(char)) ? 0 : this.emitNotTerminatedNamedEntity();
2597
+ current = decodeTree[this.treeIndex];
2598
+ valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
2599
+ if (valueLength !== 0) {
2600
+ if (char === CharCodes$1.SEMI) return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess);
2601
+ if (this.decodeMode !== DecodingMode.Strict && (current & BinTrieFlags.FLAG13) === 0) {
2602
+ this.result = this.treeIndex;
2603
+ this.consumed += this.excess;
2604
+ this.excess = 0;
2605
+ }
2606
+ }
2607
+ offset++;
2608
+ this.excess++;
2609
+ }
2610
+ return -1;
2611
+ }
2612
+ /**
2613
+ * Emit a named entity that was not terminated with a semicolon.
2614
+ * @returns The number of characters consumed.
2615
+ */
2616
+ emitNotTerminatedNamedEntity() {
2617
+ const { result, decodeTree } = this;
2618
+ const valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14;
2619
+ this.emitNamedEntityData(result, valueLength, this.consumed);
2620
+ this.errors?.missingSemicolonAfterCharacterReference();
2621
+ return this.consumed;
2622
+ }
2623
+ /**
2624
+ * Emit a named entity.
2625
+ * @param result The index of the entity in the decode tree.
2626
+ * @param valueLength The number of bytes in the entity.
2627
+ * @param consumed The number of characters consumed.
2628
+ * @returns The number of characters consumed.
2629
+ */
2630
+ emitNamedEntityData(result, valueLength, consumed) {
2631
+ const { decodeTree } = this;
2632
+ this.emitCodePoint(valueLength === 1 ? decodeTree[result] & ~(BinTrieFlags.VALUE_LENGTH | BinTrieFlags.FLAG13) : decodeTree[result + 1], consumed);
2633
+ if (valueLength === 3) this.emitCodePoint(decodeTree[result + 2], consumed);
2634
+ return consumed;
2635
+ }
2636
+ /**
2637
+ * Signal to the parser that the end of the input was reached.
2638
+ *
2639
+ * Remaining data will be emitted and relevant errors will be produced.
2640
+ * @returns The number of characters consumed.
2641
+ */
2642
+ end() {
2643
+ switch (this.state) {
2644
+ case EntityDecoderState.NamedEntity: return this.result !== 0 && (this.decodeMode !== DecodingMode.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
2645
+ case EntityDecoderState.NumericDecimal: return this.emitNumericEntity(0, 2);
2646
+ case EntityDecoderState.NumericHex: return this.emitNumericEntity(0, 3);
2647
+ case EntityDecoderState.NumericStart:
2648
+ this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed);
2649
+ return 0;
2650
+ case EntityDecoderState.EntityStart: return 0;
2651
+ }
2652
+ }
2653
+ };
2654
+ /**
2655
+ * Determines the branch of the current node that is taken given the current
2656
+ * character. This function is used to traverse the trie.
2657
+ * @param decodeTree The trie.
2658
+ * @param current The current node.
2659
+ * @param nodeIndex Index immediately after the current node header.
2660
+ * @param char The current character.
2661
+ * @returns The index of the next node, or -1 if no branch is taken.
2662
+ */
2663
+ function determineBranch(decodeTree, current, nodeIndex, char) {
2664
+ const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;
2665
+ const jumpOffset = current & BinTrieFlags.JUMP_TABLE;
2666
+ if (branchCount === 0) return jumpOffset !== 0 && char === jumpOffset ? nodeIndex : -1;
2667
+ if (jumpOffset) {
2668
+ const value = char - jumpOffset;
2669
+ return value < 0 || value >= branchCount ? -1 : decodeTree[nodeIndex + value] - 1;
2670
+ }
2671
+ const packedKeySlots = branchCount + 1 >> 1;
2672
+ let lo = 0;
2673
+ let hi = branchCount - 1;
2674
+ while (lo <= hi) {
2675
+ const mid = lo + hi >>> 1;
2676
+ const midKey = decodeTree[nodeIndex + (mid >> 1)] >> (mid & 1) * 8 & 255;
2677
+ if (midKey < char) lo = mid + 1;
2678
+ else if (midKey > char) hi = mid - 1;
2679
+ else return decodeTree[nodeIndex + packedKeySlots + mid];
2680
+ }
2681
+ return -1;
2682
+ }
2683
+ //#endregion
2684
+ //#region ../../node_modules/.pnpm/htmlparser2@12.0.0/node_modules/htmlparser2/dist/Tokenizer.js
2685
+ var CharCodes;
2686
+ (function(CharCodes) {
2687
+ CharCodes[CharCodes["Tab"] = 9] = "Tab";
2688
+ CharCodes[CharCodes["NewLine"] = 10] = "NewLine";
2689
+ CharCodes[CharCodes["FormFeed"] = 12] = "FormFeed";
2690
+ CharCodes[CharCodes["CarriageReturn"] = 13] = "CarriageReturn";
2691
+ CharCodes[CharCodes["Space"] = 32] = "Space";
2692
+ CharCodes[CharCodes["ExclamationMark"] = 33] = "ExclamationMark";
2693
+ CharCodes[CharCodes["Number"] = 35] = "Number";
2694
+ CharCodes[CharCodes["Amp"] = 38] = "Amp";
2695
+ CharCodes[CharCodes["SingleQuote"] = 39] = "SingleQuote";
2696
+ CharCodes[CharCodes["DoubleQuote"] = 34] = "DoubleQuote";
2697
+ CharCodes[CharCodes["Dash"] = 45] = "Dash";
2698
+ CharCodes[CharCodes["Slash"] = 47] = "Slash";
2699
+ CharCodes[CharCodes["Zero"] = 48] = "Zero";
2700
+ CharCodes[CharCodes["Nine"] = 57] = "Nine";
2701
+ CharCodes[CharCodes["Semi"] = 59] = "Semi";
2702
+ CharCodes[CharCodes["Lt"] = 60] = "Lt";
2703
+ CharCodes[CharCodes["Eq"] = 61] = "Eq";
2704
+ CharCodes[CharCodes["Gt"] = 62] = "Gt";
2705
+ CharCodes[CharCodes["Questionmark"] = 63] = "Questionmark";
2706
+ CharCodes[CharCodes["UpperA"] = 65] = "UpperA";
2707
+ CharCodes[CharCodes["LowerA"] = 97] = "LowerA";
2708
+ CharCodes[CharCodes["UpperF"] = 70] = "UpperF";
2709
+ CharCodes[CharCodes["LowerF"] = 102] = "LowerF";
2710
+ CharCodes[CharCodes["UpperZ"] = 90] = "UpperZ";
2711
+ CharCodes[CharCodes["LowerZ"] = 122] = "LowerZ";
2712
+ CharCodes[CharCodes["LowerX"] = 120] = "LowerX";
2713
+ CharCodes[CharCodes["OpeningSquareBracket"] = 91] = "OpeningSquareBracket";
2714
+ })(CharCodes || (CharCodes = {}));
2715
+ /** All the states the tokenizer can be in. */
2716
+ var State;
2717
+ (function(State) {
2718
+ State[State["Text"] = 1] = "Text";
2719
+ State[State["BeforeTagName"] = 2] = "BeforeTagName";
2720
+ State[State["InTagName"] = 3] = "InTagName";
2721
+ State[State["InSelfClosingTag"] = 4] = "InSelfClosingTag";
2722
+ State[State["BeforeClosingTagName"] = 5] = "BeforeClosingTagName";
2723
+ State[State["InClosingTagName"] = 6] = "InClosingTagName";
2724
+ State[State["AfterClosingTagName"] = 7] = "AfterClosingTagName";
2725
+ State[State["BeforeAttributeName"] = 8] = "BeforeAttributeName";
2726
+ State[State["InAttributeName"] = 9] = "InAttributeName";
2727
+ State[State["AfterAttributeName"] = 10] = "AfterAttributeName";
2728
+ State[State["BeforeAttributeValue"] = 11] = "BeforeAttributeValue";
2729
+ State[State["InAttributeValueDq"] = 12] = "InAttributeValueDq";
2730
+ State[State["InAttributeValueSq"] = 13] = "InAttributeValueSq";
2731
+ State[State["InAttributeValueNq"] = 14] = "InAttributeValueNq";
2732
+ State[State["BeforeDeclaration"] = 15] = "BeforeDeclaration";
2733
+ State[State["InDeclaration"] = 16] = "InDeclaration";
2734
+ State[State["InProcessingInstruction"] = 17] = "InProcessingInstruction";
2735
+ State[State["BeforeComment"] = 18] = "BeforeComment";
2736
+ State[State["CDATASequence"] = 19] = "CDATASequence";
2737
+ State[State["DeclarationSequence"] = 20] = "DeclarationSequence";
2738
+ State[State["InSpecialComment"] = 21] = "InSpecialComment";
2739
+ State[State["InCommentLike"] = 22] = "InCommentLike";
2740
+ State[State["SpecialStartSequence"] = 23] = "SpecialStartSequence";
2741
+ State[State["InSpecialTag"] = 24] = "InSpecialTag";
2742
+ State[State["InPlainText"] = 25] = "InPlainText";
2743
+ State[State["InEntity"] = 26] = "InEntity";
2744
+ })(State || (State = {}));
2745
+ function isWhitespace$1(c) {
2746
+ return c === CharCodes.Space || c === CharCodes.NewLine || c === CharCodes.Tab || c === CharCodes.FormFeed || c === CharCodes.CarriageReturn;
2747
+ }
2748
+ function isEndOfTagSection(c) {
2749
+ return c === CharCodes.Slash || c === CharCodes.Gt || isWhitespace$1(c);
2750
+ }
2751
+ function isASCIIAlpha(c) {
2752
+ return c >= CharCodes.LowerA && c <= CharCodes.LowerZ || c >= CharCodes.UpperA && c <= CharCodes.UpperZ;
2753
+ }
2754
+ /**
2755
+ * Quote style used for parsed attributes.
2756
+ */
2757
+ var QuoteType;
2758
+ (function(QuoteType) {
2759
+ QuoteType[QuoteType["NoValue"] = 0] = "NoValue";
2760
+ QuoteType[QuoteType["Unquoted"] = 1] = "Unquoted";
2761
+ QuoteType[QuoteType["Single"] = 2] = "Single";
2762
+ QuoteType[QuoteType["Double"] = 3] = "Double";
2763
+ })(QuoteType || (QuoteType = {}));
2764
+ /**
2765
+ * Sequences used to match longer strings.
2766
+ *
2767
+ * We don't have `Script`, `Style`, or `Title` here. Instead, we re-use the *End
2768
+ * sequences with an increased offset.
2769
+ */
2770
+ const Sequences = {
2771
+ Empty: new Uint8Array(0),
2772
+ Cdata: new Uint8Array([
2773
+ 67,
2774
+ 68,
2775
+ 65,
2776
+ 84,
2777
+ 65,
2778
+ 91
2779
+ ]),
2780
+ CdataEnd: new Uint8Array([
2781
+ 93,
2782
+ 93,
2783
+ 62
2784
+ ]),
2785
+ CommentEnd: new Uint8Array([
2786
+ 45,
2787
+ 45,
2788
+ 33,
2789
+ 62
2790
+ ]),
2791
+ Doctype: new Uint8Array([
2792
+ 100,
2793
+ 111,
2794
+ 99,
2795
+ 116,
2796
+ 121,
2797
+ 112,
2798
+ 101
2799
+ ]),
2800
+ IframeEnd: new Uint8Array([
2801
+ 60,
2802
+ 47,
2803
+ 105,
2804
+ 102,
2805
+ 114,
2806
+ 97,
2807
+ 109,
2808
+ 101
2809
+ ]),
2810
+ NoembedEnd: new Uint8Array([
2811
+ 60,
2812
+ 47,
2813
+ 110,
2814
+ 111,
2815
+ 101,
2816
+ 109,
2817
+ 98,
2818
+ 101,
2819
+ 100
2820
+ ]),
2821
+ NoframesEnd: new Uint8Array([
2822
+ 60,
2823
+ 47,
2824
+ 110,
2825
+ 111,
2826
+ 102,
2827
+ 114,
2828
+ 97,
2829
+ 109,
2830
+ 101,
2831
+ 115
2832
+ ]),
2833
+ Plaintext: new Uint8Array([
2834
+ 60,
2835
+ 47,
2836
+ 112,
2837
+ 108,
2838
+ 97,
2839
+ 105,
2840
+ 110,
2841
+ 116,
2842
+ 101,
2843
+ 120,
2844
+ 116
2845
+ ]),
2846
+ ScriptEnd: new Uint8Array([
2847
+ 60,
2848
+ 47,
2849
+ 115,
2850
+ 99,
2851
+ 114,
2852
+ 105,
2853
+ 112,
2854
+ 116
2855
+ ]),
2856
+ StyleEnd: new Uint8Array([
2857
+ 60,
2858
+ 47,
2859
+ 115,
2860
+ 116,
2861
+ 121,
2862
+ 108,
2863
+ 101
2864
+ ]),
2865
+ TitleEnd: new Uint8Array([
2866
+ 60,
2867
+ 47,
2868
+ 116,
2869
+ 105,
2870
+ 116,
2871
+ 108,
2872
+ 101
2873
+ ]),
2874
+ TextareaEnd: new Uint8Array([
2875
+ 60,
2876
+ 47,
2877
+ 116,
2878
+ 101,
2879
+ 120,
2880
+ 116,
2881
+ 97,
2882
+ 114,
2883
+ 101,
2884
+ 97
2885
+ ]),
2886
+ XmpEnd: new Uint8Array([
2887
+ 60,
2888
+ 47,
2889
+ 120,
2890
+ 109,
2891
+ 112
2892
+ ])
2893
+ };
2894
+ /**
2895
+ * Maps the first lowercase character of an HTML tag name to the sequence
2896
+ * used for special-tag detection. All sequences share a common layout
2897
+ * where index 2 is the first tag-name character, so matching always
2898
+ * continues from offset 3.
2899
+ */
2900
+ const specialStartSequences = new Map([
2901
+ [Sequences.IframeEnd[2], Sequences.IframeEnd],
2902
+ [Sequences.NoembedEnd[2], Sequences.NoembedEnd],
2903
+ [Sequences.Plaintext[2], Sequences.Plaintext],
2904
+ [Sequences.ScriptEnd[2], Sequences.ScriptEnd],
2905
+ [Sequences.TitleEnd[2], Sequences.TitleEnd],
2906
+ [Sequences.XmpEnd[2], Sequences.XmpEnd]
2907
+ ]);
2908
+ /**
2909
+ * Tokenizer implementation used by `Parser`.
2910
+ */
2911
+ var Tokenizer$1 = class {
2912
+ constructor({ xmlMode = false, decodeEntities = true, recognizeSelfClosing = xmlMode }, cbs) {
2913
+ _defineProperty(this, "cbs", void 0);
2914
+ _defineProperty(
2915
+ this,
2916
+ /** The current state the tokenizer is in. */
2917
+ "state",
2918
+ State.Text
2919
+ );
2920
+ _defineProperty(
2921
+ this,
2922
+ /** The read buffer. */
2923
+ "buffer",
2924
+ ""
2925
+ );
2926
+ _defineProperty(
2927
+ this,
2928
+ /** The beginning of the section that is currently being read. */
2929
+ "sectionStart",
2930
+ 0
2931
+ );
2932
+ _defineProperty(
2933
+ this,
2934
+ /** The index within the buffer that we are currently looking at. */
2935
+ "index",
2936
+ 0
2937
+ );
2938
+ _defineProperty(
2939
+ this,
2940
+ /** The start of the last entity. */
2941
+ "entityStart",
2942
+ 0
2943
+ );
2944
+ _defineProperty(
2945
+ this,
2946
+ /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */
2947
+ "baseState",
2948
+ State.Text
2949
+ );
2950
+ _defineProperty(
2951
+ this,
2952
+ /** For special parsing behavior inside of script and style tags. */
2953
+ "isSpecial",
2954
+ false
2955
+ );
2956
+ _defineProperty(
2957
+ this,
2958
+ /** Indicates whether the tokenizer has been paused. */
2959
+ "running",
2960
+ true
2961
+ );
2962
+ _defineProperty(
2963
+ this,
2964
+ /** The offset of the current buffer. */
2965
+ "offset",
2966
+ 0
2967
+ );
2968
+ _defineProperty(this, "xmlMode", void 0);
2969
+ _defineProperty(this, "decodeEntities", void 0);
2970
+ _defineProperty(this, "recognizeSelfClosing", void 0);
2971
+ _defineProperty(this, "entityDecoder", void 0);
2972
+ _defineProperty(this, "currentSequence", Sequences.Empty);
2973
+ _defineProperty(this, "sequenceIndex", 0);
2974
+ this.cbs = cbs;
2975
+ this.xmlMode = xmlMode;
2976
+ this.decodeEntities = decodeEntities;
2977
+ this.recognizeSelfClosing = recognizeSelfClosing;
2978
+ this.entityDecoder = new EntityDecoder(xmlMode ? xmlDecodeTree : htmlDecodeTree, (cp, consumed) => this.emitCodePoint(cp, consumed));
2979
+ }
2980
+ reset() {
2981
+ this.state = State.Text;
2982
+ this.buffer = "";
2983
+ this.sectionStart = 0;
2984
+ this.index = 0;
2985
+ this.baseState = State.Text;
2986
+ this.isSpecial = false;
2987
+ this.currentSequence = Sequences.Empty;
2988
+ this.sequenceIndex = 0;
2989
+ this.running = true;
2990
+ this.offset = 0;
2991
+ }
2992
+ write(chunk) {
2993
+ this.offset += this.buffer.length;
2994
+ this.buffer = chunk;
2995
+ this.parse();
2996
+ }
2997
+ end() {
2998
+ if (this.running) this.finish();
2999
+ }
3000
+ pause() {
3001
+ this.running = false;
3002
+ }
3003
+ resume() {
3004
+ this.running = true;
3005
+ if (this.index < this.buffer.length + this.offset) this.parse();
3006
+ }
3007
+ stateText(c) {
3008
+ if (c === CharCodes.Lt || !this.decodeEntities && this.fastForwardTo(CharCodes.Lt)) {
3009
+ if (this.index > this.sectionStart) this.cbs.ontext(this.sectionStart, this.index);
3010
+ this.state = State.BeforeTagName;
3011
+ this.sectionStart = this.index;
3012
+ } else if (this.decodeEntities && c === CharCodes.Amp) this.startEntity();
3013
+ }
3014
+ enterTagBody() {
3015
+ if (this.currentSequence === Sequences.Plaintext) {
3016
+ this.currentSequence = Sequences.Empty;
3017
+ this.state = State.InPlainText;
3018
+ } else if (this.isSpecial) {
3019
+ this.state = State.InSpecialTag;
3020
+ this.sequenceIndex = 0;
3021
+ } else this.state = State.Text;
3022
+ }
3023
+ /**
3024
+ * Match the opening tag name against an HTML text-only tag sequence.
3025
+ *
3026
+ * Some tags share an initial prefix (`script`/`style`, `title`/`textarea`,
3027
+ * `noembed`/`noframes`), so we may switch to an alternate sequence at the
3028
+ * first distinguishing byte. On a successful full match we fall back to
3029
+ * the normal tag-name state; a later `>` will enter raw-text, RCDATA, or
3030
+ * plaintext mode based on `currentSequence` / `isSpecial`.
3031
+ * @param c Current character code point.
3032
+ */
3033
+ stateSpecialStartSequence(c) {
3034
+ const lower = c | 32;
3035
+ if (this.sequenceIndex < this.currentSequence.length) {
3036
+ if (lower === this.currentSequence[this.sequenceIndex]) {
3037
+ this.sequenceIndex++;
3038
+ return;
3039
+ }
3040
+ if (this.sequenceIndex === 3) {
3041
+ if (this.currentSequence === Sequences.ScriptEnd && lower === Sequences.StyleEnd[3]) {
3042
+ this.currentSequence = Sequences.StyleEnd;
3043
+ this.sequenceIndex = 4;
3044
+ return;
3045
+ }
3046
+ if (this.currentSequence === Sequences.TitleEnd && lower === Sequences.TextareaEnd[3]) {
3047
+ this.currentSequence = Sequences.TextareaEnd;
3048
+ this.sequenceIndex = 4;
3049
+ return;
3050
+ }
3051
+ } else if (this.sequenceIndex === 4 && this.currentSequence === Sequences.NoembedEnd && lower === Sequences.NoframesEnd[4]) {
3052
+ this.currentSequence = Sequences.NoframesEnd;
3053
+ this.sequenceIndex = 5;
3054
+ return;
3055
+ }
3056
+ } else if (isEndOfTagSection(c)) {
3057
+ this.sequenceIndex = 0;
3058
+ this.state = State.InTagName;
3059
+ this.stateInTagName(c);
3060
+ return;
3061
+ }
3062
+ this.isSpecial = false;
3063
+ this.currentSequence = Sequences.Empty;
3064
+ this.sequenceIndex = 0;
3065
+ this.state = State.InTagName;
3066
+ this.stateInTagName(c);
3067
+ }
3068
+ stateCDATASequence(c) {
3069
+ if (c === Sequences.Cdata[this.sequenceIndex]) {
3070
+ if (++this.sequenceIndex === Sequences.Cdata.length) {
3071
+ this.state = State.InCommentLike;
3072
+ this.currentSequence = Sequences.CdataEnd;
3073
+ this.sequenceIndex = 0;
3074
+ this.sectionStart = this.index + 1;
3075
+ }
3076
+ } else {
3077
+ this.sequenceIndex = 0;
3078
+ if (this.xmlMode) {
3079
+ this.state = State.InDeclaration;
3080
+ this.stateInDeclaration(c);
3081
+ } else {
3082
+ this.state = State.InSpecialComment;
3083
+ this.stateInSpecialComment(c);
3084
+ }
3085
+ }
3086
+ }
3087
+ /**
3088
+ * When we wait for one specific character, we can speed things up
3089
+ * by skipping through the buffer until we find it.
3090
+ * @param c Current character code point.
3091
+ * @returns Whether the character was found.
3092
+ */
3093
+ fastForwardTo(c) {
3094
+ while (++this.index < this.buffer.length + this.offset) if (this.buffer.charCodeAt(this.index - this.offset) === c) return true;
3095
+ this.index = this.buffer.length + this.offset - 1;
3096
+ return false;
3097
+ }
3098
+ /**
3099
+ * Emit a comment token and return to the text state.
3100
+ * @param offset Number of characters in the end sequence that have already been matched.
3101
+ */
3102
+ emitComment(offset) {
3103
+ this.cbs.oncomment(this.sectionStart, this.index, offset);
3104
+ this.sequenceIndex = 0;
3105
+ this.sectionStart = this.index + 1;
3106
+ this.state = State.Text;
3107
+ }
3108
+ /**
3109
+ * Comments and CDATA end with `-->` and `]]>`.
3110
+ *
3111
+ * Their common qualities are:
3112
+ * - Their end sequences have a distinct character they start with.
3113
+ * - That character is then repeated, so we have to check multiple repeats.
3114
+ * - All characters but the start character of the sequence can be skipped.
3115
+ * @param c Current character code point.
3116
+ */
3117
+ stateInCommentLike(c) {
3118
+ if (!this.xmlMode && this.currentSequence === Sequences.CommentEnd && this.sequenceIndex <= 1 && this.index === this.sectionStart + this.sequenceIndex && c === CharCodes.Gt) this.emitComment(this.sequenceIndex);
3119
+ else if (this.currentSequence === Sequences.CommentEnd && this.sequenceIndex === 2 && c === CharCodes.Gt) this.emitComment(2);
3120
+ else if (this.currentSequence === Sequences.CommentEnd && this.sequenceIndex === this.currentSequence.length - 1 && c !== CharCodes.Gt) this.sequenceIndex = Number(c === CharCodes.Dash);
3121
+ else if (c === this.currentSequence[this.sequenceIndex]) {
3122
+ if (++this.sequenceIndex === this.currentSequence.length) {
3123
+ if (this.currentSequence === Sequences.CdataEnd) this.cbs.oncdata(this.sectionStart, this.index, 2);
3124
+ else this.cbs.oncomment(this.sectionStart, this.index, 3);
3125
+ this.sequenceIndex = 0;
3126
+ this.sectionStart = this.index + 1;
3127
+ this.state = State.Text;
3128
+ }
3129
+ } else if (this.sequenceIndex === 0) {
3130
+ if (this.fastForwardTo(this.currentSequence[0])) this.sequenceIndex = 1;
3131
+ } else if (c !== this.currentSequence[this.sequenceIndex - 1]) this.sequenceIndex = 0;
3132
+ }
3133
+ /**
3134
+ * HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name.
3135
+ *
3136
+ * XML allows a lot more characters here (@see https://www.w3.org/TR/REC-xml/#NT-NameStartChar).
3137
+ * We allow anything that wouldn't end the tag.
3138
+ * @param c Current character code point.
3139
+ */
3140
+ isTagStartChar(c) {
3141
+ return this.xmlMode ? !isEndOfTagSection(c) : isASCIIAlpha(c);
3142
+ }
3143
+ /**
3144
+ * Scan raw-text / RCDATA content for the matching end tag.
3145
+ *
3146
+ * For RCDATA tags (`<title>`, `<textarea>`) entities are decoded inline.
3147
+ * For raw-text tags (`<script>`, `<style>`, etc.) we fast-forward to `<`.
3148
+ * @param c Current character code point.
3149
+ */
3150
+ stateInSpecialTag(c) {
3151
+ if (this.sequenceIndex === this.currentSequence.length) {
3152
+ if (isEndOfTagSection(c)) {
3153
+ const endOfText = this.index - this.currentSequence.length;
3154
+ if (this.sectionStart < endOfText) {
3155
+ const actualIndex = this.index;
3156
+ this.index = endOfText;
3157
+ this.cbs.ontext(this.sectionStart, endOfText);
3158
+ this.index = actualIndex;
3159
+ }
3160
+ this.isSpecial = false;
3161
+ this.sectionStart = endOfText + 2;
3162
+ this.stateInClosingTagName(c);
3163
+ return;
3164
+ }
3165
+ this.sequenceIndex = 0;
3166
+ }
3167
+ if ((c | 32) === this.currentSequence[this.sequenceIndex]) this.sequenceIndex += 1;
3168
+ else if (this.sequenceIndex === 0) {
3169
+ if (this.currentSequence === Sequences.TitleEnd || this.currentSequence === Sequences.TextareaEnd) {
3170
+ if (this.decodeEntities && c === CharCodes.Amp) this.startEntity();
3171
+ } else if (this.fastForwardTo(CharCodes.Lt)) this.sequenceIndex = 1;
3172
+ } else this.sequenceIndex = Number(c === CharCodes.Lt);
3173
+ }
3174
+ stateBeforeTagName(c) {
3175
+ if (c === CharCodes.ExclamationMark) {
3176
+ this.state = State.BeforeDeclaration;
3177
+ this.sectionStart = this.index + 1;
3178
+ } else if (c === CharCodes.Questionmark) if (this.xmlMode) {
3179
+ this.state = State.InProcessingInstruction;
3180
+ this.sequenceIndex = 0;
3181
+ this.sectionStart = this.index + 1;
3182
+ } else {
3183
+ this.state = State.InSpecialComment;
3184
+ this.sectionStart = this.index;
3185
+ }
3186
+ else if (this.isTagStartChar(c)) {
3187
+ this.sectionStart = this.index;
3188
+ const special = this.xmlMode || this.cbs.isInForeignContext?.() ? void 0 : specialStartSequences.get(c | 32);
3189
+ if (special === void 0) this.state = State.InTagName;
3190
+ else {
3191
+ this.isSpecial = true;
3192
+ this.currentSequence = special;
3193
+ this.sequenceIndex = 3;
3194
+ this.state = State.SpecialStartSequence;
3195
+ }
3196
+ } else if (c === CharCodes.Slash) this.state = State.BeforeClosingTagName;
3197
+ else {
3198
+ this.state = State.Text;
3199
+ this.stateText(c);
3200
+ }
3201
+ }
3202
+ stateInTagName(c) {
3203
+ if (isEndOfTagSection(c)) {
3204
+ this.cbs.onopentagname(this.sectionStart, this.index);
3205
+ this.sectionStart = -1;
3206
+ this.state = State.BeforeAttributeName;
3207
+ this.stateBeforeAttributeName(c);
3208
+ }
3209
+ }
3210
+ stateBeforeClosingTagName(c) {
3211
+ if (isWhitespace$1(c)) if (this.xmlMode) {} else {
3212
+ this.state = State.InSpecialComment;
3213
+ this.sectionStart = this.index;
3214
+ }
3215
+ else if (c === CharCodes.Gt) {
3216
+ this.state = State.Text;
3217
+ if (!this.xmlMode) this.sectionStart = this.index + 1;
3218
+ } else {
3219
+ this.state = this.isTagStartChar(c) ? State.InClosingTagName : State.InSpecialComment;
3220
+ this.sectionStart = this.index;
3221
+ }
3222
+ }
3223
+ stateInClosingTagName(c) {
3224
+ if (isEndOfTagSection(c)) {
3225
+ this.cbs.onclosetag(this.sectionStart, this.index);
3226
+ this.sectionStart = -1;
3227
+ this.state = State.AfterClosingTagName;
3228
+ this.stateAfterClosingTagName(c);
3229
+ }
3230
+ }
3231
+ stateAfterClosingTagName(c) {
3232
+ if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {
3233
+ this.state = State.Text;
3234
+ this.sectionStart = this.index + 1;
3235
+ }
3236
+ }
3237
+ stateBeforeAttributeName(c) {
3238
+ if (c === CharCodes.Gt) {
3239
+ this.cbs.onopentagend(this.index);
3240
+ this.enterTagBody();
3241
+ this.sectionStart = this.index + 1;
3242
+ } else if (c === CharCodes.Slash) this.state = State.InSelfClosingTag;
3243
+ else if (!isWhitespace$1(c)) {
3244
+ this.state = State.InAttributeName;
3245
+ this.sectionStart = this.index;
3246
+ }
3247
+ }
3248
+ /**
3249
+ * Handle `/` before `>` in an opening tag.
3250
+ *
3251
+ * In HTML mode, text-only tags ignore the self-closing flag and still enter
3252
+ * their raw-text/RCDATA/plaintext state unless self-closing tags are being
3253
+ * recognized. In XML mode, or for ordinary tags, the tokenizer returns to
3254
+ * regular text parsing after emitting the self-closing callback.
3255
+ * @param c Current character code point.
3256
+ */
3257
+ stateInSelfClosingTag(c) {
3258
+ if (c === CharCodes.Gt) {
3259
+ this.cbs.onselfclosingtag(this.index);
3260
+ this.sectionStart = this.index + 1;
3261
+ if (!this.recognizeSelfClosing) {
3262
+ this.enterTagBody();
3263
+ return;
3264
+ }
3265
+ this.state = State.Text;
3266
+ this.isSpecial = false;
3267
+ this.currentSequence = Sequences.Empty;
3268
+ } else if (!isWhitespace$1(c)) {
3269
+ this.state = State.BeforeAttributeName;
3270
+ this.stateBeforeAttributeName(c);
3271
+ }
3272
+ }
3273
+ stateInAttributeName(c) {
3274
+ if (c === CharCodes.Eq || isEndOfTagSection(c)) {
3275
+ this.cbs.onattribname(this.sectionStart, this.index);
3276
+ this.sectionStart = this.index;
3277
+ this.state = State.AfterAttributeName;
3278
+ this.stateAfterAttributeName(c);
3279
+ }
3280
+ }
3281
+ stateAfterAttributeName(c) {
3282
+ if (c === CharCodes.Eq) this.state = State.BeforeAttributeValue;
3283
+ else if (c === CharCodes.Slash || c === CharCodes.Gt) {
3284
+ this.cbs.onattribend(QuoteType.NoValue, this.sectionStart);
3285
+ this.sectionStart = -1;
3286
+ this.state = State.BeforeAttributeName;
3287
+ this.stateBeforeAttributeName(c);
3288
+ } else if (!isWhitespace$1(c)) {
3289
+ this.cbs.onattribend(QuoteType.NoValue, this.sectionStart);
3290
+ this.state = State.InAttributeName;
3291
+ this.sectionStart = this.index;
3292
+ }
3293
+ }
3294
+ stateBeforeAttributeValue(c) {
3295
+ if (c === CharCodes.DoubleQuote) {
3296
+ this.state = State.InAttributeValueDq;
3297
+ this.sectionStart = this.index + 1;
3298
+ } else if (c === CharCodes.SingleQuote) {
3299
+ this.state = State.InAttributeValueSq;
3300
+ this.sectionStart = this.index + 1;
3301
+ } else if (!isWhitespace$1(c)) {
3302
+ this.sectionStart = this.index;
3303
+ this.state = State.InAttributeValueNq;
3304
+ this.stateInAttributeValueNoQuotes(c);
3305
+ }
3306
+ }
3307
+ handleInAttributeValue(c, quote) {
3308
+ if (c === quote || !this.decodeEntities && this.fastForwardTo(quote)) {
3309
+ this.cbs.onattribdata(this.sectionStart, this.index);
3310
+ this.sectionStart = -1;
3311
+ this.cbs.onattribend(quote === CharCodes.DoubleQuote ? QuoteType.Double : QuoteType.Single, this.index + 1);
3312
+ this.state = State.BeforeAttributeName;
3313
+ } else if (this.decodeEntities && c === CharCodes.Amp) this.startEntity();
3314
+ }
3315
+ stateInAttributeValueDoubleQuotes(c) {
3316
+ this.handleInAttributeValue(c, CharCodes.DoubleQuote);
3317
+ }
3318
+ stateInAttributeValueSingleQuotes(c) {
3319
+ this.handleInAttributeValue(c, CharCodes.SingleQuote);
3320
+ }
3321
+ stateInAttributeValueNoQuotes(c) {
3322
+ if (isWhitespace$1(c) || c === CharCodes.Gt) {
3323
+ this.cbs.onattribdata(this.sectionStart, this.index);
3324
+ this.sectionStart = -1;
3325
+ this.cbs.onattribend(QuoteType.Unquoted, this.index);
3326
+ this.state = State.BeforeAttributeName;
3327
+ this.stateBeforeAttributeName(c);
3328
+ } else if (this.decodeEntities && c === CharCodes.Amp) this.startEntity();
3329
+ }
3330
+ /**
3331
+ * Distinguish between CDATA, declarations, HTML comments, and HTML bogus
3332
+ * comments after `<!`.
3333
+ *
3334
+ * In HTML mode, only real comments and doctypes stay on declaration paths;
3335
+ * everything else becomes a bogus comment terminated by the next `>`.
3336
+ * @param c Current character code point.
3337
+ */
3338
+ stateBeforeDeclaration(c) {
3339
+ if (c === CharCodes.OpeningSquareBracket) {
3340
+ this.state = State.CDATASequence;
3341
+ this.sequenceIndex = 0;
3342
+ } else if (this.xmlMode) this.state = c === CharCodes.Dash ? State.BeforeComment : State.InDeclaration;
3343
+ else if ((c | 32) === Sequences.Doctype[0]) {
3344
+ this.state = State.DeclarationSequence;
3345
+ this.currentSequence = Sequences.Doctype;
3346
+ this.sequenceIndex = 1;
3347
+ } else if (c === CharCodes.Gt) {
3348
+ this.cbs.oncomment(this.sectionStart, this.index, 0);
3349
+ this.state = State.Text;
3350
+ this.sectionStart = this.index + 1;
3351
+ } else if (c === CharCodes.Dash) this.state = State.BeforeComment;
3352
+ else this.state = State.InSpecialComment;
3353
+ }
3354
+ /**
3355
+ * Continue matching `doctype` after `<!d`.
3356
+ *
3357
+ * A full `doctype` match stays on the declaration path; any other name falls
3358
+ * back to an HTML bogus comment, which matches browser behavior for
3359
+ * non-doctype `<!...>` constructs.
3360
+ * @param c Current character code point.
3361
+ */
3362
+ stateDeclarationSequence(c) {
3363
+ if (this.sequenceIndex === this.currentSequence.length) {
3364
+ this.state = State.InDeclaration;
3365
+ this.stateInDeclaration(c);
3366
+ } else if ((c | 32) === this.currentSequence[this.sequenceIndex]) this.sequenceIndex += 1;
3367
+ else if (c === CharCodes.Gt) {
3368
+ this.cbs.oncomment(this.sectionStart, this.index, 0);
3369
+ this.state = State.Text;
3370
+ this.sectionStart = this.index + 1;
3371
+ } else this.state = State.InSpecialComment;
3372
+ }
3373
+ stateInDeclaration(c) {
3374
+ if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {
3375
+ this.cbs.ondeclaration(this.sectionStart, this.index);
3376
+ this.state = State.Text;
3377
+ this.sectionStart = this.index + 1;
3378
+ }
3379
+ }
3380
+ /**
3381
+ * XML processing instructions (`<?...?>`).
3382
+ *
3383
+ * In HTML mode `<?` is routed to `InSpecialComment` instead, so this
3384
+ * state is only reachable in XML mode.
3385
+ * @param c Current character code point.
3386
+ */
3387
+ stateInProcessingInstruction(c) {
3388
+ if (c === CharCodes.Questionmark) this.sequenceIndex = 1;
3389
+ else if (c === CharCodes.Gt && this.sequenceIndex === 1) {
3390
+ this.cbs.onprocessinginstruction(this.sectionStart, this.index - 1);
3391
+ this.sequenceIndex = 0;
3392
+ this.state = State.Text;
3393
+ this.sectionStart = this.index + 1;
3394
+ } else this.sequenceIndex = Number(this.fastForwardTo(CharCodes.Questionmark));
3395
+ }
3396
+ stateBeforeComment(c) {
3397
+ if (c === CharCodes.Dash) {
3398
+ this.state = State.InCommentLike;
3399
+ this.currentSequence = Sequences.CommentEnd;
3400
+ this.sequenceIndex = 0;
3401
+ this.sectionStart = this.index + 1;
3402
+ } else if (this.xmlMode) this.state = State.InDeclaration;
3403
+ else if (c === CharCodes.Gt) {
3404
+ this.cbs.oncomment(this.sectionStart, this.index, 0);
3405
+ this.state = State.Text;
3406
+ this.sectionStart = this.index + 1;
3407
+ } else this.state = State.InSpecialComment;
3408
+ }
3409
+ stateInSpecialComment(c) {
3410
+ if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {
3411
+ this.cbs.oncomment(this.sectionStart, this.index, 0);
3412
+ this.state = State.Text;
3413
+ this.sectionStart = this.index + 1;
3414
+ }
3415
+ }
3416
+ startEntity() {
3417
+ this.baseState = this.state;
3418
+ this.state = State.InEntity;
3419
+ this.entityStart = this.index;
3420
+ this.entityDecoder.startEntity(this.xmlMode ? DecodingMode.Strict : this.baseState === State.Text || this.baseState === State.InSpecialTag ? DecodingMode.Legacy : DecodingMode.Attribute);
3421
+ }
3422
+ stateInEntity() {
3423
+ const indexInBuffer = this.index - this.offset;
3424
+ const length = this.entityDecoder.write(this.buffer, indexInBuffer);
3425
+ if (length >= 0) {
3426
+ this.state = this.baseState;
3427
+ if (length === 0) this.index -= 1;
3428
+ } else {
3429
+ if (indexInBuffer < this.buffer.length && this.buffer.charCodeAt(indexInBuffer) === CharCodes.Amp) {
3430
+ this.state = this.baseState;
3431
+ this.index -= 1;
3432
+ return;
3433
+ }
3434
+ this.index = this.offset + this.buffer.length - 1;
3435
+ }
3436
+ }
3437
+ /**
3438
+ * Remove data that has already been consumed from the buffer.
3439
+ */
3440
+ cleanup() {
3441
+ if (this.running && this.sectionStart !== this.index) {
3442
+ if (this.state === State.Text || this.state === State.InPlainText || this.state === State.InSpecialTag && this.sequenceIndex === 0) {
3443
+ this.cbs.ontext(this.sectionStart, this.index);
3444
+ this.sectionStart = this.index;
3445
+ } else if (this.state === State.InAttributeValueDq || this.state === State.InAttributeValueSq || this.state === State.InAttributeValueNq) {
3446
+ this.cbs.onattribdata(this.sectionStart, this.index);
3447
+ this.sectionStart = this.index;
3448
+ }
3449
+ }
3450
+ }
3451
+ shouldContinue() {
3452
+ return this.index < this.buffer.length + this.offset && this.running;
3453
+ }
3454
+ /**
3455
+ * Iterates through the buffer, calling the function corresponding to the current state.
3456
+ *
3457
+ * States that are more likely to be hit are higher up, as a performance improvement.
3458
+ */
3459
+ parse() {
3460
+ while (this.shouldContinue()) {
3461
+ const c = this.buffer.charCodeAt(this.index - this.offset);
3462
+ switch (this.state) {
3463
+ case State.Text:
3464
+ this.stateText(c);
3465
+ break;
3466
+ case State.InPlainText:
3467
+ this.index = this.buffer.length + this.offset - 1;
3468
+ break;
3469
+ case State.SpecialStartSequence:
3470
+ this.stateSpecialStartSequence(c);
3471
+ break;
3472
+ case State.InSpecialTag:
3473
+ this.stateInSpecialTag(c);
3474
+ break;
3475
+ case State.CDATASequence:
3476
+ this.stateCDATASequence(c);
3477
+ break;
3478
+ case State.DeclarationSequence:
3479
+ this.stateDeclarationSequence(c);
3480
+ break;
3481
+ case State.InAttributeValueDq:
3482
+ this.stateInAttributeValueDoubleQuotes(c);
3483
+ break;
3484
+ case State.InAttributeName:
3485
+ this.stateInAttributeName(c);
3486
+ break;
3487
+ case State.InCommentLike:
3488
+ this.stateInCommentLike(c);
3489
+ break;
3490
+ case State.InSpecialComment:
3491
+ this.stateInSpecialComment(c);
3492
+ break;
3493
+ case State.BeforeAttributeName:
3494
+ this.stateBeforeAttributeName(c);
3495
+ break;
3496
+ case State.InTagName:
3497
+ this.stateInTagName(c);
3498
+ break;
3499
+ case State.InClosingTagName:
3500
+ this.stateInClosingTagName(c);
3501
+ break;
3502
+ case State.BeforeTagName:
3503
+ this.stateBeforeTagName(c);
3504
+ break;
3505
+ case State.AfterAttributeName:
3506
+ this.stateAfterAttributeName(c);
3507
+ break;
3508
+ case State.InAttributeValueSq:
3509
+ this.stateInAttributeValueSingleQuotes(c);
3510
+ break;
3511
+ case State.BeforeAttributeValue:
3512
+ this.stateBeforeAttributeValue(c);
3513
+ break;
3514
+ case State.BeforeClosingTagName:
3515
+ this.stateBeforeClosingTagName(c);
3516
+ break;
3517
+ case State.AfterClosingTagName:
3518
+ this.stateAfterClosingTagName(c);
3519
+ break;
3520
+ case State.InAttributeValueNq:
3521
+ this.stateInAttributeValueNoQuotes(c);
3522
+ break;
3523
+ case State.InSelfClosingTag:
3524
+ this.stateInSelfClosingTag(c);
3525
+ break;
3526
+ case State.InDeclaration:
3527
+ this.stateInDeclaration(c);
3528
+ break;
3529
+ case State.BeforeDeclaration:
3530
+ this.stateBeforeDeclaration(c);
3531
+ break;
3532
+ case State.BeforeComment:
3533
+ this.stateBeforeComment(c);
3534
+ break;
3535
+ case State.InProcessingInstruction:
3536
+ this.stateInProcessingInstruction(c);
3537
+ break;
3538
+ case State.InEntity:
3539
+ this.stateInEntity();
3540
+ break;
3541
+ }
3542
+ this.index++;
3543
+ }
3544
+ this.cleanup();
3545
+ }
3546
+ finish() {
3547
+ if (this.state === State.InEntity) {
3548
+ this.entityDecoder.end();
3549
+ this.state = this.baseState;
3550
+ }
3551
+ this.handleTrailingData();
3552
+ this.cbs.onend();
3553
+ }
3554
+ handleTrailingCommentLikeData(endIndex) {
3555
+ if (this.state !== State.InCommentLike) return false;
3556
+ if (this.currentSequence === Sequences.CdataEnd) if (this.xmlMode) {
3557
+ if (this.sectionStart < endIndex) this.cbs.oncdata(this.sectionStart, endIndex, 0);
3558
+ } else {
3559
+ const cdataStart = this.sectionStart - Sequences.Cdata.length - 1;
3560
+ this.cbs.oncomment(cdataStart, endIndex, 0);
3561
+ }
3562
+ else {
3563
+ const offset = this.xmlMode ? 0 : Math.min(this.sequenceIndex, Sequences.CommentEnd.length - 1);
3564
+ this.cbs.oncomment(this.sectionStart, endIndex, offset);
3565
+ }
3566
+ return true;
3567
+ }
3568
+ handleTrailingMarkupDeclaration(endIndex) {
3569
+ if (this.xmlMode) switch (this.state) {
3570
+ case State.InSpecialComment:
3571
+ case State.BeforeComment:
3572
+ case State.CDATASequence:
3573
+ case State.DeclarationSequence:
3574
+ case State.InDeclaration:
3575
+ this.cbs.ontext(this.sectionStart, endIndex);
3576
+ return true;
3577
+ default: return false;
3578
+ }
3579
+ switch (this.state) {
3580
+ case State.BeforeDeclaration:
3581
+ case State.InSpecialComment:
3582
+ case State.BeforeComment:
3583
+ case State.CDATASequence:
3584
+ this.cbs.oncomment(this.sectionStart, endIndex, 0);
3585
+ return true;
3586
+ case State.DeclarationSequence:
3587
+ if (this.sequenceIndex !== Sequences.Doctype.length) this.cbs.oncomment(this.sectionStart, endIndex, 0);
3588
+ return true;
3589
+ case State.InDeclaration: return true;
3590
+ default: return false;
3591
+ }
3592
+ }
3593
+ /** Handle any trailing data. */
3594
+ handleTrailingData() {
3595
+ const endIndex = this.buffer.length + this.offset;
3596
+ if (this.handleTrailingCommentLikeData(endIndex) || this.handleTrailingMarkupDeclaration(endIndex)) return;
3597
+ if (this.sectionStart >= endIndex) return;
3598
+ switch (this.state) {
3599
+ case State.InTagName:
3600
+ case State.BeforeAttributeName:
3601
+ case State.BeforeAttributeValue:
3602
+ case State.AfterAttributeName:
3603
+ case State.InAttributeName:
3604
+ case State.InAttributeValueSq:
3605
+ case State.InAttributeValueDq:
3606
+ case State.InAttributeValueNq:
3607
+ case State.InClosingTagName: break;
3608
+ default: this.cbs.ontext(this.sectionStart, endIndex);
3609
+ }
3610
+ }
3611
+ emitCodePoint(cp, consumed) {
3612
+ if (this.baseState !== State.Text && this.baseState !== State.InSpecialTag) {
3613
+ if (this.sectionStart < this.entityStart) this.cbs.onattribdata(this.sectionStart, this.entityStart);
3614
+ this.sectionStart = this.entityStart + consumed;
3615
+ this.index = this.sectionStart - 1;
3616
+ this.cbs.onattribentity(cp);
3617
+ } else {
3618
+ if (this.sectionStart < this.entityStart) this.cbs.ontext(this.sectionStart, this.entityStart);
3619
+ this.sectionStart = this.entityStart + consumed;
3620
+ this.index = this.sectionStart - 1;
3621
+ this.cbs.ontextentity(cp, this.sectionStart);
3622
+ }
3623
+ }
3624
+ };
3625
+ //#endregion
3626
+ //#region ../../node_modules/.pnpm/htmlparser2@12.0.0/node_modules/htmlparser2/dist/Parser.js
3627
+ const { fromCodePoint } = String;
3628
+ const formTags = new Set([
3629
+ "input",
3630
+ "option",
3631
+ "optgroup",
3632
+ "select",
3633
+ "button",
3634
+ "datalist",
3635
+ "textarea"
3636
+ ]);
3637
+ const pTag = new Set(["p"]);
3638
+ const headingTags = new Set([
3639
+ "h1",
3640
+ "h2",
3641
+ "h3",
3642
+ "h4",
3643
+ "h5",
3644
+ "h6",
3645
+ "p"
3646
+ ]);
3647
+ const tableSectionTags = new Set(["thead", "tbody"]);
3648
+ const ddtTags = new Set(["dd", "dt"]);
3649
+ const rtpTags = new Set(["rt", "rp"]);
3650
+ const openImpliesClose = new Map([
3651
+ ["tr", new Set([
3652
+ "tr",
3653
+ "th",
3654
+ "td"
3655
+ ])],
3656
+ ["th", new Set(["th"])],
3657
+ ["td", new Set([
3658
+ "thead",
3659
+ "th",
3660
+ "td"
3661
+ ])],
3662
+ ["body", new Set([
3663
+ "head",
3664
+ "link",
3665
+ "script"
3666
+ ])],
3667
+ ["a", new Set(["a"])],
3668
+ ["li", new Set(["li"])],
3669
+ ["p", pTag],
3670
+ ["h1", headingTags],
3671
+ ["h2", headingTags],
3672
+ ["h3", headingTags],
3673
+ ["h4", headingTags],
3674
+ ["h5", headingTags],
3675
+ ["h6", headingTags],
3676
+ ["select", formTags],
3677
+ ["input", formTags],
3678
+ ["output", formTags],
3679
+ ["button", formTags],
3680
+ ["datalist", formTags],
3681
+ ["textarea", formTags],
3682
+ ["option", new Set(["option"])],
3683
+ ["optgroup", new Set(["optgroup", "option"])],
3684
+ ["dd", ddtTags],
3685
+ ["dt", ddtTags],
3686
+ ["address", pTag],
3687
+ ["article", pTag],
3688
+ ["aside", pTag],
3689
+ ["blockquote", pTag],
3690
+ ["details", pTag],
3691
+ ["div", pTag],
3692
+ ["dl", pTag],
3693
+ ["fieldset", pTag],
3694
+ ["figcaption", pTag],
3695
+ ["figure", pTag],
3696
+ ["footer", pTag],
3697
+ ["form", pTag],
3698
+ ["header", pTag],
3699
+ ["hr", pTag],
3700
+ ["main", pTag],
3701
+ ["nav", pTag],
3702
+ ["ol", pTag],
3703
+ ["pre", pTag],
3704
+ ["section", pTag],
3705
+ ["table", pTag],
3706
+ ["ul", pTag],
3707
+ ["rt", rtpTags],
3708
+ ["rp", rtpTags],
3709
+ ["tbody", tableSectionTags],
3710
+ ["tfoot", tableSectionTags]
3711
+ ]);
3712
+ const DOCUMENT_TYPE = "doctype";
3713
+ const voidElements = new Set([
3714
+ "area",
3715
+ "base",
3716
+ "basefont",
3717
+ "br",
3718
+ "col",
3719
+ "command",
3720
+ "embed",
3721
+ "frame",
3722
+ "hr",
3723
+ "img",
3724
+ "input",
3725
+ "isindex",
3726
+ "keygen",
3727
+ "link",
3728
+ "meta",
3729
+ "param",
3730
+ "source",
3731
+ "track",
3732
+ "wbr"
3733
+ ]);
3734
+ const foreignContextElements = new Set(["math", "svg"]);
3735
+ /**
3736
+ * Elements that can be used to integrate HTML content within foreign namespaces (e.g., SVG or MathML).
3737
+ *
3738
+ * Entries must use the SVG-adjusted casing (e.g. "foreignObject" not
3739
+ * "foreignobject") since they are compared against adjusted tag names.
3740
+ */
3741
+ const htmlIntegrationElements = new Set([
3742
+ "mi",
3743
+ "mo",
3744
+ "mn",
3745
+ "ms",
3746
+ "mtext",
3747
+ "annotation-xml",
3748
+ "foreignObject",
3749
+ "desc",
3750
+ "title"
3751
+ ]);
3752
+ const svgTagNameAdjustments = new Map([
3753
+ ["altglyph", "altGlyph"],
3754
+ ["altglyphdef", "altGlyphDef"],
3755
+ ["altglyphitem", "altGlyphItem"],
3756
+ ["animatecolor", "animateColor"],
3757
+ ["animatemotion", "animateMotion"],
3758
+ ["animatetransform", "animateTransform"],
3759
+ ["clippath", "clipPath"],
3760
+ ["feblend", "feBlend"],
3761
+ ["fecolormatrix", "feColorMatrix"],
3762
+ ["fecomponenttransfer", "feComponentTransfer"],
3763
+ ["fecomposite", "feComposite"],
3764
+ ["feconvolvematrix", "feConvolveMatrix"],
3765
+ ["fediffuselighting", "feDiffuseLighting"],
3766
+ ["fedisplacementmap", "feDisplacementMap"],
3767
+ ["fedistantlight", "feDistantLight"],
3768
+ ["fedropshadow", "feDropShadow"],
3769
+ ["feflood", "feFlood"],
3770
+ ["fefunca", "feFuncA"],
3771
+ ["fefuncb", "feFuncB"],
3772
+ ["fefuncg", "feFuncG"],
3773
+ ["fefuncr", "feFuncR"],
3774
+ ["fegaussianblur", "feGaussianBlur"],
3775
+ ["feimage", "feImage"],
3776
+ ["femerge", "feMerge"],
3777
+ ["femergenode", "feMergeNode"],
3778
+ ["femorphology", "feMorphology"],
3779
+ ["feoffset", "feOffset"],
3780
+ ["fepointlight", "fePointLight"],
3781
+ ["fespecularlighting", "feSpecularLighting"],
3782
+ ["fespotlight", "feSpotLight"],
3783
+ ["fetile", "feTile"],
3784
+ ["feturbulence", "feTurbulence"],
3785
+ ["foreignobject", "foreignObject"],
3786
+ ["glyphref", "glyphRef"],
3787
+ ["lineargradient", "linearGradient"],
3788
+ ["radialgradient", "radialGradient"],
3789
+ ["textpath", "textPath"]
3790
+ ]);
3791
+ var ForeignContext;
3792
+ (function(ForeignContext) {
3793
+ ForeignContext[ForeignContext["None"] = 0] = "None";
3794
+ ForeignContext[ForeignContext["Svg"] = 1] = "Svg";
3795
+ ForeignContext[ForeignContext["MathML"] = 2] = "MathML";
3796
+ })(ForeignContext || (ForeignContext = {}));
3797
+ const reNameEnd = /\s|\//;
3798
+ /**
3799
+ * Incremental parser implementation.
3800
+ */
3801
+ var Parser = class {
3802
+ constructor(cbs, options = {}) {
3803
+ _defineProperty(this, "options", void 0);
3804
+ _defineProperty(
3805
+ this,
3806
+ /** The start index of the last event. */
3807
+ "startIndex",
3808
+ 0
3809
+ );
3810
+ _defineProperty(
3811
+ this,
3812
+ /** The end index of the last event. */
3813
+ "endIndex",
3814
+ 0
3815
+ );
3816
+ _defineProperty(
3817
+ this,
3818
+ /**
3819
+ * Store the start index of the current open tag,
3820
+ * so we can update the start index for attributes.
3821
+ */
3822
+ "openTagStart",
3823
+ 0
3824
+ );
3825
+ _defineProperty(this, "tagname", "");
3826
+ _defineProperty(this, "attribname", "");
3827
+ _defineProperty(this, "attribvalue", "");
3828
+ _defineProperty(this, "attribs", null);
3829
+ _defineProperty(this, "stack", []);
3830
+ _defineProperty(this, "foreignContext", void 0);
3831
+ _defineProperty(this, "cbs", void 0);
3832
+ _defineProperty(this, "lowerCaseTagNames", void 0);
3833
+ _defineProperty(this, "lowerCaseAttributeNames", void 0);
3834
+ _defineProperty(this, "recognizeSelfClosing", void 0);
3835
+ _defineProperty(
3836
+ this,
3837
+ /** We are parsing HTML. Inverse of the `xmlMode` option. */
3838
+ "htmlMode",
3839
+ void 0
3840
+ );
3841
+ _defineProperty(this, "tokenizer", void 0);
3842
+ _defineProperty(this, "buffers", []);
3843
+ _defineProperty(this, "bufferOffset", 0);
3844
+ _defineProperty(
3845
+ this,
3846
+ /** The index of the last written buffer. Used when resuming after a `pause()`. */
3847
+ "writeIndex",
3848
+ 0
3849
+ );
3850
+ _defineProperty(
3851
+ this,
3852
+ /** Indicates whether the parser has finished running / `.end` has been called. */
3853
+ "ended",
3854
+ false
3855
+ );
3856
+ this.options = options;
3857
+ this.cbs = cbs ?? {};
3858
+ this.htmlMode = !this.options.xmlMode;
3859
+ this.lowerCaseTagNames = options.lowerCaseTags ?? this.htmlMode;
3860
+ this.lowerCaseAttributeNames = options.lowerCaseAttributeNames ?? this.htmlMode;
3861
+ this.recognizeSelfClosing = options.recognizeSelfClosing ?? !this.htmlMode;
3862
+ this.tokenizer = new (options.Tokenizer ?? Tokenizer$1)(this.options, this);
3863
+ this.foreignContext = [ForeignContext.None];
3864
+ this.cbs.onparserinit?.(this);
3865
+ }
3866
+ /**
3867
+ * @param start Start index for the current parser event.
3868
+ * @param endIndex End index for the current parser event.
3869
+ * @internal
3870
+ */
3871
+ ontext(start, endIndex) {
3872
+ const data = this.getSlice(start, endIndex);
3873
+ this.endIndex = endIndex - 1;
3874
+ this.cbs.ontext?.(data);
3875
+ this.startIndex = endIndex;
3876
+ }
3877
+ /**
3878
+ * @param cp Current Unicode code point.
3879
+ * @param endIndex End index for the current parser event.
3880
+ * @internal
3881
+ */
3882
+ ontextentity(cp, endIndex) {
3883
+ this.endIndex = endIndex - 1;
3884
+ this.cbs.ontext?.(fromCodePoint(cp));
3885
+ this.startIndex = endIndex;
3886
+ }
3887
+ /** @internal */
3888
+ isInForeignContext() {
3889
+ return this.foreignContext[0] !== ForeignContext.None;
3890
+ }
3891
+ /**
3892
+ * Checks if the current tag is a void element. Override this if you want
3893
+ * to specify your own additional void elements.
3894
+ * @param name Name of the pseudo selector.
3895
+ */
3896
+ isVoidElement(name) {
3897
+ return this.htmlMode && voidElements.has(name);
3898
+ }
3899
+ /**
3900
+ * Read a tag name from the buffer.
3901
+ *
3902
+ * When `lowerCaseTagNames` is enabled (the default in HTML mode), the name
3903
+ * is lowercased and may be adjusted for SVG casing or the `image` → `img`
3904
+ * alias.
3905
+ * @param start Start index of the tag name in the buffer.
3906
+ * @param endIndex End index of the tag name in the buffer.
3907
+ */
3908
+ readTagName(start, endIndex) {
3909
+ const name = this.lowerCaseTagNames ? this.getSlice(start, endIndex).toLowerCase() : this.getSlice(start, endIndex);
3910
+ if (!(this.lowerCaseTagNames && this.htmlMode)) return name;
3911
+ if (this.foreignContext[0] === ForeignContext.Svg) return svgTagNameAdjustments.get(name) ?? name;
3912
+ if (this.foreignContext.length > 1) {
3913
+ const adjusted = svgTagNameAdjustments.get(name);
3914
+ if (adjusted !== void 0 && this.stack.includes(adjusted)) return adjusted;
3915
+ }
3916
+ if (!this.isInForeignContext()) return name === "image" ? "img" : name;
3917
+ return name;
3918
+ }
3919
+ /**
3920
+ * @param start Start index for the current parser event.
3921
+ * @param endIndex End index for the current parser event.
3922
+ * @internal
3923
+ */
3924
+ onopentagname(start, endIndex) {
3925
+ this.endIndex = endIndex;
3926
+ this.emitOpenTag(this.readTagName(start, endIndex));
3927
+ }
3928
+ emitOpenTag(name) {
3929
+ this.openTagStart = this.startIndex;
3930
+ this.tagname = name;
3931
+ if (this.htmlMode && name === "form" && this.stack.includes("form")) {
3932
+ this.tagname = "";
3933
+ return;
3934
+ }
3935
+ const impliesClose = this.htmlMode && openImpliesClose.get(name);
3936
+ if (impliesClose) while (this.stack.length > 0 && impliesClose.has(this.stack[0])) this.popElement(true);
3937
+ if (!this.isVoidElement(name)) {
3938
+ this.stack.unshift(name);
3939
+ if (this.htmlMode) {
3940
+ if (name === "svg") this.foreignContext.unshift(ForeignContext.Svg);
3941
+ else if (name === "math") this.foreignContext.unshift(ForeignContext.MathML);
3942
+ else if (htmlIntegrationElements.has(name)) this.foreignContext.unshift(ForeignContext.None);
3943
+ }
3944
+ }
3945
+ this.cbs.onopentagname?.(name);
3946
+ if (this.cbs.onopentag) this.attribs = {};
3947
+ }
3948
+ endOpenTag(isImplied) {
3949
+ this.startIndex = this.openTagStart;
3950
+ if (this.attribs) {
3951
+ this.cbs.onopentag?.(this.tagname, this.attribs, isImplied);
3952
+ this.attribs = null;
3953
+ }
3954
+ if (this.cbs.onclosetag && this.isVoidElement(this.tagname)) this.cbs.onclosetag(this.tagname, true);
3955
+ this.tagname = "";
3956
+ }
3957
+ /**
3958
+ * @param endIndex End index for the current parser event.
3959
+ * @internal
3960
+ */
3961
+ onopentagend(endIndex) {
3962
+ this.endIndex = endIndex;
3963
+ this.endOpenTag(false);
3964
+ this.startIndex = endIndex + 1;
3965
+ }
3966
+ /**
3967
+ * @param start Start index for the current parser event.
3968
+ * @param endIndex End index for the current parser event.
3969
+ * @internal
3970
+ */
3971
+ onclosetag(start, endIndex) {
3972
+ this.endIndex = endIndex;
3973
+ const name = this.readTagName(start, endIndex);
3974
+ if (!this.isVoidElement(name)) {
3975
+ const pos = this.stack.indexOf(name);
3976
+ if (pos !== -1) {
3977
+ for (let index = 0; index < pos; index++) this.popElement(true);
3978
+ this.popElement(false);
3979
+ } else if (this.htmlMode && name === "p") {
3980
+ this.emitOpenTag("p");
3981
+ this.closeCurrentTag(true);
3982
+ }
3983
+ } else if (this.htmlMode && name === "br") {
3984
+ this.cbs.onopentagname?.("br");
3985
+ this.cbs.onopentag?.("br", {}, true);
3986
+ this.cbs.onclosetag?.("br", false);
3987
+ }
3988
+ this.startIndex = endIndex + 1;
3989
+ }
3990
+ /**
3991
+ * @param endIndex End index for the current parser event.
3992
+ * @internal
3993
+ */
3994
+ onselfclosingtag(endIndex) {
3995
+ this.endIndex = endIndex;
3996
+ if (this.recognizeSelfClosing || this.isInForeignContext()) {
3997
+ this.closeCurrentTag(false);
3998
+ this.startIndex = endIndex + 1;
3999
+ } else this.onopentagend(endIndex);
4000
+ }
4001
+ /**
4002
+ * Pop the top element off the stack, emit a close event, and maintain
4003
+ * the foreign context stack.
4004
+ * @param implied Whether this close is implied (not from an explicit end tag).
4005
+ */
4006
+ popElement(implied) {
4007
+ const element = this.stack.shift();
4008
+ if (this.htmlMode && (foreignContextElements.has(element) || htmlIntegrationElements.has(element))) this.foreignContext.shift();
4009
+ this.cbs.onclosetag?.(element, implied);
4010
+ }
4011
+ closeCurrentTag(isOpenImplied) {
4012
+ const name = this.tagname;
4013
+ this.endOpenTag(isOpenImplied);
4014
+ if (this.stack[0] === name) this.popElement(!isOpenImplied);
4015
+ }
4016
+ /**
4017
+ * @param start Start index for the current parser event.
4018
+ * @param endIndex End index for the current parser event.
4019
+ * @internal
4020
+ */
4021
+ onattribname(start, endIndex) {
4022
+ this.startIndex = start;
4023
+ const name = this.getSlice(start, endIndex);
4024
+ this.attribname = this.lowerCaseAttributeNames ? name.toLowerCase() : name;
4025
+ }
4026
+ /**
4027
+ * @param start Start index for the current parser event.
4028
+ * @param endIndex End index for the current parser event.
4029
+ * @internal
4030
+ */
4031
+ onattribdata(start, endIndex) {
4032
+ this.attribvalue += this.getSlice(start, endIndex);
4033
+ }
4034
+ /**
4035
+ * @param cp Current Unicode code point.
4036
+ * @internal
4037
+ */
4038
+ onattribentity(cp) {
4039
+ this.attribvalue += fromCodePoint(cp);
4040
+ }
4041
+ /**
4042
+ * @param quote Quote type used for the current attribute.
4043
+ * @param endIndex End index for the current parser event.
4044
+ * @internal
4045
+ */
4046
+ onattribend(quote, endIndex) {
4047
+ this.endIndex = endIndex;
4048
+ this.cbs.onattribute?.(this.attribname, this.attribvalue, quote === QuoteType.Double ? "\"" : quote === QuoteType.Single ? "'" : quote === QuoteType.NoValue ? void 0 : null);
4049
+ if (this.attribs && !Object.hasOwn(this.attribs, this.attribname)) this.attribs[this.attribname] = this.attribvalue;
4050
+ this.attribvalue = "";
4051
+ }
4052
+ getInstructionName(value) {
4053
+ const index = value.search(reNameEnd);
4054
+ let name = index < 0 ? value : value.substr(0, index);
4055
+ if (this.lowerCaseTagNames) name = name.toLowerCase();
4056
+ return name;
4057
+ }
4058
+ /**
4059
+ * @param start Start index for the current parser event.
4060
+ * @param endIndex End index for the current parser event.
4061
+ * @internal
4062
+ */
4063
+ ondeclaration(start, endIndex) {
4064
+ this.endIndex = endIndex;
4065
+ const value = this.getSlice(start, endIndex);
4066
+ if (this.cbs.onprocessinginstruction) {
4067
+ const name = this.htmlMode ? this.lowerCaseTagNames ? DOCUMENT_TYPE : value.slice(0, 7) : this.getInstructionName(value);
4068
+ this.cbs.onprocessinginstruction(`!${name}`, `!${value}`);
4069
+ }
4070
+ this.startIndex = endIndex + 1;
4071
+ }
4072
+ /**
4073
+ * @param start Start index for the current parser event.
4074
+ * @param endIndex End index for the current parser event.
4075
+ * @internal
4076
+ */
4077
+ onprocessinginstruction(start, endIndex) {
4078
+ this.endIndex = endIndex;
4079
+ const value = this.getSlice(start, endIndex);
4080
+ if (this.cbs.onprocessinginstruction) {
4081
+ const name = this.getInstructionName(value);
4082
+ this.cbs.onprocessinginstruction(`?${name}`, `?${value}`);
4083
+ }
4084
+ this.startIndex = endIndex + 1;
4085
+ }
4086
+ /**
4087
+ * @param start Start index for the current parser event.
4088
+ * @param endIndex End index for the current parser event.
4089
+ * @param offset Offset applied when computing parser indices.
4090
+ * @internal
4091
+ */
4092
+ oncomment(start, endIndex, offset) {
4093
+ this.endIndex = endIndex;
4094
+ this.cbs.oncomment?.(this.getSlice(start, endIndex - offset));
4095
+ this.cbs.oncommentend?.();
4096
+ this.startIndex = endIndex + 1;
4097
+ }
4098
+ /**
4099
+ * @param start Start index for the current parser event.
4100
+ * @param endIndex End index for the current parser event.
4101
+ * @param offset Offset applied when computing parser indices.
4102
+ * @internal
4103
+ */
4104
+ oncdata(start, endIndex, offset) {
4105
+ this.endIndex = endIndex;
4106
+ const value = this.getSlice(start, endIndex - offset);
4107
+ if (!this.htmlMode || this.options.recognizeCDATA) {
4108
+ this.cbs.oncdatastart?.();
4109
+ this.cbs.ontext?.(value);
4110
+ this.cbs.oncdataend?.();
4111
+ } else if (this.isInForeignContext()) this.cbs.ontext?.(value);
4112
+ else {
4113
+ this.cbs.oncomment?.(`[CDATA[${value}]]`);
4114
+ this.cbs.oncommentend?.();
4115
+ }
4116
+ this.startIndex = endIndex + 1;
4117
+ }
4118
+ /** @internal */
4119
+ onend() {
4120
+ if (this.cbs.onclosetag) {
4121
+ this.endIndex = this.startIndex;
4122
+ for (let index = 0; index < this.stack.length; index++) this.cbs.onclosetag(this.stack[index], true);
4123
+ }
4124
+ this.cbs.onend?.();
4125
+ }
4126
+ /**
4127
+ * Resets the parser to a blank state, ready to parse a new HTML document
4128
+ */
4129
+ reset() {
4130
+ this.cbs.onreset?.();
4131
+ this.tokenizer.reset();
4132
+ this.tagname = "";
4133
+ this.attribname = "";
4134
+ this.attribvalue = "";
4135
+ this.attribs = null;
4136
+ this.stack.length = 0;
4137
+ this.startIndex = 0;
4138
+ this.endIndex = 0;
4139
+ this.cbs.onparserinit?.(this);
4140
+ this.buffers.length = 0;
4141
+ this.foreignContext.length = 0;
4142
+ this.foreignContext.unshift(ForeignContext.None);
4143
+ this.bufferOffset = 0;
4144
+ this.writeIndex = 0;
4145
+ this.ended = false;
4146
+ }
4147
+ /**
4148
+ * Resets the parser, then parses a complete document and
4149
+ * pushes it to the handler.
4150
+ * @param data Document to parse.
4151
+ */
4152
+ parseComplete(data) {
4153
+ this.reset();
4154
+ this.end(data);
4155
+ }
4156
+ getSlice(start, end) {
4157
+ if (start === end) return "";
4158
+ while (start - this.bufferOffset >= this.buffers[0].length) this.shiftBuffer();
4159
+ let slice = this.buffers[0].slice(start - this.bufferOffset, end - this.bufferOffset);
4160
+ while (end - this.bufferOffset > this.buffers[0].length) {
4161
+ this.shiftBuffer();
4162
+ slice += this.buffers[0].slice(0, end - this.bufferOffset);
4163
+ }
4164
+ return slice;
4165
+ }
4166
+ shiftBuffer() {
4167
+ this.bufferOffset += this.buffers[0].length;
4168
+ this.writeIndex--;
4169
+ this.buffers.shift();
4170
+ }
4171
+ /**
4172
+ * Parses a chunk of data and calls the corresponding callbacks.
4173
+ * @param chunk Chunk to parse.
4174
+ */
4175
+ write(chunk) {
4176
+ if (this.ended) {
4177
+ this.cbs.onerror?.(/* @__PURE__ */ new Error(".write() after done!"));
4178
+ return;
4179
+ }
4180
+ this.buffers.push(chunk);
4181
+ if (this.tokenizer.running) {
4182
+ this.tokenizer.write(chunk);
4183
+ this.writeIndex++;
4184
+ }
4185
+ }
4186
+ /**
4187
+ * Parses the end of the buffer and clears the stack, calls onend.
4188
+ * @param chunk Optional final chunk to parse.
4189
+ */
4190
+ end(chunk) {
4191
+ if (this.ended) {
4192
+ this.cbs.onerror?.(/* @__PURE__ */ new Error(".end() after done!"));
4193
+ return;
4194
+ }
4195
+ if (chunk) this.write(chunk);
4196
+ this.ended = true;
4197
+ this.tokenizer.end();
4198
+ }
4199
+ /**
4200
+ * Pauses parsing. The parser won't emit events until `resume` is called.
4201
+ */
4202
+ pause() {
4203
+ this.tokenizer.pause();
4204
+ }
4205
+ /**
4206
+ * Resumes parsing after `pause` was called.
4207
+ */
4208
+ resume() {
4209
+ this.tokenizer.resume();
4210
+ while (this.tokenizer.running && this.writeIndex < this.buffers.length) this.tokenizer.write(this.buffers[this.writeIndex++]);
4211
+ if (this.ended) this.tokenizer.end();
4212
+ }
4213
+ };
4214
+ //#endregion
2229
4215
  //#region src/wxml/whitespace.ts
2230
4216
  const WHITESPACE_CODES = new Set([
2231
4217
  9,
@@ -2702,4 +4688,4 @@ function shouldSkipJsTransform(rawSource, options) {
2702
4688
  return !FAST_JS_TRANSFORM_HINT_RE.test(rawSource);
2703
4689
  }
2704
4690
  //#endregion
2705
- export { createTailwindRuntimeReadyPromise as _, vitePluginName as a, analyzeSource as c, isClassContextLiteralPath as d, replaceWxml as f, collectRuntimeClassSet as g, toCustomAttributesEntities as h, pluginName as i, JsTokenUpdater as l, traverse as m, getCompilerContext as n, generateCode as o, babelParse as p, resolveStyleOptionsFromContext as r, createAttributeMatcher as s, shouldSkipJsTransform as t, _defineProperty as u, ensureRuntimeClassSet as v, refreshTailwindRuntimeState as y };
4691
+ export { collectRuntimeClassSet as _, vitePluginName as a, refreshTailwindRuntimeState as b, createAttributeMatcher as c, _defineProperty as d, isClassContextLiteralPath as f, toCustomAttributesEntities as g, traverse as h, pluginName as i, analyzeSource as l, babelParse as m, getCompilerContext as n, Parser as o, replaceWxml as p, resolveStyleOptionsFromContext as r, generateCode as s, shouldSkipJsTransform as t, JsTokenUpdater as u, createTailwindRuntimeReadyPromise as v, ensureRuntimeClassSet as y };