xmlui 0.9.51 → 0.9.53

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 (171) hide show
  1. package/dist/lib/{apiInterceptorWorker-BtGYrMWj.mjs → apiInterceptorWorker-CZW6DSTB.mjs} +3 -3
  2. package/dist/lib/{index-hS5S81ba.mjs → index-qpGKk07J.mjs} +13827 -12206
  3. package/dist/lib/index.css +1 -1
  4. package/dist/lib/language-server-web-worker.mjs +1 -1
  5. package/dist/lib/language-server.mjs +1 -1
  6. package/dist/lib/{metadata-utils-QekhOD-W.mjs → metadata-utils-4EQ6kQIM.mjs} +7 -7
  7. package/dist/lib/{server-common-CtY73qos.mjs → server-common-SNl_47nE.mjs} +2 -2
  8. package/dist/lib/{transform-DXcw0gGl.mjs → transform-CgRMkbb0.mjs} +1472 -1440
  9. package/dist/lib/xmlui-parser.d.ts +84 -62
  10. package/dist/lib/xmlui-parser.mjs +41 -49
  11. package/dist/lib/{xmlui-serializer-CAZCkpXP.mjs → xmlui-serializer-EDw51UFN.mjs} +10 -10
  12. package/dist/lib/xmlui.d.ts +17 -7
  13. package/dist/lib/xmlui.mjs +19 -18
  14. package/dist/metadata/apiInterceptorWorker-CC40OeUC.mjs +15414 -0
  15. package/dist/metadata/collectedComponentMetadata-C5DVNC6p.mjs +41262 -0
  16. package/dist/metadata/core-D3puiNN6.mjs +5771 -0
  17. package/dist/metadata/style.css +1 -1
  18. package/dist/metadata/wasm-DQxwEHae.mjs +7 -0
  19. package/dist/metadata/xmlui-metadata.mjs +3 -18398
  20. package/dist/metadata/xmlui-metadata.umd.js +549 -10
  21. package/dist/scripts/package.json +5 -6
  22. package/dist/scripts/src/components/APICall/APICall.js +13 -12
  23. package/dist/scripts/src/components/APICall/APICallNative.js +5 -0
  24. package/dist/scripts/src/components/Accordion/Accordion.js +4 -2
  25. package/dist/scripts/src/components/Accordion/AccordionItem.js +2 -2
  26. package/dist/scripts/src/components/Accordion/AccordionItemNative.js +6 -2
  27. package/dist/scripts/src/components/App/App.js +22 -9
  28. package/dist/scripts/src/components/App/AppNative.js +9 -1
  29. package/dist/scripts/src/components/AppHeader/AppHeader.js +2 -2
  30. package/dist/scripts/src/components/AppHeader/AppHeaderNative.js +5 -2
  31. package/dist/scripts/src/components/AppState/AppState.js +2 -2
  32. package/dist/scripts/src/components/AppState/AppStateNative.js +5 -1
  33. package/dist/scripts/src/components/AutoComplete/AutoComplete.js +8 -8
  34. package/dist/scripts/src/components/AutoComplete/AutoCompleteNative.js +16 -2
  35. package/dist/scripts/src/components/Avatar/Avatar.js +4 -2
  36. package/dist/scripts/src/components/Backdrop/Backdrop.js +2 -2
  37. package/dist/scripts/src/components/Badge/Badge.js +7 -5
  38. package/dist/scripts/src/components/Bookmark/Bookmark.js +5 -4
  39. package/dist/scripts/src/components/Card/Card.js +6 -4
  40. package/dist/scripts/src/components/ChangeListener/ChangeListener.js +2 -1
  41. package/dist/scripts/src/components/Charts/BarChart/BarChart.js +76 -0
  42. package/dist/scripts/src/components/Charts/BarChart/BarChartNative.js +108 -0
  43. package/dist/scripts/src/components/Charts/DonutChart/DonutChart.js +59 -0
  44. package/dist/scripts/src/components/Charts/LabelList/LabelList.js +38 -0
  45. package/dist/scripts/src/components/Charts/LabelList/LabelListNative.js +24 -0
  46. package/dist/scripts/src/components/Charts/Legend/Legend.js +30 -0
  47. package/dist/scripts/src/components/Charts/Legend/LegendNative.js +64 -0
  48. package/dist/scripts/src/components/Charts/LineChart/LineChart.js +53 -0
  49. package/dist/scripts/src/components/Charts/LineChart/LineChartNative.js +103 -0
  50. package/dist/scripts/src/components/Charts/PieChart/PieChart.js +58 -0
  51. package/dist/scripts/src/components/Charts/PieChart/PieChartNative.js +127 -0
  52. package/dist/scripts/src/components/Charts/Tooltip/TooltipContent.js +27 -0
  53. package/dist/scripts/src/components/Charts/utils/ChartProvider.js +65 -0
  54. package/dist/scripts/src/components/Charts/utils/abstractions.js +26 -0
  55. package/dist/scripts/src/components/CodeBlock/CodeBlock.js +4 -4
  56. package/dist/scripts/src/components/CodeBlock/CodeBlockNative.js +5 -1
  57. package/dist/scripts/src/components/Column/Column.js +15 -9
  58. package/dist/scripts/src/components/Column/ColumnNative.js +5 -0
  59. package/dist/scripts/src/components/ComponentProvider.js +14 -6
  60. package/dist/scripts/src/components/ContentSeparator/ContentSeparator.js +4 -3
  61. package/dist/scripts/src/components/DatePicker/DatePicker.js +5 -3
  62. package/dist/scripts/src/components/EmojiSelector/EmojiSelector.js +1 -1
  63. package/dist/scripts/src/components/EmojiSelector/EmojiSelectorNative.js +7 -2
  64. package/dist/scripts/src/components/ExpandableItem/ExpandableItem.js +88 -0
  65. package/dist/scripts/src/components/ExpandableItem/ExpandableItemNative.js +91 -0
  66. package/dist/scripts/src/components/FileInput/FileInput.js +8 -9
  67. package/dist/scripts/src/components/FileInput/FileInputNative.js +14 -2
  68. package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZone.js +2 -2
  69. package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZoneNative.js +9 -2
  70. package/dist/scripts/src/components/Footer/Footer.js +1 -0
  71. package/dist/scripts/src/components/Footer/FooterNative.js +4 -1
  72. package/dist/scripts/src/components/Form/Form.js +9 -5
  73. package/dist/scripts/src/components/Form/FormNative.js +2 -1
  74. package/dist/scripts/src/components/FormItem/FormItem.js +25 -15
  75. package/dist/scripts/src/components/FormItem/FormItemNative.js +1 -0
  76. package/dist/scripts/src/components/Heading/Heading.js +12 -6
  77. package/dist/scripts/src/components/Heading/HeadingNative.js +7 -0
  78. package/dist/scripts/src/components/Icon/Icon.js +7 -5
  79. package/dist/scripts/src/components/Image/Image.js +19 -9
  80. package/dist/scripts/src/components/Image/ImageNative.js +7 -2
  81. package/dist/scripts/src/components/Items/Items.js +2 -0
  82. package/dist/scripts/src/components/Items/ItemsNative.js +5 -1
  83. package/dist/scripts/src/components/Link/Link.js +3 -4
  84. package/dist/scripts/src/components/Link/LinkNative.js +6 -2
  85. package/dist/scripts/src/components/List/List.js +12 -11
  86. package/dist/scripts/src/components/List/ListNative.js +10 -2
  87. package/dist/scripts/src/components/Logo/Logo.js +7 -0
  88. package/dist/scripts/src/components/Logo/LogoNative.js +6 -2
  89. package/dist/scripts/src/components/Markdown/Markdown.js +5 -4
  90. package/dist/scripts/src/components/Markdown/MarkdownNative.js +64 -21
  91. package/dist/scripts/src/components/Markdown/utils.js +23 -1
  92. package/dist/scripts/src/components/ModalDialog/ModalDialog.js +2 -2
  93. package/dist/scripts/src/components/ModalDialog/ModalDialogNative.js +7 -2
  94. package/dist/scripts/src/components/NavGroup/NavGroup.js +2 -1
  95. package/dist/scripts/src/components/NavLink/NavLink.js +5 -7
  96. package/dist/scripts/src/components/NavLink/NavLinkNative.js +7 -2
  97. package/dist/scripts/src/components/NavPanel/NavPanel.js +6 -0
  98. package/dist/scripts/src/components/NavPanel/NavPanelNative.js +6 -2
  99. package/dist/scripts/src/components/NestedApp/NestedApp.js +16 -4
  100. package/dist/scripts/src/components/NestedApp/NestedAppNative.js +37 -34
  101. package/dist/scripts/src/components/NestedApp/defaultProps.js +10 -0
  102. package/dist/scripts/src/components/NoResult/NoResult.js +6 -2
  103. package/dist/scripts/src/components/NoResult/NoResultNative.js +8 -3
  104. package/dist/scripts/src/components/NumberBox/NumberBox.js +8 -6
  105. package/dist/scripts/src/components/NumberBox/NumberBox2.js +6 -6
  106. package/dist/scripts/src/components/NumberBox/NumberBox2Native.js +15 -2
  107. package/dist/scripts/src/components/NumberBox/NumberBoxNative.js +16 -2
  108. package/dist/scripts/src/components/Option/Option.js +10 -15
  109. package/dist/scripts/src/components/Option/OptionNative.js +18 -0
  110. package/dist/scripts/src/components/PageMetaTitle/PageMetaTilteNative.js +6 -2
  111. package/dist/scripts/src/components/PageMetaTitle/PageMetaTitle.js +4 -1
  112. package/dist/scripts/src/components/Pages/Pages.js +7 -3
  113. package/dist/scripts/src/components/Pages/PagesNative.js +5 -0
  114. package/dist/scripts/src/components/ProgressBar/ProgressBar.js +1 -1
  115. package/dist/scripts/src/components/ProgressBar/ProgressBarNative.js +5 -2
  116. package/dist/scripts/src/components/Queue/Queue.js +11 -6
  117. package/dist/scripts/src/components/Queue/QueueNative.js +7 -1
  118. package/dist/scripts/src/components/RadioGroup/RadioGroup.js +5 -5
  119. package/dist/scripts/src/components/RadioGroup/RadioGroupNative.js +9 -2
  120. package/dist/scripts/src/components/RadioGroup/RadioItem.js +8 -2
  121. package/dist/scripts/src/components/RadioGroup/RadioItemNative.js +6 -2
  122. package/dist/scripts/src/components/RealTimeAdapter/RealTimeAdapter.js +4 -1
  123. package/dist/scripts/src/components/RealTimeAdapter/RealTimeAdapterNative.js +4 -0
  124. package/dist/scripts/src/components/Redirect/Redirect.js +8 -2
  125. package/dist/scripts/src/components/Select/Select.js +21 -12
  126. package/dist/scripts/src/components/Select/SelectNative.js +15 -2
  127. package/dist/scripts/src/components/SelectionStore/SelectionStore.js +6 -3
  128. package/dist/scripts/src/components/SelectionStore/SelectionStoreNative.js +6 -2
  129. package/dist/scripts/src/components/Slider/Slider.js +28 -9
  130. package/dist/scripts/src/components/Slider/SliderNative.js +14 -3
  131. package/dist/scripts/src/components/Spinner/Spinner.js +2 -2
  132. package/dist/scripts/src/components/Spinner/SpinnerNative.js +6 -2
  133. package/dist/scripts/src/components/Splitter/Splitter.js +6 -6
  134. package/dist/scripts/src/components/Splitter/SplitterNative.js +10 -2
  135. package/dist/scripts/src/components/Stack/Stack.js +4 -4
  136. package/dist/scripts/src/components/Stack/StackNative.js +8 -2
  137. package/dist/scripts/src/components/StickyBox/StickyBox.js +1 -1
  138. package/dist/scripts/src/components/StickyBox/StickyBoxNative.js +7 -1
  139. package/dist/scripts/src/components/Table/Table.js +15 -14
  140. package/dist/scripts/src/components/Table/TableNative.js +25 -9
  141. package/dist/scripts/src/components/TableOfContents/TableOfContents.js +12 -3
  142. package/dist/scripts/src/components/TableOfContents/TableOfContentsNative.js +6 -2
  143. package/dist/scripts/src/components/Tabs/Tabs.js +2 -2
  144. package/dist/scripts/src/components/Tabs/TabsNative.js +7 -2
  145. package/dist/scripts/src/components/Text/Text.js +14 -13
  146. package/dist/scripts/src/components/Text/TextNative.js +7 -2
  147. package/dist/scripts/src/components/TextArea/TextArea.js +8 -5
  148. package/dist/scripts/src/components/TextArea/TextAreaNative.js +19 -2
  149. package/dist/scripts/src/components/TextBox/TextBox.js +5 -4
  150. package/dist/scripts/src/components/TextBox/TextBoxNative.js +14 -2
  151. package/dist/scripts/src/components/Theme/Theme.js +1 -1
  152. package/dist/scripts/src/components/Theme/ThemeNative.js +10 -14
  153. package/dist/scripts/src/components/ToneChangerButton/ToneChangerButton.js +18 -8
  154. package/dist/scripts/src/components/TreeDisplay/TreeDisplay.js +1 -1
  155. package/dist/scripts/src/components/TreeDisplay/TreeDisplayNative.js +2 -1
  156. package/dist/scripts/src/components/ValidationSummary/ValidationSummary.js +3 -57
  157. package/dist/scripts/src/components/ValidationSummary/ValidationSummaryNative.js +64 -0
  158. package/dist/scripts/src/components/metadata-helpers.js +11 -8
  159. package/dist/scripts/src/components-core/InspectorContext.js +2 -7
  160. package/dist/scripts/src/components-core/interception/ApiInterceptor.js +1 -1
  161. package/dist/scripts/src/components-core/interception/ApiInterceptorProvider.js +6 -2
  162. package/dist/scripts/src/components-core/loader/DataLoader.js +1 -1
  163. package/dist/scripts/src/components-core/loader/Loader.js +7 -3
  164. package/dist/scripts/src/components-core/theming/themes/palette.js +5 -4
  165. package/dist/scripts/src/components-core/theming/themes/root.js +5 -4
  166. package/dist/scripts/src/components-core/theming/transformThemeVars.js +1 -17
  167. package/dist/scripts/src/parsers/xmlui-parser/diagnostics.js +92 -48
  168. package/dist/scripts/src/parsers/xmlui-parser/parser.js +179 -189
  169. package/dist/standalone/xmlui-standalone.es.d.ts +235 -223
  170. package/dist/standalone/xmlui-standalone.umd.js +288 -316
  171. package/package.json +5 -6
@@ -1,6 +1,6 @@
1
- import { parseRegExpLiteral as Ye } from "@eslint-community/regexpp";
2
- const be = 1, Ee = 2, hn = 3, Fn = 4, dn = 5, pn = 6, Qe = 7, kn = 8, gn = 9, En = 10, mn = 11, xn = 12, _n = 13, Sn = 14, me = 15, Ne = 16, Nn = 17, An = 18, Ln = 19, We = 20, wn = 100, Q = 101, ae = 102, Tn = 103, vn = 104, On = 105, In = 106, M = 107, bn = 108, Z = 109, oe = 110, ce = 111, ue = 112, Dn = 113, xe = 114, Be = 115, Rn = 116, Bn = 117, Wn = 118, Xe = 200, De = 201, ne = 202, ie = 203, Pn = 204;
3
- class Ze {
1
+ import { parseRegExpLiteral as Xe } from "@eslint-community/regexpp";
2
+ const Te = 1, ge = 2, an = 3, Wn = 4, on = 5, cn = 6, qe = 7, un = 8, fn = 9, hn = 10, pn = 11, dn = 12, kn = 13, gn = 14, Ee = 15, Ne = 16, En = 17, mn = 18, xn = 19, be = 20, Nn = 100, Y = 101, oe = 102, Sn = 103, _n = 104, An = 105, Ln = 106, $ = 107, wn = 108, C = 109, ce = 110, ue = 111, fe = 112, Tn = 113, me = 114, Ie = 115, vn = 116, On = 117, In = 118, ye = 200, ve = 201, re = 202, se = 203, bn = 204;
3
+ class Ge {
4
4
  // Creates a stream that uses the specified source code
5
5
  constructor(n) {
6
6
  this.source = n, this._pos = 0, this._line = 1, this._column = 0;
@@ -40,7 +40,7 @@ class Ze {
40
40
  }
41
41
  }
42
42
  var i = /* @__PURE__ */ ((e) => (e[e.Eof = -1] = "Eof", e[e.Ws = -2] = "Ws", e[e.BlockComment = -3] = "BlockComment", e[e.EolComment = -4] = "EolComment", e[e.Unknown = 0] = "Unknown", e[e.LParent = 1] = "LParent", e[e.RParent = 2] = "RParent", e[e.Identifier = 3] = "Identifier", e[e.Exponent = 4] = "Exponent", e[e.Divide = 5] = "Divide", e[e.Multiply = 6] = "Multiply", e[e.Remainder = 7] = "Remainder", e[e.Plus = 8] = "Plus", e[e.Minus = 9] = "Minus", e[e.BitwiseXor = 10] = "BitwiseXor", e[e.BitwiseOr = 11] = "BitwiseOr", e[e.LogicalOr = 12] = "LogicalOr", e[e.BitwiseAnd = 13] = "BitwiseAnd", e[e.LogicalAnd = 14] = "LogicalAnd", e[e.IncOp = 15] = "IncOp", e[e.DecOp = 16] = "DecOp", e[e.Assignment = 17] = "Assignment", e[e.AddAssignment = 18] = "AddAssignment", e[e.SubtractAssignment = 19] = "SubtractAssignment", e[e.ExponentAssignment = 20] = "ExponentAssignment", e[e.MultiplyAssignment = 21] = "MultiplyAssignment", e[e.DivideAssignment = 22] = "DivideAssignment", e[e.RemainderAssignment = 23] = "RemainderAssignment", e[e.ShiftLeftAssignment = 24] = "ShiftLeftAssignment", e[e.ShiftRightAssignment = 25] = "ShiftRightAssignment", e[e.SignedShiftRightAssignment = 26] = "SignedShiftRightAssignment", e[e.BitwiseAndAssignment = 27] = "BitwiseAndAssignment", e[e.BitwiseXorAssignment = 28] = "BitwiseXorAssignment", e[e.BitwiseOrAssignment = 29] = "BitwiseOrAssignment", e[e.LogicalAndAssignment = 30] = "LogicalAndAssignment", e[e.LogicalOrAssignment = 31] = "LogicalOrAssignment", e[e.NullCoalesceAssignment = 32] = "NullCoalesceAssignment", e[e.Semicolon = 33] = "Semicolon", e[e.Comma = 34] = "Comma", e[e.Colon = 35] = "Colon", e[e.LSquare = 36] = "LSquare", e[e.RSquare = 37] = "RSquare", e[e.QuestionMark = 38] = "QuestionMark", e[e.NullCoalesce = 39] = "NullCoalesce", e[e.OptionalChaining = 40] = "OptionalChaining", e[e.BinaryNot = 41] = "BinaryNot", e[e.LBrace = 42] = "LBrace", e[e.RBrace = 43] = "RBrace", e[e.Equal = 44] = "Equal", e[e.StrictEqual = 45] = "StrictEqual", e[e.LogicalNot = 46] = "LogicalNot", e[e.NotEqual = 47] = "NotEqual", e[e.StrictNotEqual = 48] = "StrictNotEqual", e[e.LessThan = 49] = "LessThan", e[e.LessThanOrEqual = 50] = "LessThanOrEqual", e[e.ShiftLeft = 51] = "ShiftLeft", e[e.GreaterThan = 52] = "GreaterThan", e[e.GreaterThanOrEqual = 53] = "GreaterThanOrEqual", e[e.ShiftRight = 54] = "ShiftRight", e[e.SignedShiftRight = 55] = "SignedShiftRight", e[e.Dot = 56] = "Dot", e[e.Spread = 57] = "Spread", e[e.Global = 58] = "Global", e[e.Backtick = 59] = "Backtick", e[e.DollarLBrace = 60] = "DollarLBrace", e[e.Arrow = 61] = "Arrow", e[e.DecimalLiteral = 62] = "DecimalLiteral", e[e.HexadecimalLiteral = 63] = "HexadecimalLiteral", e[e.BinaryLiteral = 64] = "BinaryLiteral", e[e.RealLiteral = 65] = "RealLiteral", e[e.StringLiteral = 66] = "StringLiteral", e[e.Infinity = 67] = "Infinity", e[e.NaN = 68] = "NaN", e[e.True = 69] = "True", e[e.False = 70] = "False", e[e.Typeof = 71] = "Typeof", e[e.Null = 72] = "Null", e[e.Undefined = 73] = "Undefined", e[e.In = 74] = "In", e[e.Let = 75] = "Let", e[e.Const = 76] = "Const", e[e.Var = 77] = "Var", e[e.If = 78] = "If", e[e.Else = 79] = "Else", e[e.Return = 80] = "Return", e[e.Break = 81] = "Break", e[e.Continue = 82] = "Continue", e[e.Do = 83] = "Do", e[e.While = 84] = "While", e[e.For = 85] = "For", e[e.Of = 86] = "Of", e[e.Try = 87] = "Try", e[e.Catch = 88] = "Catch", e[e.Finally = 89] = "Finally", e[e.Throw = 90] = "Throw", e[e.Switch = 91] = "Switch", e[e.Case = 92] = "Case", e[e.Default = 93] = "Default", e[e.Delete = 94] = "Delete", e[e.Function = 95] = "Function", e[e.As = 96] = "As", e[e.From = 97] = "From", e))(i || {});
43
- class Je {
43
+ class ze {
44
44
  /**
45
45
  * Initializes the tokenizer with the input stream
46
46
  * @param input Input source code stream
@@ -65,9 +65,9 @@ class Je {
65
65
  throw new Error("Cannot look ahead more than 16 tokens");
66
66
  for (; this._ahead.length <= n; ) {
67
67
  const t = this.fetch();
68
- if (Ke(t))
68
+ if (Qe(t))
69
69
  return t;
70
- (r || !r && !Ce(t)) && this._ahead.push(t);
70
+ (r || !r && !He(t)) && this._ahead.push(t);
71
71
  }
72
72
  return this._ahead[n];
73
73
  }
@@ -84,7 +84,7 @@ class Je {
84
84
  }
85
85
  for (; ; ) {
86
86
  const r = this.fetch();
87
- if (Ke(r) || n || !n && !Ce(r))
87
+ if (Qe(r) || n || !n && !He(r))
88
88
  return r;
89
89
  }
90
90
  }
@@ -119,12 +119,12 @@ class Je {
119
119
  fetch() {
120
120
  const n = this, r = this.input, t = this._prefetchedPos || r.position, l = r.line, a = this._prefetchedColumn || r.column;
121
121
  this._lastFetchPosition = this.input.position;
122
- let s = null, o = "", c = i.Eof, D = r.position, w = r.column, h = null, U = !1, x = this.getStartingPhaseThenReset();
122
+ let s = null, o = "", u = i.Eof, D = r.position, T = r.column, h = null, U = !1, m = this.getStartingPhaseThenReset();
123
123
  for (; ; ) {
124
124
  if (h = this.fetchNextChar(), h === null)
125
- return T();
126
- c === i.Eof && (c = i.Unknown);
127
- e: switch (x) {
125
+ return v();
126
+ u === i.Eof && (u = i.Unknown);
127
+ e: switch (m) {
128
128
  case 0:
129
129
  switch (h) {
130
130
  case " ":
@@ -132,37 +132,37 @@ class Je {
132
132
  case `
133
133
  `:
134
134
  case "\r":
135
- x = 1, c = i.Ws;
135
+ m = 1, u = i.Ws;
136
136
  break;
137
137
  case "/":
138
- x = 5, c = i.Divide;
138
+ m = 5, u = i.Divide;
139
139
  break;
140
140
  case "$":
141
- x = 6, c = i.Identifier;
141
+ m = 6, u = i.Identifier;
142
142
  break;
143
143
  case "*":
144
- x = 8, c = i.Multiply;
144
+ m = 8, u = i.Multiply;
145
145
  break;
146
146
  case "%":
147
- x = 54, c = i.Remainder;
147
+ m = 54, u = i.Remainder;
148
148
  break;
149
149
  case "+":
150
- x = 51, c = i.Plus;
150
+ m = 51, u = i.Plus;
151
151
  break;
152
152
  case "-":
153
- x = 52, c = i.Minus;
153
+ m = 52, u = i.Minus;
154
154
  break;
155
155
  case "^":
156
- x = 58, c = i.BitwiseXor;
156
+ m = 58, u = i.BitwiseXor;
157
157
  break;
158
158
  case "|":
159
- x = 7, c = i.BitwiseOr;
159
+ m = 7, u = i.BitwiseOr;
160
160
  break;
161
161
  case "&":
162
- x = 9, c = i.BitwiseAnd;
162
+ m = 9, u = i.BitwiseAnd;
163
163
  break;
164
164
  case "?":
165
- x = 22, c = i.QuestionMark;
165
+ m = 22, u = i.QuestionMark;
166
166
  break;
167
167
  case ";":
168
168
  return _(i.Semicolon);
@@ -173,7 +173,7 @@ class Je {
173
173
  case ")":
174
174
  return _(i.RParent);
175
175
  case ":":
176
- x = 20, c = i.Colon;
176
+ m = 20, u = i.Colon;
177
177
  break;
178
178
  case "`":
179
179
  return _(i.Backtick);
@@ -188,39 +188,39 @@ class Je {
188
188
  case "}":
189
189
  return _(i.RBrace);
190
190
  case "=":
191
- x = 10, c = i.Assignment;
191
+ m = 10, u = i.Assignment;
192
192
  break;
193
193
  case "!":
194
- x = 13, c = i.LogicalNot;
194
+ m = 13, u = i.LogicalNot;
195
195
  break;
196
196
  case "<":
197
- x = 14, c = i.LessThan;
197
+ m = 14, u = i.LessThan;
198
198
  break;
199
199
  case ">":
200
- x = 15, c = i.GreaterThan;
200
+ m = 15, u = i.GreaterThan;
201
201
  break;
202
202
  case "0":
203
- x = 21, c = i.DecimalLiteral;
203
+ m = 21, u = i.DecimalLiteral;
204
204
  break;
205
205
  case ".":
206
- x = 18, c = i.Dot;
206
+ m = 18, u = i.Dot;
207
207
  break;
208
208
  case '"':
209
209
  case "'":
210
- s = h, x = 35;
210
+ s = h, m = 35;
211
211
  break;
212
212
  default:
213
- je(h) ? (U = !0, x = 17, c = i.Identifier) : ee(h) ? (x = 27, c = i.DecimalLiteral) : _(i.Unknown);
213
+ Ye(h) ? (U = !0, m = 17, u = i.Identifier) : ne(h) ? (m = 27, u = i.DecimalLiteral) : _(i.Unknown);
214
214
  break;
215
215
  }
216
216
  break;
217
217
  case 1:
218
218
  if (h !== " " && h !== " " && h !== "\r" && h !== `
219
219
  `)
220
- return T();
220
+ return v();
221
221
  break;
222
222
  case 3:
223
- h === "*" && (x = 4);
223
+ h === "*" && (m = 4);
224
224
  break;
225
225
  case 4:
226
226
  if (h === "/")
@@ -232,230 +232,230 @@ class Je {
232
232
  return _();
233
233
  break;
234
234
  case 17:
235
- if (!Ve(h))
236
- return T();
235
+ if (!Ze(h))
236
+ return v();
237
237
  break;
238
238
  case 20:
239
- return h === ":" ? _(i.Global) : T();
239
+ return h === ":" ? _(i.Global) : v();
240
240
  case 5:
241
241
  if (h === "*")
242
- x = 3;
242
+ m = 3;
243
243
  else if (h === "/")
244
- x = 2, c = i.EolComment;
245
- else return h === "=" ? _(i.DivideAssignment) : T();
244
+ m = 2, u = i.EolComment;
245
+ else return h === "=" ? _(i.DivideAssignment) : v();
246
246
  break;
247
247
  case 51:
248
- return h === "+" ? _(i.IncOp) : h === "=" ? _(i.AddAssignment) : T();
248
+ return h === "+" ? _(i.IncOp) : h === "=" ? _(i.AddAssignment) : v();
249
249
  case 52:
250
- return h === "-" ? _(i.DecOp) : h === "=" ? _(i.SubtractAssignment) : T();
250
+ return h === "-" ? _(i.DecOp) : h === "=" ? _(i.SubtractAssignment) : v();
251
251
  case 54:
252
- return h === "=" ? _(i.RemainderAssignment) : T();
252
+ return h === "=" ? _(i.RemainderAssignment) : v();
253
253
  case 58:
254
- return h === "=" ? _(i.BitwiseXorAssignment) : T();
254
+ return h === "=" ? _(i.BitwiseXorAssignment) : v();
255
255
  case 7:
256
256
  if (h === "=")
257
257
  return _(i.BitwiseOrAssignment);
258
258
  if (h === "|") {
259
- x = 59, c = i.LogicalOr;
259
+ m = 59, u = i.LogicalOr;
260
260
  break;
261
261
  }
262
- return T();
262
+ return v();
263
263
  case 59:
264
- return h === "=" ? _(i.LogicalOrAssignment) : T();
264
+ return h === "=" ? _(i.LogicalOrAssignment) : v();
265
265
  case 9:
266
266
  if (h === "=")
267
267
  return _(i.BitwiseAndAssignment);
268
268
  if (h === "&") {
269
- x = 57, c = i.LogicalAnd;
269
+ m = 57, u = i.LogicalAnd;
270
270
  break;
271
271
  }
272
- return T();
272
+ return v();
273
273
  case 57:
274
- return h === "=" ? _(i.LogicalAndAssignment) : T();
274
+ return h === "=" ? _(i.LogicalAndAssignment) : v();
275
275
  case 8:
276
276
  if (h === "*") {
277
- x = 50, c = i.Exponent;
277
+ m = 50, u = i.Exponent;
278
278
  break;
279
279
  } else if (h === "=")
280
280
  return _(i.MultiplyAssignment);
281
- return T();
281
+ return v();
282
282
  case 50:
283
- return h === "=" ? _(i.ExponentAssignment) : T();
283
+ return h === "=" ? _(i.ExponentAssignment) : v();
284
284
  case 22:
285
285
  if (h === "?") {
286
- x = 60, c = i.NullCoalesce;
286
+ m = 60, u = i.NullCoalesce;
287
287
  break;
288
288
  }
289
- return h === "." ? _(i.OptionalChaining) : T();
289
+ return h === "." ? _(i.OptionalChaining) : v();
290
290
  case 60:
291
- return h === "=" ? _(i.NullCoalesceAssignment) : T();
291
+ return h === "=" ? _(i.NullCoalesceAssignment) : v();
292
292
  case 10:
293
293
  if (h === ">")
294
294
  return _(i.Arrow);
295
295
  if (h === "=") {
296
- x = 11, c = i.Equal;
296
+ m = 11, u = i.Equal;
297
297
  break;
298
298
  }
299
- return T();
299
+ return v();
300
300
  case 11:
301
- return h === "=" ? _(i.StrictEqual) : T();
301
+ return h === "=" ? _(i.StrictEqual) : v();
302
302
  case 13:
303
303
  if (h === "=") {
304
- x = 12, c = i.NotEqual;
304
+ m = 12, u = i.NotEqual;
305
305
  break;
306
306
  }
307
- return T();
307
+ return v();
308
308
  case 12:
309
- return h === "=" ? _(i.StrictNotEqual) : T();
309
+ return h === "=" ? _(i.StrictNotEqual) : v();
310
310
  case 14:
311
311
  if (h === "=")
312
312
  return _(i.LessThanOrEqual);
313
313
  if (h === "<") {
314
- x = 55, c = i.ShiftLeft;
314
+ m = 55, u = i.ShiftLeft;
315
315
  break;
316
316
  }
317
- return T();
317
+ return v();
318
318
  case 55:
319
- return h === "=" ? _(i.ShiftLeftAssignment) : T();
319
+ return h === "=" ? _(i.ShiftLeftAssignment) : v();
320
320
  case 15:
321
321
  if (h === "=")
322
322
  return _(i.GreaterThanOrEqual);
323
323
  if (h === ">") {
324
- x = 16, c = i.SignedShiftRight;
324
+ m = 16, u = i.SignedShiftRight;
325
325
  break;
326
326
  }
327
- return T();
327
+ return v();
328
328
  case 16:
329
329
  if (h === ">") {
330
- x = 56, c = i.ShiftRight;
330
+ m = 56, u = i.ShiftRight;
331
331
  break;
332
332
  }
333
- return h === "=" ? _(i.SignedShiftRightAssignment) : T();
333
+ return h === "=" ? _(i.SignedShiftRightAssignment) : v();
334
334
  case 56:
335
- return h === "=" ? _(i.ShiftRightAssignment) : T();
335
+ return h === "=" ? _(i.ShiftRightAssignment) : v();
336
336
  case 21:
337
337
  if (h === "x")
338
- x = 23, c = i.Unknown;
338
+ m = 23, u = i.Unknown;
339
339
  else if (h === "b")
340
- x = 25, c = i.Unknown;
341
- else if (ee(h) || h === "_")
342
- x = 27;
340
+ m = 25, u = i.Unknown;
341
+ else if (ne(h) || h === "_")
342
+ m = 27;
343
343
  else if (h === ".")
344
- x = 28, c = i.Unknown;
344
+ m = 28, u = i.Unknown;
345
345
  else if (h === "e" || h === "E")
346
- x = 30, c = i.Unknown;
346
+ m = 30, u = i.Unknown;
347
347
  else
348
- return T();
348
+ return v();
349
349
  break;
350
350
  case 18:
351
351
  if (h === ".") {
352
- x = 19, c = i.Unknown;
352
+ m = 19, u = i.Unknown;
353
353
  break;
354
354
  }
355
- if (!ee(h))
356
- return T();
357
- x = 29, c = i.RealLiteral;
355
+ if (!ne(h))
356
+ return v();
357
+ m = 29, u = i.RealLiteral;
358
358
  break;
359
359
  case 19:
360
- return h === "." ? _(i.Spread) : T();
360
+ return h === "." ? _(i.Spread) : v();
361
361
  case 23:
362
362
  if (h === "_")
363
363
  break;
364
- if (!Y(h))
365
- return T();
366
- x = 24, c = i.HexadecimalLiteral;
364
+ if (!K(h))
365
+ return v();
366
+ m = 24, u = i.HexadecimalLiteral;
367
367
  break;
368
368
  case 24:
369
- if (!Y(h) && h !== "_")
370
- return T();
369
+ if (!K(h) && h !== "_")
370
+ return v();
371
371
  break;
372
372
  case 25:
373
373
  if (h === "_")
374
374
  break;
375
- if (!en(h))
376
- return T();
377
- x = 26, c = i.BinaryLiteral;
375
+ if (!Je(h))
376
+ return v();
377
+ m = 26, u = i.BinaryLiteral;
378
378
  break;
379
379
  case 26:
380
- if (!en(h) && h !== "_")
381
- return T();
382
- c = i.BinaryLiteral;
380
+ if (!Je(h) && h !== "_")
381
+ return v();
382
+ u = i.BinaryLiteral;
383
383
  break;
384
384
  case 27:
385
- if (ee(h) || h === "_")
385
+ if (ne(h) || h === "_")
386
386
  break;
387
- if (h === "." && (this.input.peek() === null || ee(this.input.peek())))
388
- x = 28, c = i.Unknown;
387
+ if (h === "." && (this.input.peek() === null || ne(this.input.peek())))
388
+ m = 28, u = i.Unknown;
389
389
  else if (h === "e" || h === "E")
390
- x = 30, c = i.Unknown;
390
+ m = 30, u = i.Unknown;
391
391
  else
392
- return T();
392
+ return v();
393
393
  break;
394
394
  case 28:
395
- if (ee(h))
396
- x = 29, c = i.RealLiteral;
395
+ if (ne(h))
396
+ m = 29, u = i.RealLiteral;
397
397
  else if (h === "e" || h === "E")
398
- x = 30;
398
+ m = 30;
399
399
  else
400
- return T();
400
+ return v();
401
401
  break;
402
402
  case 29:
403
403
  if (h === "e" || h === "E")
404
- x = 30, c = i.Unknown;
405
- else if (!ee(h) && h !== "_")
406
- return T();
404
+ m = 30, u = i.Unknown;
405
+ else if (!ne(h) && h !== "_")
406
+ return v();
407
407
  break;
408
408
  case 30:
409
409
  if (h === "+" || h === "-")
410
- x = 31;
411
- else if (ee(h))
412
- x = 32, c = i.RealLiteral;
410
+ m = 31;
411
+ else if (ne(h))
412
+ m = 32, u = i.RealLiteral;
413
413
  else
414
- return T();
414
+ return v();
415
415
  break;
416
416
  case 31:
417
- if (ee(h))
418
- x = 32, c = i.RealLiteral;
417
+ if (ne(h))
418
+ m = 32, u = i.RealLiteral;
419
419
  else
420
- return T();
420
+ return v();
421
421
  break;
422
422
  case 32:
423
- if (!ee(h))
424
- return T();
423
+ if (!ne(h))
424
+ return v();
425
425
  break;
426
426
  case 6:
427
427
  if (h === "{")
428
428
  return _(i.DollarLBrace);
429
- x = 17, U = !0, c = i.Identifier, Ve(h) || T();
429
+ m = 17, U = !0, u = i.Identifier, Ze(h) || v();
430
430
  break;
431
431
  case 33: {
432
- x = 34;
433
- const q = this.input.ahead(0), $ = this.input.ahead(1);
434
- if (q === "`" || q === "$" && $ === "{")
432
+ m = 34;
433
+ const Q = this.input.ahead(0), X = this.input.ahead(1);
434
+ if (Q === "`" || Q === "$" && X === "{")
435
435
  return _(i.StringLiteral);
436
436
  break;
437
437
  }
438
438
  case 34:
439
439
  switch (h) {
440
440
  case "\\":
441
- x = 33, c = i.Unknown;
441
+ m = 33, u = i.Unknown;
442
442
  break e;
443
443
  case "`":
444
444
  return _(i.Backtick);
445
445
  case "$":
446
446
  if (this.input.ahead(0) === "{")
447
- return H(), this.fetchNextChar(), _(i.DollarLBrace);
447
+ return j(), this.fetchNextChar(), _(i.DollarLBrace);
448
448
  }
449
- const z = this.input.ahead(0), S = this.input.ahead(1);
450
- if (z === "`" || z === "$" && S === "{")
449
+ const G = this.input.ahead(0), A = this.input.ahead(1);
450
+ if (G === "`" || G === "$" && A === "{")
451
451
  return _(i.StringLiteral);
452
452
  break;
453
453
  case 35:
454
454
  if (h === s)
455
455
  return _(i.StringLiteral);
456
- if (Mn(h))
456
+ if (Pn(h))
457
457
  return _(i.Unknown);
458
- h === "\\" && (x = 36, c = i.Unknown);
458
+ h === "\\" && (m = 36, u = i.Unknown);
459
459
  break;
460
460
  case 36:
461
461
  switch (h) {
@@ -471,133 +471,133 @@ class Je {
471
471
  case '"':
472
472
  case "`":
473
473
  case "\\":
474
- x = 35;
474
+ m = 35;
475
475
  break;
476
476
  case "x":
477
- x = 37;
477
+ m = 37;
478
478
  break;
479
479
  case "u":
480
- x = 39;
480
+ m = 39;
481
481
  break;
482
482
  default:
483
- x = 35;
483
+ m = 35;
484
484
  break;
485
485
  }
486
486
  break;
487
487
  case 37:
488
- if (Y(h))
489
- x = 38;
488
+ if (K(h))
489
+ m = 38;
490
490
  else
491
491
  return _(i.Unknown);
492
492
  break;
493
493
  case 38:
494
- if (Y(h))
495
- x = 35;
494
+ if (K(h))
495
+ m = 35;
496
496
  else
497
497
  return _(i.Unknown);
498
498
  break;
499
499
  case 39:
500
500
  if (h === "{") {
501
- x = 43;
501
+ m = 43;
502
502
  break;
503
503
  }
504
- if (Y(h))
505
- x = 40;
504
+ if (K(h))
505
+ m = 40;
506
506
  else
507
507
  return _(i.Unknown);
508
508
  break;
509
509
  case 40:
510
- if (Y(h))
511
- x = 41;
510
+ if (K(h))
511
+ m = 41;
512
512
  else
513
513
  return _(i.Unknown);
514
514
  break;
515
515
  case 41:
516
- if (Y(h))
517
- x = 42;
516
+ if (K(h))
517
+ m = 42;
518
518
  else
519
519
  return _(i.Unknown);
520
520
  break;
521
521
  case 42:
522
- if (Y(h))
523
- x = 35;
522
+ if (K(h))
523
+ m = 35;
524
524
  else
525
525
  return _(i.Unknown);
526
526
  break;
527
527
  case 43:
528
- if (Y(h))
529
- x = 44;
528
+ if (K(h))
529
+ m = 44;
530
530
  else
531
531
  return _(i.Unknown);
532
532
  break;
533
533
  case 44:
534
534
  if (h === "}")
535
- x = 35;
536
- else if (Y(h))
537
- x = 45;
535
+ m = 35;
536
+ else if (K(h))
537
+ m = 45;
538
538
  else
539
539
  return _(i.Unknown);
540
540
  break;
541
541
  case 45:
542
542
  if (h === "}")
543
- x = 35;
544
- else if (Y(h))
545
- x = 46;
543
+ m = 35;
544
+ else if (K(h))
545
+ m = 46;
546
546
  else
547
547
  return _(i.Unknown);
548
548
  break;
549
549
  case 46:
550
550
  if (h === "}")
551
- x = 35;
552
- else if (Y(h))
553
- x = 47;
551
+ m = 35;
552
+ else if (K(h))
553
+ m = 47;
554
554
  else
555
555
  return _(i.Unknown);
556
556
  break;
557
557
  case 47:
558
558
  if (h === "}")
559
- x = 35;
560
- else if (Y(h))
561
- x = 48;
559
+ m = 35;
560
+ else if (K(h))
561
+ m = 48;
562
562
  else
563
563
  return _(i.Unknown);
564
564
  break;
565
565
  case 48:
566
566
  if (h === "}")
567
- x = 35;
568
- else if (Y(h))
569
- x = 49;
567
+ m = 35;
568
+ else if (K(h))
569
+ m = 49;
570
570
  else
571
571
  return _(i.Unknown);
572
572
  break;
573
573
  case 49:
574
574
  if (h === "}")
575
- x = 35;
575
+ m = 35;
576
576
  else
577
577
  return _(i.Unknown);
578
578
  break;
579
579
  default:
580
- return T();
580
+ return v();
581
581
  }
582
- H();
582
+ j();
583
583
  }
584
- function H() {
585
- o += h, n._prefetched = null, n._prefetchedPos = null, n._prefetchedColumn = null, D = r.position, w = r.position;
584
+ function j() {
585
+ o += h, n._prefetched = null, n._prefetchedPos = null, n._prefetchedColumn = null, D = r.position, T = r.position;
586
586
  }
587
- function T() {
588
- return U && (c = P.get(o) ?? (je(o[0]) && o[o.length - 1] !== "'" ? i.Identifier : i.Unknown)), {
587
+ function v() {
588
+ return U && (u = P.get(o) ?? (Ye(o[0]) && o[o.length - 1] !== "'" ? i.Identifier : i.Unknown)), {
589
589
  text: o,
590
- type: c,
590
+ type: u,
591
591
  startPosition: t,
592
592
  endPosition: D,
593
593
  startLine: l,
594
594
  endLine: l,
595
595
  startColumn: a,
596
- endColumn: w
596
+ endColumn: T
597
597
  };
598
598
  }
599
- function _(z) {
600
- return H(), z !== void 0 && (c = z), T();
599
+ function _(G) {
600
+ return j(), G !== void 0 && (u = G), v();
601
601
  }
602
602
  }
603
603
  getStartingPhaseThenReset() {
@@ -613,7 +613,7 @@ class Je {
613
613
  fetchRegEx() {
614
614
  const n = this._ahead.length > 0 ? this._ahead[0].startPosition : this._lastFetchPosition, r = this.input.getTail(n);
615
615
  try {
616
- const t = Ye(r), l = t.raw;
616
+ const t = Xe(r), l = t.raw;
617
617
  for (let a = 1; a < l.length; a++)
618
618
  this.fetchNextChar(), this._prefetched = null, this._prefetchedPos = null, this._prefetchedColumn = null;
619
619
  return this._ahead.length = 0, {
@@ -634,8 +634,8 @@ class Je {
634
634
  };
635
635
  const a = r.substring(0, l);
636
636
  try {
637
- const s = Ye(a), o = s.raw;
638
- for (let c = 1; c < o.length; c++)
637
+ const s = Xe(a), o = s.raw;
638
+ for (let u = 1; u < o.length; u++)
639
639
  this.fetchNextChar(), this._prefetched = null, this._prefetchedPos = null, this._prefetchedColumn = null;
640
640
  return this._ahead.length = 0, {
641
641
  success: !0,
@@ -684,37 +684,37 @@ P.set("delete", i.Delete);
684
684
  P.set("function", i.Function);
685
685
  P.set("as", i.As);
686
686
  P.set("from", i.From);
687
- function Ke(e) {
687
+ function Qe(e) {
688
688
  return e.type === i.Eof;
689
689
  }
690
- function Ce(e) {
690
+ function He(e) {
691
691
  return e.type <= i.Ws;
692
692
  }
693
- function je(e) {
693
+ function Ye(e) {
694
694
  return e >= "a" && e <= "z" || e >= "A" && e <= "Z" || e === "_" || e === "$";
695
695
  }
696
- function Ve(e) {
696
+ function Ze(e) {
697
697
  return e >= "a" && e <= "z" || e >= "A" && e <= "Z" || e >= "0" && e <= "9" || e === "_" || e === "$";
698
698
  }
699
- function en(e) {
699
+ function Je(e) {
700
700
  return e === "0" || e === "1";
701
701
  }
702
- function ee(e) {
702
+ function ne(e) {
703
703
  return e >= "0" && e <= "9";
704
704
  }
705
- function Y(e) {
705
+ function K(e) {
706
706
  return e >= "0" && e <= "9" || e >= "A" && e <= "F" || e >= "a" && e <= "f";
707
707
  }
708
- function Mn(e) {
708
+ function Pn(e) {
709
709
  return e === "\r" || e === `
710
710
  ` || e === "…" || e === "\u2028" || e === "\u2029";
711
711
  }
712
- let qn = class yn extends Error {
712
+ let yn = class Rn extends Error {
713
713
  constructor(n, r) {
714
- super(n), this.code = r, Object.setPrototypeOf(this, yn.prototype);
714
+ super(n), this.code = r, Object.setPrototypeOf(this, Rn.prototype);
715
715
  }
716
716
  };
717
- const Re = {
717
+ const Oe = {
718
718
  W001: "An expression expected",
719
719
  W002: "Unexpected token: {0}",
720
720
  W003: "An identifier expected",
@@ -746,7 +746,7 @@ const Re = {
746
746
  W029: "An imported module can contain only exported functions",
747
747
  W030: "Nested declarations cannot be exported",
748
748
  W031: "An identifier in a declaration cannot start with '$'"
749
- }, he = {
749
+ }, pe = {
750
750
  [i.Eof]: {},
751
751
  [i.Ws]: {},
752
752
  [i.DollarLBrace]: {},
@@ -850,24 +850,24 @@ const Re = {
850
850
  [i.As]: { keywordLike: !0 },
851
851
  [i.From]: { keywordLike: !0 }
852
852
  };
853
- let $n = 0;
854
- function ve() {
855
- return ++$n;
853
+ let Un = 0;
854
+ function Le() {
855
+ return ++Un;
856
856
  }
857
- class Ge {
857
+ class Ue {
858
858
  /**
859
859
  * Initializes the parser with the specified source code
860
860
  * @param source Source code to parse
861
861
  */
862
862
  constructor(n) {
863
- this._parseErrors = [], this._statementLevel = 0, this._lexer = new Je(new Ze(n ?? ""));
863
+ this._parseErrors = [], this._statementLevel = 0, this._lexer = new ze(new Ge(n ?? ""));
864
864
  }
865
865
  /**
866
866
  * Sets the source code to parse
867
867
  * @param source Source code to parse
868
868
  */
869
869
  setSource(n) {
870
- this._lexer = new Je(new Ze(n));
870
+ this._lexer = new ze(new Ge(n));
871
871
  }
872
872
  /**
873
873
  * The errors raised during the parse phase
@@ -915,7 +915,7 @@ class Ge {
915
915
  for (; !this.isEof; ) {
916
916
  const r = this.parseStatement();
917
917
  if (!r) return null;
918
- n.push(r), r.type !== Ee && this.skipToken(i.Semicolon);
918
+ n.push(r), r.type !== ge && this.skipToken(i.Semicolon);
919
919
  }
920
920
  return n;
921
921
  }
@@ -947,14 +947,14 @@ class Ge {
947
947
  return this.parseReturnStatement();
948
948
  case i.Break:
949
949
  return this._lexer.get(), this.createStatementNode(
950
- En,
950
+ hn,
951
951
  {},
952
952
  r,
953
953
  r
954
954
  );
955
955
  case i.Continue:
956
956
  return this._lexer.get(), this.createStatementNode(
957
- mn,
957
+ pn,
958
958
  {},
959
959
  r,
960
960
  r
@@ -985,7 +985,7 @@ class Ge {
985
985
  */
986
986
  parseEmptyStatement() {
987
987
  const n = this._lexer.get();
988
- return this.createStatementNode(Ee, {}, n, n);
988
+ return this.createStatementNode(ge, {}, n, n);
989
989
  }
990
990
  /**
991
991
  * Parses an expression statement
@@ -997,7 +997,7 @@ class Ge {
997
997
  parseExpressionStatement(n = !0) {
998
998
  const r = this._lexer.peek(), t = this.getExpression(n);
999
999
  return t ? this.createStatementNode(
1000
- hn,
1000
+ an,
1001
1001
  {
1002
1002
  expr: t
1003
1003
  },
@@ -1021,18 +1021,18 @@ class Ge {
1021
1021
  let a = {};
1022
1022
  if (l.type === i.LBrace) {
1023
1023
  r = this._lexer.ahead(1);
1024
- const c = this.parseObjectDestructure();
1025
- if (c === null) return null;
1024
+ const u = this.parseObjectDestructure();
1025
+ if (u === null) return null;
1026
1026
  a = {
1027
- oDestr: c
1028
- }, r = c.length > 0 ? c[c.length - 1].endToken : r;
1027
+ oDestr: u
1028
+ }, r = u.length > 0 ? u[u.length - 1].endToken : r;
1029
1029
  } else if (l.type === i.LSquare) {
1030
1030
  r = this._lexer.ahead(1);
1031
- const c = this.parseArrayDestructure();
1032
- if (c === null) return null;
1031
+ const u = this.parseArrayDestructure();
1032
+ if (u === null) return null;
1033
1033
  a = {
1034
- aDestr: c
1035
- }, r = c.length > 0 ? c[c.length - 1].endToken : r;
1034
+ aDestr: u
1035
+ }, r = u.length > 0 ? u[u.length - 1].endToken : r;
1036
1036
  } else if (l.type === i.Identifier) {
1037
1037
  if (l.text.startsWith("$"))
1038
1038
  return this.reportError("W031"), null;
@@ -1050,7 +1050,7 @@ class Ge {
1050
1050
  return this.reportError("W009", s), null;
1051
1051
  if (t.push(
1052
1052
  this.createExpressionNode(
1053
- Xe,
1053
+ ye,
1054
1054
  a,
1055
1055
  l,
1056
1056
  r
@@ -1059,7 +1059,7 @@ class Ge {
1059
1059
  this._lexer.get();
1060
1060
  }
1061
1061
  return this.createStatementNode(
1062
- dn,
1062
+ on,
1063
1063
  {
1064
1064
  decls: t
1065
1065
  },
@@ -1108,7 +1108,7 @@ class Ge {
1108
1108
  if (s === null) return null;
1109
1109
  if (a.expr = s, r = s.endToken, t.push(
1110
1110
  this.createExpressionNode(
1111
- Xe,
1111
+ ye,
1112
1112
  a,
1113
1113
  l,
1114
1114
  r
@@ -1117,7 +1117,7 @@ class Ge {
1117
1117
  this._lexer.get();
1118
1118
  }
1119
1119
  return this.createStatementNode(
1120
- pn,
1120
+ cn,
1121
1121
  {
1122
1122
  decls: t
1123
1123
  },
@@ -1144,7 +1144,7 @@ class Ge {
1144
1144
  return this.reportError("W031"), null;
1145
1145
  r = this._lexer.get(), a = {
1146
1146
  id: {
1147
- type: M,
1147
+ type: $,
1148
1148
  name: l.text,
1149
1149
  startToken: l,
1150
1150
  endToken: r
@@ -1157,7 +1157,7 @@ class Ge {
1157
1157
  if (s === null) return null;
1158
1158
  if (a.expr = s, r = s.endToken, t.push(
1159
1159
  this.createExpressionNode(
1160
- Wn,
1160
+ In,
1161
1161
  a,
1162
1162
  l,
1163
1163
  r
@@ -1166,7 +1166,7 @@ class Ge {
1166
1166
  this._lexer.get();
1167
1167
  }
1168
1168
  return this.createStatementNode(
1169
- Qe,
1169
+ qe,
1170
1170
  {
1171
1171
  decls: t
1172
1172
  },
@@ -1184,7 +1184,7 @@ class Ge {
1184
1184
  const a = l.text;
1185
1185
  if (a.startsWith("$"))
1186
1186
  return this.reportError("W031"), null;
1187
- let s, o, c;
1187
+ let s, o, u;
1188
1188
  if (this._lexer.get(), l = this._lexer.peek(), l.type === i.Colon) {
1189
1189
  if (this._lexer.get(), l = this._lexer.peek(), l.type === i.Identifier)
1190
1190
  s = l.text, t = l, this._lexer.get();
@@ -1192,14 +1192,14 @@ class Ge {
1192
1192
  if (o = this.parseArrayDestructure(), o === null) return null;
1193
1193
  t = o[o.length - 1].endToken;
1194
1194
  } else if (l.type === i.LBrace) {
1195
- if (c = this.parseObjectDestructure(), c === null) return null;
1196
- t = c[c.length - 1].endToken;
1195
+ if (u = this.parseObjectDestructure(), u === null) return null;
1196
+ t = u[u.length - 1].endToken;
1197
1197
  }
1198
1198
  }
1199
1199
  l = this._lexer.peek(), (l.type === i.Comma || l.type === i.RBrace) && (n.push(
1200
1200
  this.createExpressionNode(
1201
- ie,
1202
- { id: a, alias: s, aDestr: o, oDestr: c },
1201
+ se,
1202
+ { id: a, alias: s, aDestr: o, oDestr: u },
1203
1203
  r,
1204
1204
  t
1205
1205
  )
@@ -1226,7 +1226,7 @@ class Ge {
1226
1226
  if (l = this._lexer.peek(), l.type === i.Comma)
1227
1227
  n.push(
1228
1228
  this.createExpressionNode(
1229
- ne,
1229
+ re,
1230
1230
  { id: a, aDestr: s, oDestr: o },
1231
1231
  r,
1232
1232
  t
@@ -1235,7 +1235,7 @@ class Ge {
1235
1235
  else if (l.type === i.RSquare) {
1236
1236
  (a || s || o) && n.push(
1237
1237
  this.createExpressionNode(
1238
- ne,
1238
+ re,
1239
1239
  { id: a, aDestr: s, oDestr: o },
1240
1240
  r,
1241
1241
  t
@@ -1259,11 +1259,11 @@ class Ge {
1259
1259
  for (; this._lexer.peek().type !== i.RBrace; ) {
1260
1260
  const l = this.parseStatement();
1261
1261
  if (!l) return null;
1262
- r.push(l), l.type !== Ee && this.skipToken(i.Semicolon);
1262
+ r.push(l), l.type !== ge && this.skipToken(i.Semicolon);
1263
1263
  }
1264
1264
  const t = this._lexer.get();
1265
1265
  return this.createStatementNode(
1266
- be,
1266
+ Te,
1267
1267
  { stmts: r },
1268
1268
  n,
1269
1269
  t
@@ -1287,14 +1287,14 @@ class Ge {
1287
1287
  if (!l) return null;
1288
1288
  r = l.endToken;
1289
1289
  let a = !0;
1290
- l.type !== be && (this._lexer.peek().type === i.Semicolon ? this._lexer.get() : a = !1);
1290
+ l.type !== Te && (this._lexer.peek().type === i.Semicolon ? this._lexer.get() : a = !1);
1291
1291
  let s = null;
1292
1292
  if (a && this._lexer.peek().type === i.Else) {
1293
1293
  if (this._lexer.get(), s = this.parseStatement(), !s) return null;
1294
1294
  r = s.endToken;
1295
1295
  }
1296
1296
  return this.createStatementNode(
1297
- kn,
1297
+ un,
1298
1298
  {
1299
1299
  cond: t,
1300
1300
  thenB: l,
@@ -1319,7 +1319,7 @@ class Ge {
1319
1319
  this.expectToken(i.RParent, "W006");
1320
1320
  const t = this.parseStatement();
1321
1321
  return t ? this.createStatementNode(
1322
- xn,
1322
+ dn,
1323
1323
  {
1324
1324
  cond: r,
1325
1325
  body: t
@@ -1338,12 +1338,12 @@ class Ge {
1338
1338
  parseDoWhileStatement() {
1339
1339
  const n = this._lexer.get(), r = this.parseStatement();
1340
1340
  if (!r) return null;
1341
- r.type !== be && r.type !== Ee && this.expectToken(i.Semicolon), this.expectToken(i.While), this.expectToken(i.LParent, "W014");
1341
+ r.type !== Te && r.type !== ge && this.expectToken(i.Semicolon), this.expectToken(i.While), this.expectToken(i.LParent, "W014");
1342
1342
  const t = this.getExpression();
1343
1343
  if (!t) return null;
1344
1344
  const l = this._lexer.peek();
1345
1345
  return this.expectToken(i.RParent, "W006"), this.createStatementNode(
1346
- _n,
1346
+ kn,
1347
1347
  {
1348
1348
  cond: t,
1349
1349
  body: r
@@ -1362,12 +1362,12 @@ class Ge {
1362
1362
  parseReturnStatement() {
1363
1363
  const n = this._lexer.peek();
1364
1364
  let r = this._lexer.get(), t;
1365
- if (he[this._lexer.peek().type].expressionStart) {
1365
+ if (pe[this._lexer.peek().type].expressionStart) {
1366
1366
  if (t = this.getExpression(), t === null) return null;
1367
1367
  r = t.endToken;
1368
1368
  }
1369
1369
  return this.createStatementNode(
1370
- gn,
1370
+ fn,
1371
1371
  {
1372
1372
  expr: t
1373
1373
  },
@@ -1387,25 +1387,25 @@ class Ge {
1387
1387
  let r = this._lexer.peek();
1388
1388
  if (r.type === i.Identifier) {
1389
1389
  if (this._lexer.ahead(1).type === i.In)
1390
- return this.parseForInOfStatement(n, "none", r, me);
1390
+ return this.parseForInOfStatement(n, "none", r, Ee);
1391
1391
  if (this._lexer.ahead(1).type === i.Of)
1392
1392
  return this.parseForInOfStatement(n, "none", r, Ne);
1393
1393
  } else if (r.type === i.Let) {
1394
1394
  const o = this._lexer.ahead(1);
1395
1395
  if (o.type === i.Identifier) {
1396
- const c = this._lexer.ahead(2);
1397
- if (c.type === i.In)
1398
- return this.parseForInOfStatement(n, "let", o, me);
1399
- if (c.type === i.Of)
1396
+ const u = this._lexer.ahead(2);
1397
+ if (u.type === i.In)
1398
+ return this.parseForInOfStatement(n, "let", o, Ee);
1399
+ if (u.type === i.Of)
1400
1400
  return this.parseForInOfStatement(n, "let", o, Ne);
1401
1401
  }
1402
1402
  } else if (r.type === i.Const) {
1403
1403
  const o = this._lexer.ahead(1);
1404
1404
  if (o.type === i.Identifier) {
1405
- const c = this._lexer.ahead(2);
1406
- if (c.type === i.In)
1407
- return this.parseForInOfStatement(n, "const", o, me);
1408
- if (c.type === i.Of)
1405
+ const u = this._lexer.ahead(2);
1406
+ if (u.type === i.In)
1407
+ return this.parseForInOfStatement(n, "const", o, Ee);
1408
+ if (u.type === i.Of)
1409
1409
  return this.parseForInOfStatement(n, "const", o, Ne);
1410
1410
  }
1411
1411
  }
@@ -1416,10 +1416,10 @@ class Ge {
1416
1416
  const o = this.parseLetStatement();
1417
1417
  if (o === null)
1418
1418
  return null;
1419
- if (t = o, t.decls.some((c) => !c.expr))
1419
+ if (t = o, t.decls.some((u) => !u.expr))
1420
1420
  return this.reportError("W011"), null;
1421
1421
  this.expectToken(i.Semicolon);
1422
- } else if (he[r.type].expressionStart) {
1422
+ } else if (pe[r.type].expressionStart) {
1423
1423
  const o = this.parseExpressionStatement();
1424
1424
  if (o === null)
1425
1425
  return null;
@@ -1439,7 +1439,7 @@ class Ge {
1439
1439
  this.expectToken(i.RParent, "W006");
1440
1440
  const s = this.parseStatement();
1441
1441
  return s ? this.createStatementNode(
1442
- Sn,
1442
+ gn,
1443
1443
  {
1444
1444
  init: t,
1445
1445
  cond: l,
@@ -1471,12 +1471,12 @@ class Ge {
1471
1471
  const a = this.getExpression(!0);
1472
1472
  this.expectToken(i.RParent, "W006");
1473
1473
  const s = this.parseStatement();
1474
- return s ? l === me ? this.createStatementNode(
1475
- me,
1474
+ return s ? l === Ee ? this.createStatementNode(
1475
+ Ee,
1476
1476
  {
1477
1477
  varB: r,
1478
1478
  id: {
1479
- type: M,
1479
+ type: $,
1480
1480
  name: t.text,
1481
1481
  startToken: t,
1482
1482
  endToken: t
@@ -1491,7 +1491,7 @@ class Ge {
1491
1491
  {
1492
1492
  varB: r,
1493
1493
  id: {
1494
- type: M,
1494
+ type: $,
1495
1495
  name: t.text,
1496
1496
  startToken: t,
1497
1497
  endToken: t
@@ -1515,7 +1515,7 @@ class Ge {
1515
1515
  this._lexer.get();
1516
1516
  let r;
1517
1517
  return r = this.getExpression(), r === null ? null : this.createStatementNode(
1518
- Nn,
1518
+ En,
1519
1519
  {
1520
1520
  expr: r
1521
1521
  },
@@ -1542,26 +1542,26 @@ class Ge {
1542
1542
  const n = this._lexer.peek();
1543
1543
  let r = this._lexer.get();
1544
1544
  const t = this, l = D();
1545
- let a, s, o, c = this._lexer.peek();
1546
- if (c.type === i.Catch) {
1547
- if (this._lexer.get(), c = this._lexer.peek(), c.type === i.LParent) {
1548
- if (this._lexer.get(), c = this._lexer.peek(), c.type !== i.Identifier)
1549
- return this.reportError("W003", c), null;
1545
+ let a, s, o, u = this._lexer.peek();
1546
+ if (u.type === i.Catch) {
1547
+ if (this._lexer.get(), u = this._lexer.peek(), u.type === i.LParent) {
1548
+ if (this._lexer.get(), u = this._lexer.peek(), u.type !== i.Identifier)
1549
+ return this.reportError("W003", u), null;
1550
1550
  s = {
1551
- type: M,
1552
- nodeId: ve(),
1553
- name: c.text,
1554
- startToken: c,
1555
- endToken: c
1551
+ type: $,
1552
+ nodeId: Le(),
1553
+ name: u.text,
1554
+ startToken: u,
1555
+ endToken: u
1556
1556
  }, this._lexer.get(), this.expectToken(i.RParent, "W006");
1557
1557
  }
1558
1558
  a = D(), r = a.endToken, this._lexer.peek().type === i.Finally && (this._lexer.get(), o = D(), r = o.endToken);
1559
- } else if (c.type === i.Finally)
1559
+ } else if (u.type === i.Finally)
1560
1560
  this._lexer.get(), o = D(), r = o.endToken;
1561
1561
  else
1562
- return this.reportError("W013", c), null;
1562
+ return this.reportError("W013", u), null;
1563
1563
  return this.createStatementNode(
1564
- An,
1564
+ mn,
1565
1565
  {
1566
1566
  tryB: l,
1567
1567
  catchB: a,
@@ -1572,8 +1572,8 @@ class Ge {
1572
1572
  r
1573
1573
  );
1574
1574
  function D() {
1575
- const w = t._lexer.peek();
1576
- return w.type !== i.LBrace ? (t.reportError("W012", w), null) : t.parseBlockStatement();
1575
+ const T = t._lexer.peek();
1576
+ return T.type !== i.LBrace ? (t.reportError("W012", T), null) : t.parseBlockStatement();
1577
1577
  }
1578
1578
  }
1579
1579
  /**
@@ -1610,7 +1610,7 @@ class Ge {
1610
1610
  return this.reportError("W015"), null;
1611
1611
  }
1612
1612
  this.expectToken(i.Colon, "W008");
1613
- let c = [], D = !1;
1613
+ let u = [], D = !1;
1614
1614
  for (; !D; )
1615
1615
  switch (this._lexer.peek().type) {
1616
1616
  case i.Case:
@@ -1624,14 +1624,14 @@ class Ge {
1624
1624
  D = !0;
1625
1625
  break;
1626
1626
  }
1627
- c.push(h), h.type !== Ee && this.skipToken(i.Semicolon);
1627
+ u.push(h), h.type !== ge && this.skipToken(i.Semicolon);
1628
1628
  }
1629
1629
  t.push(
1630
1630
  this.createNode(
1631
- Pn,
1631
+ bn,
1632
1632
  {
1633
1633
  caseE: o,
1634
- stmts: c
1634
+ stmts: u
1635
1635
  },
1636
1636
  n
1637
1637
  )
@@ -1639,7 +1639,7 @@ class Ge {
1639
1639
  }
1640
1640
  const a = this._lexer.peek();
1641
1641
  return this.expectToken(i.RBrace, "W004"), this.createStatementNode(
1642
- Ln,
1642
+ xn,
1643
1643
  {
1644
1644
  expr: r,
1645
1645
  cases: t
@@ -1675,47 +1675,47 @@ class Ge {
1675
1675
  return this.reportError("W014", a), null;
1676
1676
  const s = this.getExpression(!0);
1677
1677
  let o;
1678
- const c = [];
1678
+ const u = [];
1679
1679
  switch (s.type) {
1680
- case xe:
1680
+ case me:
1681
1681
  o = !0;
1682
1682
  break;
1683
- case M:
1684
- o = (s.parenthesized ?? 0) <= 1, c.push(s);
1683
+ case $:
1684
+ o = (s.parenthesized ?? 0) <= 1, u.push(s);
1685
1685
  break;
1686
- case ae:
1686
+ case oe:
1687
1687
  o = s.parenthesized === 1;
1688
- let w = !1;
1688
+ let T = !1;
1689
1689
  if (o)
1690
1690
  for (const h of s.exprs) {
1691
- if (w) {
1691
+ if (T) {
1692
1692
  o = !1;
1693
1693
  break;
1694
1694
  }
1695
1695
  switch (h.type) {
1696
- case M:
1697
- o = !h.parenthesized, c.push(h);
1696
+ case $:
1697
+ o = !h.parenthesized, u.push(h);
1698
1698
  break;
1699
- case ce: {
1699
+ case ue: {
1700
1700
  if (o = !h.parenthesized, o) {
1701
1701
  const U = this.convertToObjectDestructure(h);
1702
- U && c.push(U);
1702
+ U && u.push(U);
1703
1703
  }
1704
1704
  break;
1705
1705
  }
1706
- case oe: {
1706
+ case ce: {
1707
1707
  if (o = !h.parenthesized, o) {
1708
1708
  const U = this.convertToArrayDestructure(h);
1709
- U && c.push(U);
1709
+ U && u.push(U);
1710
1710
  }
1711
1711
  break;
1712
1712
  }
1713
- case ue: {
1714
- if (w = !0, h.expr.type !== M) {
1713
+ case fe: {
1714
+ if (T = !0, h.expr.type !== $) {
1715
1715
  o = !1;
1716
1716
  break;
1717
1717
  }
1718
- c.push(h);
1718
+ u.push(h);
1719
1719
  break;
1720
1720
  }
1721
1721
  default:
@@ -1724,24 +1724,24 @@ class Ge {
1724
1724
  }
1725
1725
  }
1726
1726
  break;
1727
- case ce:
1727
+ case ue:
1728
1728
  if (o = s.parenthesized === 1, o) {
1729
1729
  const h = this.convertToObjectDestructure(s);
1730
- h && c.push(h);
1730
+ h && u.push(h);
1731
1731
  }
1732
1732
  break;
1733
- case oe:
1733
+ case ce:
1734
1734
  if (o = s.parenthesized === 1, o) {
1735
1735
  const h = this.convertToArrayDestructure(s);
1736
- h && c.push(h);
1736
+ h && u.push(h);
1737
1737
  }
1738
1738
  break;
1739
- case ue:
1740
- if (s.expr.type !== M) {
1739
+ case fe:
1740
+ if (s.expr.type !== $) {
1741
1741
  o = !1;
1742
1742
  break;
1743
1743
  }
1744
- o = !0, c.push(s);
1744
+ o = !0, u.push(s);
1745
1745
  break;
1746
1746
  default:
1747
1747
  o = !1;
@@ -1752,10 +1752,10 @@ class Ge {
1752
1752
  return this.reportError("W012", this._lexer.peek()), null;
1753
1753
  const D = this.parseBlockStatement();
1754
1754
  return D ? this.createStatementNode(
1755
- We,
1755
+ be,
1756
1756
  {
1757
- id: { type: M, name: t },
1758
- args: c,
1757
+ id: { type: $, name: t },
1758
+ args: u,
1759
1759
  stmt: D
1760
1760
  },
1761
1761
  r,
@@ -1790,7 +1790,7 @@ class Ge {
1790
1790
  for (l.push(t); this.skipToken(i.Comma); )
1791
1791
  if (this._lexer.peek().type === i.Comma)
1792
1792
  a = !0, r = this._lexer.peek(), l.push(
1793
- this.createExpressionNode(xe, {}, r, r)
1793
+ this.createExpressionNode(me, {}, r, r)
1794
1794
  );
1795
1795
  else {
1796
1796
  const s = this.parseCondOrSpreadOrAsgnOrArrowExpr();
@@ -1799,7 +1799,7 @@ class Ge {
1799
1799
  r = s.endToken, l.push(s);
1800
1800
  }
1801
1801
  return l.length && (t = this.createExpressionNode(
1802
- ae,
1802
+ oe,
1803
1803
  {
1804
1804
  exprs: l,
1805
1805
  loose: a
@@ -1821,7 +1821,7 @@ class Ge {
1821
1821
  this._lexer.get();
1822
1822
  const l = this.parseNullCoalescingExpr();
1823
1823
  return l ? this.createExpressionNode(
1824
- ue,
1824
+ fe,
1825
1825
  {
1826
1826
  expr: l
1827
1827
  },
@@ -1832,7 +1832,7 @@ class Ge {
1832
1832
  if (n.type === i.Function) {
1833
1833
  const l = this.parseFunctionDeclaration(!0);
1834
1834
  return l ? this.createExpressionNode(
1835
- Be,
1835
+ Ie,
1836
1836
  {
1837
1837
  name: l.id.name,
1838
1838
  args: l.args,
@@ -1854,7 +1854,7 @@ class Ge {
1854
1854
  this.expectToken(i.Colon);
1855
1855
  const a = this.getExpression(!1);
1856
1856
  return this.createExpressionNode(
1857
- Tn,
1857
+ Sn,
1858
1858
  {
1859
1859
  cond: r,
1860
1860
  thenE: l,
@@ -1864,11 +1864,11 @@ class Ge {
1864
1864
  a.endToken
1865
1865
  );
1866
1866
  }
1867
- if (he[t.type].isAssignment) {
1867
+ if (pe[t.type].isAssignment) {
1868
1868
  this._lexer.get();
1869
1869
  const l = this.getExpression();
1870
1870
  return l ? this.createExpressionNode(
1871
- Dn,
1871
+ Tn,
1872
1872
  {
1873
1873
  leftValue: r,
1874
1874
  op: t.text,
@@ -1889,13 +1889,13 @@ class Ge {
1889
1889
  let t;
1890
1890
  const l = [];
1891
1891
  switch (r.type) {
1892
- case xe:
1892
+ case me:
1893
1893
  t = !0;
1894
1894
  break;
1895
- case M:
1895
+ case $:
1896
1896
  t = (r.parenthesized ?? 0) <= 1, l.push(r);
1897
1897
  break;
1898
- case ae:
1898
+ case oe:
1899
1899
  t = r.parenthesized === 1;
1900
1900
  let s = !1;
1901
1901
  if (t)
@@ -1905,25 +1905,25 @@ class Ge {
1905
1905
  break;
1906
1906
  }
1907
1907
  switch (o.type) {
1908
- case M:
1908
+ case $:
1909
1909
  t = !o.parenthesized, l.push(o);
1910
1910
  break;
1911
- case ce: {
1911
+ case ue: {
1912
1912
  if (t = !o.parenthesized, t) {
1913
- const c = this.convertToObjectDestructure(o);
1914
- c && l.push(c);
1913
+ const u = this.convertToObjectDestructure(o);
1914
+ u && l.push(u);
1915
1915
  }
1916
1916
  break;
1917
1917
  }
1918
- case oe: {
1918
+ case ce: {
1919
1919
  if (t = !o.parenthesized, t) {
1920
- const c = this.convertToArrayDestructure(o);
1921
- c && l.push(c);
1920
+ const u = this.convertToArrayDestructure(o);
1921
+ u && l.push(u);
1922
1922
  }
1923
1923
  break;
1924
1924
  }
1925
- case ue: {
1926
- if (s = !0, o.expr.type !== M) {
1925
+ case fe: {
1926
+ if (s = !0, o.expr.type !== $) {
1927
1927
  t = !1;
1928
1928
  break;
1929
1929
  }
@@ -1936,20 +1936,20 @@ class Ge {
1936
1936
  }
1937
1937
  }
1938
1938
  break;
1939
- case ce:
1939
+ case ue:
1940
1940
  if (t = r.parenthesized === 1, t) {
1941
1941
  const o = this.convertToObjectDestructure(r);
1942
1942
  o && l.push(o);
1943
1943
  }
1944
1944
  break;
1945
- case oe:
1945
+ case ce:
1946
1946
  if (t = r.parenthesized === 1, t) {
1947
1947
  const o = this.convertToArrayDestructure(r);
1948
1948
  o && l.push(o);
1949
1949
  }
1950
1950
  break;
1951
- case ue:
1952
- t = r.expr.type === M, t && l.push(r);
1951
+ case fe:
1952
+ t = r.expr.type === $, t && l.push(r);
1953
1953
  break;
1954
1954
  default:
1955
1955
  t = !1;
@@ -1959,7 +1959,7 @@ class Ge {
1959
1959
  this._lexer.get();
1960
1960
  const a = this.parseStatement(!1);
1961
1961
  return a ? this.createExpressionNode(
1962
- Be,
1962
+ Ie,
1963
1963
  {
1964
1964
  args: l,
1965
1965
  statement: a
@@ -1984,7 +1984,7 @@ class Ge {
1984
1984
  return this.reportError("W001"), null;
1985
1985
  let l = t.endToken;
1986
1986
  r = this.createExpressionNode(
1987
- Q,
1987
+ Y,
1988
1988
  {
1989
1989
  op: "??",
1990
1990
  left: r,
@@ -2012,7 +2012,7 @@ class Ge {
2012
2012
  return this.reportError("W001"), null;
2013
2013
  let l = t.endToken;
2014
2014
  r = this.createExpressionNode(
2015
- Q,
2015
+ Y,
2016
2016
  {
2017
2017
  op: "||",
2018
2018
  left: r,
@@ -2040,7 +2040,7 @@ class Ge {
2040
2040
  return this.reportError("W001"), null;
2041
2041
  let l = t.endToken;
2042
2042
  r = this.createExpressionNode(
2043
- Q,
2043
+ Y,
2044
2044
  {
2045
2045
  op: "&&",
2046
2046
  left: r,
@@ -2068,7 +2068,7 @@ class Ge {
2068
2068
  return this.reportError("W001"), null;
2069
2069
  let l = t.endToken;
2070
2070
  r = this.createExpressionNode(
2071
- Q,
2071
+ Y,
2072
2072
  {
2073
2073
  op: "|",
2074
2074
  left: r,
@@ -2096,7 +2096,7 @@ class Ge {
2096
2096
  return this.reportError("W001"), null;
2097
2097
  let l = t.endToken;
2098
2098
  r = this.createExpressionNode(
2099
- Q,
2099
+ Y,
2100
2100
  {
2101
2101
  op: "^",
2102
2102
  left: r,
@@ -2124,7 +2124,7 @@ class Ge {
2124
2124
  return this.reportError("W001"), null;
2125
2125
  let l = t.endToken;
2126
2126
  r = this.createExpressionNode(
2127
- Q,
2127
+ Y,
2128
2128
  {
2129
2129
  op: "&",
2130
2130
  left: r,
@@ -2158,7 +2158,7 @@ class Ge {
2158
2158
  return this.reportError("W001"), null;
2159
2159
  let a = l.endToken;
2160
2160
  r = this.createExpressionNode(
2161
- Q,
2161
+ Y,
2162
2162
  {
2163
2163
  op: t.text,
2164
2164
  left: r,
@@ -2193,7 +2193,7 @@ class Ge {
2193
2193
  return this.reportError("W001"), null;
2194
2194
  let a = l.endToken;
2195
2195
  r = this.createExpressionNode(
2196
- Q,
2196
+ Y,
2197
2197
  {
2198
2198
  op: t.text,
2199
2199
  left: r,
@@ -2226,7 +2226,7 @@ class Ge {
2226
2226
  return this.reportError("W001"), null;
2227
2227
  let a = l.endToken;
2228
2228
  r = this.createExpressionNode(
2229
- Q,
2229
+ Y,
2230
2230
  {
2231
2231
  op: t.text,
2232
2232
  left: r,
@@ -2255,7 +2255,7 @@ class Ge {
2255
2255
  return this.reportError("W001"), null;
2256
2256
  let a = l.endToken;
2257
2257
  r = this.createExpressionNode(
2258
- Q,
2258
+ Y,
2259
2259
  {
2260
2260
  op: t.text,
2261
2261
  left: r,
@@ -2284,7 +2284,7 @@ class Ge {
2284
2284
  return this.reportError("W001"), null;
2285
2285
  let a = l.endToken;
2286
2286
  r = this.createExpressionNode(
2287
- Q,
2287
+ Y,
2288
2288
  {
2289
2289
  op: t.text,
2290
2290
  left: r,
@@ -2314,7 +2314,7 @@ class Ge {
2314
2314
  let s = a.endToken;
2315
2315
  if (l === 0)
2316
2316
  r = this.createExpressionNode(
2317
- Q,
2317
+ Y,
2318
2318
  {
2319
2319
  op: t.text,
2320
2320
  left: r,
@@ -2326,12 +2326,12 @@ class Ge {
2326
2326
  else {
2327
2327
  const o = r;
2328
2328
  r = this.createExpressionNode(
2329
- Q,
2329
+ Y,
2330
2330
  {
2331
2331
  op: t.text,
2332
2332
  left: o.left,
2333
2333
  right: {
2334
- type: Q,
2334
+ type: Y,
2335
2335
  op: t.text,
2336
2336
  left: o.right,
2337
2337
  right: a
@@ -2353,11 +2353,11 @@ class Ge {
2353
2353
  */
2354
2354
  parseUnaryOrPrefixExpr() {
2355
2355
  const n = this._lexer.peek();
2356
- if (he[n.type].canBeUnary) {
2356
+ if (pe[n.type].canBeUnary) {
2357
2357
  this._lexer.get();
2358
2358
  const r = this.parseUnaryOrPrefixExpr();
2359
2359
  return r ? this.createExpressionNode(
2360
- wn,
2360
+ Nn,
2361
2361
  {
2362
2362
  op: n.text,
2363
2363
  expr: r
@@ -2370,7 +2370,7 @@ class Ge {
2370
2370
  this._lexer.get();
2371
2371
  const r = this.parseMemberOrInvocationExpr();
2372
2372
  return r ? this.createExpressionNode(
2373
- Rn,
2373
+ vn,
2374
2374
  {
2375
2375
  op: n.text,
2376
2376
  expr: r
@@ -2400,19 +2400,19 @@ class Ge {
2400
2400
  switch (a.type) {
2401
2401
  case i.LParent: {
2402
2402
  this._lexer.get();
2403
- let w = [];
2403
+ let T = [];
2404
2404
  if (this._lexer.peek().type !== i.RParent) {
2405
2405
  const U = this.parseExpr();
2406
2406
  if (!U)
2407
2407
  return this.reportError("W001"), null;
2408
- w = U.type === ae ? U.exprs : [U];
2408
+ T = U.type === oe ? U.exprs : [U];
2409
2409
  }
2410
2410
  const h = this._lexer.peek();
2411
2411
  this.expectToken(i.RParent, "W006"), r = this.createExpressionNode(
2412
- vn,
2412
+ _n,
2413
2413
  {
2414
2414
  obj: r,
2415
- arguments: w
2415
+ arguments: T
2416
2416
  },
2417
2417
  n,
2418
2418
  h
@@ -2423,10 +2423,10 @@ class Ge {
2423
2423
  case i.OptionalChaining:
2424
2424
  this._lexer.get();
2425
2425
  const s = this._lexer.get();
2426
- if (!he[s.type].keywordLike)
2426
+ if (!pe[s.type].keywordLike)
2427
2427
  return this.reportError("W003"), null;
2428
2428
  r = this.createExpressionNode(
2429
- On,
2429
+ An,
2430
2430
  {
2431
2431
  obj: r,
2432
2432
  member: s.text,
@@ -2438,15 +2438,15 @@ class Ge {
2438
2438
  break;
2439
2439
  case i.LSquare:
2440
2440
  this._lexer.get();
2441
- const c = this.getExpression();
2442
- if (!c)
2441
+ const u = this.getExpression();
2442
+ if (!u)
2443
2443
  return null;
2444
2444
  const D = this._lexer.peek();
2445
2445
  this.expectToken(i.RSquare, "W005"), r = this.createExpressionNode(
2446
- In,
2446
+ Ln,
2447
2447
  {
2448
2448
  obj: r,
2449
- member: c
2449
+ member: u
2450
2450
  },
2451
2451
  n,
2452
2452
  D
@@ -2459,7 +2459,7 @@ class Ge {
2459
2459
  } while (!t);
2460
2460
  const l = this._lexer.peek();
2461
2461
  return l.type === i.IncOp || l.type === i.DecOp ? (this._lexer.get(), this.createExpressionNode(
2462
- Bn,
2462
+ On,
2463
2463
  {
2464
2464
  op: l.text,
2465
2465
  expr: r
@@ -2484,7 +2484,7 @@ class Ge {
2484
2484
  if (this._lexer.get(), this._lexer.peek().type === i.RParent) {
2485
2485
  const l = this._lexer.get();
2486
2486
  return this.createExpressionNode(
2487
- xe,
2487
+ me,
2488
2488
  {},
2489
2489
  n,
2490
2490
  l
@@ -2503,7 +2503,7 @@ class Ge {
2503
2503
  case i.Identifier: {
2504
2504
  const l = this._lexer.get();
2505
2505
  return this.createExpressionNode(
2506
- M,
2506
+ $,
2507
2507
  {
2508
2508
  name: l.text
2509
2509
  },
@@ -2515,7 +2515,7 @@ class Ge {
2515
2515
  this._lexer.get();
2516
2516
  const l = this._lexer.get();
2517
2517
  return l.type !== i.Identifier ? (this.reportError("W003"), null) : this.createExpressionNode(
2518
- M,
2518
+ $,
2519
2519
  {
2520
2520
  name: l.text,
2521
2521
  isGlobal: !0
@@ -2529,7 +2529,7 @@ class Ge {
2529
2529
  case i.False:
2530
2530
  case i.True:
2531
2531
  return this._lexer.get(), this.createExpressionNode(
2532
- Z,
2532
+ C,
2533
2533
  {
2534
2534
  value: n.type === i.True
2535
2535
  },
@@ -2548,7 +2548,7 @@ class Ge {
2548
2548
  return this._lexer.get(), this.parseStringLiteral(n);
2549
2549
  case i.Infinity:
2550
2550
  return this._lexer.get(), this.createExpressionNode(
2551
- Z,
2551
+ C,
2552
2552
  {
2553
2553
  value: 1 / 0
2554
2554
  },
@@ -2557,7 +2557,7 @@ class Ge {
2557
2557
  );
2558
2558
  case i.NaN:
2559
2559
  return this._lexer.get(), this.createExpressionNode(
2560
- Z,
2560
+ C,
2561
2561
  {
2562
2562
  value: NaN
2563
2563
  },
@@ -2566,7 +2566,7 @@ class Ge {
2566
2566
  );
2567
2567
  case i.Null:
2568
2568
  return this._lexer.get(), this.createExpressionNode(
2569
- Z,
2569
+ C,
2570
2570
  {
2571
2571
  value: null
2572
2572
  },
@@ -2575,7 +2575,7 @@ class Ge {
2575
2575
  );
2576
2576
  case i.Undefined:
2577
2577
  return this._lexer.get(), this.createExpressionNode(
2578
- Z,
2578
+ C,
2579
2579
  {
2580
2580
  value: void 0
2581
2581
  },
@@ -2616,7 +2616,7 @@ class Ge {
2616
2616
  }
2617
2617
  const t = this._lexer.get();
2618
2618
  return this.createExpressionNode(
2619
- bn,
2619
+ wn,
2620
2620
  { segments: r },
2621
2621
  n,
2622
2622
  t
@@ -2630,11 +2630,11 @@ class Ge {
2630
2630
  let r = [];
2631
2631
  if (this._lexer.peek().type !== i.RSquare) {
2632
2632
  const l = this.getExpression();
2633
- l && (r = l.type === ae ? l.exprs : [l]);
2633
+ l && (r = l.type === oe ? l.exprs : [l]);
2634
2634
  }
2635
2635
  const t = this._lexer.peek();
2636
2636
  return this.expectToken(i.RSquare), this.createExpressionNode(
2637
- oe,
2637
+ ce,
2638
2638
  {
2639
2639
  items: r
2640
2640
  },
@@ -2650,14 +2650,14 @@ class Ge {
2650
2650
  let r = [];
2651
2651
  if (this._lexer.peek().type !== i.RBrace)
2652
2652
  for (; this._lexer.peek().type !== i.RBrace; ) {
2653
- const l = this._lexer.peek(), a = he[l.type];
2653
+ const l = this._lexer.peek(), a = pe[l.type];
2654
2654
  let s;
2655
2655
  if (a.expressionStart)
2656
2656
  if (l.type === i.LSquare) {
2657
2657
  if (this._lexer.get(), s = this.getExpression(), !s)
2658
2658
  return null;
2659
2659
  this.expectToken(i.RSquare, "W005"), s = this.createExpressionNode(
2660
- ae,
2660
+ oe,
2661
2661
  {
2662
2662
  exprs: [s]
2663
2663
  },
@@ -2666,14 +2666,14 @@ class Ge {
2666
2666
  } else if (a.isPropLiteral) {
2667
2667
  if (s = this.getExpression(!1), !s)
2668
2668
  return null;
2669
- if (s.type !== M && s.type !== Z && s.type !== ue)
2669
+ if (s.type !== $ && s.type !== C && s.type !== fe)
2670
2670
  return this.reportError("W007"), null;
2671
2671
  } else
2672
2672
  return this.reportError("W007"), null;
2673
2673
  else if (a.keywordLike)
2674
2674
  s = {
2675
- type: M,
2676
- nodeId: ve(),
2675
+ type: $,
2676
+ nodeId: Le(),
2677
2677
  name: l.text,
2678
2678
  startToken: l,
2679
2679
  endToken: l
@@ -2681,32 +2681,32 @@ class Ge {
2681
2681
  else
2682
2682
  return this.reportError("W001"), null;
2683
2683
  const o = s.type;
2684
- if (o === ue)
2684
+ if (o === fe)
2685
2685
  r.push(s);
2686
2686
  else {
2687
- if (o === Z) {
2688
- const w = s.value;
2689
- if (typeof w != "number" && typeof w != "string")
2687
+ if (o === C) {
2688
+ const T = s.value;
2689
+ if (typeof T != "number" && typeof T != "string")
2690
2690
  return this.expectToken(i.RBrace, "W007"), null;
2691
2691
  }
2692
2692
  let D = null;
2693
- if (o === M) {
2694
- const w = this._lexer.peek();
2695
- (w.type === i.Comma || w.type === i.RBrace) && (D = { ...s });
2693
+ if (o === $) {
2694
+ const T = this._lexer.peek();
2695
+ (T.type === i.Comma || T.type === i.RBrace) && (D = { ...s });
2696
2696
  }
2697
2697
  if (!D && (this.expectToken(i.Colon, "W008"), D = this.getExpression(!1), !D))
2698
2698
  return null;
2699
2699
  r.push([s, D]);
2700
2700
  }
2701
- const c = this._lexer.peek().type;
2702
- if (c === i.Comma)
2701
+ const u = this._lexer.peek().type;
2702
+ if (u === i.Comma)
2703
2703
  this._lexer.get();
2704
- else if (c !== i.RBrace)
2704
+ else if (u !== i.RBrace)
2705
2705
  break;
2706
2706
  }
2707
2707
  const t = this._lexer.peek();
2708
2708
  return this.expectToken(i.RBrace, "W004"), this.createExpressionNode(
2709
- ce,
2709
+ ue,
2710
2710
  {
2711
2711
  props: r
2712
2712
  },
@@ -2717,7 +2717,7 @@ class Ge {
2717
2717
  parseRegExpLiteral() {
2718
2718
  const n = this._lexer.peek(), r = this._lexer.getRegEx();
2719
2719
  return r.success ? this.createExpressionNode(
2720
- Z,
2720
+ C,
2721
2721
  {
2722
2722
  value: new RegExp(r.pattern, r.flags)
2723
2723
  },
@@ -2770,7 +2770,7 @@ class Ge {
2770
2770
  * @param options Error message options
2771
2771
  */
2772
2772
  reportError(n, r, ...t) {
2773
- let l = Re[n] ?? "Unkonwn error";
2773
+ let l = Oe[n] ?? "Unkonwn error";
2774
2774
  throw t && t.forEach(
2775
2775
  (s, o) => l = a(l, `{${o}}`, t[o].toString())
2776
2776
  ), r || (r = this._lexer.peek()), this._parseErrors.push({
@@ -2778,10 +2778,10 @@ class Ge {
2778
2778
  text: l,
2779
2779
  line: r.startLine,
2780
2780
  column: r.startColumn
2781
- }), new qn(l, n);
2782
- function a(s, o, c) {
2781
+ }), new yn(l, n);
2782
+ function a(s, o, u) {
2783
2783
  do
2784
- s = s.replace(o, c);
2784
+ s = s.replace(o, u);
2785
2785
  while (s.includes(o));
2786
2786
  return s;
2787
2787
  }
@@ -2812,7 +2812,7 @@ class Ge {
2812
2812
  createExpressionNode(n, r = {}, t, l) {
2813
2813
  return l || (l = this._lexer.peek()), t || (t = l), Object.assign({}, r, {
2814
2814
  type: n,
2815
- nodeId: ve(),
2815
+ nodeId: Le(),
2816
2816
  startToken: t,
2817
2817
  endToken: l
2818
2818
  });
@@ -2827,7 +2827,7 @@ class Ge {
2827
2827
  createStatementNode(n, r, t, l) {
2828
2828
  return Object.assign({}, r, {
2829
2829
  type: n,
2830
- nodeId: ve(),
2830
+ nodeId: Le(),
2831
2831
  startToken: t,
2832
2832
  endToken: l
2833
2833
  });
@@ -2840,7 +2840,7 @@ class Ge {
2840
2840
  let r;
2841
2841
  const t = BigInt(n.text.replace(/[_']/g, ""));
2842
2842
  return t < Number.MIN_SAFE_INTEGER || t > Number.MAX_SAFE_INTEGER ? r = t : r = parseInt(n.text.substring(2).replace(/[_']/g, ""), 2), this.createExpressionNode(
2843
- Z,
2843
+ C,
2844
2844
  {
2845
2845
  value: r
2846
2846
  },
@@ -2856,7 +2856,7 @@ class Ge {
2856
2856
  let r;
2857
2857
  const t = BigInt(n.text.replace(/[_']/g, ""));
2858
2858
  return t < Number.MIN_SAFE_INTEGER || t > Number.MAX_SAFE_INTEGER ? r = t : r = parseInt(n.text.replace(/[_']/g, ""), 10), this.createExpressionNode(
2859
- Z,
2859
+ C,
2860
2860
  {
2861
2861
  value: r
2862
2862
  },
@@ -2872,7 +2872,7 @@ class Ge {
2872
2872
  let r;
2873
2873
  const t = BigInt(n.text.replace(/[_']/g, ""));
2874
2874
  return t < Number.MIN_SAFE_INTEGER || t > Number.MAX_SAFE_INTEGER ? r = t : r = parseInt(n.text.substring(2).replace(/[_']/g, ""), 16), this.createExpressionNode(
2875
- Z,
2875
+ C,
2876
2876
  {
2877
2877
  value: r
2878
2878
  },
@@ -2887,7 +2887,7 @@ class Ge {
2887
2887
  parseRealLiteral(n) {
2888
2888
  let r = parseFloat(n.text.replace(/[_']/g, ""));
2889
2889
  return this.createExpressionNode(
2890
- Z,
2890
+ C,
2891
2891
  {
2892
2892
  value: r
2893
2893
  },
@@ -2903,13 +2903,13 @@ class Ge {
2903
2903
  let t = n.text;
2904
2904
  r && (t = n.text.length < 2 ? "" : t.substring(1, t.length - 1));
2905
2905
  let l = "", a = 0, s = 0;
2906
- for (const c of t)
2906
+ for (const u of t)
2907
2907
  switch (a) {
2908
2908
  case 0:
2909
- c === "\\" ? a = 1 : l += c;
2909
+ u === "\\" ? a = 1 : l += u;
2910
2910
  break;
2911
2911
  case 1:
2912
- switch (a = 0, c) {
2912
+ switch (a = 0, u) {
2913
2913
  case "b":
2914
2914
  l += "\b";
2915
2915
  break;
@@ -2951,52 +2951,52 @@ class Ge {
2951
2951
  a = 4;
2952
2952
  break;
2953
2953
  default:
2954
- l += c;
2954
+ l += u;
2955
2955
  break;
2956
2956
  }
2957
2957
  break;
2958
2958
  case 2:
2959
- o(c) ? (s = parseInt(c, 16), a = 3) : (l += "x", a = 0);
2959
+ o(u) ? (s = parseInt(u, 16), a = 3) : (l += "x", a = 0);
2960
2960
  break;
2961
2961
  case 3:
2962
- o(c) ? (s = s * 16 + parseInt(c, 16), l += String.fromCharCode(s), a = 0) : (l += String.fromCharCode(s), l += c, a = 0);
2962
+ o(u) ? (s = s * 16 + parseInt(u, 16), l += String.fromCharCode(s), a = 0) : (l += String.fromCharCode(s), l += u, a = 0);
2963
2963
  break;
2964
2964
  case 4:
2965
- if (c === "{") {
2965
+ if (u === "{") {
2966
2966
  a = 8;
2967
2967
  break;
2968
2968
  }
2969
- o(c) ? (s = parseInt(c, 16), a = 5) : (l += "x", a = 0);
2969
+ o(u) ? (s = parseInt(u, 16), a = 5) : (l += "x", a = 0);
2970
2970
  break;
2971
2971
  case 5:
2972
- o(c) ? (s = s * 16 + parseInt(c, 16), a = 6) : (l += String.fromCharCode(s), l += c, a = 0);
2972
+ o(u) ? (s = s * 16 + parseInt(u, 16), a = 6) : (l += String.fromCharCode(s), l += u, a = 0);
2973
2973
  break;
2974
2974
  case 6:
2975
- o(c) ? (s = s * 16 + parseInt(c, 16), a = 7) : (l += String.fromCharCode(s), l += c, a = 0);
2975
+ o(u) ? (s = s * 16 + parseInt(u, 16), a = 7) : (l += String.fromCharCode(s), l += u, a = 0);
2976
2976
  break;
2977
2977
  case 7:
2978
- o(c) ? (s = s * 16 + parseInt(c, 16), l += String.fromCharCode(s), a = 0) : (l += String.fromCharCode(s), l += c, a = 0);
2978
+ o(u) ? (s = s * 16 + parseInt(u, 16), l += String.fromCharCode(s), a = 0) : (l += String.fromCharCode(s), l += u, a = 0);
2979
2979
  break;
2980
2980
  case 8:
2981
- o(c) ? (s = parseInt(c, 16), a = 9) : (l += "x", a = 0);
2981
+ o(u) ? (s = parseInt(u, 16), a = 9) : (l += "x", a = 0);
2982
2982
  break;
2983
2983
  case 9:
2984
- o(c) ? (s = s * 16 + parseInt(c, 16), a = 10) : (l += String.fromCharCode(s), l += c, a = 0);
2984
+ o(u) ? (s = s * 16 + parseInt(u, 16), a = 10) : (l += String.fromCharCode(s), l += u, a = 0);
2985
2985
  break;
2986
2986
  case 10:
2987
- o(c) ? (s = s * 16 + parseInt(c, 16), a = 11) : (l += String.fromCharCode(s), l += c, a = 0);
2987
+ o(u) ? (s = s * 16 + parseInt(u, 16), a = 11) : (l += String.fromCharCode(s), l += u, a = 0);
2988
2988
  break;
2989
2989
  case 11:
2990
- o(c) ? (s = s * 16 + parseInt(c, 16), a = 12) : (l += String.fromCharCode(s), l += c, a = 0);
2990
+ o(u) ? (s = s * 16 + parseInt(u, 16), a = 12) : (l += String.fromCharCode(s), l += u, a = 0);
2991
2991
  break;
2992
2992
  case 12:
2993
- o(c) ? (s = s * 16 + parseInt(c, 16), a = 13) : (l += String.fromCharCode(s), l += c, a = 0);
2993
+ o(u) ? (s = s * 16 + parseInt(u, 16), a = 13) : (l += String.fromCharCode(s), l += u, a = 0);
2994
2994
  break;
2995
2995
  case 13:
2996
- o(c) ? (s = s * 16 + parseInt(c, 16), a = 14) : (l += String.fromCharCode(s), l += c, a = 0);
2996
+ o(u) ? (s = s * 16 + parseInt(u, 16), a = 14) : (l += String.fromCharCode(s), l += u, a = 0);
2997
2997
  break;
2998
2998
  case 14:
2999
- l += String.fromCharCode(s), c !== "}" && (l += c), a = 0;
2999
+ l += String.fromCharCode(s), u !== "}" && (l += u), a = 0;
3000
3000
  break;
3001
3001
  }
3002
3002
  switch (a) {
@@ -3011,21 +3011,21 @@ class Ge {
3011
3011
  break;
3012
3012
  }
3013
3013
  return this.createExpressionNode(
3014
- Z,
3014
+ C,
3015
3015
  {
3016
3016
  value: l
3017
3017
  },
3018
3018
  n,
3019
3019
  n
3020
3020
  );
3021
- function o(c) {
3022
- return c >= "0" && c <= "9" || c >= "a" && c <= "f" || c >= "A" && c <= "F";
3021
+ function o(u) {
3022
+ return u >= "0" && u <= "9" || u >= "a" && u <= "f" || u >= "A" && u <= "F";
3023
3023
  }
3024
3024
  }
3025
3025
  convertToArrayDestructure(n) {
3026
3026
  var l;
3027
- const r = n.type === ae ? n.exprs : n.items, t = this.createExpressionNode(
3028
- De,
3027
+ const r = n.type === oe ? n.exprs : n.items, t = this.createExpressionNode(
3028
+ ve,
3029
3029
  { aDestr: [] },
3030
3030
  n.startToken,
3031
3031
  n.endToken
@@ -3033,32 +3033,32 @@ class Ge {
3033
3033
  for (const a of r) {
3034
3034
  let s;
3035
3035
  switch (a.type) {
3036
- case xe:
3036
+ case me:
3037
3037
  s = this.createExpressionNode(
3038
- ne,
3038
+ re,
3039
3039
  {},
3040
3040
  a.startToken,
3041
3041
  a.endToken
3042
3042
  );
3043
3043
  break;
3044
- case M:
3044
+ case $:
3045
3045
  s = this.createExpressionNode(
3046
- ne,
3046
+ re,
3047
3047
  { id: a.name },
3048
3048
  a.startToken,
3049
3049
  a.endToken
3050
3050
  );
3051
3051
  break;
3052
- case De:
3052
+ case ve:
3053
3053
  t.aDestr.push(...a.aDestr);
3054
3054
  break;
3055
- case ne:
3055
+ case re:
3056
3056
  s = a;
3057
3057
  break;
3058
- case oe: {
3058
+ case ce: {
3059
3059
  const o = this.convertToArrayDestructure(a);
3060
3060
  o && (s = this.createExpressionNode(
3061
- ne,
3061
+ re,
3062
3062
  {
3063
3063
  aDestr: o.aDestr
3064
3064
  },
@@ -3067,9 +3067,9 @@ class Ge {
3067
3067
  ));
3068
3068
  break;
3069
3069
  }
3070
- case ie:
3070
+ case se:
3071
3071
  s = this.createExpressionNode(
3072
- ne,
3072
+ re,
3073
3073
  {
3074
3074
  oDestr: a
3075
3075
  },
@@ -3077,10 +3077,10 @@ class Ge {
3077
3077
  a.endToken
3078
3078
  );
3079
3079
  break;
3080
- case ce: {
3080
+ case ue: {
3081
3081
  const o = this.convertToObjectDestructure(a);
3082
3082
  o && (s = this.createExpressionNode(
3083
- ne,
3083
+ re,
3084
3084
  {
3085
3085
  oDestr: o.oDestr
3086
3086
  },
@@ -3099,7 +3099,7 @@ class Ge {
3099
3099
  convertToObjectDestructure(n) {
3100
3100
  var t;
3101
3101
  const r = this.createExpressionNode(
3102
- De,
3102
+ ve,
3103
3103
  { oDestr: [] },
3104
3104
  n.startToken,
3105
3105
  n.endToken
@@ -3107,18 +3107,18 @@ class Ge {
3107
3107
  for (const l of n.props) {
3108
3108
  if (!Array.isArray(l)) return reportError("W018"), null;
3109
3109
  const [a, s] = l;
3110
- if (a.type !== M)
3110
+ if (a.type !== $)
3111
3111
  return reportError("W018"), null;
3112
3112
  let o;
3113
3113
  switch (s.type) {
3114
- case M:
3114
+ case $:
3115
3115
  s.name === a.name ? o = this.createExpressionNode(
3116
- ie,
3116
+ se,
3117
3117
  { id: a.name },
3118
3118
  s.startToken,
3119
3119
  s.endToken
3120
3120
  ) : o = this.createExpressionNode(
3121
- ie,
3121
+ se,
3122
3122
  {
3123
3123
  id: a.name,
3124
3124
  alias: s.name
@@ -3127,9 +3127,9 @@ class Ge {
3127
3127
  s.endToken
3128
3128
  );
3129
3129
  break;
3130
- case ne: {
3130
+ case re: {
3131
3131
  o = this.createExpressionNode(
3132
- ie,
3132
+ se,
3133
3133
  {
3134
3134
  id: a.name,
3135
3135
  aDestr: s
@@ -3139,29 +3139,29 @@ class Ge {
3139
3139
  );
3140
3140
  break;
3141
3141
  }
3142
- case oe: {
3143
- const c = this.convertToArrayDestructure(s);
3144
- c && (o = this.createExpressionNode(
3145
- ie,
3142
+ case ce: {
3143
+ const u = this.convertToArrayDestructure(s);
3144
+ u && (o = this.createExpressionNode(
3145
+ se,
3146
3146
  {
3147
3147
  id: a.name,
3148
- aDestr: c.aDestr
3148
+ aDestr: u.aDestr
3149
3149
  },
3150
3150
  a.startToken,
3151
3151
  s.endToken
3152
3152
  ));
3153
3153
  break;
3154
3154
  }
3155
- case ie:
3155
+ case se:
3156
3156
  o = s;
3157
3157
  break;
3158
- case ce: {
3159
- const c = this.convertToObjectDestructure(s);
3160
- c && (o = this.createExpressionNode(
3161
- ie,
3158
+ case ue: {
3159
+ const u = this.convertToObjectDestructure(s);
3160
+ u && (o = this.createExpressionNode(
3161
+ se,
3162
3162
  {
3163
3163
  id: a.name,
3164
- oDestr: c.oDestr
3164
+ oDestr: u.oDestr
3165
3165
  },
3166
3166
  a.startToken,
3167
3167
  s.endToken
@@ -3180,79 +3180,130 @@ class Ge {
3180
3180
  */
3181
3181
  isExpressionStart(n) {
3182
3182
  var r;
3183
- return ((r = he[n.type]) == null ? void 0 : r.expressionStart) ?? !1;
3183
+ return ((r = pe[n.type]) == null ? void 0 : r.expressionStart) ?? !1;
3184
3184
  }
3185
3185
  }
3186
- var d = /* @__PURE__ */ ((e) => (e[e.EOF = -1] = "EOF", e[e.nullCharacter = 0] = "nullCharacter", e[e.maxAsciiCharacter = 127] = "maxAsciiCharacter", e[e.lineFeed = 10] = "lineFeed", e[e.carriageReturn = 13] = "carriageReturn", e[e.lineSeparator = 8232] = "lineSeparator", e[e.paragraphSeparator = 8233] = "paragraphSeparator", e[e.nextLine = 133] = "nextLine", e[e.space = 32] = "space", e[e.nonBreakingSpace = 160] = "nonBreakingSpace", e[e.enQuad = 8192] = "enQuad", e[e.emQuad = 8193] = "emQuad", e[e.enSpace = 8194] = "enSpace", e[e.emSpace = 8195] = "emSpace", e[e.threePerEmSpace = 8196] = "threePerEmSpace", e[e.fourPerEmSpace = 8197] = "fourPerEmSpace", e[e.sixPerEmSpace = 8198] = "sixPerEmSpace", e[e.figureSpace = 8199] = "figureSpace", e[e.punctuationSpace = 8200] = "punctuationSpace", e[e.thinSpace = 8201] = "thinSpace", e[e.hairSpace = 8202] = "hairSpace", e[e.zeroWidthSpace = 8203] = "zeroWidthSpace", e[e.narrowNoBreakSpace = 8239] = "narrowNoBreakSpace", e[e.ideographicSpace = 12288] = "ideographicSpace", e[e.mathematicalSpace = 8287] = "mathematicalSpace", e[e.ogham = 5760] = "ogham", e[e.replacementCharacter = 65533] = "replacementCharacter", e[e._ = 95] = "_", e[e.$ = 36] = "$", e[e._0 = 48] = "_0", e[e._1 = 49] = "_1", e[e._2 = 50] = "_2", e[e._3 = 51] = "_3", e[e._4 = 52] = "_4", e[e._5 = 53] = "_5", e[e._6 = 54] = "_6", e[e._7 = 55] = "_7", e[e._8 = 56] = "_8", e[e._9 = 57] = "_9", e[e.a = 97] = "a", e[e.b = 98] = "b", e[e.c = 99] = "c", e[e.d = 100] = "d", e[e.e = 101] = "e", e[e.f = 102] = "f", e[e.g = 103] = "g", e[e.h = 104] = "h", e[e.i = 105] = "i", e[e.j = 106] = "j", e[e.k = 107] = "k", e[e.l = 108] = "l", e[e.m = 109] = "m", e[e.n = 110] = "n", e[e.o = 111] = "o", e[e.p = 112] = "p", e[e.q = 113] = "q", e[e.r = 114] = "r", e[e.s = 115] = "s", e[e.t = 116] = "t", e[e.u = 117] = "u", e[e.v = 118] = "v", e[e.w = 119] = "w", e[e.x = 120] = "x", e[e.y = 121] = "y", e[e.z = 122] = "z", e[e.A = 65] = "A", e[e.B = 66] = "B", e[e.C = 67] = "C", e[e.D = 68] = "D", e[e.E = 69] = "E", e[e.F = 70] = "F", e[e.G = 71] = "G", e[e.H = 72] = "H", e[e.I = 73] = "I", e[e.J = 74] = "J", e[e.K = 75] = "K", e[e.L = 76] = "L", e[e.M = 77] = "M", e[e.N = 78] = "N", e[e.O = 79] = "O", e[e.P = 80] = "P", e[e.Q = 81] = "Q", e[e.R = 82] = "R", e[e.S = 83] = "S", e[e.T = 84] = "T", e[e.U = 85] = "U", e[e.V = 86] = "V", e[e.W = 87] = "W", e[e.X = 88] = "X", e[e.Y = 89] = "Y", e[e.Z = 90] = "Z", e[e.ampersand = 38] = "ampersand", e[e.asterisk = 42] = "asterisk", e[e.at = 64] = "at", e[e.backslash = 92] = "backslash", e[e.backtick = 96] = "backtick", e[e.bar = 124] = "bar", e[e.caret = 94] = "caret", e[e.closeBrace = 125] = "closeBrace", e[e.closeBracket = 93] = "closeBracket", e[e.closeParen = 41] = "closeParen", e[e.colon = 58] = "colon", e[e.comma = 44] = "comma", e[e.dot = 46] = "dot", e[e.doubleQuote = 34] = "doubleQuote", e[e.equals = 61] = "equals", e[e.exclamation = 33] = "exclamation", e[e.greaterThan = 62] = "greaterThan", e[e.hash = 35] = "hash", e[e.lessThan = 60] = "lessThan", e[e.minus = 45] = "minus", e[e.openBrace = 123] = "openBrace", e[e.openBracket = 91] = "openBracket", e[e.openParen = 40] = "openParen", e[e.percent = 37] = "percent", e[e.plus = 43] = "plus", e[e.question = 63] = "question", e[e.semicolon = 59] = "semicolon", e[e.singleQuote = 39] = "singleQuote", e[e.slash = 47] = "slash", e[e.tilde = 126] = "tilde", e[e.backspace = 8] = "backspace", e[e.formFeed = 12] = "formFeed", e[e.byteOrderMark = 65279] = "byteOrderMark", e[e.tab = 9] = "tab", e[e.verticalTab = 11] = "verticalTab", e))(d || {}), _e = /* @__PURE__ */ ((e) => (e[e.Error = 1] = "Error", e[e.Warning = 2] = "Warning", e[e.Information = 3] = "Information", e[e.Hint = 4] = "Hint", e))(_e || {}), de = /* @__PURE__ */ ((e) => (e.onlyOneElem = "U002", e.expTagOpen = "U003", e.expTagName = "U004", e.expCloseStart = "U005", e.expEndOrClose = "U006", e.tagNameMismatch = "U007", e.expEnd = "U008", e.expAttrIdent = "U009", e.expEq = "U010", e.expAttrValue = "U011", e.duplAttr = "U012", e.uppercaseAttr = "U013", e.tagNameExpAfterNamespace = "U014", e.invalidChar = "W001", e.untermStr = "W002", e.untermComment = "W007", e.untermCData = "W008", e.untermScript = "W009", e))(de || {});
3187
- function wr(e, n = !0) {
3188
- const r = _e[e.category];
3186
+ var p = /* @__PURE__ */ ((e) => (e[e.EOF = -1] = "EOF", e[e.nullCharacter = 0] = "nullCharacter", e[e.maxAsciiCharacter = 127] = "maxAsciiCharacter", e[e.lineFeed = 10] = "lineFeed", e[e.carriageReturn = 13] = "carriageReturn", e[e.lineSeparator = 8232] = "lineSeparator", e[e.paragraphSeparator = 8233] = "paragraphSeparator", e[e.nextLine = 133] = "nextLine", e[e.space = 32] = "space", e[e.nonBreakingSpace = 160] = "nonBreakingSpace", e[e.enQuad = 8192] = "enQuad", e[e.emQuad = 8193] = "emQuad", e[e.enSpace = 8194] = "enSpace", e[e.emSpace = 8195] = "emSpace", e[e.threePerEmSpace = 8196] = "threePerEmSpace", e[e.fourPerEmSpace = 8197] = "fourPerEmSpace", e[e.sixPerEmSpace = 8198] = "sixPerEmSpace", e[e.figureSpace = 8199] = "figureSpace", e[e.punctuationSpace = 8200] = "punctuationSpace", e[e.thinSpace = 8201] = "thinSpace", e[e.hairSpace = 8202] = "hairSpace", e[e.zeroWidthSpace = 8203] = "zeroWidthSpace", e[e.narrowNoBreakSpace = 8239] = "narrowNoBreakSpace", e[e.ideographicSpace = 12288] = "ideographicSpace", e[e.mathematicalSpace = 8287] = "mathematicalSpace", e[e.ogham = 5760] = "ogham", e[e.replacementCharacter = 65533] = "replacementCharacter", e[e._ = 95] = "_", e[e.$ = 36] = "$", e[e._0 = 48] = "_0", e[e._1 = 49] = "_1", e[e._2 = 50] = "_2", e[e._3 = 51] = "_3", e[e._4 = 52] = "_4", e[e._5 = 53] = "_5", e[e._6 = 54] = "_6", e[e._7 = 55] = "_7", e[e._8 = 56] = "_8", e[e._9 = 57] = "_9", e[e.a = 97] = "a", e[e.b = 98] = "b", e[e.c = 99] = "c", e[e.d = 100] = "d", e[e.e = 101] = "e", e[e.f = 102] = "f", e[e.g = 103] = "g", e[e.h = 104] = "h", e[e.i = 105] = "i", e[e.j = 106] = "j", e[e.k = 107] = "k", e[e.l = 108] = "l", e[e.m = 109] = "m", e[e.n = 110] = "n", e[e.o = 111] = "o", e[e.p = 112] = "p", e[e.q = 113] = "q", e[e.r = 114] = "r", e[e.s = 115] = "s", e[e.t = 116] = "t", e[e.u = 117] = "u", e[e.v = 118] = "v", e[e.w = 119] = "w", e[e.x = 120] = "x", e[e.y = 121] = "y", e[e.z = 122] = "z", e[e.A = 65] = "A", e[e.B = 66] = "B", e[e.C = 67] = "C", e[e.D = 68] = "D", e[e.E = 69] = "E", e[e.F = 70] = "F", e[e.G = 71] = "G", e[e.H = 72] = "H", e[e.I = 73] = "I", e[e.J = 74] = "J", e[e.K = 75] = "K", e[e.L = 76] = "L", e[e.M = 77] = "M", e[e.N = 78] = "N", e[e.O = 79] = "O", e[e.P = 80] = "P", e[e.Q = 81] = "Q", e[e.R = 82] = "R", e[e.S = 83] = "S", e[e.T = 84] = "T", e[e.U = 85] = "U", e[e.V = 86] = "V", e[e.W = 87] = "W", e[e.X = 88] = "X", e[e.Y = 89] = "Y", e[e.Z = 90] = "Z", e[e.ampersand = 38] = "ampersand", e[e.asterisk = 42] = "asterisk", e[e.at = 64] = "at", e[e.backslash = 92] = "backslash", e[e.backtick = 96] = "backtick", e[e.bar = 124] = "bar", e[e.caret = 94] = "caret", e[e.closeBrace = 125] = "closeBrace", e[e.closeBracket = 93] = "closeBracket", e[e.closeParen = 41] = "closeParen", e[e.colon = 58] = "colon", e[e.comma = 44] = "comma", e[e.dot = 46] = "dot", e[e.doubleQuote = 34] = "doubleQuote", e[e.equals = 61] = "equals", e[e.exclamation = 33] = "exclamation", e[e.greaterThan = 62] = "greaterThan", e[e.hash = 35] = "hash", e[e.lessThan = 60] = "lessThan", e[e.minus = 45] = "minus", e[e.openBrace = 123] = "openBrace", e[e.openBracket = 91] = "openBracket", e[e.openParen = 40] = "openParen", e[e.percent = 37] = "percent", e[e.plus = 43] = "plus", e[e.question = 63] = "question", e[e.semicolon = 59] = "semicolon", e[e.singleQuote = 39] = "singleQuote", e[e.slash = 47] = "slash", e[e.tilde = 126] = "tilde", e[e.backspace = 8] = "backspace", e[e.formFeed = 12] = "formFeed", e[e.byteOrderMark = 65279] = "byteOrderMark", e[e.tab = 9] = "tab", e[e.verticalTab = 11] = "verticalTab", e))(p || {}), Dn = /* @__PURE__ */ ((e) => (e[e.Error = 1] = "Error", e[e.Warning = 2] = "Warning", e[e.Information = 3] = "Information", e[e.Hint = 4] = "Hint", e))(Dn || {}), Fe = /* @__PURE__ */ ((e) => (e.onlyOneElem = "U002", e.expTagOpen = "U003", e.expTagName = "U004", e.expCloseStart = "U005", e.expEndOrClose = "U006", e.tagNameMismatch = "U007", e.expEnd = "U008", e.expAttrName = "U009", e.expEq = "U010", e.expAttrValue = "U011", e.duplAttr = "U012", e.uppercaseAttr = "U013", e.expTagNameAfterNamespace = "U014", e.expCloseStartWithName = "U015", e.expAttrNameAfterNamespace = "U016", e.invalidChar = "W001", e.untermStr = "W002", e.untermComment = "W007", e.untermCData = "W008", e.untermScript = "W009", e))(Fe || {});
3187
+ const q = {
3188
+ expCloseStartWithName: function(e) {
3189
+ return {
3190
+ category: 1,
3191
+ code: "U015",
3192
+ message: `Opened tag has no closing pair. Expected to see '</${e}>'.`
3193
+ };
3194
+ },
3195
+ expCloseStart: {
3196
+ category: 1,
3197
+ code: "U005",
3198
+ message: "A '</' token expected."
3199
+ },
3200
+ uppercaseAttr: function(e) {
3201
+ return {
3202
+ category: 1,
3203
+ code: "U013",
3204
+ message: `Attribute name '${e}' cannot start with an uppercase letter.`
3205
+ };
3206
+ },
3207
+ duplAttr: function(e) {
3208
+ return {
3209
+ category: 1,
3210
+ code: "U012",
3211
+ message: `Duplicated attribute: '${e}'.`
3212
+ };
3213
+ },
3214
+ tagNameMismatch: function(e, n) {
3215
+ return {
3216
+ category: 1,
3217
+ code: "U007",
3218
+ message: `Opening and closing tag names should match. Opening tag has a name '${e}', but the closing tag name is '${n}'.`
3219
+ };
3220
+ },
3221
+ invalidChar: function(e) {
3222
+ return {
3223
+ category: 1,
3224
+ code: "W001",
3225
+ message: `Invalid character '${e}'.`
3226
+ };
3227
+ },
3228
+ expEnd: {
3229
+ category: 1,
3230
+ code: "U008",
3231
+ message: "A '>' token expected."
3232
+ },
3233
+ expTagName: {
3234
+ category: 1,
3235
+ code: "U004",
3236
+ message: "A tag name expected."
3237
+ },
3238
+ expAttrStr: {
3239
+ category: 1,
3240
+ code: "U011",
3241
+ message: "A string expected as an attribute value after '='."
3242
+ },
3243
+ expEq: {
3244
+ category: 1,
3245
+ code: "U010",
3246
+ message: "An '=' token expected."
3247
+ },
3248
+ expTagOpen: {
3249
+ category: 1,
3250
+ code: "U003",
3251
+ message: "A '<' token expected."
3252
+ },
3253
+ expEndOrClose: {
3254
+ category: 1,
3255
+ code: "U006",
3256
+ message: "A '>' or '/>' token expected."
3257
+ },
3258
+ expAttrName: {
3259
+ category: 1,
3260
+ code: "U009",
3261
+ message: "An attribute name expected."
3262
+ },
3263
+ expAttrNameAfterNamespace: {
3264
+ category: 1,
3265
+ code: "U016",
3266
+ message: "An attribute name expected after a namespaces."
3267
+ },
3268
+ expTagNameAfterNamespace: {
3269
+ category: 1,
3270
+ code: "U014",
3271
+ message: "A tag name expected after a namespaces."
3272
+ }
3273
+ };
3274
+ function Nr(e, n = !0) {
3275
+ const r = Dn[e.category];
3189
3276
  return n ? r.toLowerCase() : r;
3190
3277
  }
3191
- const ye = {
3278
+ const De = {
3192
3279
  code: "W001",
3193
3280
  category: 1,
3194
3281
  message: "Invalid character."
3195
- }, Xn = {
3282
+ }, Fn = {
3196
3283
  code: "W002",
3197
3284
  category: 1,
3198
3285
  message: "Unterminated string literal."
3199
- }, Gn = {
3286
+ }, Mn = {
3200
3287
  code: "W007",
3201
3288
  category: 1,
3202
3289
  message: "Unterminated comment"
3203
- }, zn = {
3290
+ }, qn = {
3204
3291
  code: "W008",
3205
3292
  category: 1,
3206
3293
  message: "Unterminated CDATA section"
3207
- }, Qn = {
3294
+ }, $n = {
3208
3295
  code: "W009",
3209
3296
  category: 1,
3210
3297
  message: "Unterminated script section"
3211
- }, Hn = {
3212
- category: 1,
3213
- code: "U008",
3214
- message: "A '>' token expected."
3215
- }, Yn = {
3216
- category: 1,
3217
- code: "U005",
3218
- message: "A '</' token expected."
3219
- }, Ue = {
3220
- category: 1,
3221
- code: "U004",
3222
- message: "A tag name expected."
3223
- }, Zn = {
3224
- category: 1,
3225
- code: "U011",
3226
- message: "An attribute value expected."
3227
- }, Tr = {
3228
- category: 1,
3229
- code: "U010",
3230
- message: "An '=' token expected."
3231
- }, Jn = {
3232
- category: 1,
3233
- code: "U003",
3234
- message: "A '<' token expected."
3235
- }, Fe = {
3236
- category: 1,
3237
- code: "U006",
3238
- message: "A '>' or '/>' token expected."
3239
- }, nn = {
3240
- category: 1,
3241
- code: "U009",
3242
- message: "An attribute identifier expected."
3243
- }, vr = {
3244
- category: 1,
3245
- code: "U014",
3246
- message: "A tag name expected after a namespaces."
3247
3298
  };
3248
- var u = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.EndOfFileToken = 1] = "EndOfFileToken", e[e.CommentTrivia = 2] = "CommentTrivia", e[e.NewLineTrivia = 3] = "NewLineTrivia", e[e.WhitespaceTrivia = 4] = "WhitespaceTrivia", e[e.Identifier = 5] = "Identifier", e[e.OpenNodeStart = 6] = "OpenNodeStart", e[e.CloseNodeStart = 7] = "CloseNodeStart", e[e.NodeEnd = 8] = "NodeEnd", e[e.NodeClose = 9] = "NodeClose", e[e.Colon = 10] = "Colon", e[e.Equal = 11] = "Equal", e[e.StringLiteral = 12] = "StringLiteral", e[e.CData = 13] = "CData", e[e.Script = 14] = "Script", e[e.TextNode = 15] = "TextNode", e[e.AmpersandEntity = 16] = "AmpersandEntity", e[e.LessThanEntity = 17] = "LessThanEntity", e[e.GreaterThanEntity = 18] = "GreaterThanEntity", e[e.SingleQuoteEntity = 19] = "SingleQuoteEntity", e[e.DoubleQuoteEntity = 20] = "DoubleQuoteEntity", e[e.ElementNode = 21] = "ElementNode", e[e.AttributeNode = 22] = "AttributeNode", e[e.AttributeKeyNode = 23] = "AttributeKeyNode", e[e.ContentListNode = 24] = "ContentListNode", e[e.AttributeListNode = 25] = "AttributeListNode", e[e.TagNameNode = 26] = "TagNameNode", e[e.ErrorNode = 27] = "ErrorNode", e))(u || {});
3249
- function Kn(e) {
3299
+ var c = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.EndOfFileToken = 1] = "EndOfFileToken", e[e.CommentTrivia = 2] = "CommentTrivia", e[e.NewLineTrivia = 3] = "NewLineTrivia", e[e.WhitespaceTrivia = 4] = "WhitespaceTrivia", e[e.Identifier = 5] = "Identifier", e[e.OpenNodeStart = 6] = "OpenNodeStart", e[e.CloseNodeStart = 7] = "CloseNodeStart", e[e.NodeEnd = 8] = "NodeEnd", e[e.NodeClose = 9] = "NodeClose", e[e.Colon = 10] = "Colon", e[e.Equal = 11] = "Equal", e[e.StringLiteral = 12] = "StringLiteral", e[e.CData = 13] = "CData", e[e.Script = 14] = "Script", e[e.TextNode = 15] = "TextNode", e[e.AmpersandEntity = 16] = "AmpersandEntity", e[e.LessThanEntity = 17] = "LessThanEntity", e[e.GreaterThanEntity = 18] = "GreaterThanEntity", e[e.SingleQuoteEntity = 19] = "SingleQuoteEntity", e[e.DoubleQuoteEntity = 20] = "DoubleQuoteEntity", e[e.ElementNode = 21] = "ElementNode", e[e.AttributeNode = 22] = "AttributeNode", e[e.AttributeKeyNode = 23] = "AttributeKeyNode", e[e.ContentListNode = 24] = "ContentListNode", e[e.AttributeListNode = 25] = "AttributeListNode", e[e.TagNameNode = 26] = "TagNameNode", e[e.ErrorNode = 27] = "ErrorNode", e))(c || {});
3300
+ function Xn(e) {
3250
3301
  return e >= 2 && e <= 4;
3251
3302
  }
3252
- function Cn(e) {
3303
+ function Gn(e) {
3253
3304
  return e >= 21 && e <= 27;
3254
3305
  }
3255
- function ze(e) {
3306
+ function Me(e) {
3256
3307
  switch (e) {
3257
3308
  case 0:
3258
3309
  return "Unknown";
@@ -3311,254 +3362,254 @@ function ze(e) {
3311
3362
  case 23:
3312
3363
  return "AttributeKeyNode";
3313
3364
  }
3314
- return jn();
3365
+ return zn();
3315
3366
  }
3316
- function jn(e) {
3367
+ function zn(e) {
3317
3368
  throw new Error("Didn't expect to get here");
3318
3369
  }
3319
- function Vn(e, n, r, t, l) {
3320
- let a = n ?? "", s, o, c, D, w, h;
3321
- return j(a, t, l), {
3322
- getStartPos: () => c,
3370
+ function Qn(e, n, r, t, l) {
3371
+ let a = n ?? "", s, o, u, D, T, h;
3372
+ return M(a, t, l), {
3373
+ getStartPos: () => u,
3323
3374
  getTokenEnd: () => s,
3324
- getToken: () => w,
3375
+ getToken: () => T,
3325
3376
  getTokenStart: () => D,
3326
3377
  getTokenText: () => a.substring(D, s),
3327
3378
  getTokenValue: () => h,
3328
- isIdentifier: () => w === u.Identifier,
3379
+ isIdentifier: () => T === c.Identifier,
3329
3380
  peekChar: U,
3330
- scanChar: x,
3331
- scan: H,
3332
- scanTrivia: T,
3381
+ scanChar: m,
3382
+ scan: j,
3383
+ scanTrivia: v,
3333
3384
  scanText: _,
3334
- getText: z,
3335
- setText: j,
3336
- setOnError: fe,
3337
- resetTokenState: X,
3338
- back: pe
3385
+ getText: G,
3386
+ setText: M,
3387
+ setOnError: H,
3388
+ resetTokenState: V,
3389
+ back: Z
3339
3390
  };
3340
3391
  function U(g) {
3341
3392
  if (s + (g ?? 0) >= o)
3342
3393
  return null;
3343
- const p = q(s + (g ?? 0));
3344
- return isNaN(p) ? null : p;
3394
+ const d = Q(s + (g ?? 0));
3395
+ return isNaN(d) ? null : d;
3345
3396
  }
3346
- function x() {
3397
+ function m() {
3347
3398
  if (s >= o)
3348
3399
  return null;
3349
- const g = q(s);
3350
- return s += re(g), g;
3400
+ const g = Q(s);
3401
+ return s += ie(g), g;
3351
3402
  }
3352
- function H() {
3353
- for (c = s; ; ) {
3403
+ function j() {
3404
+ for (u = s; ; ) {
3354
3405
  if (D = s, s >= o)
3355
- return w = u.EndOfFileToken;
3356
- const g = q(s);
3406
+ return T = c.EndOfFileToken;
3407
+ const g = Q(s);
3357
3408
  switch (g) {
3358
- case d.lineFeed:
3359
- case d.carriageReturn:
3409
+ case p.lineFeed:
3410
+ case p.carriageReturn:
3360
3411
  if (e) {
3361
3412
  s++;
3362
3413
  continue;
3363
3414
  } else
3364
- return g === d.carriageReturn && s + 1 < o && S(s + 1) === d.lineFeed ? s += 2 : s++, w = u.NewLineTrivia;
3365
- case d.tab:
3366
- case d.verticalTab:
3367
- case d.formFeed:
3368
- case d.space:
3369
- case d.nonBreakingSpace:
3370
- case d.ogham:
3371
- case d.enQuad:
3372
- case d.emQuad:
3373
- case d.enSpace:
3374
- case d.emSpace:
3375
- case d.threePerEmSpace:
3376
- case d.fourPerEmSpace:
3377
- case d.sixPerEmSpace:
3378
- case d.figureSpace:
3379
- case d.punctuationSpace:
3380
- case d.thinSpace:
3381
- case d.hairSpace:
3382
- case d.zeroWidthSpace:
3383
- case d.narrowNoBreakSpace:
3384
- case d.mathematicalSpace:
3385
- case d.ideographicSpace:
3386
- case d.byteOrderMark:
3415
+ return g === p.carriageReturn && s + 1 < o && A(s + 1) === p.lineFeed ? s += 2 : s++, T = c.NewLineTrivia;
3416
+ case p.tab:
3417
+ case p.verticalTab:
3418
+ case p.formFeed:
3419
+ case p.space:
3420
+ case p.nonBreakingSpace:
3421
+ case p.ogham:
3422
+ case p.enQuad:
3423
+ case p.emQuad:
3424
+ case p.enSpace:
3425
+ case p.emSpace:
3426
+ case p.threePerEmSpace:
3427
+ case p.fourPerEmSpace:
3428
+ case p.sixPerEmSpace:
3429
+ case p.figureSpace:
3430
+ case p.punctuationSpace:
3431
+ case p.thinSpace:
3432
+ case p.hairSpace:
3433
+ case p.zeroWidthSpace:
3434
+ case p.narrowNoBreakSpace:
3435
+ case p.mathematicalSpace:
3436
+ case p.ideographicSpace:
3437
+ case p.byteOrderMark:
3387
3438
  if (e) {
3388
3439
  s++;
3389
3440
  continue;
3390
3441
  } else {
3391
- for (; s < o && rn(S(s)); )
3442
+ for (; s < o && Ke(A(s)); )
3392
3443
  s++;
3393
- return w = u.WhitespaceTrivia;
3444
+ return T = c.WhitespaceTrivia;
3394
3445
  }
3395
- case d.doubleQuote:
3396
- case d.singleQuote:
3397
- case d.backtick:
3398
- return h = k(), w = u.StringLiteral;
3399
- case d.ampersand:
3400
- return S(s + 1) === d.a && S(s + 2) === d.m && S(s + 3) === d.p && S(s + 4) === d.semicolon ? (s += 5, w = u.AmpersandEntity) : S(s + 1) === d.l && S(s + 2) === d.t && S(s + 3) === d.semicolon ? (s += 4, w = u.LessThanEntity) : S(s + 1) === d.g && S(s + 2) === d.t && S(s + 3) === d.semicolon ? (s += 4, w = u.GreaterThanEntity) : S(s + 1) === d.q && S(s + 2) === d.u && S(s + 3) === d.o && S(s + 4) === d.t && S(s + 5) === d.semicolon ? (s += 6, w = u.DoubleQuoteEntity) : S(s + 1) === d.a && S(s + 2) === d.p && S(s + 3) === d.o && S(s + 4) === d.s && S(s + 5) === d.semicolon ? (s += 6, w = u.SingleQuoteEntity) : (s++, f(ye, 1), w = u.Unknown);
3401
- case d.equals:
3402
- return s++, w = u.Equal;
3403
- case d.colon:
3404
- return s++, w = u.Colon;
3405
- case d.lessThan:
3406
- if (S(s + 1) === d.slash)
3407
- return s += 2, w = u.CloseNodeStart;
3446
+ case p.doubleQuote:
3447
+ case p.singleQuote:
3448
+ case p.backtick:
3449
+ return h = k(), T = c.StringLiteral;
3450
+ case p.ampersand:
3451
+ return A(s + 1) === p.a && A(s + 2) === p.m && A(s + 3) === p.p && A(s + 4) === p.semicolon ? (s += 5, T = c.AmpersandEntity) : A(s + 1) === p.l && A(s + 2) === p.t && A(s + 3) === p.semicolon ? (s += 4, T = c.LessThanEntity) : A(s + 1) === p.g && A(s + 2) === p.t && A(s + 3) === p.semicolon ? (s += 4, T = c.GreaterThanEntity) : A(s + 1) === p.q && A(s + 2) === p.u && A(s + 3) === p.o && A(s + 4) === p.t && A(s + 5) === p.semicolon ? (s += 6, T = c.DoubleQuoteEntity) : A(s + 1) === p.a && A(s + 2) === p.p && A(s + 3) === p.o && A(s + 4) === p.s && A(s + 5) === p.semicolon ? (s += 6, T = c.SingleQuoteEntity) : (s++, f(De, 1), T = c.Unknown);
3452
+ case p.equals:
3453
+ return s++, T = c.Equal;
3454
+ case p.colon:
3455
+ return s++, T = c.Colon;
3456
+ case p.lessThan:
3457
+ if (A(s + 1) === p.slash)
3458
+ return s += 2, T = c.CloseNodeStart;
3408
3459
  if (
3409
3460
  // --- "<!-- -->", XMLUI comment
3410
- S(s + 1) === d.exclamation && S(s + 2) === d.minus && S(s + 3) === d.minus
3461
+ A(s + 1) === p.exclamation && A(s + 2) === p.minus && A(s + 3) === p.minus
3411
3462
  ) {
3412
3463
  for (s += 4; s < o; ) {
3413
- if (S(s) === d.minus && S(s + 1) === d.minus && S(s + 2) === d.greaterThan)
3414
- return s += 3, w = u.CommentTrivia;
3415
- s += re(S(s));
3464
+ if (A(s) === p.minus && A(s + 1) === p.minus && A(s + 2) === p.greaterThan)
3465
+ return s += 3, T = c.CommentTrivia;
3466
+ s += ie(A(s));
3416
3467
  }
3417
- return f(Gn, 4), w = u.Unknown;
3468
+ return f(Mn, 4), T = c.Unknown;
3418
3469
  } else if (
3419
3470
  // --- <![CDATA[ section
3420
- S(s + 1) === d.exclamation && S(s + 2) === d.openBracket && S(s + 3) === d.C && S(s + 4) === d.D && S(s + 5) === d.A && S(s + 6) === d.T && S(s + 7) === d.A && S(s + 8) === d.openBracket
3471
+ A(s + 1) === p.exclamation && A(s + 2) === p.openBracket && A(s + 3) === p.C && A(s + 4) === p.D && A(s + 5) === p.A && A(s + 6) === p.T && A(s + 7) === p.A && A(s + 8) === p.openBracket
3421
3472
  ) {
3422
3473
  for (s += 9; s < o; ) {
3423
- if (S(s) === d.closeBracket && S(s + 1) === d.closeBracket && S(s + 2) === d.greaterThan)
3424
- return s += 3, w = u.CData;
3425
- s += re(S(s));
3474
+ if (A(s) === p.closeBracket && A(s + 1) === p.closeBracket && A(s + 2) === p.greaterThan)
3475
+ return s += 3, T = c.CData;
3476
+ s += ie(A(s));
3426
3477
  }
3427
- return f(zn, 9), w = u.CData;
3478
+ return f(qn, 9), T = c.CData;
3428
3479
  } else if (
3429
3480
  // --- <script>
3430
- S(s + 1) === d.s && S(s + 2) === d.c && S(s + 3) === d.r && S(s + 4) === d.i && S(s + 5) === d.p && S(s + 6) === d.t && S(s + 7) === d.greaterThan
3481
+ A(s + 1) === p.s && A(s + 2) === p.c && A(s + 3) === p.r && A(s + 4) === p.i && A(s + 5) === p.p && A(s + 6) === p.t && A(s + 7) === p.greaterThan
3431
3482
  ) {
3432
3483
  for (s += 8; s < o; ) {
3433
- if (S(s) === d.lessThan && S(s + 1) === d.slash && S(s + 2) === d.s && S(s + 3) === d.c && S(s + 4) === d.r && S(s + 5) === d.i && S(s + 6) === d.p && S(s + 7) === d.t && S(s + 8) === d.greaterThan)
3434
- return s += 9, w = u.Script;
3435
- s += re(S(s));
3484
+ if (A(s) === p.lessThan && A(s + 1) === p.slash && A(s + 2) === p.s && A(s + 3) === p.c && A(s + 4) === p.r && A(s + 5) === p.i && A(s + 6) === p.p && A(s + 7) === p.t && A(s + 8) === p.greaterThan)
3485
+ return s += 9, T = c.Script;
3486
+ s += ie(A(s));
3436
3487
  }
3437
- return f(Qn, 9), w = u.Script;
3488
+ return f($n, 9), T = c.Script;
3438
3489
  }
3439
- return s++, w = u.OpenNodeStart;
3440
- case d.slash:
3441
- return S(s + 1) === d.greaterThan ? (s += 2, w = u.NodeClose) : (s++, f(ye, 1), w = u.Unknown);
3442
- case d.greaterThan:
3443
- return s++, w = u.NodeEnd;
3490
+ return s++, T = c.OpenNodeStart;
3491
+ case p.slash:
3492
+ return A(s + 1) === p.greaterThan ? (s += 2, T = c.NodeClose) : (s++, f(De, 1), T = c.Unknown);
3493
+ case p.greaterThan:
3494
+ return s++, T = c.NodeEnd;
3444
3495
  default:
3445
- const p = J(g);
3446
- if (p)
3447
- return w = p;
3448
- if (rn(g)) {
3449
- s += re(g);
3496
+ const d = te(g);
3497
+ if (d)
3498
+ return T = d;
3499
+ if (Ke(g)) {
3500
+ s += ie(g);
3450
3501
  continue;
3451
- } else if (ir(g)) {
3452
- s += re(g);
3502
+ } else if (Kn(g)) {
3503
+ s += ie(g);
3453
3504
  continue;
3454
3505
  }
3455
- const N = re(g);
3456
- return s += N, f(ye, N), w = u.Unknown;
3506
+ const N = ie(g);
3507
+ return s += N, f(De, N), T = c.Unknown;
3457
3508
  }
3458
3509
  }
3459
3510
  }
3460
- function T() {
3461
- const g = s, p = H();
3462
- return Kn(p) ? p : (X(g), null);
3511
+ function v() {
3512
+ const g = s, d = j();
3513
+ return Xn(d) ? d : (V(g), null);
3463
3514
  }
3464
3515
  function _() {
3465
- return u.Unknown;
3516
+ return c.Unknown;
3466
3517
  }
3467
- function z() {
3518
+ function G() {
3468
3519
  return a;
3469
3520
  }
3470
- function S(g) {
3521
+ function A(g) {
3471
3522
  return a.charCodeAt(g);
3472
3523
  }
3473
- function q(g) {
3474
- return $(a, g);
3524
+ function Q(g) {
3525
+ return X(a, g);
3475
3526
  }
3476
- function $(g, p) {
3477
- return g.codePointAt(p) ?? 0;
3527
+ function X(g, d) {
3528
+ return g.codePointAt(d) ?? 0;
3478
3529
  }
3479
- function j(g, p, N) {
3480
- a = g || "", o = N === void 0 ? a.length : p + N, X(p || 0);
3530
+ function M(g, d, N) {
3531
+ a = g || "", o = N === void 0 ? a.length : d + N, V(d || 0);
3481
3532
  }
3482
- function fe(g) {
3533
+ function H(g) {
3483
3534
  r = g;
3484
3535
  }
3485
- function X(g) {
3486
- s = g, c = g, D = g, w = u.Unknown, h = void 0;
3536
+ function V(g) {
3537
+ s = g, u = g, D = g, T = c.Unknown, h = void 0;
3487
3538
  }
3488
- function pe() {
3489
- X(c);
3539
+ function Z() {
3540
+ V(u);
3490
3541
  }
3491
- function J(g) {
3492
- let p = g;
3493
- if (rr(p)) {
3494
- for (s += re(p); s < o && tr(p = q(s)); )
3495
- s += re(p);
3496
- return h = a.substring(D, s), V();
3542
+ function te(g) {
3543
+ let d = g;
3544
+ if (Zn(d)) {
3545
+ for (s += ie(d); s < o && Jn(d = Q(s)); )
3546
+ s += ie(d);
3547
+ return h = a.substring(D, s), J();
3497
3548
  }
3498
3549
  }
3499
- function V() {
3500
- return w = u.Identifier;
3550
+ function J() {
3551
+ return T = c.Identifier;
3501
3552
  }
3502
3553
  function k() {
3503
- const g = S(s);
3554
+ const g = A(s);
3504
3555
  s++;
3505
- let p = "", N = s;
3556
+ let d = "", N = s;
3506
3557
  for (; ; ) {
3507
3558
  if (s >= o) {
3508
- p += a.substring(N, s), f(Xn, 1);
3559
+ d += a.substring(N, s), f(Fn, 1);
3509
3560
  break;
3510
3561
  }
3511
- if (S(s) === g) {
3512
- p += a.substring(N, s), s++;
3562
+ if (A(s) === g) {
3563
+ d += a.substring(N, s), s++;
3513
3564
  break;
3514
3565
  }
3515
3566
  s++;
3516
3567
  }
3517
- return p;
3568
+ return d;
3518
3569
  }
3519
- function f(g, p = 0) {
3520
- r && r(g, p);
3570
+ function f(g, d = 0) {
3571
+ r && r(g, d);
3521
3572
  }
3522
3573
  }
3523
- function re(e) {
3524
- return e >= 65536 ? 2 : e === d.EOF ? 0 : 1;
3574
+ function ie(e) {
3575
+ return e >= 65536 ? 2 : e === p.EOF ? 0 : 1;
3525
3576
  }
3526
- function Un(e) {
3527
- return e >= d.A && e <= d.Z || e >= d.a && e <= d.z;
3577
+ function Bn(e) {
3578
+ return e >= p.A && e <= p.Z || e >= p.a && e <= p.z;
3528
3579
  }
3529
- function er(e) {
3530
- return Un(e) || nr(e) || e === d._;
3580
+ function Hn(e) {
3581
+ return Bn(e) || Yn(e) || e === p._;
3531
3582
  }
3532
- function nr(e) {
3533
- return e >= d._0 && e <= d._9;
3583
+ function Yn(e) {
3584
+ return e >= p._0 && e <= p._9;
3534
3585
  }
3535
- function rr(e) {
3536
- return Un(e) || e === d.$ || e === d._;
3586
+ function Zn(e) {
3587
+ return Bn(e) || e === p.$ || e === p._;
3537
3588
  }
3538
- function tr(e) {
3539
- return er(e) || e === d.$ || e === d.minus || e === d.dot;
3589
+ function Jn(e) {
3590
+ return Hn(e) || e === p.$ || e === p.minus || e === p.dot;
3540
3591
  }
3541
- function rn(e) {
3542
- return e === d.space || e === d.tab || e === d.verticalTab || e === d.formFeed || e === d.nonBreakingSpace || e === d.nextLine || e === d.ogham || e >= d.enQuad && e <= d.zeroWidthSpace || e === d.narrowNoBreakSpace || e === d.mathematicalSpace || e === d.ideographicSpace || e === d.byteOrderMark;
3592
+ function Ke(e) {
3593
+ return e === p.space || e === p.tab || e === p.verticalTab || e === p.formFeed || e === p.nonBreakingSpace || e === p.nextLine || e === p.ogham || e >= p.enQuad && e <= p.zeroWidthSpace || e === p.narrowNoBreakSpace || e === p.mathematicalSpace || e === p.ideographicSpace || e === p.byteOrderMark;
3543
3594
  }
3544
- function ir(e) {
3545
- return e === d.lineFeed || e === d.carriageReturn || e === d.lineSeparator || e === d.paragraphSeparator;
3595
+ function Kn(e) {
3596
+ return e === p.lineFeed || e === p.carriageReturn || e === p.lineSeparator || e === p.paragraphSeparator;
3546
3597
  }
3547
- function lr(e, n, r = 0) {
3598
+ function Cn(e, n, r = 0) {
3548
3599
  var l;
3549
- const t = `${" ".repeat(r)} ${ze(e.kind)} @${e.start}..${e.end}`;
3550
- if (Cn(e.kind))
3600
+ const t = `${" ".repeat(r)} ${Me(e.kind)} @${e.start}..${e.end}`;
3601
+ if (Gn(e.kind))
3551
3602
  return t + `
3552
- ` + ((l = e.children) == null ? void 0 : l.map((a) => lr(a, n, r + 1)).join(`
3603
+ ` + ((l = e.children) == null ? void 0 : l.map((a) => Cn(a, n, r + 1)).join(`
3553
3604
  `));
3554
3605
  {
3555
3606
  let a = n(e);
3556
- return e.kind === u.NewLineTrivia && (a = "*newline*"), t + ` "${a}"`;
3607
+ return e.kind === c.NewLineTrivia && (a = "*newline*"), t + ` "${a}"`;
3557
3608
  }
3558
3609
  }
3559
- function sr(e, n, r) {
3610
+ function jn(e, n, r) {
3560
3611
  var a, s;
3561
- const t = ((a = e.children) == null ? void 0 : a.filter((o) => o.kind !== u.ErrorNode)) ?? [], l = ((s = n.children) == null ? void 0 : s.filter((o) => o.kind !== u.ErrorNode)) ?? [];
3612
+ const t = ((a = e.children) == null ? void 0 : a.filter((o) => o.kind !== c.ErrorNode)) ?? [], l = ((s = n.children) == null ? void 0 : s.filter((o) => o.kind !== c.ErrorNode)) ?? [];
3562
3613
  if (t.length !== l.length)
3563
3614
  return !1;
3564
3615
  for (let o = 0; o < t.length; ++o)
@@ -3566,7 +3617,7 @@ function sr(e, n, r) {
3566
3617
  return !1;
3567
3618
  return !0;
3568
3619
  }
3569
- function Or(e, n) {
3620
+ function Sr(e, n) {
3570
3621
  const r = [e];
3571
3622
  let t;
3572
3623
  if (e.start > n || n > e.end)
@@ -3578,356 +3629,345 @@ function Or(e, n) {
3578
3629
  };
3579
3630
  for (; e.children !== void 0 && e.children.length > 0; ) {
3580
3631
  const a = e.children.findIndex(
3581
- (c) => c.start <= n && (n < c.end || c.kind === u.EndOfFileToken && c.start <= c.end)
3632
+ (u) => u.start <= n && (n < u.end || u.kind === c.EndOfFileToken && u.start <= u.end)
3582
3633
  ), s = e.children[a], o = e.children[a - 1];
3583
3634
  if (o !== void 0 && n <= s.pos)
3584
3635
  return t = r.length, {
3585
- chainBeforePos: r.concat(or(o)),
3636
+ chainBeforePos: r.concat(er(o)),
3586
3637
  sharedParents: t,
3587
- chainAtPos: r.concat(ar(s))
3638
+ chainAtPos: r.concat(Vn(s))
3588
3639
  };
3589
3640
  e = s, l.chainAtPos.push(e);
3590
3641
  }
3591
3642
  return l;
3592
3643
  }
3593
- function ar(e) {
3644
+ function Vn(e) {
3594
3645
  const n = [e];
3595
3646
  for (; e.children !== void 0 && e.children.length > 0; )
3596
3647
  e = e.children[0], n.push(e);
3597
3648
  return n;
3598
3649
  }
3599
- function or(e) {
3650
+ function er(e) {
3600
3651
  const n = [e];
3601
3652
  for (; e.children !== void 0 && e.children.length > 0; )
3602
3653
  e = e.children[e.children.length - 1], n.push(e);
3603
3654
  return n;
3604
3655
  }
3605
- const Oe = {
3606
- uppercaseAttr: function(e) {
3607
- return {
3608
- category: _e.Error,
3609
- code: de.uppercaseAttr,
3610
- message: `Attribute name '${e}' cannot start with an uppercase letter.`
3611
- };
3612
- },
3613
- duplAttr: function(e) {
3614
- return {
3615
- category: _e.Error,
3616
- code: de.duplAttr,
3617
- message: `Duplicated attribute: '${e}'.`
3618
- };
3619
- },
3620
- tagNameMismatch: function(e, n) {
3621
- return {
3622
- category: _e.Error,
3623
- code: de.tagNameMismatch,
3624
- message: `Opening and closing tag names should match. Opening tag has a name '${e}', but the closing tag name is '${n}'.`
3625
- };
3626
- },
3627
- invalidChar: function(e) {
3628
- return {
3629
- category: _e.Error,
3630
- code: de.invalidChar,
3631
- message: `Invalid character '${e}'.`
3632
- };
3633
- }
3634
- };
3635
- u.CData, u.Script, u.OpenNodeStart;
3636
- function Ir(e) {
3656
+ const nr = [c.CData, c.Script, c.OpenNodeStart], Se = [c.OpenNodeStart, c.NodeEnd, c.NodeClose, c.CloseNodeStart, c.CData, c.Script], Ce = [c.Identifier, ...Se], rr = [c.TextNode, c.StringLiteral, c.CData, c.Script, c.OpenNodeStart, c.CloseNodeStart], tr = [c.NodeEnd, c.OpenNodeStart, c.CloseNodeStart, c.CData, c.Script];
3657
+ function _r(e) {
3637
3658
  return {
3638
- parse: () => cr(e),
3659
+ parse: () => ir(e),
3639
3660
  getText: (n, r = !0) => e.substring(r ? n.pos ?? n.start ?? 0 : n.start ?? n.pos ?? 0, n.end)
3640
3661
  };
3641
3662
  }
3642
- function cr(e) {
3663
+ function ir(e) {
3643
3664
  const n = [], r = [];
3644
3665
  let t, l = { children: [] }, a;
3645
- const o = Vn(!1, e, function(m, E) {
3666
+ const o = Qn(!1, e, function(E, x) {
3646
3667
  a = {
3647
- message: m,
3648
- prefixLength: E
3668
+ message: E,
3669
+ prefixLength: x
3649
3670
  };
3650
3671
  });
3651
- function c(m, E = !0) {
3652
- return e.substring(E ? m.pos : m.start, m.end);
3672
+ return { node: T(), errors: n };
3673
+ function D(E, x = !0) {
3674
+ return e.substring(x ? E.pos : E.start, E.end);
3653
3675
  }
3654
- function D() {
3655
- I();
3656
- e: for (; ; ) {
3657
- const m = g();
3658
- switch (m.kind) {
3659
- case u.TextNode:
3660
- case u.StringLiteral:
3661
- p(m.kind);
3676
+ function T() {
3677
+ for (; ; )
3678
+ switch (k().kind) {
3679
+ case c.EndOfFileToken:
3680
+ return g(), je(c.ContentListNode, l.children);
3681
+ case c.CData:
3682
+ case c.Script:
3683
+ g();
3684
+ break;
3685
+ case c.OpenNodeStart:
3686
+ U();
3662
3687
  break;
3663
- case u.CloseNodeStart:
3664
- break e;
3665
- case u.EndOfFileToken:
3666
- break e;
3667
3688
  default:
3668
- h();
3689
+ const x = H(nr);
3690
+ M(q.expTagOpen, x.pos, x.end);
3669
3691
  break;
3670
3692
  }
3671
- }
3672
- l.children && l.children.length > 0 ? O(u.ContentListNode) : F();
3673
3693
  }
3674
- function w() {
3675
- for (; ; )
3676
- switch (g().kind) {
3677
- case u.EndOfFileToken:
3678
- N();
3679
- return;
3694
+ function h() {
3695
+ d();
3696
+ e: for (; ; )
3697
+ switch (k().kind) {
3698
+ case c.TextNode:
3699
+ case c.StringLiteral:
3700
+ case c.CData:
3701
+ case c.Script:
3702
+ g();
3703
+ break;
3704
+ case c.OpenNodeStart:
3705
+ U();
3706
+ break;
3707
+ case c.CloseNodeStart:
3708
+ case c.EndOfFileToken:
3709
+ break e;
3680
3710
  default:
3681
- h();
3711
+ const x = H(rr);
3712
+ M(q.expTagOpen, x.pos, x.end);
3682
3713
  break;
3683
3714
  }
3684
- }
3685
- function h() {
3686
- !$(u.CData) && !$(u.Script) && (q(u.OpenNodeStart) ? U() : pe(Jn));
3715
+ l.children && l.children.length > 0 ? N(c.ContentListNode) : b();
3687
3716
  }
3688
3717
  function U() {
3689
- I(), p(u.OpenNodeStart);
3690
- let m = !1, E;
3691
- if (q(u.Identifier))
3692
- E = H();
3693
- else {
3694
- m = !0;
3695
- const A = fe([u.OpenNodeStart, u.NodeEnd, u.NodeClose, u.CloseNodeStart, u.CData, u.Script]);
3696
- A ? V(Ue, A.pos, A.end) : J(Ue);
3718
+ d(), f(c.OpenNodeStart);
3719
+ let E = !0, x = null;
3720
+ if (te(c.Identifier)) {
3721
+ const S = m();
3722
+ E = S.errInName, x = S.node;
3723
+ } else {
3724
+ const S = H(Se);
3725
+ S ? M(q.expTagName, S.pos, S.end) : X(q.expTagName);
3697
3726
  }
3698
- switch (m || T(), f().kind) {
3699
- case u.NodeClose: {
3700
- N(), O(u.ElementNode);
3727
+ switch (E || j(), J().kind) {
3728
+ case c.NodeClose: {
3729
+ g(), N(c.ElementNode);
3701
3730
  return;
3702
3731
  }
3703
- case u.NodeEnd: {
3704
- N(), D(), x(E), O(u.ElementNode);
3732
+ case c.NodeEnd: {
3733
+ g(), h(), G(x, E), N(c.ElementNode);
3705
3734
  return;
3706
3735
  }
3707
- case u.OpenNodeStart:
3708
- case u.Script:
3709
- case u.CData: {
3710
- O(u.ElementNode), J(Fe);
3736
+ default: {
3737
+ N(c.ElementNode), X(q.expEndOrClose);
3711
3738
  return;
3712
3739
  }
3713
- case u.CloseNodeStart: {
3714
- J(Fe), x(E), O(u.ElementNode);
3715
- return;
3716
- }
3717
- default:
3718
- J(Fe);
3719
3740
  }
3720
3741
  }
3721
- function x(m) {
3722
- if ($(u.CloseNodeStart)) {
3723
- if (q(u.Identifier)) {
3724
- const E = H();
3725
- m !== void 0 && !sr(m, E, c) && J(Oe.tagNameMismatch(c(m), c(E)));
3726
- } else
3727
- X(Ue, [u.NodeEnd]);
3728
- $(u.NodeEnd) || J(Hn);
3742
+ function m() {
3743
+ if (d(), f(c.Identifier), Z(c.Colon) && !Z(c.Identifier)) {
3744
+ const E = N(c.TagNameNode);
3745
+ return M(q.expTagNameAfterNamespace, E.pos, E.end), H([c.Identifier, ...Se]), { node: E, errInName: !0 };
3729
3746
  } else
3730
- J(Yn);
3731
- }
3732
- function H() {
3733
- return I(), p(u.Identifier), $(u.Colon) && $(u.Identifier), O(u.TagNameNode);
3747
+ return { node: N(c.TagNameNode), errInName: !1 };
3748
+ }
3749
+ function j() {
3750
+ d();
3751
+ const E = [];
3752
+ e: for (; ; )
3753
+ switch (J().kind) {
3754
+ case c.EndOfFileToken:
3755
+ case c.OpenNodeStart:
3756
+ case c.NodeEnd:
3757
+ case c.NodeClose:
3758
+ case c.CloseNodeStart:
3759
+ case c.CData:
3760
+ case c.Script:
3761
+ break e;
3762
+ default:
3763
+ v(E);
3764
+ }
3765
+ l.children.length === 0 ? b() : N(c.AttributeListNode);
3734
3766
  }
3735
- function T() {
3736
- I();
3737
- const m = [];
3738
- for (; !j([u.EndOfFileToken, u.NodeEnd, u.NodeClose]); )
3739
- _(m);
3740
- l.children.length === 0 ? F() : O(u.AttributeListNode);
3741
- }
3742
- function _(m) {
3743
- if (I(), q(u.Identifier))
3744
- z(m);
3767
+ function v(E) {
3768
+ if (d(), te(c.Identifier))
3769
+ _(E);
3745
3770
  else {
3746
- const E = [u.Equal];
3747
- if (!X(nn, E))
3748
- return;
3771
+ const x = H(Ce);
3772
+ x ? (M(q.expAttrName, x.pos, x.end), N(c.AttributeNode)) : (b(), X(q.expAttrName));
3773
+ return;
3749
3774
  }
3750
- if ($(u.Equal) && !$(u.StringLiteral)) {
3751
- const E = [u.NodeEnd, u.NodeClose];
3752
- X(Zn, E);
3775
+ if (Z(c.Equal) && !Z(c.StringLiteral)) {
3776
+ const x = H(Ce);
3777
+ x ? M(q.expAttrStr, x.pos, x.end) : X(q.expAttrStr);
3753
3778
  }
3754
- O(u.AttributeNode);
3755
- }
3756
- function z(m) {
3757
- const E = f();
3758
- let A;
3759
- I(), p(u.Identifier), $(u.Colon) && (q(u.Identifier) ? A = p(u.Identifier) : X(nn, [
3760
- u.NodeClose,
3761
- u.NodeEnd,
3762
- u.Equal
3763
- ])), S(m, { nsIdent: A, nameIdent: E }), O(u.AttributeKeyNode);
3764
- }
3765
- function S(m, { nameIdent: E, nsIdent: A }) {
3766
- const v = c(E), W = A === void 0 ? void 0 : c(A), G = ({ ns: Ae, name: Le }) => Le === v && Ae === W, R = m.findIndex(G) !== -1, K = "A" <= v[0] && v[0] <= "Z", le = R || K;
3767
- R && V(Oe.duplAttr(v), E.pos, E.end), K && V(Oe.uppercaseAttr(v), E.pos, E.end), le || m.push({ name: v });
3768
- }
3769
- function q(m) {
3770
- return f().kind === m;
3779
+ N(c.AttributeNode);
3771
3780
  }
3772
- function $(m) {
3773
- const E = q(m);
3774
- return E && N(), E;
3775
- }
3776
- function j(m) {
3777
- return m.includes(f().kind);
3778
- }
3779
- function fe(m) {
3780
- return I(), k(m), l.children.length === 0 ? (F(), null) : O(u.ErrorNode);
3781
+ function _(E) {
3782
+ let x = J(), S;
3783
+ if (d(), f(c.Identifier), Z(c.Colon))
3784
+ if (te(c.Identifier))
3785
+ S = x, x = f(c.Identifier);
3786
+ else {
3787
+ const I = H([c.Equal, c.Identifier, ...Se]);
3788
+ I ? M(q.expAttrNameAfterNamespace, I.pos, I.end) : X(q.expAttrNameAfterNamespace);
3789
+ }
3790
+ Q(E, { nsIdent: S, nameIdent: x }), N(c.AttributeKeyNode);
3791
+ }
3792
+ function G(E, x) {
3793
+ if (Z(c.CloseNodeStart)) {
3794
+ if (te(c.Identifier)) {
3795
+ const S = A();
3796
+ if (!x && E !== null && !jn(E, S, D)) {
3797
+ const L = q.tagNameMismatch(D(E), D(S));
3798
+ M(L, S.pos, S.end);
3799
+ }
3800
+ } else {
3801
+ const S = H(tr);
3802
+ S ? M(q.expTagName, S.pos, S.end) : X(q.expTagName);
3803
+ }
3804
+ Z(c.NodeEnd) || X(q.expEnd);
3805
+ } else
3806
+ E ? M(q.expCloseStartWithName(D(E)), E.pos, E.end) : X(q.expCloseStart);
3781
3807
  }
3782
- function X(m, E) {
3783
- return j(E) || q(u.EndOfFileToken) ? (J(m), !0) : (I(), J(m), N(), O(u.ErrorNode), !1);
3808
+ function A() {
3809
+ if (d(), f(c.Identifier), Z(c.Colon) && !Z(c.Identifier)) {
3810
+ const E = N(c.TagNameNode);
3811
+ return M(q.expTagNameAfterNamespace, E.pos, E.end), H(Se), E;
3812
+ } else
3813
+ return N(c.TagNameNode);
3784
3814
  }
3785
- function pe(m) {
3786
- X(m, []);
3815
+ function Q(E, { nameIdent: x, nsIdent: S }) {
3816
+ const I = D(x), L = S && D(S), O = ({ ns: y, name: he }) => he === I && y === L, B = E.findIndex(O) !== -1, F = "A" <= I[0] && I[0] <= "Z", z = B || F;
3817
+ B && M(q.duplAttr(I), x.pos, x.end), !S && F && M(q.uppercaseAttr(I), x.pos, x.end), z || E.push({ name: I, ns: L });
3787
3818
  }
3788
- function J({ code: m, message: E, category: A }) {
3789
- const { pos: v, end: W } = f();
3819
+ function X({ code: E, message: x, category: S }) {
3820
+ const { pos: I, end: L } = J();
3790
3821
  n.push({
3791
- category: A,
3792
- code: m,
3793
- message: E,
3794
- pos: v,
3795
- end: W
3822
+ category: S,
3823
+ code: E,
3824
+ message: x,
3825
+ pos: I,
3826
+ end: L
3796
3827
  });
3797
3828
  }
3798
- function V({ code: m, message: E, category: A }, v, W) {
3829
+ function M({ code: E, message: x, category: S }, I, L) {
3799
3830
  n.push({
3800
- category: A,
3801
- code: m,
3802
- message: E,
3803
- pos: v,
3804
- end: W
3831
+ category: S,
3832
+ code: E,
3833
+ message: x,
3834
+ pos: I,
3835
+ end: L
3805
3836
  });
3806
3837
  }
3807
- function k(m) {
3808
- for (let E = f(); E.kind !== u.EndOfFileToken && !m.includes(E.kind); N(), E = f())
3838
+ function H(E) {
3839
+ return d(), V(E), l.children.length === 0 ? (b(), null) : N(c.ErrorNode);
3840
+ }
3841
+ function V(E) {
3842
+ for (let x = J(); x.kind !== c.EndOfFileToken && !E.includes(x.kind); g(), x = J())
3809
3843
  ;
3810
3844
  }
3811
- function f(m = !1) {
3812
- return t !== void 0 || (t = y(m)), t;
3845
+ function Z(E) {
3846
+ const x = te(E);
3847
+ return x && g(), x;
3813
3848
  }
3814
- function g() {
3815
- const m = f(!0);
3816
- if (m.kind === u.EndOfFileToken || m.kind === u.OpenNodeStart || m.kind === u.Script || m.kind === u.CData || m.kind === u.CloseNodeStart)
3817
- return m;
3818
- const E = m.triviaBefore, A = (E == null ? void 0 : E.length) ?? 0;
3819
- let v = 0, W = [], G = -1;
3820
- for (; v < A; ++v)
3821
- if (E[v].kind === u.CommentTrivia)
3822
- W.push(E[v]);
3849
+ function te(E) {
3850
+ return J().kind === E;
3851
+ }
3852
+ function J(E = !1) {
3853
+ return t !== void 0 || (t = R(E)), t;
3854
+ }
3855
+ function k() {
3856
+ const E = J(!0);
3857
+ if (E.kind === c.EndOfFileToken || E.kind === c.OpenNodeStart || E.kind === c.Script || E.kind === c.CData || E.kind === c.CloseNodeStart)
3858
+ return E;
3859
+ const x = E.triviaBefore, S = (x == null ? void 0 : x.length) ?? 0;
3860
+ let I = 0, L = [], O = -1;
3861
+ for (; I < S; ++I)
3862
+ if (x[I].kind === c.CommentTrivia)
3863
+ L.push(x[I]);
3823
3864
  else {
3824
- G = v;
3865
+ O = I;
3825
3866
  break;
3826
3867
  }
3827
- let R = -1;
3828
- for (; v < A; ++v)
3829
- if (E[v].kind === u.CommentTrivia) {
3830
- R = v;
3868
+ let B = -1;
3869
+ for (; I < S; ++I)
3870
+ if (x[I].kind === c.CommentTrivia) {
3871
+ B = I;
3831
3872
  break;
3832
3873
  }
3833
- let K = !1;
3834
- if (m.kind === u.StringLiteral) {
3835
- const we = m.end, Te = y(!0);
3836
- K = Te.kind === u.CData || Te.kind === u.CloseNodeStart || Te.kind === u.Script || Te.kind === u.OpenNodeStart, o.resetTokenState(we);
3874
+ let F = !1;
3875
+ if (E.kind === c.StringLiteral) {
3876
+ const _e = E.end, Ae = R(!0);
3877
+ F = Ae.kind === c.CData || Ae.kind === c.CloseNodeStart || Ae.kind === c.Script || Ae.kind === c.OpenNodeStart, o.resetTokenState(_e);
3837
3878
  }
3838
- let le;
3839
- K ? le = m.pos : W.length > 0 ? le = W[W.length - 1].end : G !== -1 ? le = E[G].pos : le = m.start;
3840
- let Ae = le, Le;
3841
- W.length > 0 && (Le = W, Ae = W[0].pos);
3842
- let He = u.TextNode, Se = -1;
3843
- if (R !== -1)
3844
- Se = E[R].pos, o.resetTokenState(Se);
3845
- else if (K)
3846
- He = u.StringLiteral, Se = m.end;
3879
+ let z;
3880
+ F ? z = E.pos : L.length > 0 ? z = L[L.length - 1].end : O !== -1 ? z = x[O].pos : z = E.start;
3881
+ let y = z, he;
3882
+ L.length > 0 && (he = L, y = L[0].pos);
3883
+ let $e = c.TextNode, xe = -1;
3884
+ if (B !== -1)
3885
+ xe = x[B].pos, o.resetTokenState(xe);
3886
+ else if (F)
3887
+ $e = c.StringLiteral, xe = E.end;
3847
3888
  else {
3848
3889
  for (; ; ) {
3849
- const we = o.peekChar();
3850
- if (we === null || we === d.lessThan)
3890
+ const _e = o.peekChar();
3891
+ if (_e === null || _e === p.lessThan)
3851
3892
  break;
3852
3893
  o.scanChar();
3853
3894
  }
3854
- Se = o.getTokenEnd();
3895
+ xe = o.getTokenEnd();
3855
3896
  }
3856
- return t = { kind: He, start: Ae, pos: le, end: Se, triviaBefore: Le }, t;
3897
+ return t = { kind: $e, start: y, pos: z, end: xe, triviaBefore: he }, t;
3857
3898
  }
3858
- function p(m) {
3859
- const E = N();
3860
- if (E.kind !== m)
3899
+ function f(E) {
3900
+ const x = g();
3901
+ if (x.kind !== E)
3861
3902
  throw new Error(
3862
- `expected ${ze(m)}, bumped a ${ze(E.kind)}`
3903
+ `expected ${Me(E)}, bumped a ${Me(x.kind)}`
3863
3904
  );
3864
- return E;
3905
+ return x;
3865
3906
  }
3866
- function N() {
3907
+ function g() {
3867
3908
  if (t) {
3868
3909
  l.children.push(t);
3869
- const E = t;
3870
- return t = void 0, E;
3910
+ const x = t;
3911
+ return t = void 0, x;
3871
3912
  }
3872
- const m = y(!1);
3873
- return l.children.push(m), m;
3913
+ const E = R(!1);
3914
+ return l.children.push(E), E;
3874
3915
  }
3875
- function I() {
3916
+ function d() {
3876
3917
  r.push(l), l = {
3877
3918
  children: []
3878
3919
  };
3879
3920
  }
3880
- function O(m) {
3881
- const E = tn(m, l.children), A = r[r.length - 1];
3882
- return A.children.push(E), l = A, r.pop(), E;
3921
+ function N(E) {
3922
+ const x = je(E, l.children), S = r[r.length - 1];
3923
+ return S.children.push(x), l = S, r.pop(), x;
3883
3924
  }
3884
- function y(m) {
3885
- let E, A = [], v = null;
3925
+ function R(E) {
3926
+ let x, S = [], I = null;
3886
3927
  for (; ; ) {
3887
- if (E = o.scan(), v === null && (v = o.getTokenStart()), a !== void 0) {
3888
- let W;
3889
- a.message.code === de.invalidChar ? W = Oe.invalidChar(o.getTokenText()) : W = a.message;
3890
- const G = o.getTokenStart(), R = {
3891
- kind: E,
3892
- start: v,
3893
- pos: G,
3928
+ if (x = o.scan(), I === null && (I = o.getTokenStart()), a !== void 0) {
3929
+ let L;
3930
+ a.message.code === Fe.invalidChar ? L = q.invalidChar(o.getTokenText()) : L = a.message;
3931
+ const O = o.getTokenStart(), B = {
3932
+ kind: x,
3933
+ start: I,
3934
+ pos: O,
3894
3935
  end: o.getTokenEnd(),
3895
- triviaBefore: A.length > 0 ? A : void 0
3936
+ triviaBefore: S.length > 0 ? S : void 0
3896
3937
  };
3897
- if (A = [], m && W.code === de.invalidChar)
3898
- return a = void 0, R;
3899
- const K = G + a.prefixLength;
3900
- return R.end = K, o.resetTokenState(K), I(), l.children.push(R), V(W, G, K), O(u.ErrorNode), a = void 0, y(m);
3938
+ if (S = [], E && L.code === Fe.invalidChar)
3939
+ return a = void 0, B;
3940
+ const F = O + a.prefixLength;
3941
+ return B.end = F, o.resetTokenState(F), d(), l.children.push(B), M(L, O, F), N(c.ErrorNode), a = void 0, R(E);
3901
3942
  }
3902
- switch (E) {
3903
- case u.CommentTrivia:
3904
- case u.NewLineTrivia:
3905
- case u.WhitespaceTrivia:
3906
- A.push({
3907
- kind: E,
3908
- start: v,
3943
+ switch (x) {
3944
+ case c.CommentTrivia:
3945
+ case c.NewLineTrivia:
3946
+ case c.WhitespaceTrivia:
3947
+ S.push({
3948
+ kind: x,
3949
+ start: I,
3909
3950
  pos: o.getTokenStart(),
3910
3951
  end: o.getTokenEnd()
3911
3952
  });
3912
3953
  break;
3913
3954
  default:
3914
3955
  return {
3915
- kind: E,
3916
- start: v,
3956
+ kind: x,
3957
+ start: I,
3917
3958
  pos: o.getTokenStart(),
3918
3959
  end: o.getTokenEnd(),
3919
- triviaBefore: A.length > 0 ? A : void 0
3960
+ triviaBefore: S.length > 0 ? S : void 0
3920
3961
  };
3921
3962
  }
3922
3963
  }
3923
3964
  }
3924
- function F() {
3925
- const m = r[r.length - 1];
3926
- m.children.push(...l.children), l = m, r.pop();
3965
+ function b() {
3966
+ const E = r[r.length - 1];
3967
+ E.children.push(...l.children), l = E, r.pop();
3927
3968
  }
3928
- return w(), { node: tn(u.ContentListNode, l.children), errors: n };
3929
3969
  }
3930
- function tn(e, n) {
3970
+ function je(e, n) {
3931
3971
  const r = n[0], t = n[n.length - 1];
3932
3972
  return {
3933
3973
  kind: e,
@@ -3937,75 +3977,75 @@ function tn(e, n) {
3937
3977
  children: n
3938
3978
  };
3939
3979
  }
3940
- function L(e, n, r, t, l, a) {
3980
+ function w(e, n, r, t, l, a) {
3941
3981
  if (n.cancel)
3942
3982
  return n;
3943
3983
  if (n.skipChildren = !1, Array.isArray(e)) {
3944
3984
  for (const s of e)
3945
- n = L(s, n, r, t, l, a);
3985
+ n = w(s, n, r, t, l, a);
3946
3986
  return n;
3947
3987
  }
3948
3988
  switch (e.type) {
3949
- case be: {
3989
+ case Te: {
3950
3990
  if (n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel) return n;
3951
3991
  if (!n.skipChildren) {
3952
3992
  for (const s of e.stmts)
3953
- if (n = L(s, n, r, t, e, "statements"), n.cancel) return n;
3993
+ if (n = w(s, n, r, t, e, "statements"), n.cancel) return n;
3954
3994
  }
3955
3995
  return n = (r == null ? void 0 : r(!1, e, n, l, a)) || n, n;
3956
3996
  }
3957
- case Ee:
3997
+ case ge:
3958
3998
  return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n;
3959
- case hn:
3960
- return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = L(e.expr, n, r, t, e, "expression"), n.cancel) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
3961
- case Fn:
3999
+ case an:
4000
+ return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = w(e.expr, n, r, t, e, "expression"), n.cancel) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
4001
+ case Wn:
3962
4002
  return n;
3963
- case dn: {
4003
+ case on: {
3964
4004
  if (n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel) return n;
3965
4005
  if (!n.skipChildren) {
3966
4006
  for (const s of e.decls)
3967
- if (n = L(s, n, r, t, e, "declarations"), n.cancel) return n;
4007
+ if (n = w(s, n, r, t, e, "declarations"), n.cancel) return n;
3968
4008
  }
3969
4009
  return n = (r == null ? void 0 : r(!1, e, n, l, a)) || n, n;
3970
4010
  }
3971
- case pn: {
4011
+ case cn: {
3972
4012
  if (n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel) return n;
3973
4013
  if (!n.skipChildren) {
3974
4014
  for (const s of e.decls)
3975
- if (n = L(s, n, r, t, e, "declarations"), n.cancel) return n;
4015
+ if (n = w(s, n, r, t, e, "declarations"), n.cancel) return n;
3976
4016
  }
3977
4017
  return n = (r == null ? void 0 : r(!1, e, n, l, a)) || n, n;
3978
4018
  }
3979
- case Qe: {
4019
+ case qe: {
3980
4020
  if (n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel) return n;
3981
4021
  if (!n.skipChildren) {
3982
4022
  for (const s of e.decls)
3983
- if (n = L(s, n, r, t, e, "declarations"), n.cancel) return n;
4023
+ if (n = w(s, n, r, t, e, "declarations"), n.cancel) return n;
3984
4024
  }
3985
4025
  return n = (r == null ? void 0 : r(!1, e, n, l, a)) || n, n;
3986
4026
  }
4027
+ case un:
4028
+ return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = w(e.cond, n, r, t, e, "condition"), n.cancel || (e.thenB && (n = w(e.thenB, n, r, t, e, "thenBranch")), n.cancel) || (e.elseB && (n = w(e.elseB, n, r, t, e, "elseBranch")), n.cancel)) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
4029
+ case fn:
4030
+ return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (e.expr && (n = w(e.expr, n, r, t, e, "expression")), n.cancel) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
4031
+ case hn:
4032
+ return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n;
4033
+ case pn:
4034
+ return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n;
4035
+ case dn:
4036
+ return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = w(e.cond, n, r, t, e, "condition"), n.cancel || (n = w(e.body, n, r, t, e, "body"), n.cancel)) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
3987
4037
  case kn:
3988
- return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = L(e.cond, n, r, t, e, "condition"), n.cancel || (e.thenB && (n = L(e.thenB, n, r, t, e, "thenBranch")), n.cancel) || (e.elseB && (n = L(e.elseB, n, r, t, e, "elseBranch")), n.cancel)) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
4038
+ return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = w(e.body, n, r, t, e, "body"), n.cancel || (n = w(e.cond, n, r, t, e, "condition"), n.cancel)) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
3989
4039
  case gn:
3990
- return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (e.expr && (n = L(e.expr, n, r, t, e, "expression")), n.cancel) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
4040
+ return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (e.init && (n = w(e.init, n, r, t, e, "init")), n.cancel || (e.cond && (n = w(e.cond, n, r, t, e, "condition")), n.cancel) || (e.upd && (n = w(e.upd, n, r, t, e, "update")), n.cancel) || (n = w(e.body, n, r, t, e, "body"), n.cancel)) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
4041
+ case Ee:
4042
+ return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = w(e.expr, n, r, t, e, "expression"), n.cancel || (n = w(e.body, n, r, t, e, "body"), n.cancel)) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
4043
+ case Ne:
4044
+ return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = w(e.expr, n, r, t, e, "expression"), n.cancel || (n = w(e.body, n, r, t, e, "body"), n.cancel)) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
3991
4045
  case En:
3992
- return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n;
4046
+ return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = w(e.expr, n, r, t, e, "expression"), n.cancel) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
3993
4047
  case mn:
3994
- return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n;
3995
- case xn:
3996
- return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = L(e.cond, n, r, t, e, "condition"), n.cancel || (n = L(e.body, n, r, t, e, "body"), n.cancel)) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
3997
- case _n:
3998
- return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = L(e.body, n, r, t, e, "body"), n.cancel || (n = L(e.cond, n, r, t, e, "condition"), n.cancel)) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
3999
- case Sn:
4000
- return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (e.init && (n = L(e.init, n, r, t, e, "init")), n.cancel || (e.cond && (n = L(e.cond, n, r, t, e, "condition")), n.cancel) || (e.upd && (n = L(e.upd, n, r, t, e, "update")), n.cancel) || (n = L(e.body, n, r, t, e, "body"), n.cancel)) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
4001
- case me:
4002
- return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = L(e.expr, n, r, t, e, "expression"), n.cancel || (n = L(e.body, n, r, t, e, "body"), n.cancel)) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
4003
- case Ne:
4004
- return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = L(e.expr, n, r, t, e, "expression"), n.cancel || (n = L(e.body, n, r, t, e, "body"), n.cancel)) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
4005
- case Nn:
4006
- return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = L(e.expr, n, r, t, e, "expression"), n.cancel) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
4007
- case An:
4008
- return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (e.tryB && (n = L(e.tryB, n, r, t, e, "tryBlock")), n.cancel || (e.catchB && (n = L(e.catchB, n, r, t, e, "catchBlock")), n.cancel) || (e.finallyB && (n = L(
4048
+ return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (e.tryB && (n = w(e.tryB, n, r, t, e, "tryBlock")), n.cancel || (e.catchB && (n = w(e.catchB, n, r, t, e, "catchBlock")), n.cancel) || (e.finallyB && (n = w(
4009
4049
  e.finallyB,
4010
4050
  n,
4011
4051
  r,
@@ -4013,12 +4053,12 @@ function L(e, n, r, t, l, a) {
4013
4053
  e,
4014
4054
  "finallyBlock"
4015
4055
  )), n.cancel)) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
4016
- case Ln: {
4056
+ case xn: {
4017
4057
  if (n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel) return n;
4018
4058
  if (!n.skipChildren) {
4019
- if (n = L(e.expr, n, r, t, e, "expression"), n.cancel) return n;
4059
+ if (n = w(e.expr, n, r, t, e, "expression"), n.cancel) return n;
4020
4060
  for (const s of e.cases) {
4021
- if (s.caseE && (n = L(
4061
+ if (s.caseE && (n = w(
4022
4062
  s.caseE,
4023
4063
  n,
4024
4064
  r,
@@ -4028,7 +4068,7 @@ function L(e, n, r, t, l, a) {
4028
4068
  )), n.cancel) return n;
4029
4069
  if (s.stmts !== void 0) {
4030
4070
  for (const o of s.stmts)
4031
- if (n = L(
4071
+ if (n = w(
4032
4072
  o,
4033
4073
  n,
4034
4074
  r,
@@ -4041,205 +4081,205 @@ function L(e, n, r, t, l, a) {
4041
4081
  }
4042
4082
  return n = (r == null ? void 0 : r(!1, e, n, l, a)) || n, n;
4043
4083
  }
4044
- case We: {
4084
+ case be: {
4045
4085
  if (n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel) return n;
4046
4086
  if (!n.skipChildren) {
4047
4087
  for (const s of e.args)
4048
- if (n = L(s, n, r, t, e, "arg"), n.cancel) return n;
4049
- if (n = L(e.stmt, n, r, t, e, "statement"), n.cancel) return n;
4088
+ if (n = w(s, n, r, t, e, "arg"), n.cancel) return n;
4089
+ if (n = w(e.stmt, n, r, t, e, "statement"), n.cancel) return n;
4050
4090
  }
4051
4091
  return n = (r == null ? void 0 : r(!1, e, n, l, a)) || n, n;
4052
4092
  }
4053
- case wn:
4054
- return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = L(e.expr, n, r, t, e, "operand"), n.cancel) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4055
- case Q:
4056
- return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = L(e.left, n, r, t, e, "left"), n.cancel || (n = L(e.right, n, r, t, e, "right"), n.cancel)) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4057
- case ae: {
4093
+ case Nn:
4094
+ return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = w(e.expr, n, r, t, e, "operand"), n.cancel) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4095
+ case Y:
4096
+ return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = w(e.left, n, r, t, e, "left"), n.cancel || (n = w(e.right, n, r, t, e, "right"), n.cancel)) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4097
+ case oe: {
4058
4098
  if (n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel) return n;
4059
4099
  if (!n.skipChildren) {
4060
4100
  for (const s of e.exprs)
4061
- if (n = L(s, n, r, t, e, "expression"), n.cancel) return n;
4101
+ if (n = w(s, n, r, t, e, "expression"), n.cancel) return n;
4062
4102
  }
4063
4103
  return n = (t == null ? void 0 : t(!1, e, n, l, a)) || n, n;
4064
4104
  }
4065
- case Tn:
4066
- return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = L(e.cond, n, r, t, e, "condition"), n.cancel || (n = L(e.thenE, n, r, t, e, "consequent"), n.cancel) || (n = L(e.elseE, n, r, t, e, "alternate"), n.cancel)) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4067
- case vn: {
4105
+ case Sn:
4106
+ return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = w(e.cond, n, r, t, e, "condition"), n.cancel || (n = w(e.thenE, n, r, t, e, "consequent"), n.cancel) || (n = w(e.elseE, n, r, t, e, "alternate"), n.cancel)) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4107
+ case _n: {
4068
4108
  if (n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel) return n;
4069
4109
  if (!n.skipChildren) {
4070
4110
  for (const s of e.arguments)
4071
- if (n = L(s, n, r, t, e, "argument"), n.cancel) return n;
4072
- if (n = L(e.obj, n, r, t, e, "object"), n.cancel) return n;
4111
+ if (n = w(s, n, r, t, e, "argument"), n.cancel) return n;
4112
+ if (n = w(e.obj, n, r, t, e, "object"), n.cancel) return n;
4073
4113
  }
4074
4114
  return n = (t == null ? void 0 : t(!1, e, n, l, a)) || n, n;
4075
4115
  }
4076
- case On:
4077
- return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = L(e.obj, n, r, t, e, "object"), n.cancel) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4078
- case In:
4079
- return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = L(e.obj, n, r, t, e, "object"), n.cancel || (n = L(e.member, n, r, t, e, "member"), n.cancel)) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4080
- case M:
4116
+ case An:
4117
+ return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = w(e.obj, n, r, t, e, "object"), n.cancel) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4118
+ case Ln:
4119
+ return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = w(e.obj, n, r, t, e, "object"), n.cancel || (n = w(e.member, n, r, t, e, "member"), n.cancel)) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4120
+ case $:
4081
4121
  return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n;
4082
- case Z:
4122
+ case C:
4083
4123
  return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n;
4084
- case oe: {
4124
+ case ce: {
4085
4125
  if (n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel) return n;
4086
4126
  if (!n.skipChildren) {
4087
4127
  for (const s of e.items)
4088
- if (n = L(s, n, r, t, e, "item"), n.cancel) return n;
4128
+ if (n = w(s, n, r, t, e, "item"), n.cancel) return n;
4089
4129
  }
4090
4130
  return n = (t == null ? void 0 : t(!1, e, n, l, a)) || n, n;
4091
4131
  }
4092
- case ce: {
4132
+ case ue: {
4093
4133
  if (n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel) return n;
4094
4134
  if (!n.skipChildren) {
4095
4135
  for (const s of e.props)
4096
4136
  if (Array.isArray(s)) {
4097
- const [o, c] = s;
4098
- if (n = L(o, n, r, t, e, "propKey"), n.cancel || (n = L(c, n, r, t, e, "propValue"), n.cancel)) return n;
4099
- } else if (n = L(s, n, r, t, e, "prop"), n.cancel) return n;
4137
+ const [o, u] = s;
4138
+ if (n = w(o, n, r, t, e, "propKey"), n.cancel || (n = w(u, n, r, t, e, "propValue"), n.cancel)) return n;
4139
+ } else if (n = w(s, n, r, t, e, "prop"), n.cancel) return n;
4100
4140
  }
4101
4141
  return n = (t == null ? void 0 : t(!1, e, n, l, a)) || n, n;
4102
4142
  }
4103
- case ue:
4104
- return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = L(e.expr, n, r, t, e, "operand"), n.cancel) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4105
- case Dn:
4106
- return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = L(e.expr, n, r, t, e, "operand"), n.cancel || (n = L(e.leftValue, n, r, t, e, "leftValue"), n.cancel)) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4107
- case xe:
4143
+ case fe:
4144
+ return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = w(e.expr, n, r, t, e, "operand"), n.cancel) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4145
+ case Tn:
4146
+ return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = w(e.expr, n, r, t, e, "operand"), n.cancel || (n = w(e.leftValue, n, r, t, e, "leftValue"), n.cancel)) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4147
+ case me:
4108
4148
  return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n;
4109
- case Be: {
4149
+ case Ie: {
4110
4150
  if (n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel) return n;
4111
4151
  if (!n.skipChildren) {
4112
4152
  for (const s of e.args)
4113
- if (n = L(s, n, r, t, e, "arg"), n.cancel) return n;
4114
- if (n = L(e.statement, n, r, t, e, "statement"), n.cancel) return n;
4153
+ if (n = w(s, n, r, t, e, "arg"), n.cancel) return n;
4154
+ if (n = w(e.statement, n, r, t, e, "statement"), n.cancel) return n;
4115
4155
  }
4116
4156
  return n = (t == null ? void 0 : t(!1, e, n, l, a)) || n, n;
4117
4157
  }
4118
- case Rn:
4119
- case Bn:
4120
- return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = L(e.expr, n, r, t, e, "operand"), n.cancel) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4121
- case Xe: {
4158
+ case vn:
4159
+ case On:
4160
+ return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = w(e.expr, n, r, t, e, "operand"), n.cancel) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4161
+ case ye: {
4122
4162
  if (n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel) return n;
4123
4163
  if (!n.skipChildren) {
4124
4164
  if (e.aDestr !== void 0) {
4125
4165
  for (const s of e.aDestr)
4126
- if (n = L(s, n, r, t, e), n.cancel) return n;
4166
+ if (n = w(s, n, r, t, e), n.cancel) return n;
4127
4167
  }
4128
4168
  if (e.oDestr !== void 0) {
4129
4169
  for (const s of e.oDestr)
4130
- if (n = L(s, n, r, t, e), n.cancel) return n;
4170
+ if (n = w(s, n, r, t, e), n.cancel) return n;
4131
4171
  }
4132
- if (e.expr && (n = L(e.expr, n, r, t, e, "expression")), n.cancel) return n;
4172
+ if (e.expr && (n = w(e.expr, n, r, t, e, "expression")), n.cancel) return n;
4133
4173
  }
4134
4174
  return n = (t == null ? void 0 : t(!1, e, n, l, a)) || n, n;
4135
4175
  }
4136
- case De:
4137
- case ie:
4138
- case ne: {
4176
+ case ve:
4177
+ case se:
4178
+ case re: {
4139
4179
  if (n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel) return n;
4140
4180
  if (!n.skipChildren) {
4141
4181
  if (e.aDestr !== void 0) {
4142
4182
  for (const s of e.aDestr)
4143
- if (n = L(s, n, r, t, e), n.cancel) return n;
4183
+ if (n = w(s, n, r, t, e), n.cancel) return n;
4144
4184
  }
4145
4185
  if (e.oDestr !== void 0) {
4146
4186
  for (const s of e.oDestr)
4147
- if (n = L(s, n, r, t, e), n.cancel) return n;
4187
+ if (n = w(s, n, r, t, e), n.cancel) return n;
4148
4188
  }
4149
4189
  }
4150
4190
  return n = (t == null ? void 0 : t(!1, e, n, l, a)) || n, n;
4151
4191
  }
4152
- case Wn:
4153
- return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (e.expr && (n = L(e.expr, n, r, t, e, "expression")), n.cancel) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4154
- case bn:
4192
+ case In:
4193
+ return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (e.expr && (n = w(e.expr, n, r, t, e, "expression")), n.cancel) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4194
+ case wn:
4155
4195
  return n;
4156
- case Pn:
4196
+ case bn:
4157
4197
  return n;
4158
4198
  default:
4159
4199
  return n;
4160
4200
  }
4161
4201
  }
4162
- function ur(e) {
4202
+ function lr(e) {
4163
4203
  return e.type !== "ScriptModule";
4164
4204
  }
4165
- function fr(e, n) {
4205
+ function sr(e, n) {
4166
4206
  const r = /* @__PURE__ */ new Map(), t = {}, l = a(e, n);
4167
4207
  return !l || Object.keys(t).length > 0 ? t : l;
4168
4208
  function a(s, o) {
4169
4209
  if (r.has(s))
4170
4210
  return r.get(s);
4171
- const c = new Ge(o);
4211
+ const u = new Ue(o);
4172
4212
  let D = [];
4173
4213
  try {
4174
- D = c.parseStatements();
4214
+ D = u.parseStatements();
4175
4215
  } catch {
4176
- return t[s] = c.errors, null;
4216
+ return t[s] = u.errors, null;
4177
4217
  }
4178
- const w = c.current;
4179
- if (w.type !== i.Eof)
4218
+ const T = u.current;
4219
+ if (T.type !== i.Eof)
4180
4220
  return t[s] ?? (t[s] = []), t[s].push({
4181
4221
  code: "W002",
4182
- text: Re.W002.replace(/\{(\d+)}/g, () => w.text),
4183
- position: w.startLine,
4184
- line: w.startLine,
4185
- column: w.startColumn
4222
+ text: Oe.W002.replace(/\{(\d+)}/g, () => T.text),
4223
+ position: T.startLine,
4224
+ line: T.startLine,
4225
+ column: T.startColumn
4186
4226
  }), null;
4187
4227
  const h = [], U = {};
4188
- D.filter((T) => T.type === We).forEach((T) => {
4189
- const _ = T;
4228
+ D.filter((v) => v.type === be).forEach((v) => {
4229
+ const _ = v;
4190
4230
  if (U[_.id.name]) {
4191
- H("W020", T, _.id.name);
4231
+ j("W020", v, _.id.name);
4192
4232
  return;
4193
4233
  }
4194
4234
  U[_.id.name] = _;
4195
4235
  });
4196
- const x = {
4236
+ const m = {
4197
4237
  type: "ScriptModule",
4198
4238
  name: s,
4199
4239
  functions: U,
4200
4240
  statements: D,
4201
4241
  sources: /* @__PURE__ */ new Map()
4202
4242
  };
4203
- if (r.set(s, x), h.length > 0)
4243
+ if (r.set(s, m), h.length > 0)
4204
4244
  return t[s] = h, null;
4205
- return x;
4206
- function H(T, _, ...z) {
4207
- var q, $, j;
4208
- let S = Re[T];
4209
- z && z.forEach(
4210
- (fe, X) => S = S.replaceAll(`{${X}}`, z[X].toString())
4245
+ return m;
4246
+ function j(v, _, ...G) {
4247
+ var Q, X, M;
4248
+ let A = Oe[v];
4249
+ G && G.forEach(
4250
+ (H, V) => A = A.replaceAll(`{${V}}`, G[V].toString())
4211
4251
  ), h.push({
4212
- code: T,
4213
- text: Re[T].replace(/\{(\d+)}/g, (fe, X) => z[X]),
4214
- position: (q = _.startToken) == null ? void 0 : q.startPosition,
4215
- line: ($ = _.startToken) == null ? void 0 : $.startLine,
4216
- column: (j = _.startToken) == null ? void 0 : j.startColumn
4252
+ code: v,
4253
+ text: Oe[v].replace(/\{(\d+)}/g, (H, V) => G[V]),
4254
+ position: (Q = _.startToken) == null ? void 0 : Q.startPosition,
4255
+ line: (X = _.startToken) == null ? void 0 : X.startLine,
4256
+ column: (M = _.startToken) == null ? void 0 : M.startColumn
4217
4257
  });
4218
4258
  }
4219
4259
  }
4220
4260
  }
4221
- const Me = "__PARSED__";
4222
- function hr(e, n) {
4261
+ const Be = "__PARSED__";
4262
+ function ar(e, n) {
4223
4263
  const r = {
4224
4264
  vars: {},
4225
4265
  moduleErrors: {},
4226
4266
  functions: {}
4227
- }, t = {}, l = fr(e, n);
4228
- if (ur(l))
4267
+ }, t = {}, l = sr(e, n);
4268
+ if (lr(l))
4229
4269
  return { ...r, moduleErrors: l };
4230
4270
  return l.statements.forEach((s) => {
4231
4271
  switch (s.type) {
4232
- case Qe:
4272
+ case qe:
4233
4273
  s.decls.forEach((o) => {
4234
4274
  if (o.id.name in r.vars)
4235
4275
  throw new Error(`Duplicated var declaration: '${o.id.name}'`);
4236
4276
  r.vars[o.id.name] = {
4237
- [Me]: !0,
4277
+ [Be]: !0,
4238
4278
  tree: o.expr
4239
4279
  };
4240
4280
  });
4241
4281
  break;
4242
- case We:
4282
+ case be:
4243
4283
  a(s);
4244
4284
  break;
4245
4285
  default:
@@ -4252,7 +4292,7 @@ function hr(e, n) {
4252
4292
  if (s.id.name in r.functions)
4253
4293
  throw new Error(`Duplicated function declaration: '${s.id.name}'`);
4254
4294
  const o = {
4255
- type: Be,
4295
+ type: Ie,
4256
4296
  args: s.args.slice(),
4257
4297
  statement: s.stmt
4258
4298
  // closureContext: obtainClosures({
@@ -4263,15 +4303,15 @@ function hr(e, n) {
4263
4303
  // }),
4264
4304
  };
4265
4305
  t[s.id.name] = {
4266
- [Me]: !0,
4306
+ [Be]: !0,
4267
4307
  tree: o
4268
4308
  }, r.functions[s.id.name] = {
4269
- [Me]: !0,
4309
+ [Be]: !0,
4270
4310
  tree: o
4271
4311
  };
4272
4312
  }
4273
4313
  }
4274
- function br(e) {
4314
+ function Ar(e) {
4275
4315
  if (!e) return;
4276
4316
  const n = {
4277
4317
  data: null,
@@ -4285,15 +4325,15 @@ function br(e) {
4285
4325
  });
4286
4326
  function r(t) {
4287
4327
  const l = (a, s, o) => (a && s && (delete s.startToken, delete s.endToken), o);
4288
- L(t.tree, n, l, l);
4328
+ w(t.tree, n, l, l);
4289
4329
  }
4290
4330
  }
4291
- class Pe extends Error {
4331
+ class Re extends Error {
4292
4332
  constructor(n, r) {
4293
- super(`${r ? `${r}: ` : ""}${n}`), this.code = r, Object.setPrototypeOf(this, Pe.prototype);
4333
+ super(`${r ? `${r}: ` : ""}${n}`), this.code = r, Object.setPrototypeOf(this, Re.prototype);
4294
4334
  }
4295
4335
  }
4296
- const dr = {
4336
+ const or = {
4297
4337
  U001: "Unexpected token: {0}.",
4298
4338
  U002: "A component definition can have exactly one XMLUI element.",
4299
4339
  U003: "A '<' token expected.",
@@ -4338,7 +4378,7 @@ const dr = {
4338
4378
  T027: "Cannot resolve namespace '{0}'. It was not defined in any of the ancestor components.",
4339
4379
  T028: "Incorrect namespace value '{0}'. {1}",
4340
4380
  T029: "Incorrect scheme specified before ':' (colon) in namespace {0}. Delete it to get the default '{1}'."
4341
- }, ln = "Component", qe = /^[A-Z]/, sn = /^on[A-Z]/, pr = ["name", "value"], kr = 9, $e = "component-ns", gr = "app-ns", Er = "#app-ns", mr = "core-ns", xr = "#xmlui-core-ns", se = {
4381
+ }, Ve = "Component", We = /^[A-Z]/, en = /^on[A-Z]/, cr = ["name", "value"], ur = 9, Pe = "component-ns", fr = "app-ns", hr = "#app-ns", pr = "core-ns", dr = "#xmlui-core-ns", ae = {
4342
4382
  property: "property",
4343
4383
  event: "event",
4344
4384
  variable: "variable",
@@ -4348,15 +4388,15 @@ const dr = {
4348
4388
  item: "item",
4349
4389
  field: "field"
4350
4390
  };
4351
- let _r = 0;
4352
- function Dr(e, n, r) {
4353
- const t = (k) => k.text ?? n(k), l = Ar(e), a = $(l), s = [], o = [];
4354
- return c(s, a);
4355
- function c(k, f) {
4356
- const g = fn(f, t, o);
4357
- if (g === ln)
4358
- return w(f);
4359
- let p = {
4391
+ let kr = 0;
4392
+ function Lr(e, n, r) {
4393
+ const t = (k) => k.text ?? n(k), l = mr(e), a = X(l), s = [], o = [];
4394
+ return u(s, a);
4395
+ function u(k, f) {
4396
+ const g = sn(f, t, o);
4397
+ if (g === Ve)
4398
+ return T(f);
4399
+ let d = {
4360
4400
  type: g,
4361
4401
  debug: {
4362
4402
  source: {
@@ -4366,12 +4406,12 @@ function Dr(e, n, r) {
4366
4406
  }
4367
4407
  }
4368
4408
  };
4369
- return h(k, p, f), p;
4409
+ return h(k, d, f), d;
4370
4410
  }
4371
4411
  function D(k, f) {
4372
- const g = fn(f, t, o);
4373
- g === ln && B("T006");
4374
- let p = {
4412
+ const g = sn(f, t, o);
4413
+ g === Ve && W("T006");
4414
+ let d = {
4375
4415
  type: g,
4376
4416
  debug: {
4377
4417
  source: {
@@ -4381,41 +4421,41 @@ function Dr(e, n, r) {
4381
4421
  }
4382
4422
  }
4383
4423
  };
4384
- return h(k, p, f), p;
4424
+ return h(k, d, f), d;
4385
4425
  }
4386
- function w(k) {
4387
- const f = ke(k).map(S), g = f.find((R) => R.name === "name");
4388
- g || B("T003"), qe.test(g.value) || B("T004");
4389
- const p = f.find((R) => R.name === "codeBehind");
4426
+ function T(k) {
4427
+ const f = de(k).map(A), g = f.find((y) => y.name === "name");
4428
+ g || W("T003"), We.test(g.value) || W("T004");
4429
+ const d = f.find((y) => y.name === "codeBehind");
4390
4430
  let N;
4391
- const I = f.filter((R) => R.startSegment === "method");
4392
- I.length > 0 && (N = {}, I.forEach((R) => {
4393
- N[R.name] = R.value;
4431
+ const R = f.filter((y) => y.startSegment === "method");
4432
+ R.length > 0 && (N = {}, R.forEach((y) => {
4433
+ N[y.name] = y.value;
4394
4434
  }));
4395
- let O;
4396
- const y = f.filter((R) => R.startSegment === "var");
4397
- y.length > 0 && (O = {}, y.forEach((R) => {
4398
- O[R.name] = R.value;
4435
+ let b;
4436
+ const E = f.filter((y) => y.startSegment === "var");
4437
+ E.length > 0 && (b = {}, E.forEach((y) => {
4438
+ b[y.name] = y.value;
4399
4439
  }));
4400
- const F = ge(k), b = F.filter(
4401
- (R) => R.kind === u.ElementNode && !(te(R, t) in se)
4440
+ const x = ke(k), S = x.filter(
4441
+ (y) => y.kind === c.ElementNode && !(le(y, t) in ae)
4402
4442
  );
4403
- b.length === 0 && b.push(an(""));
4404
- const m = [], E = [];
4405
- for (let R of F)
4406
- if (R.kind === u.ElementNode) {
4407
- const K = te(R, t);
4408
- K === se.variable ? E.push(R) : K in se && m.push(R);
4443
+ S.length === 0 && S.push(nn(""));
4444
+ const I = [], L = [];
4445
+ for (let y of x)
4446
+ if (y.kind === c.ElementNode) {
4447
+ const he = le(y, t);
4448
+ he === ae.variable ? L.push(y) : he in ae && I.push(y);
4409
4449
  }
4410
- let A;
4411
- b.length > 1 || E.length > 0 ? A = on([...E, ...b]) : A = b[0], o.push(/* @__PURE__ */ new Map()), f.filter((R) => R.namespace === "xmlns").forEach((R) => {
4412
- un(o, A, R.unsegmentedName, R.value);
4450
+ let O;
4451
+ S.length > 1 || L.length > 0 ? O = rn([...L, ...S]) : O = S[0], o.push(/* @__PURE__ */ new Map()), f.filter((y) => y.namespace === "xmlns").forEach((y) => {
4452
+ ln(o, O, y.unsegmentedName, y.value);
4413
4453
  });
4414
- let v = D(s, A);
4454
+ let B = D(s, O);
4415
4455
  o.pop();
4416
- const W = {
4456
+ const F = {
4417
4457
  name: g.value,
4418
- component: v,
4458
+ component: B,
4419
4459
  debug: {
4420
4460
  source: {
4421
4461
  start: k.start,
@@ -4424,55 +4464,55 @@ function Dr(e, n, r) {
4424
4464
  }
4425
4465
  }
4426
4466
  };
4427
- N && (W.api = N), O && (v.vars = { ...v.vars, ...O }), p && (W.codeBehind = p.value), v.debug = {
4467
+ N && (F.api = N), b && (B.vars = { ...B.vars, ...b }), d && (F.codeBehind = d.value), B.debug = {
4428
4468
  source: {
4429
- start: A.start,
4430
- end: A.end,
4469
+ start: O.start,
4470
+ end: O.end,
4431
4471
  fileId: r
4432
4472
  }
4433
4473
  };
4434
- const G = cn(k, m);
4435
- return h(s, W, G), W;
4474
+ const z = tn(k, I);
4475
+ return h(s, F, z), F;
4436
4476
  }
4437
4477
  function h(k, f, g) {
4438
- var F;
4439
- const p = !C(f), N = ke(g);
4440
- if (o.push(/* @__PURE__ */ new Map()), N.forEach((b) => {
4441
- U(f, b);
4442
- }), ge(g).forEach((b) => {
4443
- if (b.kind === u.Script) {
4444
- ke(b).length > 0 && B("T022");
4445
- const E = t(b), A = E.slice(
4446
- E.indexOf(">") + 1,
4447
- E.lastIndexOf("</")
4478
+ var x;
4479
+ const d = !ee(f), N = de(g);
4480
+ if (o.push(/* @__PURE__ */ new Map()), N.forEach((S) => {
4481
+ U(f, S);
4482
+ }), ke(g).forEach((S) => {
4483
+ if (S.kind === c.Script) {
4484
+ de(S).length > 0 && W("T022");
4485
+ const L = t(S), O = L.slice(
4486
+ L.indexOf(">") + 1,
4487
+ L.lastIndexOf("</")
4448
4488
  );
4449
4489
  f.script ?? (f.script = ""), f.script.length > 0 && (f.script += `
4450
- `), f.script += A;
4490
+ `), f.script += O;
4451
4491
  return;
4452
4492
  }
4453
- if (b.kind === u.TextNode && !p) {
4454
- f.children = Ie(f.children, t(b));
4493
+ if (S.kind === c.TextNode && !d) {
4494
+ f.children = we(f.children, t(S));
4455
4495
  return;
4456
4496
  }
4457
- const m = te(b, t);
4458
- if (!(p && b.kind === u.ElementNode && !(m in se))) {
4459
- if (!(m in se) && !p) {
4460
- const E = D(k, b);
4461
- E && (f.children ? typeof f.children == "string" ? f.children = [f.children, E] : Array.isArray(f.children) && f.children.push(E) : f.children = [E]);
4497
+ const I = le(S, t);
4498
+ if (!(d && S.kind === c.ElementNode && !(I in ae))) {
4499
+ if (!(I in ae) && !d) {
4500
+ const L = D(k, S);
4501
+ L && (f.children ? typeof f.children == "string" ? f.children = [f.children, L] : Array.isArray(f.children) && f.children.push(L) : f.children = [L]);
4462
4502
  return;
4463
4503
  }
4464
- switch (m) {
4504
+ switch (I) {
4465
4505
  case "property":
4466
4506
  _(
4467
4507
  k,
4468
4508
  f,
4469
- b,
4470
- (E) => {
4471
- var A;
4472
- return C(f) ? (A = f.props) == null ? void 0 : A[E] : void 0;
4509
+ S,
4510
+ (L) => {
4511
+ var O;
4512
+ return ee(f) ? (O = f.props) == null ? void 0 : O[L] : void 0;
4473
4513
  },
4474
- (E, A) => {
4475
- C(f) && (f.props ?? (f.props = {}), f.props[E] = A);
4514
+ (L, O) => {
4515
+ ee(f) && (f.props ?? (f.props = {}), f.props[L] = O);
4476
4516
  }
4477
4517
  );
4478
4518
  return;
@@ -4480,297 +4520,297 @@ function Dr(e, n, r) {
4480
4520
  _(
4481
4521
  k,
4482
4522
  f,
4483
- b,
4484
- (E) => {
4485
- var A;
4486
- return C(f) ? (A = f.events) == null ? void 0 : A[E] : void 0;
4523
+ S,
4524
+ (L) => {
4525
+ var O;
4526
+ return ee(f) ? (O = f.events) == null ? void 0 : O[L] : void 0;
4487
4527
  },
4488
- (E, A) => {
4489
- C(f) && (f.events ?? (f.events = {}), f.events[E] = V(A));
4528
+ (L, O) => {
4529
+ ee(f) && (f.events ?? (f.events = {}), f.events[L] = J(O));
4490
4530
  },
4491
- (E) => {
4492
- sn.test(E) && B("T008", E);
4531
+ (L) => {
4532
+ en.test(L) && W("T008", L);
4493
4533
  }
4494
4534
  );
4495
4535
  return;
4496
- case se.variable:
4536
+ case ae.variable:
4497
4537
  _(
4498
4538
  k,
4499
4539
  f,
4500
- b,
4501
- (E) => {
4502
- var A;
4503
- return C(f) ? (A = f.vars) == null ? void 0 : A[E] : void 0;
4540
+ S,
4541
+ (L) => {
4542
+ var O;
4543
+ return ee(f) ? (O = f.vars) == null ? void 0 : O[L] : void 0;
4504
4544
  },
4505
- (E, A) => {
4506
- C(f) && (f.vars ?? (f.vars = {}), f.vars[E] = A);
4545
+ (L, O) => {
4546
+ ee(f) && (f.vars ?? (f.vars = {}), f.vars[L] = O);
4507
4547
  }
4508
4548
  );
4509
4549
  return;
4510
4550
  case "loaders":
4511
- T(k, f, b);
4551
+ v(k, f, S);
4512
4552
  return;
4513
4553
  case "uses":
4514
- z(f, b);
4554
+ G(f, S);
4515
4555
  return;
4516
4556
  case "method":
4517
4557
  _(
4518
4558
  k,
4519
4559
  f,
4520
- b,
4521
- (E) => {
4522
- var A;
4523
- return C(f) ? (A = f.api) == null ? void 0 : A[E] : void 0;
4560
+ S,
4561
+ (L) => {
4562
+ var O;
4563
+ return ee(f) ? (O = f.api) == null ? void 0 : O[L] : void 0;
4524
4564
  },
4525
- (E, A) => {
4526
- f.api ?? (f.api = {}), f.api[E] = A;
4565
+ (L, O) => {
4566
+ f.api ?? (f.api = {}), f.api[L] = O;
4527
4567
  }
4528
4568
  );
4529
4569
  return;
4530
4570
  default:
4531
- B("T009", m);
4571
+ W("T009", I);
4532
4572
  return;
4533
4573
  }
4534
4574
  }
4535
4575
  }), o.pop(), !f.script || f.script.trim().length === 0)
4536
4576
  return;
4537
- const O = new Ge(f.script);
4577
+ const b = new Ue(f.script);
4538
4578
  try {
4539
- O.parseStatements(), f.scriptCollected = hr("Main", f.script);
4540
- } catch (b) {
4541
- O.errors && O.errors.length > 0 ? f.scriptError = O.errors : f.scriptError = b;
4579
+ b.parseStatements(), f.scriptCollected = ar("Main", f.script);
4580
+ } catch (S) {
4581
+ b.errors && b.errors.length > 0 ? f.scriptError = b.errors : f.scriptError = S;
4542
4582
  }
4543
- const y = ((F = f.scriptCollected) == null ? void 0 : F.moduleErrors) ?? {};
4544
- Object.keys(y).length > 0 && (f.scriptError = y);
4583
+ const E = ((x = f.scriptCollected) == null ? void 0 : x.moduleErrors) ?? {};
4584
+ Object.keys(E).length > 0 && (f.scriptError = E);
4545
4585
  }
4546
4586
  function U(k, f) {
4547
- const { namespace: g, startSegment: p, name: N, value: I, unsegmentedName: O } = S(f);
4587
+ const { namespace: g, startSegment: d, name: N, value: R, unsegmentedName: b } = A(f);
4548
4588
  if (g === "xmlns")
4549
- return un(o, k, O, I);
4550
- if (!C(k)) {
4551
- if (p && p !== "method" && p !== "var") {
4552
- B("T021");
4589
+ return ln(o, k, b, R);
4590
+ if (!ee(k)) {
4591
+ if (d && d !== "method" && d !== "var") {
4592
+ W("T021");
4553
4593
  return;
4554
4594
  }
4555
- if (N === "name" && !p || N === "codeBehind" && !p)
4595
+ if (N === "name" && !d || N === "codeBehind" && !d)
4556
4596
  return;
4557
- !p && N && B("T021", N);
4597
+ !d && N && W("T021", N);
4558
4598
  return;
4559
4599
  }
4560
4600
  switch (N) {
4561
4601
  case "id":
4562
- k.uid = I;
4602
+ k.uid = R;
4563
4603
  return;
4564
4604
  case "testId":
4565
- k.testId = I;
4605
+ k.testId = R;
4566
4606
  return;
4567
4607
  case "when":
4568
- k.when = I;
4608
+ k.when = R;
4569
4609
  return;
4570
4610
  default:
4571
- if (p === "var")
4572
- k.vars ?? (k.vars = {}), k.vars[N] = I;
4573
- else if (p === "method")
4574
- k.api ?? (k.api = {}), k.api[N] = I;
4575
- else if (p === "event")
4576
- k.events ?? (k.events = {}), k.events[N] = V(I);
4577
- else if (sn.test(N)) {
4611
+ if (d === "var")
4612
+ k.vars ?? (k.vars = {}), k.vars[N] = R;
4613
+ else if (d === "method")
4614
+ k.api ?? (k.api = {}), k.api[N] = R;
4615
+ else if (d === "event")
4616
+ k.events ?? (k.events = {}), k.events[N] = J(R);
4617
+ else if (en.test(N)) {
4578
4618
  k.events ?? (k.events = {});
4579
- const F = N[2].toLowerCase() + N.substring(3);
4580
- k.events[F] = V(I);
4619
+ const x = N[2].toLowerCase() + N.substring(3);
4620
+ k.events[x] = J(R);
4581
4621
  } else
4582
- k.props ?? (k.props = {}), k.props[N] = I;
4622
+ k.props ?? (k.props = {}), k.props[N] = R;
4583
4623
  return;
4584
4624
  }
4585
4625
  }
4586
- function x(k, f) {
4626
+ function m(k, f) {
4587
4627
  let g = null;
4588
4628
  if (!f) return g;
4589
- let p = null;
4629
+ let d = null;
4590
4630
  return f.forEach((N) => {
4591
- if (N.kind === u.TextNode) {
4592
- g = Ie(g, t(N));
4631
+ if (N.kind === c.TextNode) {
4632
+ g = we(g, t(N));
4593
4633
  return;
4594
4634
  }
4595
- if (N.kind !== u.ElementNode) return;
4596
- const I = te(N, t);
4597
- if (I !== "field" && I !== "item") {
4598
- B("T016");
4635
+ if (N.kind !== c.ElementNode) return;
4636
+ const R = le(N, t);
4637
+ if (R !== "field" && R !== "item") {
4638
+ W("T016");
4599
4639
  return;
4600
4640
  }
4601
- if (I === "field") {
4602
- if (!p)
4603
- p = I, g = {};
4604
- else if (p !== I) {
4605
- B("T017");
4641
+ if (R === "field") {
4642
+ if (!d)
4643
+ d = R, g = {};
4644
+ else if (d !== R) {
4645
+ W("T017");
4606
4646
  return;
4607
4647
  }
4608
- } else if (I === "item") {
4609
- if (!p)
4610
- p = I, g = [];
4611
- else if (p !== I) {
4612
- B("T017");
4648
+ } else if (R === "item") {
4649
+ if (!d)
4650
+ d = R, g = [];
4651
+ else if (d !== R) {
4652
+ W("T017");
4613
4653
  return;
4614
4654
  }
4615
4655
  }
4616
- let O = H(k, N, I === "field");
4617
- if (!O)
4656
+ let b = j(k, N, R === "field");
4657
+ if (!b)
4618
4658
  return null;
4619
- p === "field" ? g[O.name] = O.value : g.push(O.value);
4659
+ d === "field" ? g[b.name] = b.value : g.push(b.value);
4620
4660
  }), g;
4621
4661
  }
4622
- function H(k, f, g = !0) {
4623
- const p = te(f, t), N = ge(f), I = N.filter(
4624
- (v) => v.kind === u.ElementNode && qe.test(te(v, t))
4625
- ), O = N.filter(
4626
- (v) => v.kind === u.ElementNode && !qe.test(te(v, t))
4627
- ), y = ke(f).map(S), F = y.filter((v) => pr.indexOf(v.name) >= 0);
4628
- if (y.length > F.length)
4629
- return B("T011", p), null;
4630
- const b = F.find((v) => v.name === "name");
4662
+ function j(k, f, g = !0) {
4663
+ const d = le(f, t), N = ke(f), R = N.filter(
4664
+ (B) => B.kind === c.ElementNode && We.test(le(B, t))
4665
+ ), b = N.filter(
4666
+ (B) => B.kind === c.ElementNode && !We.test(le(B, t))
4667
+ ), E = de(f).map(A), x = E.filter((B) => cr.indexOf(B.name) >= 0);
4668
+ if (E.length > x.length)
4669
+ return W("T011", d), null;
4670
+ const S = x.find((B) => B.name === "name");
4631
4671
  if (g) {
4632
- if (!(b != null && b.value))
4633
- return B("T012", p), null;
4634
- } else if (b)
4635
- return B("T018", p), null;
4636
- const m = b == null ? void 0 : b.value, E = F.find((v) => v.name === "value");
4637
- if (E && E.value === void 0)
4638
- return B("T019", p), null;
4639
- if (m && I.length >= 1) {
4640
- if (O.length > 0)
4641
- return B("T020"), null;
4642
- const v = I.map((W) => D(k, W));
4672
+ if (!(S != null && S.value))
4673
+ return W("T012", d), null;
4674
+ } else if (S)
4675
+ return W("T018", d), null;
4676
+ const I = S == null ? void 0 : S.value, L = x.find((B) => B.name === "value");
4677
+ if (L && L.value === void 0)
4678
+ return W("T019", d), null;
4679
+ if (I && R.length >= 1) {
4680
+ if (b.length > 0)
4681
+ return W("T020"), null;
4682
+ const B = R.map((F) => D(k, F));
4643
4683
  return {
4644
- name: m,
4645
- value: v.length === 1 ? v[0] : v
4684
+ name: I,
4685
+ value: B.length === 1 ? B[0] : B
4646
4686
  };
4647
4687
  }
4648
- let A = E == null ? void 0 : E.value;
4649
- return A === null ? null : typeof A == "string" ? { name: m, value: A } : { name: m, value: x(k, N) };
4688
+ let O = L == null ? void 0 : L.value;
4689
+ return O === null ? null : typeof O == "string" ? { name: I, value: O } : { name: I, value: m(k, N) };
4650
4690
  }
4651
- function T(k, f, g) {
4652
- var I;
4653
- if (!C(f)) {
4654
- B("T009", "loaders");
4691
+ function v(k, f, g) {
4692
+ var R;
4693
+ if (!ee(f)) {
4694
+ W("T009", "loaders");
4655
4695
  return;
4656
4696
  }
4657
- const p = ge(g);
4658
- if (p.length === 0 && (f.loaders ?? (f.loaders = [])), (I = g.children) == null ? void 0 : I.some((O) => O.kind === u.AttributeListNode)) {
4659
- B("T014", "attributes");
4697
+ const d = ke(g);
4698
+ if (d.length === 0 && (f.loaders ?? (f.loaders = [])), (R = g.children) == null ? void 0 : R.some((b) => b.kind === c.AttributeListNode)) {
4699
+ W("T014", "attributes");
4660
4700
  return;
4661
4701
  }
4662
- p.forEach((O) => {
4663
- if (O.kind === u.TextNode) {
4664
- B("T010", "loader");
4702
+ d.forEach((b) => {
4703
+ if (b.kind === c.TextNode) {
4704
+ W("T010", "loader");
4665
4705
  return;
4666
4706
  }
4667
- const y = D(k, O);
4668
- if (!y.uid) {
4669
- B("T013");
4707
+ const E = D(k, b);
4708
+ if (!E.uid) {
4709
+ W("T013");
4670
4710
  return;
4671
4711
  }
4672
- if (y.vars) {
4673
- B("T014", "vars");
4712
+ if (E.vars) {
4713
+ W("T014", "vars");
4674
4714
  return;
4675
4715
  }
4676
- if (y.loaders) {
4677
- B("T014", "loaders");
4716
+ if (E.loaders) {
4717
+ W("T014", "loaders");
4678
4718
  return;
4679
4719
  }
4680
- if (y.uses) {
4681
- B("T014", "uses");
4720
+ if (E.uses) {
4721
+ W("T014", "uses");
4682
4722
  return;
4683
4723
  }
4684
- f.loaders ?? (f.loaders = []), f.loaders.push(y);
4724
+ f.loaders ?? (f.loaders = []), f.loaders.push(E);
4685
4725
  });
4686
4726
  }
4687
- function _(k, f, g, p, N, I) {
4688
- const O = H(k, g);
4689
- if (!O)
4727
+ function _(k, f, g, d, N, R) {
4728
+ const b = j(k, g);
4729
+ if (!b)
4690
4730
  return;
4691
- I == null || I((O == null ? void 0 : O.name) ?? "");
4692
- const y = O.name, F = O.value;
4693
- if ((O == null ? void 0 : O.value) !== void 0)
4694
- N(y, Ie(p(y), F));
4731
+ R == null || R((b == null ? void 0 : b.name) ?? "");
4732
+ const E = b.name, x = b.value;
4733
+ if ((b == null ? void 0 : b.value) !== void 0)
4734
+ N(E, we(d(E), x));
4695
4735
  else {
4696
- const b = ge(g), m = x(k, b);
4697
- let E = p(y);
4698
- E = Ie(E, m), N(y, E);
4736
+ const S = ke(g), I = m(k, S);
4737
+ let L = d(E);
4738
+ L = we(L, I), N(E, L);
4699
4739
  }
4700
4740
  }
4701
- function z(k, f) {
4702
- if (!C(k)) {
4703
- B("T009", "uses");
4741
+ function G(k, f) {
4742
+ if (!ee(k)) {
4743
+ W("T009", "uses");
4704
4744
  return;
4705
4745
  }
4706
- const g = ke(f).map(S), p = g.find((N) => N.name === "value");
4707
- if (!(p != null && p.value) || g.length !== 1) {
4708
- B("T015", "uses");
4746
+ const g = de(f).map(A), d = g.find((N) => N.name === "value");
4747
+ if (!(d != null && d.value) || g.length !== 1) {
4748
+ W("T015", "uses");
4709
4749
  return;
4710
4750
  }
4711
- k.uses ?? (k.uses = p.value.split(",").map((N) => N.trim()));
4751
+ k.uses ?? (k.uses = d.value.split(",").map((N) => N.trim()));
4712
4752
  }
4713
- function S(k) {
4753
+ function A(k) {
4714
4754
  let f = k.children[0];
4715
4755
  const g = f.children.length === 3;
4716
- let p;
4717
- g && (p = t(f.children[0]));
4756
+ let d;
4757
+ g && (d = t(f.children[0]));
4718
4758
  let N = t(f.children[f.children.length - 1]);
4719
- const I = N.split(".");
4720
- I.length > 2 && B("T007", k, f);
4721
- let O, y;
4722
- I.length === 2 ? (y = I[0], O = I[1], O.trim() === "" && B("T007", k, O)) : O = N;
4723
- const F = t(k.children[2]), b = F.substring(1, F.length - 1);
4724
- return { namespace: p, startSegment: y, name: O, value: b, unsegmentedName: N };
4725
- }
4726
- function q(k) {
4759
+ const R = N.split(".");
4760
+ R.length > 2 && W("T007", k, f);
4761
+ let b, E;
4762
+ R.length === 2 ? (E = R[0], b = R[1], b.trim() === "" && W("T007", k, b)) : b = N;
4763
+ const x = t(k.children[2]), S = x.substring(1, x.length - 1);
4764
+ return { namespace: d, startSegment: E, name: b, value: S, unsegmentedName: N };
4765
+ }
4766
+ function Q(k) {
4727
4767
  for (let f of k) {
4728
- const g = f.children[f.children.length - 1], p = pe(t(g));
4729
- p !== null && (g.text = p);
4768
+ const g = f.children[f.children.length - 1], d = Z(t(g));
4769
+ d !== null && (g.text = d);
4730
4770
  }
4731
4771
  }
4732
- function $(k) {
4733
- const f = ge(k), g = te(k, t), N = !(g in se) || g === "property", I = g !== "event" && g !== "method", O = ke(k);
4734
- Nr(O), q(O), X(f), J(f, I);
4735
- let y = !1, F = !1;
4736
- for (let A = 0; A < f.length; ++A) {
4737
- const v = f[A];
4738
- let W;
4739
- if (v.kind == u.Script) {
4740
- F = !0;
4772
+ function X(k) {
4773
+ const f = ke(k), g = le(k, t), N = !(g in ae) || g === "property", R = g !== "event" && g !== "method", b = de(k);
4774
+ Er(b), Q(b), V(f), te(f, R);
4775
+ let E = !1, x = !1;
4776
+ for (let O = 0; O < f.length; ++O) {
4777
+ const B = f[O];
4778
+ let F;
4779
+ if (B.kind == c.Script) {
4780
+ x = !0;
4741
4781
  continue;
4742
4782
  }
4743
- if (v.kind === u.ElementNode) {
4744
- W = $(v), f[A] = W;
4783
+ if (B.kind === c.ElementNode) {
4784
+ F = X(B), f[O] = F;
4745
4785
  continue;
4746
4786
  }
4747
- let G = t(v);
4748
- v.kind === u.StringLiteral ? G = G.slice(1, -1) : v.kind === u.CData ? y = !0 : (v.kind, u.TextNode), N ? y ? W = Sr(G) : W = an(G) : W = {
4749
- kind: u.TextNode,
4750
- text: G
4751
- }, f[A] = W;
4787
+ let z = t(B);
4788
+ B.kind === c.StringLiteral ? z = z.slice(1, -1) : B.kind === c.CData ? E = !0 : (B.kind, c.TextNode), N ? E ? F = gr(z) : F = nn(z) : F = {
4789
+ kind: c.TextNode,
4790
+ text: z
4791
+ }, f[O] = F;
4752
4792
  }
4753
- const b = [], m = [];
4754
- let E = !1;
4755
- for (const A of f) {
4756
- if (A.kind === u.ElementNode) {
4757
- if ((te(A, t) ?? void 0) in se) {
4758
- b.push(A);
4793
+ const S = [], I = [];
4794
+ let L = !1;
4795
+ for (const O of f) {
4796
+ if (O.kind === c.ElementNode) {
4797
+ if ((le(O, t) ?? void 0) in ae) {
4798
+ S.push(O);
4759
4799
  continue;
4760
4800
  }
4761
- E = !0;
4801
+ L = !0;
4762
4802
  }
4763
- m.push(A);
4803
+ I.push(O);
4764
4804
  }
4765
- if (F && E) {
4766
- const A = on(m);
4767
- return b.push(A), cn(k, b);
4805
+ if (x && L) {
4806
+ const O = rn(I);
4807
+ return S.push(O), tn(k, S);
4768
4808
  }
4769
4809
  return k;
4770
4810
  }
4771
- function j(k) {
4811
+ function M(k) {
4772
4812
  for (let f = 0; f < k.length; ++f)
4773
- if (k[f].kind === u.StringLiteral || k[f].kind === u.TextNode) {
4813
+ if (k[f].kind === c.StringLiteral || k[f].kind === c.TextNode) {
4774
4814
  const g = /[\f\n\r\t\v\u0020\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/g;
4775
4815
  k[f].text = t(k[f]).replace(
4776
4816
  g,
@@ -4778,153 +4818,153 @@ function Dr(e, n, r) {
4778
4818
  );
4779
4819
  }
4780
4820
  }
4781
- function fe(k) {
4821
+ function H(k) {
4782
4822
  for (let f = 0; f < k.length; ++f)
4783
- k[f].kind === u.CData && (k[f].text = t(k[f]).slice(kr, -3));
4823
+ k[f].kind === c.CData && (k[f].text = t(k[f]).slice(ur, -3));
4784
4824
  }
4785
- function X(k) {
4825
+ function V(k) {
4786
4826
  for (let f of k)
4787
- if (f.kind === u.StringLiteral || f.kind === u.TextNode) {
4788
- const g = pe(t(f));
4827
+ if (f.kind === c.StringLiteral || f.kind === c.TextNode) {
4828
+ const g = Z(t(f));
4789
4829
  g !== null && (f.text = g);
4790
4830
  }
4791
4831
  }
4792
- function pe(k) {
4832
+ function Z(k) {
4793
4833
  let f = "", g = 0;
4794
- for (let p = 0; p < k.length; ++p)
4795
- if (k.charCodeAt(p) === d.ampersand)
4796
- switch (k.charCodeAt(p + 1)) {
4797
- case d.a:
4798
- switch (k.charCodeAt(p + 2)) {
4799
- case d.m:
4800
- k.charCodeAt(p + 3) === d.p && k.charCodeAt(p + 4) === d.semicolon && (f = f + k.substring(g, p) + "&", p += 4, g = p + 1);
4834
+ for (let d = 0; d < k.length; ++d)
4835
+ if (k.charCodeAt(d) === p.ampersand)
4836
+ switch (k.charCodeAt(d + 1)) {
4837
+ case p.a:
4838
+ switch (k.charCodeAt(d + 2)) {
4839
+ case p.m:
4840
+ k.charCodeAt(d + 3) === p.p && k.charCodeAt(d + 4) === p.semicolon && (f = f + k.substring(g, d) + "&", d += 4, g = d + 1);
4801
4841
  break;
4802
- case d.p:
4803
- k.charCodeAt(p + 3) === d.o && k.charCodeAt(p + 4) === d.s && k.charCodeAt(p + 5) === d.semicolon && (f = f + k.substring(g, p) + "'", p += 5, g = p + 1);
4842
+ case p.p:
4843
+ k.charCodeAt(d + 3) === p.o && k.charCodeAt(d + 4) === p.s && k.charCodeAt(d + 5) === p.semicolon && (f = f + k.substring(g, d) + "'", d += 5, g = d + 1);
4804
4844
  break;
4805
4845
  }
4806
4846
  break;
4807
- case d.g:
4808
- k.charCodeAt(p + 2) === d.t && k.charCodeAt(p + 3) === d.semicolon && (f = f + k.substring(g, p) + ">", p += 3, g = p + 1);
4847
+ case p.g:
4848
+ k.charCodeAt(d + 2) === p.t && k.charCodeAt(d + 3) === p.semicolon && (f = f + k.substring(g, d) + ">", d += 3, g = d + 1);
4809
4849
  break;
4810
- case d.l:
4811
- k.charCodeAt(p + 2) === d.t && k.charCodeAt(p + 3) === d.semicolon && (f = f + k.substring(g, p) + "<", p += 3, g = p + 1);
4850
+ case p.l:
4851
+ k.charCodeAt(d + 2) === p.t && k.charCodeAt(d + 3) === p.semicolon && (f = f + k.substring(g, d) + "<", d += 3, g = d + 1);
4812
4852
  break;
4813
- case d.q:
4814
- k.charCodeAt(p + 2) === d.u && k.charCodeAt(p + 3) === d.o && k.charCodeAt(p + 4) === d.t && k.charCodeAt(p + 5) === d.semicolon && (f = f + k.substring(g, p) + '"', p += 5, g = p + 1);
4853
+ case p.q:
4854
+ k.charCodeAt(d + 2) === p.u && k.charCodeAt(d + 3) === p.o && k.charCodeAt(d + 4) === p.t && k.charCodeAt(d + 5) === p.semicolon && (f = f + k.substring(g, d) + '"', d += 5, g = d + 1);
4815
4855
  break;
4816
- case d.n:
4817
- k.charCodeAt(p + 2) === d.b && k.charCodeAt(p + 3) === d.s && k.charCodeAt(p + 4) === d.p && k.charCodeAt(p + 5) === d.semicolon && (f = f + k.substring(g, p) + " ", p += 5, g = p + 1);
4856
+ case p.n:
4857
+ k.charCodeAt(d + 2) === p.b && k.charCodeAt(d + 3) === p.s && k.charCodeAt(d + 4) === p.p && k.charCodeAt(d + 5) === p.semicolon && (f = f + k.substring(g, d) + " ", d += 5, g = d + 1);
4818
4858
  break;
4819
4859
  }
4820
4860
  return g === 0 ? null : (f += k.substring(g), f);
4821
4861
  }
4822
- function J(k, f) {
4823
- f && j(k), fe(k);
4862
+ function te(k, f) {
4863
+ f && M(k), H(k);
4824
4864
  for (let g = k.length - 1; g > 0; --g) {
4825
- const p = k[g - 1], N = k[g];
4826
- p.kind === u.StringLiteral && N.kind === u.CData ? (k[g - 1] = {
4827
- kind: u.CData,
4828
- text: t(p).slice(1, -1) + t(N)
4829
- }, k.pop()) : p.kind === u.CData && N.kind === u.StringLiteral ? (k[g - 1] = {
4830
- kind: u.CData,
4831
- text: t(p) + t(N).slice(1, -1)
4832
- }, k.pop()) : p.kind === u.CData && N.kind === u.TextNode ? (k[g - 1] = {
4833
- kind: u.CData,
4834
- text: t(p) + t(N)
4835
- }, k.pop()) : p.kind === u.CData && N.kind === u.CData ? (k[g - 1] = {
4836
- kind: u.CData,
4837
- text: t(p) + t(N)
4838
- }, k.pop()) : p.kind === u.TextNode && N.kind === u.TextNode ? (t(p).endsWith(" ") && t(N).startsWith(" ") && (p.text = t(p).trimEnd()), k[g - 1] = {
4839
- kind: u.TextNode,
4840
- text: t(p) + t(N)
4841
- }, k.pop()) : p.kind === u.TextNode && N.kind === u.CData && (k[g - 1] = {
4842
- kind: u.CData,
4843
- text: t(p) + t(N)
4865
+ const d = k[g - 1], N = k[g];
4866
+ d.kind === c.StringLiteral && N.kind === c.CData ? (k[g - 1] = {
4867
+ kind: c.CData,
4868
+ text: t(d).slice(1, -1) + t(N)
4869
+ }, k.pop()) : d.kind === c.CData && N.kind === c.StringLiteral ? (k[g - 1] = {
4870
+ kind: c.CData,
4871
+ text: t(d) + t(N).slice(1, -1)
4872
+ }, k.pop()) : d.kind === c.CData && N.kind === c.TextNode ? (k[g - 1] = {
4873
+ kind: c.CData,
4874
+ text: t(d) + t(N)
4875
+ }, k.pop()) : d.kind === c.CData && N.kind === c.CData ? (k[g - 1] = {
4876
+ kind: c.CData,
4877
+ text: t(d) + t(N)
4878
+ }, k.pop()) : d.kind === c.TextNode && N.kind === c.TextNode ? (t(d).endsWith(" ") && t(N).startsWith(" ") && (d.text = t(d).trimEnd()), k[g - 1] = {
4879
+ kind: c.TextNode,
4880
+ text: t(d) + t(N)
4881
+ }, k.pop()) : d.kind === c.TextNode && N.kind === c.CData && (k[g - 1] = {
4882
+ kind: c.CData,
4883
+ text: t(d) + t(N)
4844
4884
  }, k.pop());
4845
4885
  }
4846
4886
  }
4847
- function V(k) {
4887
+ function J(k) {
4848
4888
  if (typeof k != "string")
4849
4889
  return k;
4850
- const f = new Ge(k);
4890
+ const f = new Ue(k);
4851
4891
  try {
4852
4892
  return {
4853
4893
  __PARSED: !0,
4854
4894
  statements: f.parseStatements(),
4855
- parseId: ++_r,
4895
+ parseId: ++kr,
4856
4896
  // TODO: retrieve the event source code only in dev mode
4857
4897
  source: k
4858
4898
  };
4859
4899
  } catch {
4860
4900
  if (f.errors.length > 0) {
4861
4901
  const g = f.errors[0];
4862
- throw new Pe(`${g.text} [${g.line}: ${g.column}]`, g.code);
4902
+ throw new Re(`${g.text} [${g.line}: ${g.column}]`, g.code);
4863
4903
  }
4864
4904
  }
4865
4905
  }
4866
4906
  }
4867
- function Sr(e) {
4907
+ function gr(e) {
4868
4908
  return {
4869
- kind: u.ElementNode,
4909
+ kind: c.ElementNode,
4870
4910
  children: [
4871
- { kind: u.OpenNodeStart },
4911
+ { kind: c.OpenNodeStart },
4872
4912
  {
4873
- kind: u.TagNameNode,
4874
- children: [{ kind: u.Identifier, text: "TextNodeCData" }]
4913
+ kind: c.TagNameNode,
4914
+ children: [{ kind: c.Identifier, text: "TextNodeCData" }]
4875
4915
  },
4876
4916
  {
4877
- kind: u.AttributeListNode,
4917
+ kind: c.AttributeListNode,
4878
4918
  children: [
4879
4919
  {
4880
- kind: u.AttributeNode,
4920
+ kind: c.AttributeNode,
4881
4921
  children: [
4882
4922
  {
4883
- kind: u.AttributeKeyNode,
4884
- children: [{ kind: u.Identifier, text: "value" }]
4923
+ kind: c.AttributeKeyNode,
4924
+ children: [{ kind: c.Identifier, text: "value" }]
4885
4925
  },
4886
- { kind: u.Equal },
4887
- { kind: u.Identifier, text: `"${e}"` }
4926
+ { kind: c.Equal },
4927
+ { kind: c.Identifier, text: `"${e}"` }
4888
4928
  ]
4889
4929
  }
4890
4930
  ]
4891
4931
  },
4892
- { kind: u.NodeClose }
4932
+ { kind: c.NodeClose }
4893
4933
  ]
4894
4934
  };
4895
4935
  }
4896
- function an(e) {
4936
+ function nn(e) {
4897
4937
  return {
4898
- kind: u.ElementNode,
4938
+ kind: c.ElementNode,
4899
4939
  children: [
4900
- { kind: u.OpenNodeStart },
4940
+ { kind: c.OpenNodeStart },
4901
4941
  {
4902
- kind: u.TagNameNode,
4903
- children: [{ kind: u.Identifier, text: "TextNode" }]
4942
+ kind: c.TagNameNode,
4943
+ children: [{ kind: c.Identifier, text: "TextNode" }]
4904
4944
  },
4905
4945
  {
4906
- kind: u.AttributeListNode,
4946
+ kind: c.AttributeListNode,
4907
4947
  children: [
4908
4948
  {
4909
- kind: u.AttributeNode,
4949
+ kind: c.AttributeNode,
4910
4950
  children: [
4911
4951
  {
4912
- kind: u.AttributeKeyNode,
4913
- children: [{ kind: u.Identifier, text: "value" }]
4952
+ kind: c.AttributeKeyNode,
4953
+ children: [{ kind: c.Identifier, text: "value" }]
4914
4954
  },
4915
- { kind: u.Equal },
4916
- { kind: u.Identifier, text: `"${e}"` }
4955
+ { kind: c.Equal },
4956
+ { kind: c.Identifier, text: `"${e}"` }
4917
4957
  ]
4918
4958
  }
4919
4959
  ]
4920
4960
  },
4921
- { kind: u.NodeClose }
4961
+ { kind: c.NodeClose }
4922
4962
  ]
4923
4963
  };
4924
4964
  }
4925
- function B(e, ...n) {
4926
- let r = dr[e] ?? "Unknown error";
4927
- throw n && n.forEach((l, a) => r = t(r, `{${a}}`, l.toString())), new Pe(r, e);
4965
+ function W(e, ...n) {
4966
+ let r = or[e] ?? "Unknown error";
4967
+ throw n && n.forEach((l, a) => r = t(r, `{${a}}`, l.toString())), new Re(r, e);
4928
4968
  function t(l, a, s) {
4929
4969
  do
4930
4970
  l = l.replace(a, s);
@@ -4932,44 +4972,44 @@ function B(e, ...n) {
4932
4972
  return l;
4933
4973
  }
4934
4974
  }
4935
- function C(e) {
4975
+ function ee(e) {
4936
4976
  return e.type;
4937
4977
  }
4938
- function Ie(e, n) {
4978
+ function we(e, n) {
4939
4979
  return e ? Array.isArray(e) ? typeof e == "string" ? [e, n] : (e.push(n), e) : [e, n] : n;
4940
4980
  }
4941
- function on(e) {
4981
+ function rn(e) {
4942
4982
  const n = {
4943
- kind: u.TagNameNode,
4944
- children: [{ kind: u.Identifier, text: "Fragment" }]
4983
+ kind: c.TagNameNode,
4984
+ children: [{ kind: c.Identifier, text: "Fragment" }]
4945
4985
  };
4946
4986
  return {
4947
- kind: u.ElementNode,
4987
+ kind: c.ElementNode,
4948
4988
  start: e[0].start,
4949
4989
  pos: e[0].pos,
4950
4990
  end: e[e.length - 1].end,
4951
4991
  children: [
4952
- { kind: u.OpenNodeStart },
4992
+ { kind: c.OpenNodeStart },
4953
4993
  n,
4954
- { kind: u.NodeEnd },
4955
- { kind: u.ContentListNode, children: e },
4956
- { kind: u.CloseNodeStart },
4994
+ { kind: c.NodeEnd },
4995
+ { kind: c.ContentListNode, children: e },
4996
+ { kind: c.CloseNodeStart },
4957
4997
  n,
4958
- { kind: u.NodeEnd }
4998
+ { kind: c.NodeEnd }
4959
4999
  ]
4960
5000
  };
4961
5001
  }
4962
- function ke(e) {
5002
+ function de(e) {
4963
5003
  var n, r;
4964
- return ((r = (n = e.children) == null ? void 0 : n.find((t) => t.kind === u.AttributeListNode)) == null ? void 0 : r.children) ?? [];
5004
+ return ((r = (n = e.children) == null ? void 0 : n.find((t) => t.kind === c.AttributeListNode)) == null ? void 0 : r.children) ?? [];
4965
5005
  }
4966
- function ge(e) {
5006
+ function ke(e) {
4967
5007
  var n, r;
4968
- return ((r = (n = e.children) == null ? void 0 : n.find((t) => t.kind === u.ContentListNode)) == null ? void 0 : r.children) ?? [];
5008
+ return ((r = (n = e.children) == null ? void 0 : n.find((t) => t.kind === c.ContentListNode)) == null ? void 0 : r.children) ?? [];
4969
5009
  }
4970
- function cn(e, n) {
5010
+ function tn(e, n) {
4971
5011
  var t;
4972
- const r = (t = e.children) == null ? void 0 : t.findIndex((l) => l.kind === u.ContentListNode);
5012
+ const r = (t = e.children) == null ? void 0 : t.findIndex((l) => l.kind === c.ContentListNode);
4973
5013
  return r === void 0 || r === -1 ? e : {
4974
5014
  ...e,
4975
5015
  children: [
@@ -4979,150 +5019,142 @@ function cn(e, n) {
4979
5019
  ]
4980
5020
  };
4981
5021
  }
4982
- function Nr(e) {
5022
+ function Er(e) {
4983
5023
  var n;
4984
5024
  for (let r of e)
4985
5025
  if (((n = r.children) == null ? void 0 : n.length) === 1) {
4986
5026
  const t = {
4987
- kind: u.Equal
5027
+ kind: c.Equal
4988
5028
  }, l = {
4989
- kind: u.StringLiteral,
5029
+ kind: c.StringLiteral,
4990
5030
  text: '"true"'
4991
5031
  };
4992
5032
  r.children.push(t, l);
4993
5033
  }
4994
5034
  }
4995
- function un(e, n, r, t) {
5035
+ function ln(e, n, r, t) {
4996
5036
  let l = t.split(":");
4997
5037
  if (l.length > 2)
4998
- return B("T028", t, "Namespace cannot contain multiple ':' (colon).");
5038
+ return W("T028", t, "Namespace cannot contain multiple ':' (colon).");
4999
5039
  let a = t;
5000
5040
  if (l.length === 2) {
5001
- if (l[0] != $e)
5002
- return B("T029", t, $e);
5041
+ if (l[0] != Pe)
5042
+ return W("T029", t, Pe);
5003
5043
  a = l[1];
5004
5044
  }
5005
5045
  if (a.includes("#"))
5006
- return B("T028", a, "Namespace cannot contain character '#'.");
5046
+ return W("T028", a, "Namespace cannot contain character '#'.");
5007
5047
  switch (a) {
5008
- case $e:
5048
+ case Pe:
5009
5049
  a = r;
5010
5050
  break;
5011
- case gr:
5012
- a = Er;
5051
+ case fr:
5052
+ a = hr;
5013
5053
  break;
5014
- case mr:
5015
- a = xr;
5054
+ case pr:
5055
+ a = dr;
5016
5056
  break;
5017
5057
  }
5018
5058
  const s = e[e.length - 1];
5019
5059
  if (s.has(r))
5020
- return B("T025", r);
5060
+ return W("T025", r);
5021
5061
  s.set(r, a), n.namespaces ?? (n.namespaces = {}), n.namespaces[r] = a;
5022
5062
  }
5023
- function Ar(e, n) {
5024
- e.children.length !== 2 && B("T001");
5063
+ function mr(e, n) {
5064
+ e.children.length !== 2 && W("T001");
5025
5065
  const r = e.children[0];
5026
- return r.kind !== u.ElementNode && B("T001"), r;
5066
+ return r.kind !== c.ElementNode && W("T001"), r;
5027
5067
  }
5028
- function te(e, n) {
5029
- const r = e.children.find((l) => l.kind === u.TagNameNode).children;
5068
+ function le(e, n) {
5069
+ const r = e.children.find((l) => l.kind === c.TagNameNode).children;
5030
5070
  return n(r.at(-1));
5031
5071
  }
5032
- function fn(e, n, r) {
5033
- const t = e.children.find((o) => o.kind === u.TagNameNode).children, l = n(t.at(-1));
5072
+ function sn(e, n, r) {
5073
+ const t = e.children.find((o) => o.kind === c.TagNameNode).children, l = n(t.at(-1));
5034
5074
  if (t.length === 1)
5035
5075
  return l;
5036
5076
  const a = n(t[0]);
5037
- r.length === 0 && B("T026");
5077
+ r.length === 0 && W("T026");
5038
5078
  let s;
5039
5079
  for (let o = r.length - 1; o >= 0 && (s = r[o].get(a), s === void 0); --o)
5040
5080
  ;
5041
- return s === void 0 && B("T027", a), s + "." + l;
5081
+ return s === void 0 && W("T027", a), s + "." + l;
5042
5082
  }
5043
- function Rr(e) {
5083
+ function wr(e) {
5044
5084
  return e[2].toLowerCase() + e.substring(3);
5045
5085
  }
5046
5086
  export {
5047
- En as $,
5048
- Dr as A,
5049
- Rr as B,
5050
- d as C,
5051
- _e as D,
5052
- de as E,
5053
- lr as F,
5054
- sr as G,
5055
- Or as H,
5056
- Ge as I,
5057
- On as J,
5058
- M as K,
5059
- Rn as L,
5060
- We as M,
5061
- Be as N,
5062
- ve as O,
5063
- Pe as P,
5064
- Ee as Q,
5065
- Ln as R,
5066
- u as S,
5067
- In as T,
5068
- qe as U,
5069
- An as V,
5070
- Nn as W,
5071
- Ne as X,
5072
- me as Y,
5073
- Sn as Z,
5074
- hn as _,
5075
- ye as a,
5076
- mn as a0,
5077
- _n as a1,
5078
- xn as a2,
5079
- gn as a3,
5080
- kn as a4,
5081
- pn as a5,
5082
- dn as a6,
5083
- Fn as a7,
5084
- be as a8,
5085
- Qe as a9,
5086
- Dn as aa,
5087
- Z as ab,
5088
- ue as ac,
5089
- vn as ad,
5090
- Bn as ae,
5091
- Tn as af,
5092
- Q as ag,
5093
- wn as ah,
5094
- ce as ai,
5095
- oe as aj,
5096
- ae as ak,
5097
- bn as al,
5098
- Xe as am,
5099
- De as an,
5100
- Me as ao,
5101
- hr as ap,
5102
- br as aq,
5103
- Xn as b,
5104
- Gn as c,
5105
- wr as d,
5106
- zn as e,
5107
- Qn as f,
5108
- Hn as g,
5109
- Yn as h,
5110
- Ue as i,
5111
- Zn as j,
5112
- Tr as k,
5113
- Jn as l,
5114
- Fe as m,
5115
- nn as n,
5116
- vr as o,
5117
- Ir as p,
5118
- cr as q,
5087
+ Wn as $,
5088
+ vn as A,
5089
+ be as B,
5090
+ p as C,
5091
+ Dn as D,
5092
+ Fe as E,
5093
+ Ie as F,
5094
+ Le as G,
5095
+ ge as H,
5096
+ xn as I,
5097
+ mn as J,
5098
+ En as K,
5099
+ Ne as L,
5100
+ Ee as M,
5101
+ gn as N,
5102
+ an as O,
5103
+ Re as P,
5104
+ hn as Q,
5105
+ pn as R,
5106
+ c as S,
5107
+ Ln as T,
5108
+ We as U,
5109
+ kn as V,
5110
+ dn as W,
5111
+ fn as X,
5112
+ un as Y,
5113
+ cn as Z,
5114
+ on as _,
5115
+ q as a,
5116
+ Te as a0,
5117
+ qe as a1,
5118
+ Tn as a2,
5119
+ C as a3,
5120
+ fe as a4,
5121
+ _n as a5,
5122
+ On as a6,
5123
+ Sn as a7,
5124
+ Y as a8,
5125
+ Nn as a9,
5126
+ ue as aa,
5127
+ ce as ab,
5128
+ oe as ac,
5129
+ wn as ad,
5130
+ ye as ae,
5131
+ ve as af,
5132
+ Be as ag,
5133
+ ar as ah,
5134
+ Ar as ai,
5135
+ De as b,
5136
+ Fn as c,
5137
+ Nr as d,
5138
+ Mn as e,
5139
+ qn as f,
5140
+ $n as g,
5141
+ _r as h,
5142
+ or as i,
5143
+ Qn as j,
5144
+ Zn as k,
5145
+ Xn as l,
5146
+ Gn as m,
5147
+ Me as n,
5148
+ Ve as o,
5149
+ ir as p,
5150
+ en as q,
5119
5151
  dr as r,
5120
- Vn as s,
5121
- rr as t,
5122
- Kn as u,
5123
- Cn as v,
5124
- ze as w,
5125
- ln as x,
5126
- sn as y,
5127
- xr as z
5152
+ Lr as s,
5153
+ wr as t,
5154
+ Cn as u,
5155
+ jn as v,
5156
+ Sr as w,
5157
+ Ue as x,
5158
+ An as y,
5159
+ $ as z
5128
5160
  };