@collabchron/notiq 0.3.0 → 1.0.0

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 (282) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +230 -39
  3. package/dist/CodeActionMenuPlugin-EINOY4U4.mjs +15 -0
  4. package/dist/DynamicBlockComponent-NRQJ4WW4.mjs +161 -0
  5. package/dist/EquationComponent-CB6DFIHV.mjs +154 -0
  6. package/dist/ExcalidrawComponent-XW6646OH.mjs +528 -0
  7. package/dist/ExcalidrawPlugin-ZFHT62IF.mjs +14 -0
  8. package/dist/ExportPlugin-V2RLM63S.mjs +11 -0
  9. package/dist/FloatingLinkEditorPlugin-TRTCMSP4.mjs +12 -0
  10. package/dist/FloatingTextFormatToolbarPlugin-F2GY6LMI.mjs +30 -0
  11. package/dist/HintComponet-BRL6EAMS.mjs +217 -0
  12. package/dist/InlineImageComponent-UWIUWBHI.mjs +453 -0
  13. package/dist/MobileToolbar-BOOZAMQE.mjs +268 -0
  14. package/dist/SlashCommand-GMT5JI33.mjs +28 -0
  15. package/dist/StoryBuilderComponent-JGDBM5JU.mjs +562 -0
  16. package/{src/components/editor/plugins/TableCellActionMenuPlugin/index.tsx → dist/TableCellActionMenuPlugin-PGK2K3VG.mjs} +667 -759
  17. package/{src/components/editor/plugins/TableHoverActionsPlugin/index.tsx → dist/TableHoverActionsPlugin-GJVE6VRW.mjs} +258 -314
  18. package/dist/TemplatePlugin-ZD3QEVTI.mjs +9 -0
  19. package/dist/ToolbarPlugin-7TOZRD2R.mjs +1547 -0
  20. package/dist/babel-JZ2EV6AX.mjs +7233 -0
  21. package/dist/background-color-XZTYLGO2.mjs +362 -0
  22. package/dist/block-format-YJCV2DIY.mjs +15 -0
  23. package/dist/chunk-2FNEAMSP.mjs +127 -0
  24. package/dist/chunk-3CPBODXA.mjs +84 -0
  25. package/dist/chunk-3G37YKTV.mjs +83 -0
  26. package/dist/chunk-3JVFG7ER.mjs +184 -0
  27. package/dist/chunk-456TN7IM.mjs +110 -0
  28. package/dist/chunk-4EXYCTGJ.mjs +27 -0
  29. package/{src/utils/getSelectedNode.ts → dist/chunk-4HBCVSE6.mjs} +26 -27
  30. package/dist/chunk-4MEDW3T6.mjs +125 -0
  31. package/dist/chunk-4VWFVWYP.mjs +36 -0
  32. package/dist/chunk-5BAKY5KN.mjs +84 -0
  33. package/dist/chunk-5QSNIVIG.mjs +333 -0
  34. package/dist/chunk-64Z3FI7T.mjs +37 -0
  35. package/{src/components/editor/nodes/Stepper/index.tsx → dist/chunk-6RNZQOH2.mjs} +214 -260
  36. package/dist/chunk-77KXU36M.mjs +64 -0
  37. package/dist/chunk-77UA6HYR.mjs +165 -0
  38. package/dist/chunk-7NZAPJ4G.mjs +102 -0
  39. package/dist/chunk-7VUMHWWL.mjs +152 -0
  40. package/dist/chunk-AMMKBSST.mjs +1256 -0
  41. package/dist/chunk-BIU7WTLX.mjs +95 -0
  42. package/dist/chunk-EGMI62PP.mjs +83 -0
  43. package/dist/chunk-EHNQD5KO.mjs +88 -0
  44. package/dist/chunk-FSM26655.mjs +37 -0
  45. package/{src/components/editor/nodes/Hint/index.tsx → dist/chunk-G53GLEAY.mjs} +158 -190
  46. package/dist/chunk-GK35L7UY.mjs +28 -0
  47. package/dist/chunk-GXYD4VZM.mjs +193 -0
  48. package/dist/chunk-GYIOYVCN.mjs +538 -0
  49. package/dist/chunk-GZPNVR7L.mjs +157 -0
  50. package/dist/chunk-JXDPPUJI.mjs +52 -0
  51. package/dist/chunk-K36V4SIW.mjs +141 -0
  52. package/dist/chunk-KJ6AJ44Q.mjs +128 -0
  53. package/dist/chunk-KJV3FAZ7.mjs +142 -0
  54. package/{src/components/editor/plugins/ImagesPlugin/index.tsx → dist/chunk-LGG4IUIA.mjs} +189 -222
  55. package/dist/chunk-LQN3CMKV.mjs +1906 -0
  56. package/dist/chunk-N3WN46VL.mjs +236 -0
  57. package/dist/chunk-PBD6LMLC.mjs +366 -0
  58. package/dist/chunk-POGRR73N.mjs +33 -0
  59. package/{src/components/editor/utils/editorFormatting.ts → dist/chunk-PZSUSXQG.mjs} +238 -282
  60. package/dist/chunk-QEIFVK5M.mjs +29 -0
  61. package/dist/chunk-QHIQKMVN.mjs +427 -0
  62. package/dist/chunk-TCYK7DM7.mjs +36 -0
  63. package/dist/chunk-TTHQCW5F.mjs +47 -0
  64. package/dist/chunk-U47ABU5Z.mjs +53 -0
  65. package/dist/chunk-WDG7J2DY.mjs +116 -0
  66. package/dist/chunk-WJRHXI2C.mjs +733 -0
  67. package/dist/chunk-XLER2DHM.mjs +357 -0
  68. package/dist/chunk-XWC4TK2N.mjs +315 -0
  69. package/dist/chunk-YHPNOWFH.mjs +15 -0
  70. package/dist/chunk-YKC3SO4Z.mjs +32 -0
  71. package/dist/chunk-YMBXLRW5.mjs +374 -0
  72. package/dist/chunk-YPHOEJ46.mjs +64 -0
  73. package/dist/chunk-YUDCJRJM.mjs +25 -0
  74. package/dist/chunk-Z4EWP7BI.mjs +65 -0
  75. package/dist/chunk-ZB5LZQKC.mjs +191 -0
  76. package/dist/chunk-ZJRKATOJ.mjs +65 -0
  77. package/dist/color-BPKOPQKN.mjs +12 -0
  78. package/dist/estree-XC56IUFX.mjs +4414 -0
  79. package/dist/font-FEZ3GKSF.mjs +13 -0
  80. package/dist/font-size-EK775WRH.mjs +15 -0
  81. package/dist/html-S3ACX7NI.mjs +2738 -0
  82. package/dist/image-2PJIAYAT.mjs +993 -0
  83. package/dist/index.d.mts +145 -0
  84. package/dist/index.d.ts +145 -0
  85. package/dist/index.js +57855 -0
  86. package/dist/index.mjs +1790 -0
  87. package/dist/insert-gif-SAIDYURE.mjs +100 -0
  88. package/dist/insert-image-U3RJN3OW.mjs +259 -0
  89. package/dist/insert-node-5P2CRJ7S.mjs +201 -0
  90. package/dist/insert-poll-HCPM7MO6.mjs +33 -0
  91. package/dist/insert-table-24XYUS2W.mjs +66 -0
  92. package/dist/markdown-SNVBOSRA.mjs +3487 -0
  93. package/dist/poll-component-2R4MDLHS.mjs +303 -0
  94. package/dist/postcss-ONF3VDIM.mjs +5051 -0
  95. package/dist/standalone-EOIALU3M.mjs +2373 -0
  96. package/dist/stepper-FSARL6X6.mjs +304 -0
  97. package/dist/styles/notiq.css +1149 -0
  98. package/dist/text-align-VLECWO4H.mjs +118 -0
  99. package/dist/text-format-BG5WOOPZ.mjs +16 -0
  100. package/dist/typescript-AMPI6OVS.mjs +13135 -0
  101. package/package.json +66 -11
  102. package/src/styles/notiq.css +1149 -0
  103. package/src/styles/tailwind-plugin.ts +134 -0
  104. package/components.json +0 -21
  105. package/eslint.config.mjs +0 -16
  106. package/next.config.ts +0 -12
  107. package/postcss.config.mjs +0 -5
  108. package/public/file.svg +0 -1
  109. package/public/globe.svg +0 -1
  110. package/public/images/icons/plus.svg +0 -10
  111. package/public/next.svg +0 -1
  112. package/public/vercel.svg +0 -1
  113. package/public/window.svg +0 -1
  114. package/src/app/actions.ts +0 -2
  115. package/src/app/api/ai/route.ts +0 -175
  116. package/src/app/api/edgestore/[...edgestore]/route.ts +0 -28
  117. package/src/app/favicon.ico +0 -0
  118. package/src/app/globals.css +0 -205
  119. package/src/app/layout.tsx +0 -38
  120. package/src/app/page.tsx +0 -12
  121. package/src/components/editor/Core.tsx +0 -220
  122. package/src/components/editor/hooks/instructions-messages.ts +0 -300
  123. package/src/components/editor/hooks/use-mobile.ts +0 -19
  124. package/src/components/editor/hooks/useReport.ts +0 -67
  125. package/src/components/editor/hooks/useResizeObservert.ts +0 -22
  126. package/src/components/editor/index.tsx +0 -39
  127. package/src/components/editor/lexical-on-change.tsx +0 -28
  128. package/src/components/editor/nodes/CollapsibleNode/CollapsibleContainerNode.ts +0 -92
  129. package/src/components/editor/nodes/CollapsibleNode/CollapsibleContentNode.ts +0 -65
  130. package/src/components/editor/nodes/CollapsibleNode/CollapsibleTitleNode.ts +0 -105
  131. package/src/components/editor/nodes/EquationNode/EquationComponent.tsx +0 -143
  132. package/src/components/editor/nodes/EquationNode/EquationNode.tsx +0 -170
  133. package/src/components/editor/nodes/ExcalidrawNode/ExcalidrawComponent.tsx +0 -228
  134. package/src/components/editor/nodes/ExcalidrawNode/ExcalidrawImage.tsx +0 -137
  135. package/src/components/editor/nodes/ExcalidrawNode/ImageResizer.tsx +0 -317
  136. package/src/components/editor/nodes/ExcalidrawNode/index.tsx +0 -204
  137. package/src/components/editor/nodes/FigmaNode/FigmaNode.tsx +0 -134
  138. package/src/components/editor/nodes/Hint/HintComponet.tsx +0 -221
  139. package/src/components/editor/nodes/ImageNode/index.tsx +0 -328
  140. package/src/components/editor/nodes/InlineImageNode/InlineImageComponent.tsx +0 -383
  141. package/src/components/editor/nodes/InlineImageNode/InlineImageNode.css +0 -94
  142. package/src/components/editor/nodes/InlineImageNode/InlineImageNode.tsx +0 -309
  143. package/src/components/editor/nodes/LayoutNode/LayoutContainerNode.ts +0 -146
  144. package/src/components/editor/nodes/LayoutNode/LayoutItemNode.ts +0 -79
  145. package/src/components/editor/nodes/PollNode/index.tsx +0 -204
  146. package/src/components/editor/nodes/TweetNode/index.tsx +0 -214
  147. package/src/components/editor/nodes/index.ts +0 -81
  148. package/src/components/editor/plugins/AutoEmbedPlugin/index.tsx +0 -350
  149. package/src/components/editor/plugins/AutoLinkPlugin/index.tsx +0 -56
  150. package/src/components/editor/plugins/CodeActionMenuPlugin/components/CopyButton.tsx +0 -70
  151. package/src/components/editor/plugins/CodeActionMenuPlugin/components/PrettierButton.tsx +0 -192
  152. package/src/components/editor/plugins/CodeActionMenuPlugin/index.tsx +0 -217
  153. package/src/components/editor/plugins/CodeActionMenuPlugin/utils.ts +0 -26
  154. package/src/components/editor/plugins/CodeHighlightPlugin/index.ts +0 -21
  155. package/src/components/editor/plugins/CollapsiblePlugin/Collapsible.css +0 -76
  156. package/src/components/editor/plugins/CollapsiblePlugin/index.ts +0 -228
  157. package/src/components/editor/plugins/DragDropPastePlugin/index.tsx +0 -44
  158. package/src/components/editor/plugins/DraggableBlockPlugin/index.tsx +0 -52
  159. package/src/components/editor/plugins/EquationsPlugin/index.tsx +0 -85
  160. package/src/components/editor/plugins/ExcalidrawPlugin/index.tsx +0 -98
  161. package/src/components/editor/plugins/FigmaPlugin/index.tsx +0 -42
  162. package/src/components/editor/plugins/FloatingLinkEditorPlugin/index.tsx +0 -445
  163. package/src/components/editor/plugins/FloatingTextFormatToolbarPlugin/index.tsx +0 -275
  164. package/src/components/editor/plugins/InlineImagePlugin/index.tsx +0 -351
  165. package/src/components/editor/plugins/LayoutPlugin/index.tsx +0 -238
  166. package/src/components/editor/plugins/LinkPlugin/index.tsx +0 -36
  167. package/src/components/editor/plugins/LinkWithMetaData/index.tsx +0 -271
  168. package/src/components/editor/plugins/MarkdownShortcutPlugin/index.tsx +0 -11
  169. package/src/components/editor/plugins/MarkdownTransformers/index.tsx +0 -304
  170. package/src/components/editor/plugins/PollPlugin/index.tsx +0 -49
  171. package/src/components/editor/plugins/ShortcutsPlugin/index.tsx +0 -180
  172. package/src/components/editor/plugins/ShortcutsPlugin/shortcuts.ts +0 -253
  173. package/src/components/editor/plugins/SlashCommand/index.tsx +0 -621
  174. package/src/components/editor/plugins/SpeechToTextPlugin/index.ts +0 -127
  175. package/src/components/editor/plugins/TabFocusPlugin/index.ts +0 -58
  176. package/src/components/editor/plugins/TableCellResizer/index.tsx +0 -438
  177. package/src/components/editor/plugins/TablePlugin/index.tsx +0 -99
  178. package/src/components/editor/plugins/ToolbarPlugin/index.tsx +0 -522
  179. package/src/components/editor/plugins/TwitterPlugin/index.ts +0 -35
  180. package/src/components/editor/plugins/YouTubeNode/index.tsx +0 -179
  181. package/src/components/editor/plugins/YouTubePlugin/index.ts +0 -41
  182. package/src/components/editor/themes/editor-theme.ts +0 -113
  183. package/src/components/editor/themes/theme.css +0 -377
  184. package/src/components/editor/utils/ai.ts +0 -291
  185. package/src/components/editor/utils/canUseDOM.ts +0 -12
  186. package/src/components/editor/utils/environment.ts +0 -50
  187. package/src/components/editor/utils/extract-data.ts +0 -166
  188. package/src/components/editor/utils/getAllLexicalChildren.ts +0 -13
  189. package/src/components/editor/utils/getDOMRangeRect.ts +0 -27
  190. package/src/components/editor/utils/getSelectedNode.ts +0 -27
  191. package/src/components/editor/utils/gif.ts +0 -29
  192. package/src/components/editor/utils/invariant.ts +0 -15
  193. package/src/components/editor/utils/setFloatingElemPosition.ts +0 -51
  194. package/src/components/editor/utils/setFloatingElemPositionForLinkEditor.ts +0 -40
  195. package/src/components/editor/utils/setNodePlaceholderFromSelection/getNodePlaceholder.ts +0 -51
  196. package/src/components/editor/utils/setNodePlaceholderFromSelection/setNodePlaceholderFromSelection.ts +0 -15
  197. package/src/components/editor/utils/setNodePlaceholderFromSelection/setPlaceholderOnSelection.ts +0 -114
  198. package/src/components/editor/utils/setNodePlaceholderFromSelection/styles.css +0 -6
  199. package/src/components/editor/utils/url.ts +0 -109
  200. package/src/components/editor/utils/useLayoutEffect.ts +0 -13
  201. package/src/components/providers/QueryProvider.tsx +0 -15
  202. package/src/components/providers/SharedHistoryContext.tsx +0 -28
  203. package/src/components/providers/ToolbarContext.tsx +0 -123
  204. package/src/components/providers/theme-provider.tsx +0 -11
  205. package/src/components/theme/ModeToggle.tsx +0 -40
  206. package/src/components/ui/FileInput.tsx +0 -40
  207. package/src/components/ui/Input.css +0 -32
  208. package/src/components/ui/Select.css +0 -42
  209. package/src/components/ui/Select.tsx +0 -36
  210. package/src/components/ui/TextInput.tsx +0 -48
  211. package/src/components/ui/ai/ai-button.tsx +0 -574
  212. package/src/components/ui/ai/border.tsx +0 -99
  213. package/src/components/ui/ai/placeholder-input-vanish.tsx +0 -282
  214. package/src/components/ui/button.tsx +0 -89
  215. package/src/components/ui/card.tsx +0 -76
  216. package/src/components/ui/checkbox.tsx +0 -30
  217. package/src/components/ui/command.tsx +0 -153
  218. package/src/components/ui/dialog/Dialog.css +0 -25
  219. package/src/components/ui/dialog/Dialog.tsx +0 -34
  220. package/src/components/ui/dialog.tsx +0 -122
  221. package/src/components/ui/drop-downs/background-color.tsx +0 -183
  222. package/src/components/ui/drop-downs/block-format.tsx +0 -159
  223. package/src/components/ui/drop-downs/code.tsx +0 -42
  224. package/src/components/ui/drop-downs/color.tsx +0 -177
  225. package/src/components/ui/drop-downs/font-size.tsx +0 -138
  226. package/src/components/ui/drop-downs/font.tsx +0 -155
  227. package/src/components/ui/drop-downs/index.tsx +0 -122
  228. package/src/components/ui/drop-downs/insert-node.tsx +0 -213
  229. package/src/components/ui/drop-downs/text-align.tsx +0 -123
  230. package/src/components/ui/drop-downs/text-format.tsx +0 -104
  231. package/src/components/ui/dropdown-menu.tsx +0 -201
  232. package/src/components/ui/equation/EquationEditor.css +0 -38
  233. package/src/components/ui/equation/EquationEditor.tsx +0 -56
  234. package/src/components/ui/equation/KatexEquationAlterer.css +0 -41
  235. package/src/components/ui/equation/KatexEquationAlterer.tsx +0 -83
  236. package/src/components/ui/equation/KatexRenderer.tsx +0 -66
  237. package/src/components/ui/excalidraw/ExcalidrawModal.css +0 -64
  238. package/src/components/ui/excalidraw/ExcalidrawModal.tsx +0 -234
  239. package/src/components/ui/excalidraw/Modal.css +0 -62
  240. package/src/components/ui/excalidraw/Modal.tsx +0 -110
  241. package/src/components/ui/hover-card.tsx +0 -29
  242. package/src/components/ui/image/error-image.tsx +0 -17
  243. package/src/components/ui/image/file-upload.tsx +0 -240
  244. package/src/components/ui/image/image-resizer.tsx +0 -297
  245. package/src/components/ui/image/image-toolbar.tsx +0 -264
  246. package/src/components/ui/image/index.tsx +0 -408
  247. package/src/components/ui/image/lazy-image.tsx +0 -68
  248. package/src/components/ui/image/lazy-video.tsx +0 -71
  249. package/src/components/ui/input.tsx +0 -22
  250. package/src/components/ui/models/custom-dialog.tsx +0 -320
  251. package/src/components/ui/models/insert-gif.tsx +0 -90
  252. package/src/components/ui/models/insert-image.tsx +0 -52
  253. package/src/components/ui/models/insert-poll.tsx +0 -29
  254. package/src/components/ui/models/insert-table.tsx +0 -62
  255. package/src/components/ui/models/use-model.tsx +0 -91
  256. package/src/components/ui/poll/poll-component.tsx +0 -304
  257. package/src/components/ui/popover.tsx +0 -33
  258. package/src/components/ui/progress.tsx +0 -28
  259. package/src/components/ui/scroll-area.tsx +0 -48
  260. package/src/components/ui/separator.tsx +0 -31
  261. package/src/components/ui/skeleton.tsx +0 -15
  262. package/src/components/ui/sonner.tsx +0 -31
  263. package/src/components/ui/stepper/step.tsx +0 -179
  264. package/src/components/ui/stepper/stepper.tsx +0 -89
  265. package/src/components/ui/textarea.tsx +0 -22
  266. package/src/components/ui/toggle.tsx +0 -71
  267. package/src/components/ui/tooltip.tsx +0 -32
  268. package/src/components/ui/write/text-format-floting-toolbar.tsx +0 -346
  269. package/src/lib/edgestore.ts +0 -9
  270. package/src/lib/pinecone-client.ts +0 -0
  271. package/src/lib/utils.ts +0 -6
  272. package/src/utils/docSerialization.ts +0 -77
  273. package/src/utils/emoji-list.ts +0 -16615
  274. package/src/utils/getDOMRangeRect.ts +0 -27
  275. package/src/utils/getThemeSelector.ts +0 -25
  276. package/src/utils/isMobileWidth.ts +0 -7
  277. package/src/utils/joinClasses.ts +0 -13
  278. package/src/utils/setFloatingElemPosition.ts +0 -74
  279. package/src/utils/setFloatingElemPositionForLinkEditor.ts +0 -46
  280. package/src/utils/swipe.ts +0 -127
  281. package/src/utils/url.ts +0 -38
  282. package/tsconfig.json +0 -27
@@ -0,0 +1,4414 @@
1
+ import {
2
+ __publicField,
3
+ __spreadProps,
4
+ __spreadValues,
5
+ init_react_shim
6
+ } from "./chunk-77KXU36M.mjs";
7
+
8
+ // node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/plugins/estree.mjs
9
+ init_react_shim();
10
+ var za = Object.defineProperty;
11
+ var Us = (e) => {
12
+ throw TypeError(e);
13
+ };
14
+ var xr = (e, t) => {
15
+ for (var r in t) za(e, r, { get: t[r], enumerable: true });
16
+ };
17
+ var Xs = (e, t, r) => t.has(e) || Us("Cannot " + r);
18
+ var mt = (e, t, r) => (Xs(e, t, "read from private field"), r ? r.call(e) : t.get(e));
19
+ var Ys = (e, t, r) => t.has(e) ? Us("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r);
20
+ var Hs = (e, t, r, n) => (Xs(e, t, "write to private field"), n ? n.call(e, r) : t.set(e, r), r);
21
+ var Rs = {};
22
+ xr(Rs, { languages: () => Tm, options: () => Ha, printers: () => dm });
23
+ var Vs = [{ name: "JavaScript", type: "programming", extensions: [".js", "._js", ".bones", ".cjs", ".es", ".es6", ".gs", ".jake", ".javascript", ".jsb", ".jscad", ".jsfl", ".jslib", ".jsm", ".jspre", ".jss", ".mjs", ".njs", ".pac", ".sjs", ".ssjs", ".xsjs", ".xsjslib", ".start.frag", ".end.frag", ".wxs"], tmScope: "source.js", aceMode: "javascript", aliases: ["js", "node"], codemirrorMode: "javascript", codemirrorMimeType: "text/javascript", interpreters: ["chakra", "d8", "gjs", "js", "node", "nodejs", "qjs", "rhino", "v8", "v8-shell", "zx"], filenames: ["Jakefile", "start.frag", "end.frag"], parsers: ["babel", "acorn", "espree", "meriyah", "babel-flow", "babel-ts", "flow", "typescript"], vscodeLanguageIds: ["javascript", "mongo"], linguistLanguageId: 183 }, { name: "Flow", type: "programming", extensions: [".js.flow"], tmScope: "source.js", aceMode: "javascript", aliases: [], codemirrorMode: "javascript", codemirrorMimeType: "text/javascript", interpreters: ["chakra", "d8", "gjs", "js", "node", "nodejs", "qjs", "rhino", "v8", "v8-shell"], filenames: [], parsers: ["flow", "babel-flow"], vscodeLanguageIds: ["javascript"], linguistLanguageId: 183 }, { name: "JSX", type: "programming", extensions: [".jsx"], tmScope: "source.js.jsx", aceMode: "javascript", aliases: void 0, codemirrorMode: "jsx", codemirrorMimeType: "text/jsx", interpreters: void 0, filenames: void 0, parsers: ["babel", "babel-flow", "babel-ts", "flow", "typescript", "espree", "meriyah"], vscodeLanguageIds: ["javascriptreact"], group: "JavaScript", linguistLanguageId: 183 }, { name: "TypeScript", type: "programming", extensions: [".ts", ".cts", ".mts"], tmScope: "source.ts", aceMode: "typescript", aliases: ["ts"], codemirrorMode: "javascript", codemirrorMimeType: "application/typescript", interpreters: ["bun", "deno", "ts-node", "tsx"], parsers: ["typescript", "babel-ts"], vscodeLanguageIds: ["typescript"], linguistLanguageId: 378 }, { name: "TSX", type: "programming", extensions: [".tsx"], tmScope: "source.tsx", aceMode: "javascript", codemirrorMode: "jsx", codemirrorMimeType: "text/jsx", group: "TypeScript", parsers: ["typescript", "babel-ts"], vscodeLanguageIds: ["typescriptreact"], linguistLanguageId: 94901924 }];
24
+ var vs = {};
25
+ xr(vs, { canAttachComment: () => kp, embed: () => oi, experimentalFeatures: () => fm, getCommentChildNodes: () => Ip, getVisitorKeys: () => br, handleComments: () => ts, insertPragma: () => di, isBlockComment: () => te, isGap: () => Lp, massageAstNode: () => Bu, print: () => Ga, printComment: () => ju, willPrintOwnComments: () => rs });
26
+ var Za = (e, t, r, n) => {
27
+ if (!(e && t == null)) return t.replaceAll ? t.replaceAll(r, n) : r.global ? t.replace(r, n) : t.split(r).join(n);
28
+ };
29
+ var X = Za;
30
+ var eo = (e, t, r) => {
31
+ if (!(e && t == null)) return Array.isArray(t) || typeof t == "string" ? t[r < 0 ? t.length + r : r] : t.at(r);
32
+ };
33
+ var v = eo;
34
+ function to(e) {
35
+ return e !== null && typeof e == "object";
36
+ }
37
+ var $s = to;
38
+ function* ro(e, t) {
39
+ let { getVisitorKeys: r, filter: n = () => true } = t, s = (u) => $s(u) && n(u);
40
+ for (let u of r(e)) {
41
+ let i = e[u];
42
+ if (Array.isArray(i)) for (let a of i) s(a) && (yield a);
43
+ else s(i) && (yield i);
44
+ }
45
+ }
46
+ function* no(e, t) {
47
+ let r = [e];
48
+ for (let n = 0; n < r.length; n++) {
49
+ let s = r[n];
50
+ for (let u of ro(s, t)) yield u, r.push(u);
51
+ }
52
+ }
53
+ function Ks(e, { getVisitorKeys: t, predicate: r }) {
54
+ for (let n of no(e, { getVisitorKeys: t })) if (r(n)) return true;
55
+ return false;
56
+ }
57
+ var Qs = () => /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
58
+ function zs(e) {
59
+ return e === 12288 || e >= 65281 && e <= 65376 || e >= 65504 && e <= 65510;
60
+ }
61
+ function Zs(e) {
62
+ return e >= 4352 && e <= 4447 || e === 8986 || e === 8987 || e === 9001 || e === 9002 || e >= 9193 && e <= 9196 || e === 9200 || e === 9203 || e === 9725 || e === 9726 || e === 9748 || e === 9749 || e >= 9776 && e <= 9783 || e >= 9800 && e <= 9811 || e === 9855 || e >= 9866 && e <= 9871 || e === 9875 || e === 9889 || e === 9898 || e === 9899 || e === 9917 || e === 9918 || e === 9924 || e === 9925 || e === 9934 || e === 9940 || e === 9962 || e === 9970 || e === 9971 || e === 9973 || e === 9978 || e === 9981 || e === 9989 || e === 9994 || e === 9995 || e === 10024 || e === 10060 || e === 10062 || e >= 10067 && e <= 10069 || e === 10071 || e >= 10133 && e <= 10135 || e === 10160 || e === 10175 || e === 11035 || e === 11036 || e === 11088 || e === 11093 || e >= 11904 && e <= 11929 || e >= 11931 && e <= 12019 || e >= 12032 && e <= 12245 || e >= 12272 && e <= 12287 || e >= 12289 && e <= 12350 || e >= 12353 && e <= 12438 || e >= 12441 && e <= 12543 || e >= 12549 && e <= 12591 || e >= 12593 && e <= 12686 || e >= 12688 && e <= 12773 || e >= 12783 && e <= 12830 || e >= 12832 && e <= 12871 || e >= 12880 && e <= 42124 || e >= 42128 && e <= 42182 || e >= 43360 && e <= 43388 || e >= 44032 && e <= 55203 || e >= 63744 && e <= 64255 || e >= 65040 && e <= 65049 || e >= 65072 && e <= 65106 || e >= 65108 && e <= 65126 || e >= 65128 && e <= 65131 || e >= 94176 && e <= 94180 || e === 94192 || e === 94193 || e >= 94208 && e <= 100343 || e >= 100352 && e <= 101589 || e >= 101631 && e <= 101640 || e >= 110576 && e <= 110579 || e >= 110581 && e <= 110587 || e === 110589 || e === 110590 || e >= 110592 && e <= 110882 || e === 110898 || e >= 110928 && e <= 110930 || e === 110933 || e >= 110948 && e <= 110951 || e >= 110960 && e <= 111355 || e >= 119552 && e <= 119638 || e >= 119648 && e <= 119670 || e === 126980 || e === 127183 || e === 127374 || e >= 127377 && e <= 127386 || e >= 127488 && e <= 127490 || e >= 127504 && e <= 127547 || e >= 127552 && e <= 127560 || e === 127568 || e === 127569 || e >= 127584 && e <= 127589 || e >= 127744 && e <= 127776 || e >= 127789 && e <= 127797 || e >= 127799 && e <= 127868 || e >= 127870 && e <= 127891 || e >= 127904 && e <= 127946 || e >= 127951 && e <= 127955 || e >= 127968 && e <= 127984 || e === 127988 || e >= 127992 && e <= 128062 || e === 128064 || e >= 128066 && e <= 128252 || e >= 128255 && e <= 128317 || e >= 128331 && e <= 128334 || e >= 128336 && e <= 128359 || e === 128378 || e === 128405 || e === 128406 || e === 128420 || e >= 128507 && e <= 128591 || e >= 128640 && e <= 128709 || e === 128716 || e >= 128720 && e <= 128722 || e >= 128725 && e <= 128727 || e >= 128732 && e <= 128735 || e === 128747 || e === 128748 || e >= 128756 && e <= 128764 || e >= 128992 && e <= 129003 || e === 129008 || e >= 129292 && e <= 129338 || e >= 129340 && e <= 129349 || e >= 129351 && e <= 129535 || e >= 129648 && e <= 129660 || e >= 129664 && e <= 129673 || e >= 129679 && e <= 129734 || e >= 129742 && e <= 129756 || e >= 129759 && e <= 129769 || e >= 129776 && e <= 129784 || e >= 131072 && e <= 196605 || e >= 196608 && e <= 262141;
63
+ }
64
+ var eu = (e) => !(zs(e) || Zs(e));
65
+ var so = /[^\x20-\x7F]/u;
66
+ function uo(e) {
67
+ if (!e) return 0;
68
+ if (!so.test(e)) return e.length;
69
+ e = e.replace(Qs(), " ");
70
+ let t = 0;
71
+ for (let r of e) {
72
+ let n = r.codePointAt(0);
73
+ n <= 31 || n >= 127 && n <= 159 || n >= 768 && n <= 879 || (t += eu(n) ? 1 : 2);
74
+ }
75
+ return t;
76
+ }
77
+ var st = uo;
78
+ function hr(e) {
79
+ return (t, r, n) => {
80
+ let s = !!(n != null && n.backwards);
81
+ if (r === false) return false;
82
+ let { length: u } = t, i = r;
83
+ for (; i >= 0 && i < u; ) {
84
+ let a = t.charAt(i);
85
+ if (e instanceof RegExp) {
86
+ if (!e.test(a)) return i;
87
+ } else if (!e.includes(a)) return i;
88
+ s ? i-- : i++;
89
+ }
90
+ return i === -1 || i === u ? i : false;
91
+ };
92
+ }
93
+ var Jm = hr(/\s/u);
94
+ var Ye = hr(" ");
95
+ var tu = hr(",; ");
96
+ var ru = hr(/[^\n\r]/u);
97
+ function io(e, t, r) {
98
+ let n = !!(r != null && r.backwards);
99
+ if (t === false) return false;
100
+ let s = e.charAt(t);
101
+ if (n) {
102
+ if (e.charAt(t - 1) === "\r" && s === `
103
+ `) return t - 2;
104
+ if (s === `
105
+ ` || s === "\r" || s === "\u2028" || s === "\u2029") return t - 1;
106
+ } else {
107
+ if (s === "\r" && e.charAt(t + 1) === `
108
+ `) return t + 2;
109
+ if (s === `
110
+ ` || s === "\r" || s === "\u2028" || s === "\u2029") return t + 1;
111
+ }
112
+ return t;
113
+ }
114
+ var He = io;
115
+ function ao(e, t, r = {}) {
116
+ let n = Ye(e, r.backwards ? t - 1 : t, r), s = He(e, n, r);
117
+ return n !== s;
118
+ }
119
+ var ee = ao;
120
+ function oo(e, t) {
121
+ if (t === false) return false;
122
+ if (e.charAt(t) === "/" && e.charAt(t + 1) === "*") {
123
+ for (let r = t + 2; r < e.length; ++r) if (e.charAt(r) === "*" && e.charAt(r + 1) === "/") return r + 2;
124
+ }
125
+ return t;
126
+ }
127
+ var _t = oo;
128
+ function po(e, t) {
129
+ return t === false ? false : e.charAt(t) === "/" && e.charAt(t + 1) === "/" ? ru(e, t) : t;
130
+ }
131
+ var Mt = po;
132
+ function co(e, t) {
133
+ let r = null, n = t;
134
+ for (; n !== r; ) r = n, n = tu(e, n), n = _t(e, n), n = Ye(e, n);
135
+ return n = Mt(e, n), n = He(e, n), n !== false && ee(e, n);
136
+ }
137
+ var vt = co;
138
+ function lo(e) {
139
+ return Array.isArray(e) && e.length > 0;
140
+ }
141
+ var O = lo;
142
+ var nu = new Proxy(() => {
143
+ }, { get: () => nu });
144
+ var jt = nu;
145
+ var gr = "'";
146
+ var su = '"';
147
+ function mo(e, t) {
148
+ let r = t === true || t === gr ? gr : su, n = r === gr ? su : gr, s = 0, u = 0;
149
+ for (let i of e) i === r ? s++ : i === n && u++;
150
+ return s > u ? n : r;
151
+ }
152
+ var Sr = mo;
153
+ function yo(e, t, r) {
154
+ let n = t === '"' ? "'" : '"', u = X(false, e, new RegExp(`\\\\(.)|(["'])`, "gsu"), (i, a, o) => a === n ? a : o === t ? "\\" + o : o || (r && /^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(a) ? a : "\\" + a));
155
+ return t + u + t;
156
+ }
157
+ var uu = yo;
158
+ function fo(e, t) {
159
+ jt.ok(new RegExp(`^(?<quote>["']).*\\k<quote>$`, "su").test(e));
160
+ let r = e.slice(1, -1), n = t.parser === "json" || t.parser === "jsonc" || t.parser === "json5" && t.quoteProps === "preserve" && !t.singleQuote ? '"' : t.__isInHtmlAttribute ? "'" : Sr(r, t.singleQuote);
161
+ return e.charAt(0) === n ? e : uu(r, n, false);
162
+ }
163
+ var ut = fo;
164
+ var iu = (e) => Number.isInteger(e) && e >= 0;
165
+ function j(e) {
166
+ var _a2, _b;
167
+ var n, s, u;
168
+ let t = (_a2 = (n = e.range) == null ? void 0 : n[0]) != null ? _a2 : e.start, r = (u = (_b = (s = e.declaration) == null ? void 0 : s.decorators) != null ? _b : e.decorators) == null ? void 0 : u[0];
169
+ return r ? Math.min(j(r), t) : t;
170
+ }
171
+ function P(e) {
172
+ var _a2;
173
+ var r;
174
+ return (_a2 = (r = e.range) == null ? void 0 : r[1]) != null ? _a2 : e.end;
175
+ }
176
+ function Bt(e, t) {
177
+ let r = j(e);
178
+ return iu(r) && r === j(t);
179
+ }
180
+ function Do(e, t) {
181
+ let r = P(e);
182
+ return iu(r) && r === P(t);
183
+ }
184
+ function au(e, t) {
185
+ return Bt(e, t) && Do(e, t);
186
+ }
187
+ var rr = null;
188
+ function nr(e) {
189
+ if (rr !== null && typeof rr.property) {
190
+ let t = rr;
191
+ return rr = nr.prototype = null, t;
192
+ }
193
+ return rr = nr.prototype = e != null ? e : /* @__PURE__ */ Object.create(null), new nr();
194
+ }
195
+ var Eo = 10;
196
+ for (let e = 0; e <= Eo; e++) nr();
197
+ function On(e) {
198
+ return nr(e);
199
+ }
200
+ function Fo(e, t = "type") {
201
+ On(e);
202
+ function r(n) {
203
+ let s = n[t], u = e[s];
204
+ if (!Array.isArray(u)) throw Object.assign(new Error(`Missing visitor keys for '${s}'.`), { node: n });
205
+ return u;
206
+ }
207
+ return r;
208
+ }
209
+ var Br = Fo;
210
+ var ou = { ArrayExpression: ["elements"], AssignmentExpression: ["left", "right"], BinaryExpression: ["left", "right"], InterpreterDirective: [], Directive: ["value"], DirectiveLiteral: [], BlockStatement: ["directives", "body"], BreakStatement: ["label"], CallExpression: ["callee", "typeParameters", "typeArguments", "arguments"], CatchClause: ["param", "body"], ConditionalExpression: ["test", "consequent", "alternate"], ContinueStatement: ["label"], DebuggerStatement: [], DoWhileStatement: ["body", "test"], EmptyStatement: [], ExpressionStatement: ["expression"], File: ["program"], ForInStatement: ["left", "right", "body"], ForStatement: ["init", "test", "update", "body"], FunctionDeclaration: ["id", "typeParameters", "params", "predicate", "returnType", "body"], FunctionExpression: ["id", "typeParameters", "params", "returnType", "body"], Identifier: ["typeAnnotation", "decorators"], IfStatement: ["test", "consequent", "alternate"], LabeledStatement: ["label", "body"], StringLiteral: [], NumericLiteral: [], NullLiteral: [], BooleanLiteral: [], RegExpLiteral: [], LogicalExpression: ["left", "right"], MemberExpression: ["object", "property"], NewExpression: ["callee", "typeParameters", "typeArguments", "arguments"], Program: ["directives", "body"], ObjectExpression: ["properties"], ObjectMethod: ["decorators", "key", "typeParameters", "params", "returnType", "body"], ObjectProperty: ["decorators", "key", "value"], RestElement: ["argument", "typeAnnotation", "decorators"], ReturnStatement: ["argument"], SequenceExpression: ["expressions"], ParenthesizedExpression: ["expression"], SwitchCase: ["test", "consequent"], SwitchStatement: ["discriminant", "cases"], ThisExpression: [], ThrowStatement: ["argument"], TryStatement: ["block", "handler", "finalizer"], UnaryExpression: ["argument"], UpdateExpression: ["argument"], VariableDeclaration: ["declarations"], VariableDeclarator: ["id", "init"], WhileStatement: ["test", "body"], WithStatement: ["object", "body"], AssignmentPattern: ["left", "right", "decorators", "typeAnnotation"], ArrayPattern: ["elements", "typeAnnotation", "decorators"], ArrowFunctionExpression: ["typeParameters", "params", "predicate", "returnType", "body"], ClassBody: ["body"], ClassExpression: ["decorators", "id", "typeParameters", "superClass", "superTypeParameters", "mixins", "implements", "body", "superTypeArguments"], ClassDeclaration: ["decorators", "id", "typeParameters", "superClass", "superTypeParameters", "mixins", "implements", "body", "superTypeArguments"], ExportAllDeclaration: ["source", "attributes", "exported"], ExportDefaultDeclaration: ["declaration"], ExportNamedDeclaration: ["declaration", "specifiers", "source", "attributes"], ExportSpecifier: ["local", "exported"], ForOfStatement: ["left", "right", "body"], ImportDeclaration: ["specifiers", "source", "attributes"], ImportDefaultSpecifier: ["local"], ImportNamespaceSpecifier: ["local"], ImportSpecifier: ["imported", "local"], ImportExpression: ["source", "options"], MetaProperty: ["meta", "property"], ClassMethod: ["decorators", "key", "typeParameters", "params", "returnType", "body"], ObjectPattern: ["decorators", "properties", "typeAnnotation"], SpreadElement: ["argument"], Super: [], TaggedTemplateExpression: ["tag", "typeParameters", "quasi", "typeArguments"], TemplateElement: [], TemplateLiteral: ["quasis", "expressions"], YieldExpression: ["argument"], AwaitExpression: ["argument"], BigIntLiteral: [], ExportNamespaceSpecifier: ["exported"], OptionalMemberExpression: ["object", "property"], OptionalCallExpression: ["callee", "typeParameters", "typeArguments", "arguments"], ClassProperty: ["decorators", "variance", "key", "typeAnnotation", "value"], ClassAccessorProperty: ["decorators", "key", "typeAnnotation", "value"], ClassPrivateProperty: ["decorators", "variance", "key", "typeAnnotation", "value"], ClassPrivateMethod: ["decorators", "key", "typeParameters", "params", "returnType", "body"], PrivateName: ["id"], StaticBlock: ["body"], ImportAttribute: ["key", "value"], AnyTypeAnnotation: [], ArrayTypeAnnotation: ["elementType"], BooleanTypeAnnotation: [], BooleanLiteralTypeAnnotation: [], NullLiteralTypeAnnotation: [], ClassImplements: ["id", "typeParameters"], DeclareClass: ["id", "typeParameters", "extends", "mixins", "implements", "body"], DeclareFunction: ["id", "predicate"], DeclareInterface: ["id", "typeParameters", "extends", "body"], DeclareModule: ["id", "body"], DeclareModuleExports: ["typeAnnotation"], DeclareTypeAlias: ["id", "typeParameters", "right"], DeclareOpaqueType: ["id", "typeParameters", "supertype"], DeclareVariable: ["id"], DeclareExportDeclaration: ["declaration", "specifiers", "source", "attributes"], DeclareExportAllDeclaration: ["source", "attributes"], DeclaredPredicate: ["value"], ExistsTypeAnnotation: [], FunctionTypeAnnotation: ["typeParameters", "this", "params", "rest", "returnType"], FunctionTypeParam: ["name", "typeAnnotation"], GenericTypeAnnotation: ["id", "typeParameters"], InferredPredicate: [], InterfaceExtends: ["id", "typeParameters"], InterfaceDeclaration: ["id", "typeParameters", "extends", "body"], InterfaceTypeAnnotation: ["extends", "body"], IntersectionTypeAnnotation: ["types"], MixedTypeAnnotation: [], EmptyTypeAnnotation: [], NullableTypeAnnotation: ["typeAnnotation"], NumberLiteralTypeAnnotation: [], NumberTypeAnnotation: [], ObjectTypeAnnotation: ["properties", "indexers", "callProperties", "internalSlots"], ObjectTypeInternalSlot: ["id", "value"], ObjectTypeCallProperty: ["value"], ObjectTypeIndexer: ["variance", "id", "key", "value"], ObjectTypeProperty: ["key", "value", "variance"], ObjectTypeSpreadProperty: ["argument"], OpaqueType: ["id", "typeParameters", "supertype", "impltype"], QualifiedTypeIdentifier: ["qualification", "id"], StringLiteralTypeAnnotation: [], StringTypeAnnotation: [], SymbolTypeAnnotation: [], ThisTypeAnnotation: [], TupleTypeAnnotation: ["types", "elementTypes"], TypeofTypeAnnotation: ["argument", "typeArguments"], TypeAlias: ["id", "typeParameters", "right"], TypeAnnotation: ["typeAnnotation"], TypeCastExpression: ["expression", "typeAnnotation"], TypeParameter: ["bound", "default", "variance"], TypeParameterDeclaration: ["params"], TypeParameterInstantiation: ["params"], UnionTypeAnnotation: ["types"], Variance: [], VoidTypeAnnotation: [], EnumDeclaration: ["id", "body"], EnumBooleanBody: ["members"], EnumNumberBody: ["members"], EnumStringBody: ["members"], EnumSymbolBody: ["members"], EnumBooleanMember: ["id", "init"], EnumNumberMember: ["id", "init"], EnumStringMember: ["id", "init"], EnumDefaultedMember: ["id"], IndexedAccessType: ["objectType", "indexType"], OptionalIndexedAccessType: ["objectType", "indexType"], JSXAttribute: ["name", "value"], JSXClosingElement: ["name"], JSXElement: ["openingElement", "children", "closingElement"], JSXEmptyExpression: [], JSXExpressionContainer: ["expression"], JSXSpreadChild: ["expression"], JSXIdentifier: [], JSXMemberExpression: ["object", "property"], JSXNamespacedName: ["namespace", "name"], JSXOpeningElement: ["name", "typeParameters", "typeArguments", "attributes"], JSXSpreadAttribute: ["argument"], JSXText: [], JSXFragment: ["openingFragment", "children", "closingFragment"], JSXOpeningFragment: [], JSXClosingFragment: [], Noop: [], Placeholder: [], V8IntrinsicIdentifier: [], ArgumentPlaceholder: [], BindExpression: ["object", "callee"], Decorator: ["expression"], DoExpression: ["body"], ExportDefaultSpecifier: ["exported"], ModuleExpression: ["body"], TopicReference: [], PipelineTopicExpression: ["expression"], PipelineBareFunction: ["callee"], PipelinePrimaryTopicReference: [], TSParameterProperty: ["parameter", "decorators"], TSDeclareFunction: ["id", "typeParameters", "params", "returnType", "body"], TSDeclareMethod: ["decorators", "key", "typeParameters", "params", "returnType"], TSQualifiedName: ["left", "right"], TSCallSignatureDeclaration: ["typeParameters", "parameters", "typeAnnotation", "params", "returnType"], TSConstructSignatureDeclaration: ["typeParameters", "parameters", "typeAnnotation", "params", "returnType"], TSPropertySignature: ["key", "typeAnnotation"], TSMethodSignature: ["key", "typeParameters", "parameters", "typeAnnotation", "params", "returnType"], TSIndexSignature: ["parameters", "typeAnnotation"], TSAnyKeyword: [], TSBooleanKeyword: [], TSBigIntKeyword: [], TSIntrinsicKeyword: [], TSNeverKeyword: [], TSNullKeyword: [], TSNumberKeyword: [], TSObjectKeyword: [], TSStringKeyword: [], TSSymbolKeyword: [], TSUndefinedKeyword: [], TSUnknownKeyword: [], TSVoidKeyword: [], TSThisType: [], TSFunctionType: ["typeParameters", "parameters", "typeAnnotation", "params", "returnType"], TSConstructorType: ["typeParameters", "parameters", "typeAnnotation", "params", "returnType"], TSTypeReference: ["typeName", "typeParameters", "typeArguments"], TSTypePredicate: ["parameterName", "typeAnnotation"], TSTypeQuery: ["exprName", "typeParameters", "typeArguments"], TSTypeLiteral: ["members"], TSArrayType: ["elementType"], TSTupleType: ["elementTypes"], TSOptionalType: ["typeAnnotation"], TSRestType: ["typeAnnotation"], TSNamedTupleMember: ["label", "elementType"], TSUnionType: ["types"], TSIntersectionType: ["types"], TSConditionalType: ["checkType", "extendsType", "trueType", "falseType"], TSInferType: ["typeParameter"], TSParenthesizedType: ["typeAnnotation"], TSTypeOperator: ["typeAnnotation"], TSIndexedAccessType: ["objectType", "indexType"], TSMappedType: ["nameType", "typeAnnotation", "key", "constraint"], TSTemplateLiteralType: ["quasis", "types"], TSLiteralType: ["literal"], TSExpressionWithTypeArguments: ["expression", "typeParameters"], TSInterfaceDeclaration: ["id", "typeParameters", "extends", "body"], TSInterfaceBody: ["body"], TSTypeAliasDeclaration: ["id", "typeParameters", "typeAnnotation"], TSInstantiationExpression: ["expression", "typeParameters", "typeArguments"], TSAsExpression: ["expression", "typeAnnotation"], TSSatisfiesExpression: ["expression", "typeAnnotation"], TSTypeAssertion: ["typeAnnotation", "expression"], TSEnumBody: ["members"], TSEnumDeclaration: ["id", "body"], TSEnumMember: ["id", "initializer"], TSModuleDeclaration: ["id", "body"], TSModuleBlock: ["body"], TSImportType: ["argument", "options", "qualifier", "typeParameters", "typeArguments"], TSImportEqualsDeclaration: ["id", "moduleReference"], TSExternalModuleReference: ["expression"], TSNonNullExpression: ["expression"], TSExportAssignment: ["expression"], TSNamespaceExportDeclaration: ["id"], TSTypeAnnotation: ["typeAnnotation"], TSTypeParameterInstantiation: ["params"], TSTypeParameterDeclaration: ["params"], TSTypeParameter: ["constraint", "default", "name"], ChainExpression: ["expression"], ExperimentalRestProperty: ["argument"], ExperimentalSpreadProperty: ["argument"], Literal: [], MethodDefinition: ["decorators", "key", "value"], PrivateIdentifier: [], Property: ["key", "value"], PropertyDefinition: ["decorators", "key", "typeAnnotation", "value", "variance"], AccessorProperty: ["decorators", "key", "typeAnnotation", "value"], TSAbstractAccessorProperty: ["decorators", "key", "typeAnnotation"], TSAbstractKeyword: [], TSAbstractMethodDefinition: ["key", "value"], TSAbstractPropertyDefinition: ["decorators", "key", "typeAnnotation"], TSAsyncKeyword: [], TSClassImplements: ["expression", "typeArguments", "typeParameters"], TSDeclareKeyword: [], TSEmptyBodyFunctionExpression: ["id", "typeParameters", "params", "returnType"], TSExportKeyword: [], TSInterfaceHeritage: ["expression", "typeArguments", "typeParameters"], TSPrivateKeyword: [], TSProtectedKeyword: [], TSPublicKeyword: [], TSReadonlyKeyword: [], TSStaticKeyword: [], AsConstExpression: ["expression"], AsExpression: ["expression", "typeAnnotation"], BigIntLiteralTypeAnnotation: [], BigIntTypeAnnotation: [], ComponentDeclaration: ["id", "params", "body", "typeParameters", "rendersType"], ComponentParameter: ["name", "local"], ComponentTypeAnnotation: ["params", "rest", "typeParameters", "rendersType"], ComponentTypeParameter: ["name", "typeAnnotation"], ConditionalTypeAnnotation: ["checkType", "extendsType", "trueType", "falseType"], DeclareComponent: ["id", "params", "rest", "typeParameters", "rendersType"], DeclareEnum: ["id", "body"], DeclareHook: ["id"], DeclareNamespace: ["id", "body"], EnumBigIntBody: ["members"], EnumBigIntMember: ["id", "init"], HookDeclaration: ["id", "params", "body", "typeParameters", "returnType"], HookTypeAnnotation: ["params", "returnType", "rest", "typeParameters"], InferTypeAnnotation: ["typeParameter"], KeyofTypeAnnotation: ["argument"], ObjectTypeMappedTypeProperty: ["keyTparam", "propType", "sourceType", "variance"], QualifiedTypeofIdentifier: ["qualification", "id"], TupleTypeLabeledElement: ["label", "elementType", "variance"], TupleTypeSpreadElement: ["label", "typeAnnotation"], TypeOperator: ["typeAnnotation"], TypePredicate: ["parameterName", "typeAnnotation", "asserts"], NGChainedExpression: ["expressions"], NGEmptyExpression: [], NGPipeExpression: ["left", "right", "arguments"], NGMicrosyntax: ["body"], NGMicrosyntaxAs: ["key", "alias"], NGMicrosyntaxExpression: ["expression", "alias"], NGMicrosyntaxKey: [], NGMicrosyntaxKeyedExpression: ["key", "expression"], NGMicrosyntaxLet: ["key", "value"], NGRoot: ["node"], JsExpressionRoot: ["node"], JsonRoot: ["node"], TSJSDocAllType: [], TSJSDocUnknownType: [], TSJSDocNullableType: ["typeAnnotation"], TSJSDocNonNullableType: ["typeAnnotation"], NeverTypeAnnotation: [], SatisfiesExpression: ["expression", "typeAnnotation"], UndefinedTypeAnnotation: [], UnknownTypeAnnotation: [] };
211
+ var Co = Br(ou);
212
+ var br = Co;
213
+ function Ao(e) {
214
+ let t = new Set(e);
215
+ return (r) => t.has(r == null ? void 0 : r.type);
216
+ }
217
+ var R = Ao;
218
+ function To(e) {
219
+ var _a2;
220
+ var t;
221
+ return (_a2 = (t = e.extra) == null ? void 0 : t.raw) != null ? _a2 : e.raw;
222
+ }
223
+ var ae = To;
224
+ var xo = R(["Block", "CommentBlock", "MultiLine"]);
225
+ var te = xo;
226
+ var ho = R(["AnyTypeAnnotation", "ThisTypeAnnotation", "NumberTypeAnnotation", "VoidTypeAnnotation", "BooleanTypeAnnotation", "BigIntTypeAnnotation", "SymbolTypeAnnotation", "StringTypeAnnotation", "NeverTypeAnnotation", "UndefinedTypeAnnotation", "UnknownTypeAnnotation", "EmptyTypeAnnotation", "MixedTypeAnnotation"]);
227
+ var Pr = ho;
228
+ var go = R(["Line", "CommentLine", "SingleLine", "HashbangComment", "HTMLOpen", "HTMLClose", "Hashbang", "InterpreterDirective"]);
229
+ var At = go;
230
+ function So(e, t) {
231
+ let r = t.split(".");
232
+ for (let n = r.length - 1; n >= 0; n--) {
233
+ let s = r[n];
234
+ if (n === 0) return e.type === "Identifier" && e.name === s;
235
+ if (e.type !== "MemberExpression" || e.optional || e.computed || e.property.type !== "Identifier" || e.property.name !== s) return false;
236
+ e = e.object;
237
+ }
238
+ }
239
+ function Bo(e, t) {
240
+ return t.some((r) => So(e, r));
241
+ }
242
+ var pu = Bo;
243
+ function bo({ type: e }) {
244
+ return e.startsWith("TS") && e.endsWith("Keyword");
245
+ }
246
+ var kr = bo;
247
+ function ur(e, t) {
248
+ return t(e) || Ks(e, { getVisitorKeys: br, predicate: t });
249
+ }
250
+ function Jt(e) {
251
+ return e.type === "AssignmentExpression" || e.type === "BinaryExpression" || e.type === "LogicalExpression" || e.type === "NGPipeExpression" || e.type === "ConditionalExpression" || w(e) || G(e) || e.type === "SequenceExpression" || e.type === "TaggedTemplateExpression" || e.type === "BindExpression" || e.type === "UpdateExpression" && !e.prefix || xe(e) || e.type === "TSNonNullExpression" || e.type === "ChainExpression";
252
+ }
253
+ function mu(e) {
254
+ var _a2, _b, _c2, _d, _e2, _f;
255
+ return e.expressions ? e.expressions[0] : (_f = (_e2 = (_d = (_c2 = (_b = (_a2 = e.left) != null ? _a2 : e.test) != null ? _b : e.callee) != null ? _c2 : e.object) != null ? _d : e.tag) != null ? _e2 : e.argument) != null ? _f : e.expression;
256
+ }
257
+ function Lr(e) {
258
+ if (e.expressions) return ["expressions", 0];
259
+ if (e.left) return ["left"];
260
+ if (e.test) return ["test"];
261
+ if (e.object) return ["object"];
262
+ if (e.callee) return ["callee"];
263
+ if (e.tag) return ["tag"];
264
+ if (e.argument) return ["argument"];
265
+ if (e.expression) return ["expression"];
266
+ throw new Error("Unexpected node has no left side.");
267
+ }
268
+ var yu = R(["ExportDefaultDeclaration", "DeclareExportDeclaration", "ExportNamedDeclaration", "ExportAllDeclaration", "DeclareExportAllDeclaration"]);
269
+ var U = R(["ArrayExpression"]);
270
+ var ue = R(["ObjectExpression"]);
271
+ function fu(e) {
272
+ return e.type === "LogicalExpression" && e.operator === "??";
273
+ }
274
+ function ye(e) {
275
+ return e.type === "NumericLiteral" || e.type === "Literal" && typeof e.value == "number";
276
+ }
277
+ function Du(e) {
278
+ return e.type === "BooleanLiteral" || e.type === "Literal" && typeof e.value == "boolean";
279
+ }
280
+ function Rn(e) {
281
+ return e.type === "UnaryExpression" && (e.operator === "+" || e.operator === "-") && ye(e.argument);
282
+ }
283
+ function K(e) {
284
+ return !!(e && (e.type === "StringLiteral" || e.type === "Literal" && typeof e.value == "string"));
285
+ }
286
+ function Jn(e) {
287
+ return e.type === "RegExpLiteral" || e.type === "Literal" && !!e.regex;
288
+ }
289
+ var wr = R(["Literal", "BooleanLiteral", "BigIntLiteral", "DirectiveLiteral", "NullLiteral", "NumericLiteral", "RegExpLiteral", "StringLiteral"]);
290
+ var Po = R(["Identifier", "ThisExpression", "Super", "PrivateName", "PrivateIdentifier"]);
291
+ var Re = R(["ObjectTypeAnnotation", "TSTypeLiteral", "TSMappedType"]);
292
+ var Rt = R(["FunctionExpression", "ArrowFunctionExpression"]);
293
+ function ko(e) {
294
+ return e.type === "FunctionExpression" || e.type === "ArrowFunctionExpression" && e.body.type === "BlockStatement";
295
+ }
296
+ function _n(e) {
297
+ return w(e) && e.callee.type === "Identifier" && ["async", "inject", "fakeAsync", "waitForAsync"].includes(e.callee.name);
298
+ }
299
+ var Y = R(["JSXElement", "JSXFragment"]);
300
+ function bt(e) {
301
+ return e.method && e.kind === "init" || e.kind === "get" || e.kind === "set";
302
+ }
303
+ function Or(e) {
304
+ return (e.type === "ObjectTypeProperty" || e.type === "ObjectTypeInternalSlot") && !e.static && !e.method && e.kind !== "get" && e.kind !== "set" && e.value.type === "FunctionTypeAnnotation";
305
+ }
306
+ function Eu(e) {
307
+ return (e.type === "TypeAnnotation" || e.type === "TSTypeAnnotation") && e.typeAnnotation.type === "FunctionTypeAnnotation" && !e.static && !Bt(e, e.typeAnnotation);
308
+ }
309
+ var Fe = R(["BinaryExpression", "LogicalExpression", "NGPipeExpression"]);
310
+ function dt(e) {
311
+ return G(e) || e.type === "BindExpression" && !!e.object;
312
+ }
313
+ var Io = R(["TSThisType", "NullLiteralTypeAnnotation", "BooleanLiteralTypeAnnotation", "StringLiteralTypeAnnotation", "BigIntLiteralTypeAnnotation", "NumberLiteralTypeAnnotation", "TSLiteralType", "TSTemplateLiteralType"]);
314
+ function Nt(e) {
315
+ return kr(e) || Pr(e) || Io(e) || (e.type === "GenericTypeAnnotation" || e.type === "TSTypeReference") && !e.typeParameters && !e.typeArguments;
316
+ }
317
+ function Lo(e) {
318
+ return e.type === "Identifier" && (e.name === "beforeEach" || e.name === "beforeAll" || e.name === "afterEach" || e.name === "afterAll");
319
+ }
320
+ var wo = ["it", "it.only", "it.skip", "describe", "describe.only", "describe.skip", "test", "test.only", "test.skip", "test.step", "test.describe", "test.describe.only", "test.describe.parallel", "test.describe.parallel.only", "test.describe.serial", "test.describe.serial.only", "skip", "xit", "xdescribe", "xtest", "fit", "fdescribe", "ftest"];
321
+ function Oo(e) {
322
+ return pu(e, wo);
323
+ }
324
+ function Pt(e, t) {
325
+ if ((e == null ? void 0 : e.type) !== "CallExpression" || e.optional) return false;
326
+ let r = le(e);
327
+ if (r.length === 1) {
328
+ if (_n(e) && Pt(t)) return Rt(r[0]);
329
+ if (Lo(e.callee)) return _n(r[0]);
330
+ } else if ((r.length === 2 || r.length === 3) && (r[0].type === "TemplateLiteral" || K(r[0])) && Oo(e.callee)) return r[2] && !ye(r[2]) ? false : (r.length === 2 ? Rt(r[1]) : ko(r[1]) && Q(r[1]).length <= 1) || _n(r[1]);
331
+ return false;
332
+ }
333
+ var Fu = (e) => (t) => ((t == null ? void 0 : t.type) === "ChainExpression" && (t = t.expression), e(t));
334
+ var w = Fu(R(["CallExpression", "OptionalCallExpression"]));
335
+ var G = Fu(R(["MemberExpression", "OptionalMemberExpression"]));
336
+ function Nn(e, t = 5) {
337
+ return Cu(e, t) <= t;
338
+ }
339
+ function Cu(e, t) {
340
+ let r = 0;
341
+ for (let n in e) {
342
+ let s = e[n];
343
+ if (s && typeof s == "object" && typeof s.type == "string" && (r++, r += Cu(s, t - r)), r > t) return r;
344
+ }
345
+ return r;
346
+ }
347
+ var _o = 0.25;
348
+ function ir(e, t) {
349
+ let { printWidth: r } = t;
350
+ if (d(e)) return false;
351
+ let n = r * _o;
352
+ if (e.type === "ThisExpression" || e.type === "Identifier" && e.name.length <= n || Rn(e) && !d(e.argument)) return true;
353
+ let s = e.type === "Literal" && "regex" in e && e.regex.pattern || e.type === "RegExpLiteral" && e.pattern;
354
+ return s ? s.length <= n : K(e) ? ut(ae(e), t).length <= n : e.type === "TemplateLiteral" ? e.expressions.length === 0 && e.quasis[0].value.raw.length <= n && !e.quasis[0].value.raw.includes(`
355
+ `) : e.type === "UnaryExpression" ? ir(e.argument, { printWidth: r }) : e.type === "CallExpression" && e.arguments.length === 0 && e.callee.type === "Identifier" ? e.callee.name.length <= n - 2 : wr(e);
356
+ }
357
+ function de(e, t) {
358
+ return Y(t) ? kt(t) : d(t, h.Leading, (r) => ee(e, P(r)));
359
+ }
360
+ function cu(e) {
361
+ return e.quasis.some((t) => t.value.raw.includes(`
362
+ `));
363
+ }
364
+ function _r(e, t) {
365
+ return (e.type === "TemplateLiteral" && cu(e) || e.type === "TaggedTemplateExpression" && cu(e.quasi)) && !ee(t, j(e), { backwards: true });
366
+ }
367
+ function Mr(e) {
368
+ if (!d(e)) return false;
369
+ let t = v(false, Ve(e, h.Dangling), -1);
370
+ return t && !te(t);
371
+ }
372
+ function Au(e) {
373
+ if (e.length <= 1) return false;
374
+ let t = 0;
375
+ for (let r of e) if (Rt(r)) {
376
+ if (t += 1, t > 1) return true;
377
+ } else if (w(r)) {
378
+ for (let n of le(r)) if (Rt(n)) return true;
379
+ }
380
+ return false;
381
+ }
382
+ function vr(e) {
383
+ let { node: t, parent: r, key: n } = e;
384
+ return n === "callee" && w(t) && w(r) && r.arguments.length > 0 && t.arguments.length > r.arguments.length;
385
+ }
386
+ var Mo = /* @__PURE__ */ new Set(["!", "-", "+", "~"]);
387
+ function we(e, t = 2) {
388
+ var _a2;
389
+ if (t <= 0) return false;
390
+ if (e.type === "ChainExpression" || e.type === "TSNonNullExpression") return we(e.expression, t);
391
+ let r = (n) => we(n, t - 1);
392
+ if (Jn(e)) return st((_a2 = e.pattern) != null ? _a2 : e.regex.pattern) <= 5;
393
+ if (wr(e) || Po(e) || e.type === "ArgumentPlaceholder") return true;
394
+ if (e.type === "TemplateLiteral") return e.quasis.every((n) => !n.value.raw.includes(`
395
+ `)) && e.expressions.every(r);
396
+ if (ue(e)) return e.properties.every((n) => !n.computed && (n.shorthand || n.value && r(n.value)));
397
+ if (U(e)) return e.elements.every((n) => n === null || r(n));
398
+ if (yt(e)) {
399
+ if (e.type === "ImportExpression" || we(e.callee, t)) {
400
+ let n = le(e);
401
+ return n.length <= t && n.every(r);
402
+ }
403
+ return false;
404
+ }
405
+ return G(e) ? we(e.object, t) && we(e.property, t) : e.type === "UnaryExpression" && Mo.has(e.operator) || e.type === "UpdateExpression" ? we(e.argument, t) : false;
406
+ }
407
+ function du(e) {
408
+ return e;
409
+ }
410
+ function ce(e, t = "es5") {
411
+ return e.trailingComma === "es5" && t === "es5" || e.trailingComma === "all" && (t === "all" || t === "es5");
412
+ }
413
+ function pe(e, t) {
414
+ switch (e.type) {
415
+ case "BinaryExpression":
416
+ case "LogicalExpression":
417
+ case "AssignmentExpression":
418
+ case "NGPipeExpression":
419
+ return pe(e.left, t);
420
+ case "MemberExpression":
421
+ case "OptionalMemberExpression":
422
+ return pe(e.object, t);
423
+ case "TaggedTemplateExpression":
424
+ return e.tag.type === "FunctionExpression" ? false : pe(e.tag, t);
425
+ case "CallExpression":
426
+ case "OptionalCallExpression":
427
+ return e.callee.type === "FunctionExpression" ? false : pe(e.callee, t);
428
+ case "ConditionalExpression":
429
+ return pe(e.test, t);
430
+ case "UpdateExpression":
431
+ return !e.prefix && pe(e.argument, t);
432
+ case "BindExpression":
433
+ return e.object && pe(e.object, t);
434
+ case "SequenceExpression":
435
+ return pe(e.expressions[0], t);
436
+ case "ChainExpression":
437
+ case "TSSatisfiesExpression":
438
+ case "TSAsExpression":
439
+ case "TSNonNullExpression":
440
+ case "AsExpression":
441
+ case "AsConstExpression":
442
+ case "SatisfiesExpression":
443
+ return pe(e.expression, t);
444
+ default:
445
+ return t(e);
446
+ }
447
+ }
448
+ var lu = { "==": true, "!=": true, "===": true, "!==": true };
449
+ var Ir = { "*": true, "/": true, "%": true };
450
+ var jn = { ">>": true, ">>>": true, "<<": true };
451
+ function ar(e, t) {
452
+ return !(sr(t) !== sr(e) || e === "**" || lu[e] && lu[t] || t === "%" && Ir[e] || e === "%" && Ir[t] || t !== e && Ir[t] && Ir[e] || jn[e] && jn[t]);
453
+ }
454
+ var vo = new Map([["|>"], ["??"], ["||"], ["&&"], ["|"], ["^"], ["&"], ["==", "===", "!=", "!=="], ["<", ">", "<=", ">=", "in", "instanceof"], [">>", "<<", ">>>"], ["+", "-"], ["*", "/", "%"], ["**"]].flatMap((e, t) => e.map((r) => [r, t])));
455
+ function sr(e) {
456
+ return vo.get(e);
457
+ }
458
+ function Tu(e) {
459
+ return !!jn[e] || e === "|" || e === "^" || e === "&";
460
+ }
461
+ function xu(e) {
462
+ var r;
463
+ if (e.rest) return true;
464
+ let t = Q(e);
465
+ return ((r = v(false, t, -1)) == null ? void 0 : r.type) === "RestElement";
466
+ }
467
+ var Mn = /* @__PURE__ */ new WeakMap();
468
+ function Q(e) {
469
+ if (Mn.has(e)) return Mn.get(e);
470
+ let t = [];
471
+ return e.this && t.push(e.this), Array.isArray(e.parameters) ? t.push(...e.parameters) : Array.isArray(e.params) && t.push(...e.params), e.rest && t.push(e.rest), Mn.set(e, t), t;
472
+ }
473
+ function hu(e, t) {
474
+ let { node: r } = e, n = 0, s = (u) => t(u, n++);
475
+ r.this && e.call(s, "this"), Array.isArray(r.parameters) ? e.each(s, "parameters") : Array.isArray(r.params) && e.each(s, "params"), r.rest && e.call(s, "rest");
476
+ }
477
+ var vn = /* @__PURE__ */ new WeakMap();
478
+ function le(e) {
479
+ if (vn.has(e)) return vn.get(e);
480
+ if (e.type === "ChainExpression") return le(e.expression);
481
+ let t = e.arguments;
482
+ return (e.type === "ImportExpression" || e.type === "TSImportType") && (t = [e.type === "ImportExpression" ? e.source : e.argument], e.options && t.push(e.options)), vn.set(e, t), t;
483
+ }
484
+ function Gt(e, t) {
485
+ let { node: r } = e;
486
+ if (r.type === "ChainExpression") return e.call(() => Gt(e, t), "expression");
487
+ r.type === "ImportExpression" || r.type === "TSImportType" ? (e.call((n) => t(n, 0), r.type === "ImportExpression" ? "source" : "argument"), r.options && e.call((n) => t(n, 1), "options")) : e.each(t, "arguments");
488
+ }
489
+ function Gn(e, t) {
490
+ let r = [];
491
+ if (e.type === "ChainExpression" && (e = e.expression, r.push("expression")), e.type === "ImportExpression" || e.type === "TSImportType") {
492
+ if (t === 0 || t === (e.options ? -2 : -1)) return [...r, e.type === "ImportExpression" ? "source" : "argument"];
493
+ if (e.options && (t === 1 || t === -1)) return [...r, "options"];
494
+ throw new RangeError("Invalid argument index");
495
+ }
496
+ if (t < 0 && (t = e.arguments.length + t), t < 0 || t >= e.arguments.length) throw new RangeError("Invalid argument index");
497
+ return [...r, "arguments", t];
498
+ }
499
+ function or(e) {
500
+ return e.value.trim() === "prettier-ignore" && !e.unignore;
501
+ }
502
+ function kt(e) {
503
+ return (e == null ? void 0 : e.prettierIgnore) || d(e, h.PrettierIgnore);
504
+ }
505
+ var h = { Leading: 2, Trailing: 4, Dangling: 8, Block: 16, Line: 32, PrettierIgnore: 64, First: 128, Last: 256 };
506
+ var gu = (e, t) => {
507
+ if (typeof e == "function" && (t = e, e = 0), e || t) return (r, n, s) => !(e & h.Leading && !r.leading || e & h.Trailing && !r.trailing || e & h.Dangling && (r.leading || r.trailing) || e & h.Block && !te(r) || e & h.Line && !At(r) || e & h.First && n !== 0 || e & h.Last && n !== s.length - 1 || e & h.PrettierIgnore && !or(r) || t && !t(r));
508
+ };
509
+ function d(e, t, r) {
510
+ if (!O(e == null ? void 0 : e.comments)) return false;
511
+ let n = gu(t, r);
512
+ return n ? e.comments.some(n) : true;
513
+ }
514
+ function Ve(e, t, r) {
515
+ if (!Array.isArray(e == null ? void 0 : e.comments)) return [];
516
+ let n = gu(t, r);
517
+ return n ? e.comments.filter(n) : e.comments;
518
+ }
519
+ var me = (e, { originalText: t }) => vt(t, P(e));
520
+ function yt(e) {
521
+ return w(e) || e.type === "NewExpression" || e.type === "ImportExpression";
522
+ }
523
+ function Te(e) {
524
+ return e && (e.type === "ObjectProperty" || e.type === "Property" && !bt(e));
525
+ }
526
+ var xe = R(["TSAsExpression", "TSSatisfiesExpression", "AsExpression", "AsConstExpression", "SatisfiesExpression"]);
527
+ var Oe = R(["TSUnionType", "UnionTypeAnnotation"]);
528
+ var qt = R(["TSIntersectionType", "IntersectionTypeAnnotation"]);
529
+ var Je = R(["TSConditionalType", "ConditionalTypeAnnotation"]);
530
+ var jo = /* @__PURE__ */ new Set(["range", "raw", "comments", "leadingComments", "trailingComments", "innerComments", "extra", "start", "end", "loc", "flags", "errors", "tokens"]);
531
+ var Wt = (e) => {
532
+ for (let t of e.quasis) delete t.value;
533
+ };
534
+ function Su(e, t) {
535
+ var n;
536
+ if (e.type === "Program" && delete t.sourceType, (e.type === "BigIntLiteral" || e.type === "BigIntLiteralTypeAnnotation") && e.value && (t.value = e.value.toLowerCase()), (e.type === "BigIntLiteral" || e.type === "Literal") && e.bigint && (t.bigint = e.bigint.toLowerCase()), e.type === "EmptyStatement" || e.type === "JSXText" || e.type === "JSXExpressionContainer" && (e.expression.type === "Literal" || e.expression.type === "StringLiteral") && e.expression.value === " ") return null;
537
+ if ((e.type === "Property" || e.type === "ObjectProperty" || e.type === "MethodDefinition" || e.type === "ClassProperty" || e.type === "ClassMethod" || e.type === "PropertyDefinition" || e.type === "TSDeclareMethod" || e.type === "TSPropertySignature" || e.type === "ObjectTypeProperty" || e.type === "ImportAttribute") && e.key && !e.computed) {
538
+ let { key: s } = e;
539
+ K(s) || ye(s) ? t.key = String(s.value) : s.type === "Identifier" && (t.key = s.name);
540
+ }
541
+ if (e.type === "JSXElement" && e.openingElement.name.name === "style" && e.openingElement.attributes.some((s) => s.type === "JSXAttribute" && s.name.name === "jsx")) for (let { type: s, expression: u } of t.children) s === "JSXExpressionContainer" && u.type === "TemplateLiteral" && Wt(u);
542
+ e.type === "JSXAttribute" && e.name.name === "css" && e.value.type === "JSXExpressionContainer" && e.value.expression.type === "TemplateLiteral" && Wt(t.value.expression), e.type === "JSXAttribute" && ((n = e.value) == null ? void 0 : n.type) === "Literal" && /["']|&quot;|&apos;/u.test(e.value.value) && (t.value.value = X(false, e.value.value, /["']|&quot;|&apos;/gu, '"'));
543
+ let r = e.expression || e.callee;
544
+ if (e.type === "Decorator" && r.type === "CallExpression" && r.callee.name === "Component" && r.arguments.length === 1) {
545
+ let s = e.expression.arguments[0].properties;
546
+ for (let [u, i] of t.expression.arguments[0].properties.entries()) switch (s[u].key.name) {
547
+ case "styles":
548
+ U(i.value) && Wt(i.value.elements[0]);
549
+ break;
550
+ case "template":
551
+ i.value.type === "TemplateLiteral" && Wt(i.value);
552
+ break;
553
+ }
554
+ }
555
+ e.type === "TaggedTemplateExpression" && (e.tag.type === "MemberExpression" || e.tag.type === "Identifier" && (e.tag.name === "gql" || e.tag.name === "graphql" || e.tag.name === "css" || e.tag.name === "md" || e.tag.name === "markdown" || e.tag.name === "html") || e.tag.type === "CallExpression") && Wt(t.quasi), e.type === "TemplateLiteral" && Wt(t), e.type === "ChainExpression" && e.expression.type === "TSNonNullExpression" && (t.type = "TSNonNullExpression", t.expression.type = "ChainExpression");
556
+ }
557
+ Su.ignoredProperties = jo;
558
+ var Bu = Su;
559
+ var Ne = "string";
560
+ var ge = "array";
561
+ var it = "cursor";
562
+ var $e = "indent";
563
+ var Ke = "align";
564
+ var Qe = "trim";
565
+ var fe = "group";
566
+ var _e = "fill";
567
+ var he = "if-break";
568
+ var ze = "indent-if-break";
569
+ var Ze = "line-suffix";
570
+ var Ge = "line-suffix-boundary";
571
+ var oe = "line";
572
+ var Se = "label";
573
+ var Me = "break-parent";
574
+ var jr = /* @__PURE__ */ new Set([it, $e, Ke, Qe, fe, _e, he, ze, Ze, Ge, oe, Se, Me]);
575
+ function Ro(e) {
576
+ if (typeof e == "string") return Ne;
577
+ if (Array.isArray(e)) return ge;
578
+ if (!e) return;
579
+ let { type: t } = e;
580
+ if (jr.has(t)) return t;
581
+ }
582
+ var Be = Ro;
583
+ var Jo = (e) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(e);
584
+ function No(e) {
585
+ let t = e === null ? "null" : typeof e;
586
+ if (t !== "string" && t !== "object") return `Unexpected doc '${t}',
587
+ Expected it to be 'string' or 'object'.`;
588
+ if (Be(e)) throw new Error("doc is valid.");
589
+ let r = Object.prototype.toString.call(e);
590
+ if (r !== "[object Object]") return `Unexpected doc '${r}'.`;
591
+ let n = Jo([...jr].map((s) => `'${s}'`));
592
+ return `Unexpected doc.type '${e.type}'.
593
+ Expected it to be ${n}.`;
594
+ }
595
+ var qn = class extends Error {
596
+ constructor(t) {
597
+ super(No(t));
598
+ __publicField(this, "name", "InvalidDocError");
599
+ this.doc = t;
600
+ }
601
+ };
602
+ var Tt = qn;
603
+ var bu = {};
604
+ function Go(e, t, r, n) {
605
+ let s = [e];
606
+ for (; s.length > 0; ) {
607
+ let u = s.pop();
608
+ if (u === bu) {
609
+ r(s.pop());
610
+ continue;
611
+ }
612
+ r && s.push(u, bu);
613
+ let i = Be(u);
614
+ if (!i) throw new Tt(u);
615
+ if ((t == null ? void 0 : t(u)) !== false) switch (i) {
616
+ case ge:
617
+ case _e: {
618
+ let a = i === ge ? u : u.parts;
619
+ for (let o = a.length, p = o - 1; p >= 0; --p) s.push(a[p]);
620
+ break;
621
+ }
622
+ case he:
623
+ s.push(u.flatContents, u.breakContents);
624
+ break;
625
+ case fe:
626
+ if (n && u.expandedStates) for (let a = u.expandedStates.length, o = a - 1; o >= 0; --o) s.push(u.expandedStates[o]);
627
+ else s.push(u.contents);
628
+ break;
629
+ case Ke:
630
+ case $e:
631
+ case ze:
632
+ case Se:
633
+ case Ze:
634
+ s.push(u.contents);
635
+ break;
636
+ case Ne:
637
+ case it:
638
+ case Qe:
639
+ case Ge:
640
+ case oe:
641
+ case Me:
642
+ break;
643
+ default:
644
+ throw new Tt(u);
645
+ }
646
+ }
647
+ }
648
+ var pr = Go;
649
+ function ft(e, t) {
650
+ if (typeof e == "string") return t(e);
651
+ let r = /* @__PURE__ */ new Map();
652
+ return n(e);
653
+ function n(u) {
654
+ if (r.has(u)) return r.get(u);
655
+ let i = s(u);
656
+ return r.set(u, i), i;
657
+ }
658
+ function s(u) {
659
+ switch (Be(u)) {
660
+ case ge:
661
+ return t(u.map(n));
662
+ case _e:
663
+ return t(__spreadProps(__spreadValues({}, u), { parts: u.parts.map(n) }));
664
+ case he:
665
+ return t(__spreadProps(__spreadValues({}, u), { breakContents: n(u.breakContents), flatContents: n(u.flatContents) }));
666
+ case fe: {
667
+ let { expandedStates: i, contents: a } = u;
668
+ return i ? (i = i.map(n), a = i[0]) : a = n(a), t(__spreadProps(__spreadValues({}, u), { contents: a, expandedStates: i }));
669
+ }
670
+ case Ke:
671
+ case $e:
672
+ case ze:
673
+ case Se:
674
+ case Ze:
675
+ return t(__spreadProps(__spreadValues({}, u), { contents: n(u.contents) }));
676
+ case Ne:
677
+ case it:
678
+ case Qe:
679
+ case Ge:
680
+ case oe:
681
+ case Me:
682
+ return t(u);
683
+ default:
684
+ throw new Tt(u);
685
+ }
686
+ }
687
+ }
688
+ function ku(e, t, r) {
689
+ let n = r, s = false;
690
+ function u(i) {
691
+ if (s) return false;
692
+ let a = t(i);
693
+ a !== void 0 && (s = true, n = a);
694
+ }
695
+ return pr(e, u), n;
696
+ }
697
+ function qo(e) {
698
+ if (e.type === fe && e.break || e.type === oe && e.hard || e.type === Me) return true;
699
+ }
700
+ function re(e) {
701
+ return ku(e, qo, false);
702
+ }
703
+ function Pu(e) {
704
+ if (e.length > 0) {
705
+ let t = v(false, e, -1);
706
+ !t.expandedStates && !t.break && (t.break = "propagated");
707
+ }
708
+ return null;
709
+ }
710
+ function Iu(e) {
711
+ let t = /* @__PURE__ */ new Set(), r = [];
712
+ function n(u) {
713
+ if (u.type === Me && Pu(r), u.type === fe) {
714
+ if (r.push(u), t.has(u)) return false;
715
+ t.add(u);
716
+ }
717
+ }
718
+ function s(u) {
719
+ u.type === fe && r.pop().break && Pu(r);
720
+ }
721
+ pr(e, n, s, true);
722
+ }
723
+ function Wo(e) {
724
+ return e.type === oe && !e.hard ? e.soft ? "" : " " : e.type === he ? e.flatContents : e;
725
+ }
726
+ function cr(e) {
727
+ return ft(e, Wo);
728
+ }
729
+ function Uo(e) {
730
+ switch (Be(e)) {
731
+ case _e:
732
+ if (e.parts.every((t) => t === "")) return "";
733
+ break;
734
+ case fe:
735
+ if (!e.contents && !e.id && !e.break && !e.expandedStates) return "";
736
+ if (e.contents.type === fe && e.contents.id === e.id && e.contents.break === e.break && e.contents.expandedStates === e.expandedStates) return e.contents;
737
+ break;
738
+ case Ke:
739
+ case $e:
740
+ case ze:
741
+ case Ze:
742
+ if (!e.contents) return "";
743
+ break;
744
+ case he:
745
+ if (!e.flatContents && !e.breakContents) return "";
746
+ break;
747
+ case ge: {
748
+ let t = [];
749
+ for (let r of e) {
750
+ if (!r) continue;
751
+ let [n, ...s] = Array.isArray(r) ? r : [r];
752
+ typeof n == "string" && typeof v(false, t, -1) == "string" ? t[t.length - 1] += n : t.push(n), t.push(...s);
753
+ }
754
+ return t.length === 0 ? "" : t.length === 1 ? t[0] : t;
755
+ }
756
+ case Ne:
757
+ case it:
758
+ case Qe:
759
+ case Ge:
760
+ case oe:
761
+ case Se:
762
+ case Me:
763
+ break;
764
+ default:
765
+ throw new Tt(e);
766
+ }
767
+ return e;
768
+ }
769
+ function Ut(e) {
770
+ return ft(e, (t) => Uo(t));
771
+ }
772
+ function ve(e, t = Rr) {
773
+ return ft(e, (r) => typeof r == "string" ? b(t, r.split(`
774
+ `)) : r);
775
+ }
776
+ function Xo(e) {
777
+ if (e.type === oe) return true;
778
+ }
779
+ function Lu(e) {
780
+ return ku(e, Xo, false);
781
+ }
782
+ function lr(e, t) {
783
+ return e.type === Se ? __spreadProps(__spreadValues({}, e), { contents: t(e.contents) }) : t(e);
784
+ }
785
+ function wu(e) {
786
+ let t = true;
787
+ return pr(e, (r) => {
788
+ switch (Be(r)) {
789
+ case Ne:
790
+ if (r === "") break;
791
+ case Qe:
792
+ case Ge:
793
+ case oe:
794
+ case Me:
795
+ return t = false, false;
796
+ }
797
+ }), t;
798
+ }
799
+ var Wn = () => {
800
+ };
801
+ var et = Wn;
802
+ var Un = Wn;
803
+ var Ou = Wn;
804
+ function D(e) {
805
+ return et(e), { type: $e, contents: e };
806
+ }
807
+ function be(e, t) {
808
+ return et(t), { type: Ke, contents: t, n: e };
809
+ }
810
+ function l(e, t = {}) {
811
+ return et(e), Un(t.expandedStates, true), { type: fe, id: t.id, contents: e, break: !!t.shouldBreak, expandedStates: t.expandedStates };
812
+ }
813
+ function _u(e) {
814
+ return be(Number.NEGATIVE_INFINITY, e);
815
+ }
816
+ function Jr(e) {
817
+ return be(-1, e);
818
+ }
819
+ function tt(e, t) {
820
+ return l(e[0], __spreadProps(__spreadValues({}, t), { expandedStates: e }));
821
+ }
822
+ function Nr(e) {
823
+ return Ou(e), { type: _e, parts: e };
824
+ }
825
+ function S(e, t = "", r = {}) {
826
+ return et(e), t !== "" && et(t), { type: he, breakContents: e, flatContents: t, groupId: r.groupId };
827
+ }
828
+ function xt(e, t) {
829
+ return et(e), { type: ze, contents: e, groupId: t.groupId, negate: t.negate };
830
+ }
831
+ function Xn(e) {
832
+ return et(e), { type: Ze, contents: e };
833
+ }
834
+ var je = { type: Ge };
835
+ var Ce = { type: Me };
836
+ var Yn = { type: oe, hard: true };
837
+ var Yo = { type: oe, hard: true, literal: true };
838
+ var x = { type: oe };
839
+ var E = { type: oe, soft: true };
840
+ var F = [Yn, Ce];
841
+ var Rr = [Yo, Ce];
842
+ var mr = { type: it };
843
+ function b(e, t) {
844
+ et(e), Un(t);
845
+ let r = [];
846
+ for (let n = 0; n < t.length; n++) n !== 0 && r.push(e), r.push(t[n]);
847
+ return r;
848
+ }
849
+ function Mu(e, t, r) {
850
+ et(e);
851
+ let n = e;
852
+ if (t > 0) {
853
+ for (let s = 0; s < Math.floor(t / r); ++s) n = D(n);
854
+ n = be(t % r, n), n = be(Number.NEGATIVE_INFINITY, n);
855
+ }
856
+ return n;
857
+ }
858
+ function at(e, t) {
859
+ return et(t), e ? { type: Se, label: e, contents: t } : t;
860
+ }
861
+ function Ho(e) {
862
+ if (!te(e)) return false;
863
+ let t = `*${e.value}*`.split(`
864
+ `);
865
+ return t.length > 1 && t.every((r) => r.trimStart()[0] === "*");
866
+ }
867
+ var Hn = /* @__PURE__ */ new WeakMap();
868
+ function Vo(e) {
869
+ return Hn.has(e) || Hn.set(e, Ho(e)), Hn.get(e);
870
+ }
871
+ var vu = Vo;
872
+ function ju(e, t) {
873
+ let r = e.node;
874
+ if (At(r)) return t.originalText.slice(j(r), P(r)).trimEnd();
875
+ if (vu(r)) return $o(r);
876
+ if (te(r)) return ["/*", ve(r.value), "*/"];
877
+ throw new Error("Not a comment: " + JSON.stringify(r));
878
+ }
879
+ function $o(e) {
880
+ let t = e.value.split(`
881
+ `);
882
+ return ["/*", b(F, t.map((r, n) => n === 0 ? r.trimEnd() : " " + (n < t.length - 1 ? r.trim() : r.trimStart()))), "*/"];
883
+ }
884
+ var ts = {};
885
+ xr(ts, { endOfLine: () => rp, ownLine: () => tp, remaining: () => np });
886
+ function Ko(e) {
887
+ let t = e.type || e.kind || "(unknown type)", r = String(e.name || e.id && (typeof e.id == "object" ? e.id.name : e.id) || e.key && (typeof e.key == "object" ? e.key.name : e.key) || e.value && (typeof e.value == "object" ? "" : String(e.value)) || e.operator || "");
888
+ return r.length > 20 && (r = r.slice(0, 19) + "\u2026"), t + (r ? " " + r : "");
889
+ }
890
+ function Vn(e, t) {
891
+ var _a2;
892
+ ((_a2 = e.comments) != null ? _a2 : e.comments = []).push(t), t.printed = false, t.nodeDescription = Ko(e);
893
+ }
894
+ function De(e, t) {
895
+ t.leading = true, t.trailing = false, Vn(e, t);
896
+ }
897
+ function Pe(e, t, r) {
898
+ t.leading = false, t.trailing = false, r && (t.marker = r), Vn(e, t);
899
+ }
900
+ function z(e, t) {
901
+ t.leading = false, t.trailing = true, Vn(e, t);
902
+ }
903
+ function Qo(e, t) {
904
+ let r = null, n = t;
905
+ for (; n !== r; ) r = n, n = Ye(e, n), n = _t(e, n), n = Mt(e, n), n = He(e, n);
906
+ return n;
907
+ }
908
+ var ot = Qo;
909
+ function zo(e, t) {
910
+ let r = ot(e, t);
911
+ return r === false ? "" : e.charAt(r);
912
+ }
913
+ var ke = zo;
914
+ function Zo(e, t, r) {
915
+ for (let n = t; n < r; ++n) if (e.charAt(n) === `
916
+ `) return true;
917
+ return false;
918
+ }
919
+ var ie = Zo;
920
+ var $n = /* @__PURE__ */ new WeakMap();
921
+ function ep(e) {
922
+ return $n.has(e) || $n.set(e, te(e) && e.value[0] === "*" && /@(?:type|satisfies)\b/u.test(e.value)), $n.get(e);
923
+ }
924
+ var Gr = ep;
925
+ var Ru = (e, t) => At(e) || !ie(t, j(e), P(e));
926
+ function tp(e) {
927
+ return [Yu, Nu, Wu, fp, up, Qn, zn, Ju, Gu, Cp, Ep, es, Xu, Ap, qu, Uu, Zn, ip, Bp, Hu].some((t) => t(e));
928
+ }
929
+ function rp(e) {
930
+ return [sp, Wu, Nu, Xu, Qn, zn, Ju, Gu, Uu, Dp, Fp, es, xp, Zn, gp, Sp, bp, Hu].some((t) => t(e));
931
+ }
932
+ function np(e) {
933
+ return [Yu, Qn, zn, ap, yp, qu, es, mp, lp, Zn, hp].some((t) => t(e));
934
+ }
935
+ function It(e, t) {
936
+ let r = (e.body || e.properties).find(({ type: n }) => n !== "EmptyStatement");
937
+ r ? De(r, t) : Pe(e, t);
938
+ }
939
+ function Kn(e, t) {
940
+ e.type === "BlockStatement" ? It(e, t) : De(e, t);
941
+ }
942
+ function sp({ comment: e, followingNode: t }) {
943
+ return t && Gr(e) ? (De(t, e), true) : false;
944
+ }
945
+ function Qn({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s }) {
946
+ if ((r == null ? void 0 : r.type) !== "IfStatement" || !n) return false;
947
+ if (ke(s, P(e)) === ")") return z(t, e), true;
948
+ if (t === r.consequent && n === r.alternate) {
949
+ let i = ot(s, P(r.consequent));
950
+ if (j(e) < i || r.alternate.type === "BlockStatement") return t.type === "BlockStatement" ? (z(t, e), true) : Ru(e, s) && !ie(s, j(t), j(e)) ? (z(t, e), true) : (Pe(r, e), true);
951
+ }
952
+ return n.type === "BlockStatement" ? (It(n, e), true) : n.type === "IfStatement" ? (Kn(n.consequent, e), true) : r.consequent === n ? (De(n, e), true) : false;
953
+ }
954
+ function zn({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s }) {
955
+ return (r == null ? void 0 : r.type) !== "WhileStatement" || !n ? false : ke(s, P(e)) === ")" ? (z(t, e), true) : n.type === "BlockStatement" ? (It(n, e), true) : r.body === n ? (De(n, e), true) : false;
956
+ }
957
+ function Ju({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n }) {
958
+ return (r == null ? void 0 : r.type) !== "TryStatement" && (r == null ? void 0 : r.type) !== "CatchClause" || !n ? false : r.type === "CatchClause" && t ? (z(t, e), true) : n.type === "BlockStatement" ? (It(n, e), true) : n.type === "TryStatement" ? (Kn(n.finalizer, e), true) : n.type === "CatchClause" ? (Kn(n.body, e), true) : false;
959
+ }
960
+ function up({ comment: e, enclosingNode: t, followingNode: r }) {
961
+ return G(t) && (r == null ? void 0 : r.type) === "Identifier" ? (De(t, e), true) : false;
962
+ }
963
+ function ip({ comment: e, enclosingNode: t, followingNode: r, options: n }) {
964
+ return !n.experimentalTernaries || !((t == null ? void 0 : t.type) === "ConditionalExpression" || Je(t)) ? false : (r == null ? void 0 : r.type) === "ConditionalExpression" || Je(r) ? (Pe(t, e), true) : false;
965
+ }
966
+ function Nu({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s, options: u }) {
967
+ let i = t && !ie(s, P(t), j(e));
968
+ return (!t || !i) && ((r == null ? void 0 : r.type) === "ConditionalExpression" || Je(r)) && n ? u.experimentalTernaries && r.alternate === n && !(te(e) && !ie(u.originalText, j(e), P(e))) ? (Pe(r, e), true) : (De(n, e), true) : false;
969
+ }
970
+ function ap({ comment: e, precedingNode: t, enclosingNode: r }) {
971
+ return Te(r) && r.shorthand && r.key === t && r.value.type === "AssignmentPattern" ? (z(r.value.left, e), true) : false;
972
+ }
973
+ var op = /* @__PURE__ */ new Set(["ClassDeclaration", "ClassExpression", "DeclareClass", "DeclareInterface", "InterfaceDeclaration", "TSInterfaceDeclaration"]);
974
+ function Gu({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n }) {
975
+ if (op.has(r == null ? void 0 : r.type)) {
976
+ if (O(r.decorators) && (n == null ? void 0 : n.type) !== "Decorator") return z(v(false, r.decorators, -1), e), true;
977
+ if (r.body && n === r.body) return It(r.body, e), true;
978
+ if (n) {
979
+ if (r.superClass && n === r.superClass && t && (t === r.id || t === r.typeParameters)) return z(t, e), true;
980
+ for (let s of ["implements", "extends", "mixins"]) if (r[s] && n === r[s][0]) return t && (t === r.id || t === r.typeParameters || t === r.superClass) ? z(t, e) : Pe(r, e, s), true;
981
+ }
982
+ }
983
+ return false;
984
+ }
985
+ var pp = /* @__PURE__ */ new Set(["ClassMethod", "ClassProperty", "PropertyDefinition", "TSAbstractPropertyDefinition", "TSAbstractMethodDefinition", "TSDeclareMethod", "MethodDefinition", "ClassAccessorProperty", "AccessorProperty", "TSAbstractAccessorProperty", "TSParameterProperty"]);
986
+ function qu({ comment: e, precedingNode: t, enclosingNode: r, text: n }) {
987
+ return r && t && ke(n, P(e)) === "(" && (r.type === "Property" || r.type === "TSDeclareMethod" || r.type === "TSAbstractMethodDefinition") && t.type === "Identifier" && r.key === t && ke(n, P(t)) !== ":" ? (z(t, e), true) : (t == null ? void 0 : t.type) === "Decorator" && pp.has(r == null ? void 0 : r.type) && (At(e) || e.placement === "ownLine") ? (z(t, e), true) : false;
988
+ }
989
+ var cp = /* @__PURE__ */ new Set(["FunctionDeclaration", "FunctionExpression", "ClassMethod", "MethodDefinition", "ObjectMethod"]);
990
+ function lp({ comment: e, precedingNode: t, enclosingNode: r, text: n }) {
991
+ return ke(n, P(e)) !== "(" ? false : t && cp.has(r == null ? void 0 : r.type) ? (z(t, e), true) : false;
992
+ }
993
+ function mp({ comment: e, enclosingNode: t, text: r }) {
994
+ if ((t == null ? void 0 : t.type) !== "ArrowFunctionExpression") return false;
995
+ let n = ot(r, P(e));
996
+ return n !== false && r.slice(n, n + 2) === "=>" ? (Pe(t, e), true) : false;
997
+ }
998
+ function yp({ comment: e, enclosingNode: t, text: r }) {
999
+ return ke(r, P(e)) !== ")" ? false : t && (Vu(t) && Q(t).length === 0 || yt(t) && le(t).length === 0) ? (Pe(t, e), true) : ((t == null ? void 0 : t.type) === "MethodDefinition" || (t == null ? void 0 : t.type) === "TSAbstractMethodDefinition") && Q(t.value).length === 0 ? (Pe(t.value, e), true) : false;
1000
+ }
1001
+ function fp({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s }) {
1002
+ return (t == null ? void 0 : t.type) === "ComponentTypeParameter" && ((r == null ? void 0 : r.type) === "DeclareComponent" || (r == null ? void 0 : r.type) === "ComponentTypeAnnotation") && (n == null ? void 0 : n.type) !== "ComponentTypeParameter" ? (z(t, e), true) : ((t == null ? void 0 : t.type) === "ComponentParameter" || (t == null ? void 0 : t.type) === "RestElement") && (r == null ? void 0 : r.type) === "ComponentDeclaration" && ke(s, P(e)) === ")" ? (z(t, e), true) : false;
1003
+ }
1004
+ function Wu({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s }) {
1005
+ return (t == null ? void 0 : t.type) === "FunctionTypeParam" && (r == null ? void 0 : r.type) === "FunctionTypeAnnotation" && (n == null ? void 0 : n.type) !== "FunctionTypeParam" ? (z(t, e), true) : ((t == null ? void 0 : t.type) === "Identifier" || (t == null ? void 0 : t.type) === "AssignmentPattern" || (t == null ? void 0 : t.type) === "ObjectPattern" || (t == null ? void 0 : t.type) === "ArrayPattern" || (t == null ? void 0 : t.type) === "RestElement" || (t == null ? void 0 : t.type) === "TSParameterProperty") && Vu(r) && ke(s, P(e)) === ")" ? (z(t, e), true) : !te(e) && ((r == null ? void 0 : r.type) === "FunctionDeclaration" || (r == null ? void 0 : r.type) === "FunctionExpression" || (r == null ? void 0 : r.type) === "ObjectMethod") && (n == null ? void 0 : n.type) === "BlockStatement" && r.body === n && ot(s, P(e)) === j(n) ? (It(n, e), true) : false;
1006
+ }
1007
+ function Uu({ comment: e, enclosingNode: t }) {
1008
+ return (t == null ? void 0 : t.type) === "LabeledStatement" ? (De(t, e), true) : false;
1009
+ }
1010
+ function Zn({ comment: e, enclosingNode: t }) {
1011
+ return ((t == null ? void 0 : t.type) === "ContinueStatement" || (t == null ? void 0 : t.type) === "BreakStatement") && !t.label ? (z(t, e), true) : false;
1012
+ }
1013
+ function Dp({ comment: e, precedingNode: t, enclosingNode: r }) {
1014
+ return w(r) && t && r.callee === t && r.arguments.length > 0 ? (De(r.arguments[0], e), true) : false;
1015
+ }
1016
+ function Ep({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n }) {
1017
+ return Oe(r) ? (or(e) && (n.prettierIgnore = true, e.unignore = true), t ? (z(t, e), true) : false) : (Oe(n) && or(e) && (n.types[0].prettierIgnore = true, e.unignore = true), false);
1018
+ }
1019
+ function Fp({ comment: e, enclosingNode: t }) {
1020
+ return Te(t) ? (De(t, e), true) : false;
1021
+ }
1022
+ function es({ comment: e, enclosingNode: t, ast: r, isLastComment: n }) {
1023
+ var s;
1024
+ return ((s = r == null ? void 0 : r.body) == null ? void 0 : s.length) === 0 ? (n ? Pe(r, e) : De(r, e), true) : (t == null ? void 0 : t.type) === "Program" && t.body.length === 0 && !O(t.directives) ? (n ? Pe(t, e) : De(t, e), true) : false;
1025
+ }
1026
+ function Cp({ comment: e, enclosingNode: t }) {
1027
+ return (t == null ? void 0 : t.type) === "ForInStatement" || (t == null ? void 0 : t.type) === "ForOfStatement" ? (De(t, e), true) : false;
1028
+ }
1029
+ function Xu({ comment: e, precedingNode: t, enclosingNode: r, text: n }) {
1030
+ if ((r == null ? void 0 : r.type) === "ImportSpecifier" || (r == null ? void 0 : r.type) === "ExportSpecifier") return De(r, e), true;
1031
+ let s = (t == null ? void 0 : t.type) === "ImportSpecifier" && (r == null ? void 0 : r.type) === "ImportDeclaration", u = (t == null ? void 0 : t.type) === "ExportSpecifier" && (r == null ? void 0 : r.type) === "ExportNamedDeclaration";
1032
+ return (s || u) && ee(n, P(e)) ? (z(t, e), true) : false;
1033
+ }
1034
+ function Ap({ comment: e, enclosingNode: t }) {
1035
+ return (t == null ? void 0 : t.type) === "AssignmentPattern" ? (De(t, e), true) : false;
1036
+ }
1037
+ var dp = /* @__PURE__ */ new Set(["VariableDeclarator", "AssignmentExpression", "TypeAlias", "TSTypeAliasDeclaration"]);
1038
+ var Tp = /* @__PURE__ */ new Set(["ObjectExpression", "ArrayExpression", "TemplateLiteral", "TaggedTemplateExpression", "ObjectTypeAnnotation", "TSTypeLiteral"]);
1039
+ function xp({ comment: e, enclosingNode: t, followingNode: r }) {
1040
+ return dp.has(t == null ? void 0 : t.type) && r && (Tp.has(r.type) || te(e)) ? (De(r, e), true) : false;
1041
+ }
1042
+ function hp({ comment: e, enclosingNode: t, followingNode: r, text: n }) {
1043
+ return !r && ((t == null ? void 0 : t.type) === "TSMethodSignature" || (t == null ? void 0 : t.type) === "TSDeclareFunction" || (t == null ? void 0 : t.type) === "TSAbstractMethodDefinition") && ke(n, P(e)) === ";" ? (z(t, e), true) : false;
1044
+ }
1045
+ function Yu({ comment: e, enclosingNode: t, followingNode: r }) {
1046
+ if (or(e) && (t == null ? void 0 : t.type) === "TSMappedType" && r === t.key) return t.prettierIgnore = true, e.unignore = true, true;
1047
+ }
1048
+ function Hu({ comment: e, precedingNode: t, enclosingNode: r }) {
1049
+ if ((r == null ? void 0 : r.type) === "TSMappedType" && !t) return Pe(r, e), true;
1050
+ }
1051
+ function gp({ comment: e, enclosingNode: t, followingNode: r }) {
1052
+ return !t || t.type !== "SwitchCase" || t.test || !r || r !== t.consequent[0] ? false : (r.type === "BlockStatement" && At(e) ? It(r, e) : Pe(t, e), true);
1053
+ }
1054
+ function Sp({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n }) {
1055
+ return Oe(t) && ((r.type === "TSArrayType" || r.type === "ArrayTypeAnnotation") && !n || qt(r)) ? (z(v(false, t.types, -1), e), true) : false;
1056
+ }
1057
+ function Bp({ comment: e, enclosingNode: t, precedingNode: r, followingNode: n }) {
1058
+ if (((t == null ? void 0 : t.type) === "ObjectPattern" || (t == null ? void 0 : t.type) === "ArrayPattern") && (n == null ? void 0 : n.type) === "TSTypeAnnotation") return r ? z(r, e) : Pe(t, e), true;
1059
+ }
1060
+ function bp({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s }) {
1061
+ return !n && (r == null ? void 0 : r.type) === "UnaryExpression" && ((t == null ? void 0 : t.type) === "LogicalExpression" || (t == null ? void 0 : t.type) === "BinaryExpression") && ie(s, j(r.argument), j(t.right)) && Ru(e, s) && !ie(s, j(t.right), j(e)) ? (z(t.right, e), true) : false;
1062
+ }
1063
+ var Vu = R(["ArrowFunctionExpression", "FunctionExpression", "FunctionDeclaration", "ObjectMethod", "ClassMethod", "TSDeclareFunction", "TSCallSignatureDeclaration", "TSConstructSignatureDeclaration", "TSMethodSignature", "TSConstructorType", "TSFunctionType", "TSDeclareMethod"]);
1064
+ var Pp = /* @__PURE__ */ new Set(["EmptyStatement", "TemplateElement", "TSEmptyBodyFunctionExpression", "ChainExpression"]);
1065
+ function kp(e) {
1066
+ return !Pp.has(e.type);
1067
+ }
1068
+ function Ip(e, t) {
1069
+ var r;
1070
+ if ((t.parser === "typescript" || t.parser === "flow" || t.parser === "hermes" || t.parser === "acorn" || t.parser === "oxc" || t.parser === "oxc-ts" || t.parser === "espree" || t.parser === "meriyah" || t.parser === "__babel_estree") && e.type === "MethodDefinition" && ((r = e.value) == null ? void 0 : r.type) === "FunctionExpression" && Q(e.value).length === 0 && !e.value.returnType && !O(e.value.typeParameters) && e.value.body) return [...e.decorators || [], e.key, e.value.body];
1071
+ }
1072
+ function rs(e) {
1073
+ let { node: t, parent: r } = e;
1074
+ return (Y(t) || r && (r.type === "JSXSpreadAttribute" || r.type === "JSXSpreadChild" || Oe(r) || (r.type === "ClassDeclaration" || r.type === "ClassExpression") && r.superClass === t)) && (!kt(t) || Oe(r));
1075
+ }
1076
+ function Lp(e, { parser: t }) {
1077
+ if (t === "flow" || t === "hermes" || t === "babel-flow") return e = X(false, e, /[\s(]/gu, ""), e === "" || e === "/*" || e === "/*::";
1078
+ }
1079
+ function $u(e) {
1080
+ switch (e) {
1081
+ case "cr":
1082
+ return "\r";
1083
+ case "crlf":
1084
+ return `\r
1085
+ `;
1086
+ default:
1087
+ return `
1088
+ `;
1089
+ }
1090
+ }
1091
+ var Ie = /* @__PURE__ */ Symbol("MODE_BREAK");
1092
+ var pt = /* @__PURE__ */ Symbol("MODE_FLAT");
1093
+ var Xt = /* @__PURE__ */ Symbol("cursor");
1094
+ var ns = /* @__PURE__ */ Symbol("DOC_FILL_PRINTED_LENGTH");
1095
+ function Ku() {
1096
+ return { value: "", length: 0, queue: [] };
1097
+ }
1098
+ function wp(e, t) {
1099
+ return ss(e, { type: "indent" }, t);
1100
+ }
1101
+ function Op(e, t, r) {
1102
+ return t === Number.NEGATIVE_INFINITY ? e.root || Ku() : t < 0 ? ss(e, { type: "dedent" }, r) : t ? t.type === "root" ? __spreadProps(__spreadValues({}, e), { root: e }) : ss(e, { type: typeof t == "string" ? "stringAlign" : "numberAlign", n: t }, r) : e;
1103
+ }
1104
+ function ss(e, t, r) {
1105
+ let n = t.type === "dedent" ? e.queue.slice(0, -1) : [...e.queue, t], s = "", u = 0, i = 0, a = 0;
1106
+ for (let c of n) switch (c.type) {
1107
+ case "indent":
1108
+ m(), r.useTabs ? o(1) : p(r.tabWidth);
1109
+ break;
1110
+ case "stringAlign":
1111
+ m(), s += c.n, u += c.n.length;
1112
+ break;
1113
+ case "numberAlign":
1114
+ i += 1, a += c.n;
1115
+ break;
1116
+ default:
1117
+ throw new Error(`Unexpected type '${c.type}'`);
1118
+ }
1119
+ return y(), __spreadProps(__spreadValues({}, e), { value: s, length: u, queue: n });
1120
+ function o(c) {
1121
+ s += " ".repeat(c), u += r.tabWidth * c;
1122
+ }
1123
+ function p(c) {
1124
+ s += " ".repeat(c), u += c;
1125
+ }
1126
+ function m() {
1127
+ r.useTabs ? f() : y();
1128
+ }
1129
+ function f() {
1130
+ i > 0 && o(i), C();
1131
+ }
1132
+ function y() {
1133
+ a > 0 && p(a), C();
1134
+ }
1135
+ function C() {
1136
+ i = 0, a = 0;
1137
+ }
1138
+ }
1139
+ function us(e) {
1140
+ let t = 0, r = 0, n = e.length;
1141
+ e: for (; n--; ) {
1142
+ let s = e[n];
1143
+ if (s === Xt) {
1144
+ r++;
1145
+ continue;
1146
+ }
1147
+ for (let u = s.length - 1; u >= 0; u--) {
1148
+ let i = s[u];
1149
+ if (i === " " || i === " ") t++;
1150
+ else {
1151
+ e[n] = s.slice(0, u + 1);
1152
+ break e;
1153
+ }
1154
+ }
1155
+ }
1156
+ if (t > 0 || r > 0) for (e.length = n + 1; r-- > 0; ) e.push(Xt);
1157
+ return t;
1158
+ }
1159
+ function qr(e, t, r, n, s, u) {
1160
+ var _a2;
1161
+ if (r === Number.POSITIVE_INFINITY) return true;
1162
+ let i = t.length, a = [e], o = [];
1163
+ for (; r >= 0; ) {
1164
+ if (a.length === 0) {
1165
+ if (i === 0) return true;
1166
+ a.push(t[--i]);
1167
+ continue;
1168
+ }
1169
+ let { mode: p, doc: m } = a.pop(), f = Be(m);
1170
+ switch (f) {
1171
+ case Ne:
1172
+ o.push(m), r -= st(m);
1173
+ break;
1174
+ case ge:
1175
+ case _e: {
1176
+ let y = f === ge ? m : m.parts, C = (_a2 = m[ns]) != null ? _a2 : 0;
1177
+ for (let c = y.length - 1; c >= C; c--) a.push({ mode: p, doc: y[c] });
1178
+ break;
1179
+ }
1180
+ case $e:
1181
+ case Ke:
1182
+ case ze:
1183
+ case Se:
1184
+ a.push({ mode: p, doc: m.contents });
1185
+ break;
1186
+ case Qe:
1187
+ r += us(o);
1188
+ break;
1189
+ case fe: {
1190
+ if (u && m.break) return false;
1191
+ let y = m.break ? Ie : p, C = m.expandedStates && y === Ie ? v(false, m.expandedStates, -1) : m.contents;
1192
+ a.push({ mode: y, doc: C });
1193
+ break;
1194
+ }
1195
+ case he: {
1196
+ let C = (m.groupId ? s[m.groupId] || pt : p) === Ie ? m.breakContents : m.flatContents;
1197
+ C && a.push({ mode: p, doc: C });
1198
+ break;
1199
+ }
1200
+ case oe:
1201
+ if (p === Ie || m.hard) return true;
1202
+ m.soft || (o.push(" "), r--);
1203
+ break;
1204
+ case Ze:
1205
+ n = true;
1206
+ break;
1207
+ case Ge:
1208
+ if (n) return false;
1209
+ break;
1210
+ }
1211
+ }
1212
+ return false;
1213
+ }
1214
+ function is(e, t) {
1215
+ var _a2;
1216
+ let r = {}, n = t.printWidth, s = $u(t.endOfLine), u = 0, i = [{ ind: Ku(), mode: Ie, doc: e }], a = [], o = false, p = [], m = 0;
1217
+ for (Iu(e); i.length > 0; ) {
1218
+ let { ind: y, mode: C, doc: c } = i.pop();
1219
+ switch (Be(c)) {
1220
+ case Ne: {
1221
+ let A = s !== `
1222
+ ` ? X(false, c, `
1223
+ `, s) : c;
1224
+ a.push(A), i.length > 0 && (u += st(A));
1225
+ break;
1226
+ }
1227
+ case ge:
1228
+ for (let A = c.length - 1; A >= 0; A--) i.push({ ind: y, mode: C, doc: c[A] });
1229
+ break;
1230
+ case it:
1231
+ if (m >= 2) throw new Error("There are too many 'cursor' in doc.");
1232
+ a.push(Xt), m++;
1233
+ break;
1234
+ case $e:
1235
+ i.push({ ind: wp(y, t), mode: C, doc: c.contents });
1236
+ break;
1237
+ case Ke:
1238
+ i.push({ ind: Op(y, c.n, t), mode: C, doc: c.contents });
1239
+ break;
1240
+ case Qe:
1241
+ u -= us(a);
1242
+ break;
1243
+ case fe:
1244
+ switch (C) {
1245
+ case pt:
1246
+ if (!o) {
1247
+ i.push({ ind: y, mode: c.break ? Ie : pt, doc: c.contents });
1248
+ break;
1249
+ }
1250
+ case Ie: {
1251
+ o = false;
1252
+ let A = { ind: y, mode: pt, doc: c.contents }, T = n - u, B = p.length > 0;
1253
+ if (!c.break && qr(A, i, T, B, r)) i.push(A);
1254
+ else if (c.expandedStates) {
1255
+ let g = v(false, c.expandedStates, -1);
1256
+ if (c.break) {
1257
+ i.push({ ind: y, mode: Ie, doc: g });
1258
+ break;
1259
+ } else for (let _ = 1; _ < c.expandedStates.length + 1; _++) if (_ >= c.expandedStates.length) {
1260
+ i.push({ ind: y, mode: Ie, doc: g });
1261
+ break;
1262
+ } else {
1263
+ let M = c.expandedStates[_], J = { ind: y, mode: pt, doc: M };
1264
+ if (qr(J, i, T, B, r)) {
1265
+ i.push(J);
1266
+ break;
1267
+ }
1268
+ }
1269
+ } else i.push({ ind: y, mode: Ie, doc: c.contents });
1270
+ break;
1271
+ }
1272
+ }
1273
+ c.id && (r[c.id] = v(false, i, -1).mode);
1274
+ break;
1275
+ case _e: {
1276
+ let A = n - u, T = (_a2 = c[ns]) != null ? _a2 : 0, { parts: B } = c, g = B.length - T;
1277
+ if (g === 0) break;
1278
+ let _ = B[T + 0], M = B[T + 1], J = { ind: y, mode: pt, doc: _ }, I = { ind: y, mode: Ie, doc: _ }, q = qr(J, [], A, p.length > 0, r, true);
1279
+ if (g === 1) {
1280
+ q ? i.push(J) : i.push(I);
1281
+ break;
1282
+ }
1283
+ let k = { ind: y, mode: pt, doc: M }, W = { ind: y, mode: Ie, doc: M };
1284
+ if (g === 2) {
1285
+ q ? i.push(k, J) : i.push(W, I);
1286
+ break;
1287
+ }
1288
+ let ne = B[T + 2], Z = { ind: y, mode: C, doc: __spreadProps(__spreadValues({}, c), { [ns]: T + 2 }) };
1289
+ qr({ ind: y, mode: pt, doc: [_, M, ne] }, [], A, p.length > 0, r, true) ? i.push(Z, k, J) : q ? i.push(Z, W, J) : i.push(Z, W, I);
1290
+ break;
1291
+ }
1292
+ case he:
1293
+ case ze: {
1294
+ let A = c.groupId ? r[c.groupId] : C;
1295
+ if (A === Ie) {
1296
+ let T = c.type === he ? c.breakContents : c.negate ? c.contents : D(c.contents);
1297
+ T && i.push({ ind: y, mode: C, doc: T });
1298
+ }
1299
+ if (A === pt) {
1300
+ let T = c.type === he ? c.flatContents : c.negate ? D(c.contents) : c.contents;
1301
+ T && i.push({ ind: y, mode: C, doc: T });
1302
+ }
1303
+ break;
1304
+ }
1305
+ case Ze:
1306
+ p.push({ ind: y, mode: C, doc: c.contents });
1307
+ break;
1308
+ case Ge:
1309
+ p.length > 0 && i.push({ ind: y, mode: C, doc: Yn });
1310
+ break;
1311
+ case oe:
1312
+ switch (C) {
1313
+ case pt:
1314
+ if (c.hard) o = true;
1315
+ else {
1316
+ c.soft || (a.push(" "), u += 1);
1317
+ break;
1318
+ }
1319
+ case Ie:
1320
+ if (p.length > 0) {
1321
+ i.push({ ind: y, mode: C, doc: c }, ...p.reverse()), p.length = 0;
1322
+ break;
1323
+ }
1324
+ c.literal ? y.root ? (a.push(s, y.root.value), u = y.root.length) : (a.push(s), u = 0) : (u -= us(a), a.push(s + y.value), u = y.length);
1325
+ break;
1326
+ }
1327
+ break;
1328
+ case Se:
1329
+ i.push({ ind: y, mode: C, doc: c.contents });
1330
+ break;
1331
+ case Me:
1332
+ break;
1333
+ default:
1334
+ throw new Tt(c);
1335
+ }
1336
+ i.length === 0 && p.length > 0 && (i.push(...p.reverse()), p.length = 0);
1337
+ }
1338
+ let f = a.indexOf(Xt);
1339
+ if (f !== -1) {
1340
+ let y = a.indexOf(Xt, f + 1);
1341
+ if (y === -1) return { formatted: a.filter((T) => T !== Xt).join("") };
1342
+ let C = a.slice(0, f).join(""), c = a.slice(f + 1, y).join(""), A = a.slice(y + 1).join("");
1343
+ return { formatted: C + c + A, cursorNodeStart: C.length, cursorNodeText: c };
1344
+ }
1345
+ return { formatted: a.join("") };
1346
+ }
1347
+ function _p(e, t, r = 0) {
1348
+ let n = 0;
1349
+ for (let s = r; s < e.length; ++s) e[s] === " " ? n = n + t - n % t : n++;
1350
+ return n;
1351
+ }
1352
+ var Qu = _p;
1353
+ function Mp(e, t) {
1354
+ let r = e.lastIndexOf(`
1355
+ `);
1356
+ return r === -1 ? 0 : Qu(e.slice(r + 1).match(/^[\t ]*/u)[0], t);
1357
+ }
1358
+ var zu = Mp;
1359
+ function Wr(e, t, r) {
1360
+ let { node: n } = e;
1361
+ if (n.type === "TemplateLiteral" && Rp(e)) {
1362
+ let p = vp(e, t, r);
1363
+ if (p) return p;
1364
+ }
1365
+ let u = "expressions";
1366
+ n.type === "TSTemplateLiteralType" && (u = "types");
1367
+ let i = [], a = e.map(r, u);
1368
+ i.push(je, "`");
1369
+ let o = 0;
1370
+ return e.each(({ index: p, node: m }) => {
1371
+ if (i.push(r()), m.tail) return;
1372
+ let { tabWidth: f } = t, y = m.value.raw, C = y.includes(`
1373
+ `) ? zu(y, f) : o;
1374
+ o = C;
1375
+ let c = a[p], A = n[u][p], T = ie(t.originalText, P(m), j(n.quasis[p + 1]));
1376
+ if (!T) {
1377
+ let g = is(c, __spreadProps(__spreadValues({}, t), { printWidth: Number.POSITIVE_INFINITY })).formatted;
1378
+ g.includes(`
1379
+ `) ? T = true : c = g;
1380
+ }
1381
+ T && (d(A) || A.type === "Identifier" || G(A) || A.type === "ConditionalExpression" || A.type === "SequenceExpression" || xe(A) || Fe(A)) && (c = [D([E, c]), E]);
1382
+ let B = C === 0 && y.endsWith(`
1383
+ `) ? be(Number.NEGATIVE_INFINITY, c) : Mu(c, C, f);
1384
+ i.push(l(["${", B, je, "}"]));
1385
+ }, "quasis"), i.push("`"), i;
1386
+ }
1387
+ function Zu(e, t, r) {
1388
+ var _a2, _b;
1389
+ let n = r("quasi"), { node: s } = e, u = "", i = Ve(s.quasi, h.Leading)[0];
1390
+ return i && (ie(t.originalText, P((_b = (_a2 = s.typeArguments) != null ? _a2 : s.typeParameters) != null ? _b : s.tag), j(i)) ? u = E : u = " "), at(n.label && __spreadValues({ tagged: true }, n.label), [r("tag"), r(s.typeArguments ? "typeArguments" : "typeParameters"), u, je, n]);
1391
+ }
1392
+ function vp(e, t, r) {
1393
+ let { node: n } = e, s = n.quasis[0].value.raw.trim().split(/\s*\|\s*/u);
1394
+ if (s.length > 1 || s.some((u) => u.length > 0)) {
1395
+ t.__inJestEach = true;
1396
+ let u = e.map(r, "expressions");
1397
+ t.__inJestEach = false;
1398
+ let i = [], a = u.map((y) => "${" + is(y, __spreadProps(__spreadValues({}, t), { printWidth: Number.POSITIVE_INFINITY, endOfLine: "lf" })).formatted + "}"), o = [{ hasLineBreak: false, cells: [] }];
1399
+ for (let y = 1; y < n.quasis.length; y++) {
1400
+ let C = v(false, o, -1), c = a[y - 1];
1401
+ C.cells.push(c), c.includes(`
1402
+ `) && (C.hasLineBreak = true), n.quasis[y].value.raw.includes(`
1403
+ `) && o.push({ hasLineBreak: false, cells: [] });
1404
+ }
1405
+ let p = Math.max(s.length, ...o.map((y) => y.cells.length)), m = Array.from({ length: p }).fill(0), f = [{ cells: s }, ...o.filter((y) => y.cells.length > 0)];
1406
+ for (let { cells: y } of f.filter((C) => !C.hasLineBreak)) for (let [C, c] of y.entries()) m[C] = Math.max(m[C], st(c));
1407
+ return i.push(je, "`", D([F, b(F, f.map((y) => b(" | ", y.cells.map((C, c) => y.hasLineBreak ? C : C + " ".repeat(m[c] - st(C))))))]), F, "`"), i;
1408
+ }
1409
+ }
1410
+ function jp(e, t) {
1411
+ let { node: r } = e, n = t();
1412
+ return d(r) && (n = l([D([E, n]), E])), ["${", n, je, "}"];
1413
+ }
1414
+ function Yt(e, t) {
1415
+ return e.map((r) => jp(r, t), "expressions");
1416
+ }
1417
+ function Ur(e, t) {
1418
+ return ft(e, (r) => typeof r == "string" ? t ? X(false, r, /(\\*)`/gu, "$1$1\\`") : as(r) : r);
1419
+ }
1420
+ function as(e) {
1421
+ return X(false, e, /([\\`]|\$\{)/gu, String.raw`\$1`);
1422
+ }
1423
+ function Rp({ node: e, parent: t }) {
1424
+ let r = /^[fx]?(?:describe|it|test)$/u;
1425
+ return t.type === "TaggedTemplateExpression" && t.quasi === e && t.tag.type === "MemberExpression" && t.tag.property.type === "Identifier" && t.tag.property.name === "each" && (t.tag.object.type === "Identifier" && r.test(t.tag.object.name) || t.tag.object.type === "MemberExpression" && t.tag.object.property.type === "Identifier" && (t.tag.object.property.name === "only" || t.tag.object.property.name === "skip") && t.tag.object.object.type === "Identifier" && r.test(t.tag.object.object.name));
1426
+ }
1427
+ var ps = [(e, t) => e.type === "ObjectExpression" && t === "properties", (e, t) => e.type === "CallExpression" && e.callee.type === "Identifier" && e.callee.name === "Component" && t === "arguments", (e, t) => e.type === "Decorator" && t === "expression"];
1428
+ function ei(e) {
1429
+ let t = (n) => n.type === "TemplateLiteral", r = (n, s) => Te(n) && !n.computed && n.key.type === "Identifier" && n.key.name === "styles" && s === "value";
1430
+ return e.match(t, (n, s) => U(n) && s === "elements", r, ...ps) || e.match(t, r, ...ps);
1431
+ }
1432
+ function ti(e) {
1433
+ return e.match((t) => t.type === "TemplateLiteral", (t, r) => Te(t) && !t.computed && t.key.type === "Identifier" && t.key.name === "template" && r === "value", ...ps);
1434
+ }
1435
+ function os(e, t) {
1436
+ return d(e, h.Block | h.Leading, ({ value: r }) => r === ` ${t} `);
1437
+ }
1438
+ function Xr({ node: e, parent: t }, r) {
1439
+ return os(e, r) || Jp(t) && os(t, r) || t.type === "ExpressionStatement" && os(t, r);
1440
+ }
1441
+ function Jp(e) {
1442
+ return e.type === "AsConstExpression" || e.type === "TSAsExpression" && e.typeAnnotation.type === "TSTypeReference" && e.typeAnnotation.typeName.type === "Identifier" && e.typeAnnotation.typeName.name === "const";
1443
+ }
1444
+ async function Np(e, t, r) {
1445
+ let { node: n } = r, s = n.quasis.map((m) => m.value.raw), u = 0, i = s.reduce((m, f, y) => y === 0 ? f : m + "@prettier-placeholder-" + u++ + "-id" + f, ""), a = await e(i, { parser: "scss" }), o = Yt(r, t), p = Gp(a, o);
1446
+ if (!p) throw new Error("Couldn't insert all the expressions");
1447
+ return ["`", D([F, p]), E, "`"];
1448
+ }
1449
+ function Gp(e, t) {
1450
+ if (!O(t)) return e;
1451
+ let r = 0, n = ft(Ut(e), (s) => typeof s != "string" || !s.includes("@prettier-placeholder") ? s : s.split(/@prettier-placeholder-(\d+)-id/u).map((u, i) => i % 2 === 0 ? ve(u) : (r++, t[u])));
1452
+ return t.length === r ? n : null;
1453
+ }
1454
+ function qp({ node: e, parent: t, grandparent: r }) {
1455
+ return r && e.quasis && t.type === "JSXExpressionContainer" && r.type === "JSXElement" && r.openingElement.name.name === "style" && r.openingElement.attributes.some((n) => n.type === "JSXAttribute" && n.name.name === "jsx") || (t == null ? void 0 : t.type) === "TaggedTemplateExpression" && t.tag.type === "Identifier" && t.tag.name === "css" || (t == null ? void 0 : t.type) === "TaggedTemplateExpression" && t.tag.type === "MemberExpression" && t.tag.object.name === "css" && (t.tag.property.name === "global" || t.tag.property.name === "resolve");
1456
+ }
1457
+ function Yr(e) {
1458
+ return e.type === "Identifier" && e.name === "styled";
1459
+ }
1460
+ function ri(e) {
1461
+ return /^[A-Z]/u.test(e.object.name) && e.property.name === "extend";
1462
+ }
1463
+ function Wp({ parent: e }) {
1464
+ if (!e || e.type !== "TaggedTemplateExpression") return false;
1465
+ let t = e.tag.type === "ParenthesizedExpression" ? e.tag.expression : e.tag;
1466
+ switch (t.type) {
1467
+ case "MemberExpression":
1468
+ return Yr(t.object) || ri(t);
1469
+ case "CallExpression":
1470
+ return Yr(t.callee) || t.callee.type === "MemberExpression" && (t.callee.object.type === "MemberExpression" && (Yr(t.callee.object.object) || ri(t.callee.object)) || t.callee.object.type === "CallExpression" && Yr(t.callee.object.callee));
1471
+ case "Identifier":
1472
+ return t.name === "css";
1473
+ default:
1474
+ return false;
1475
+ }
1476
+ }
1477
+ function Up({ parent: e, grandparent: t }) {
1478
+ return (t == null ? void 0 : t.type) === "JSXAttribute" && e.type === "JSXExpressionContainer" && t.name.type === "JSXIdentifier" && t.name.name === "css";
1479
+ }
1480
+ function Xp(e) {
1481
+ if (qp(e) || Wp(e) || Up(e) || ei(e)) return Np;
1482
+ }
1483
+ var ni = Xp;
1484
+ async function Yp(e, t, r) {
1485
+ let { node: n } = r, s = n.quasis.length, u = Yt(r, t), i = [];
1486
+ for (let a = 0; a < s; a++) {
1487
+ let o = n.quasis[a], p = a === 0, m = a === s - 1, f = o.value.cooked, y = f.split(`
1488
+ `), C = y.length, c = u[a], A = C > 2 && y[0].trim() === "" && y[1].trim() === "", T = C > 2 && y[C - 1].trim() === "" && y[C - 2].trim() === "", B = y.every((_) => /^\s*(?:#[^\n\r]*)?$/u.test(_));
1489
+ if (!m && /#[^\n\r]*$/u.test(y[C - 1])) return null;
1490
+ let g = null;
1491
+ B ? g = Hp(y) : g = await e(f, { parser: "graphql" }), g ? (g = Ur(g, false), !p && A && i.push(""), i.push(g), !m && T && i.push("")) : !p && !m && A && i.push(""), c && i.push(c);
1492
+ }
1493
+ return ["`", D([F, b(F, i)]), F, "`"];
1494
+ }
1495
+ function Hp(e) {
1496
+ let t = [], r = false, n = e.map((s) => s.trim());
1497
+ for (let [s, u] of n.entries()) u !== "" && (n[s - 1] === "" && r ? t.push([F, u]) : t.push(u), r = true);
1498
+ return t.length === 0 ? null : b(F, t);
1499
+ }
1500
+ function Vp({ node: e, parent: t }) {
1501
+ return Xr({ node: e, parent: t }, "GraphQL") || t && (t.type === "TaggedTemplateExpression" && (t.tag.type === "MemberExpression" && t.tag.object.name === "graphql" && t.tag.property.name === "experimental" || t.tag.type === "Identifier" && (t.tag.name === "gql" || t.tag.name === "graphql")) || t.type === "CallExpression" && t.callee.type === "Identifier" && t.callee.name === "graphql");
1502
+ }
1503
+ function $p(e) {
1504
+ if (Vp(e)) return Yp;
1505
+ }
1506
+ var si = $p;
1507
+ var cs = 0;
1508
+ async function ui(e, t, r, n, s) {
1509
+ let { node: u } = n, i = cs;
1510
+ cs = cs + 1 >>> 0;
1511
+ let a = (B) => `PRETTIER_HTML_PLACEHOLDER_${B}_${i}_IN_JS`, o = u.quasis.map((B, g, _) => g === _.length - 1 ? B.value.cooked : B.value.cooked + a(g)).join(""), p = Yt(n, r), m = new RegExp(a(String.raw`(\d+)`), "gu"), f = 0, y = await t(o, { parser: e, __onHtmlRoot(B) {
1512
+ f = B.children.length;
1513
+ } }), C = ft(y, (B) => {
1514
+ if (typeof B != "string") return B;
1515
+ let g = [], _ = B.split(m);
1516
+ for (let M = 0; M < _.length; M++) {
1517
+ let J = _[M];
1518
+ if (M % 2 === 0) {
1519
+ J && (J = as(J), s.__embeddedInHtml && (J = X(false, J, /<\/(?=script\b)/giu, String.raw`<\/`)), g.push(J));
1520
+ continue;
1521
+ }
1522
+ let I = Number(J);
1523
+ g.push(p[I]);
1524
+ }
1525
+ return g;
1526
+ }), c = /^\s/u.test(o) ? " " : "", A = /\s$/u.test(o) ? " " : "", T = s.htmlWhitespaceSensitivity === "ignore" ? F : c && A ? x : null;
1527
+ return T ? l(["`", D([T, l(C)]), T, "`"]) : at({ hug: false }, l(["`", c, f > 1 ? D(l(C)) : l(C), A, "`"]));
1528
+ }
1529
+ function Kp(e) {
1530
+ return Xr(e, "HTML") || e.match((t) => t.type === "TemplateLiteral", (t, r) => t.type === "TaggedTemplateExpression" && t.tag.type === "Identifier" && t.tag.name === "html" && r === "quasi");
1531
+ }
1532
+ var Qp = ui.bind(void 0, "html");
1533
+ var zp = ui.bind(void 0, "angular");
1534
+ function Zp(e) {
1535
+ if (Kp(e)) return Qp;
1536
+ if (ti(e)) return zp;
1537
+ }
1538
+ var ii = Zp;
1539
+ async function ec(e, t, r) {
1540
+ let { node: n } = r, s = X(false, n.quasis[0].value.raw, /((?:\\\\)*)\\`/gu, (o, p) => "\\".repeat(p.length / 2) + "`"), u = tc(s), i = u !== "";
1541
+ i && (s = X(false, s, new RegExp(`^${u}`, "gmu"), ""));
1542
+ let a = Ur(await e(s, { parser: "markdown", __inJsTemplate: true }), true);
1543
+ return ["`", i ? D([E, a]) : [Rr, _u(a)], E, "`"];
1544
+ }
1545
+ function tc(e) {
1546
+ let t = e.match(/^([^\S\n]*)\S/mu);
1547
+ return t === null ? "" : t[1];
1548
+ }
1549
+ function rc(e) {
1550
+ if (nc(e)) return ec;
1551
+ }
1552
+ function nc({ node: e, parent: t }) {
1553
+ return (t == null ? void 0 : t.type) === "TaggedTemplateExpression" && e.quasis.length === 1 && t.tag.type === "Identifier" && (t.tag.name === "md" || t.tag.name === "markdown");
1554
+ }
1555
+ var ai = rc;
1556
+ function sc(e) {
1557
+ let { node: t } = e;
1558
+ if (t.type !== "TemplateLiteral" || uc(t)) return;
1559
+ let r;
1560
+ for (let n of [ni, si, ii, ai]) if (r = n(e), !!r) return t.quasis.length === 1 && t.quasis[0].value.raw.trim() === "" ? "``" : async (...s) => {
1561
+ let u = await r(...s);
1562
+ return u && at(__spreadValues({ embed: true }, u.label), u);
1563
+ };
1564
+ }
1565
+ function uc({ quasis: e }) {
1566
+ return e.some(({ value: { cooked: t } }) => t === null);
1567
+ }
1568
+ var oi = sc;
1569
+ var ic = /\*\/$/;
1570
+ var ac = /^\/\*\*?/;
1571
+ var mi = /^\s*(\/\*\*?(.|\r?\n)*?\*\/)/;
1572
+ var oc = /(^|\s+)\/\/([^\n\r]*)/g;
1573
+ var pi = /^(\r?\n)+/;
1574
+ var pc = /(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g;
1575
+ var ci = /(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g;
1576
+ var cc = /(\r?\n|^) *\* ?/g;
1577
+ var yi = [];
1578
+ function fi(e) {
1579
+ let t = e.match(mi);
1580
+ return t ? t[0].trimStart() : "";
1581
+ }
1582
+ function Di(e) {
1583
+ let t = e.match(mi), r = t == null ? void 0 : t[0];
1584
+ return r == null ? e : e.slice(r.length);
1585
+ }
1586
+ function Ei(e) {
1587
+ let t = `
1588
+ `;
1589
+ e = X(false, e.replace(ac, "").replace(ic, ""), cc, "$1");
1590
+ let r = "";
1591
+ for (; r !== e; ) r = e, e = X(false, e, pc, `${t}$1 $2${t}`);
1592
+ e = e.replace(pi, "").trimEnd();
1593
+ let n = /* @__PURE__ */ Object.create(null), s = X(false, e, ci, "").replace(pi, "").trimEnd(), u;
1594
+ for (; u = ci.exec(e); ) {
1595
+ let i = X(false, u[2], oc, "");
1596
+ if (typeof n[u[1]] == "string" || Array.isArray(n[u[1]])) {
1597
+ let a = n[u[1]];
1598
+ n[u[1]] = [...yi, ...Array.isArray(a) ? a : [a], i];
1599
+ } else n[u[1]] = i;
1600
+ }
1601
+ return { comments: s, pragmas: n };
1602
+ }
1603
+ function Fi({ comments: e = "", pragmas: t = {} }) {
1604
+ let r = `
1605
+ `, n = "/**", s = " *", u = " */", i = Object.keys(t), a = i.flatMap((p) => li(p, t[p])).map((p) => `${s} ${p}${r}`).join("");
1606
+ if (!e) {
1607
+ if (i.length === 0) return "";
1608
+ if (i.length === 1 && !Array.isArray(t[i[0]])) {
1609
+ let p = t[i[0]];
1610
+ return `${n} ${li(i[0], p)[0]}${u}`;
1611
+ }
1612
+ }
1613
+ let o = e.split(r).map((p) => `${s} ${p}`).join(r) + r;
1614
+ return n + r + (e ? o : "") + (e && i.length > 0 ? s + r : "") + a + u;
1615
+ }
1616
+ function li(e, t) {
1617
+ return [...yi, ...Array.isArray(t) ? t : [t]].map((r) => `@${e} ${r}`.trim());
1618
+ }
1619
+ var Ci = "format";
1620
+ function lc(e) {
1621
+ if (!e.startsWith("#!")) return "";
1622
+ let t = e.indexOf(`
1623
+ `);
1624
+ return t === -1 ? e : e.slice(0, t);
1625
+ }
1626
+ var Ai = lc;
1627
+ function mc(e) {
1628
+ let t = Ai(e);
1629
+ t && (e = e.slice(t.length + 1));
1630
+ let r = fi(e), { pragmas: n, comments: s } = Ei(r);
1631
+ return { shebang: t, text: e, pragmas: n, comments: s };
1632
+ }
1633
+ function di(e) {
1634
+ let { shebang: t, text: r, pragmas: n, comments: s } = mc(e), u = Di(r), i = Fi({ pragmas: __spreadValues({ [Ci]: "" }, n), comments: s.trimStart() });
1635
+ return (t ? `${t}
1636
+ ` : "") + i + (u.startsWith(`
1637
+ `) ? `
1638
+ ` : `
1639
+
1640
+ `) + u;
1641
+ }
1642
+ function yc(e, t) {
1643
+ let { originalText: r, [/* @__PURE__ */ Symbol.for("comments")]: n, locStart: s, locEnd: u, [/* @__PURE__ */ Symbol.for("printedComments")]: i } = t, { node: a } = e, o = s(a), p = u(a);
1644
+ for (let m of n) s(m) >= o && u(m) <= p && i.add(m);
1645
+ return r.slice(o, p);
1646
+ }
1647
+ var Ti = yc;
1648
+ function ls(e, t) {
1649
+ var u, i, a, o, p, m, f, y, C;
1650
+ if (e.isRoot) return false;
1651
+ let { node: r, key: n, parent: s } = e;
1652
+ if (t.__isInHtmlInterpolation && !t.bracketSpacing && Fc(r) && yr(e)) return true;
1653
+ if (fc(r)) return false;
1654
+ if (r.type === "Identifier") {
1655
+ if ((u = r.extra) != null && u.parenthesized && /^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(r.name) || n === "left" && (r.name === "async" && !s.await || r.name === "let") && s.type === "ForOfStatement") return true;
1656
+ if (r.name === "let") {
1657
+ let c = (i = e.findAncestor((A) => A.type === "ForOfStatement")) == null ? void 0 : i.left;
1658
+ if (c && pe(c, (A) => A === r)) return true;
1659
+ }
1660
+ if (n === "object" && r.name === "let" && s.type === "MemberExpression" && s.computed && !s.optional) {
1661
+ let c = e.findAncestor((T) => T.type === "ExpressionStatement" || T.type === "ForStatement" || T.type === "ForInStatement"), A = c ? c.type === "ExpressionStatement" ? c.expression : c.type === "ForStatement" ? c.init : c.left : void 0;
1662
+ if (A && pe(A, (T) => T === r)) return true;
1663
+ }
1664
+ if (n === "expression") switch (r.name) {
1665
+ case "await":
1666
+ case "interface":
1667
+ case "module":
1668
+ case "using":
1669
+ case "yield":
1670
+ case "let":
1671
+ case "component":
1672
+ case "hook":
1673
+ case "type": {
1674
+ let c = e.findAncestor((A) => !xe(A));
1675
+ if (c !== s && c.type === "ExpressionStatement") return true;
1676
+ }
1677
+ }
1678
+ return false;
1679
+ }
1680
+ if (r.type === "ObjectExpression" || r.type === "FunctionExpression" || r.type === "ClassExpression" || r.type === "DoExpression") {
1681
+ let c = (a = e.findAncestor((A) => A.type === "ExpressionStatement")) == null ? void 0 : a.expression;
1682
+ if (c && pe(c, (A) => A === r)) return true;
1683
+ }
1684
+ if (r.type === "ObjectExpression") {
1685
+ let c = (o = e.findAncestor((A) => A.type === "ArrowFunctionExpression")) == null ? void 0 : o.body;
1686
+ if (c && c.type !== "SequenceExpression" && c.type !== "AssignmentExpression" && pe(c, (A) => A === r)) return true;
1687
+ }
1688
+ switch (s.type) {
1689
+ case "ParenthesizedExpression":
1690
+ return false;
1691
+ case "ClassDeclaration":
1692
+ case "ClassExpression":
1693
+ if (n === "superClass" && (r.type === "ArrowFunctionExpression" || r.type === "AssignmentExpression" || r.type === "AwaitExpression" || r.type === "BinaryExpression" || r.type === "ConditionalExpression" || r.type === "LogicalExpression" || r.type === "NewExpression" || r.type === "ObjectExpression" || r.type === "SequenceExpression" || r.type === "TaggedTemplateExpression" || r.type === "UnaryExpression" || r.type === "UpdateExpression" || r.type === "YieldExpression" || r.type === "TSNonNullExpression" || r.type === "ClassExpression" && O(r.decorators))) return true;
1694
+ break;
1695
+ case "ExportDefaultDeclaration":
1696
+ return xi(e, t) || r.type === "SequenceExpression";
1697
+ case "Decorator":
1698
+ if (n === "expression" && !Ac(r)) return true;
1699
+ break;
1700
+ case "TypeAnnotation":
1701
+ if (e.match(void 0, void 0, (c, A) => A === "returnType" && c.type === "ArrowFunctionExpression") && Ec(r)) return true;
1702
+ break;
1703
+ case "BinaryExpression":
1704
+ if (n === "left" && (s.operator === "in" || s.operator === "instanceof") && r.type === "UnaryExpression") return true;
1705
+ break;
1706
+ case "VariableDeclarator":
1707
+ if (n === "init" && e.match(void 0, void 0, (c, A) => A === "declarations" && c.type === "VariableDeclaration", (c, A) => A === "left" && c.type === "ForInStatement")) return true;
1708
+ break;
1709
+ }
1710
+ switch (r.type) {
1711
+ case "UpdateExpression":
1712
+ if (s.type === "UnaryExpression") return r.prefix && (r.operator === "++" && s.operator === "+" || r.operator === "--" && s.operator === "-");
1713
+ case "UnaryExpression":
1714
+ switch (s.type) {
1715
+ case "UnaryExpression":
1716
+ return r.operator === s.operator && (r.operator === "+" || r.operator === "-");
1717
+ case "BindExpression":
1718
+ return true;
1719
+ case "MemberExpression":
1720
+ case "OptionalMemberExpression":
1721
+ return n === "object";
1722
+ case "TaggedTemplateExpression":
1723
+ return true;
1724
+ case "NewExpression":
1725
+ case "CallExpression":
1726
+ case "OptionalCallExpression":
1727
+ return n === "callee";
1728
+ case "BinaryExpression":
1729
+ return n === "left" && s.operator === "**";
1730
+ case "TSNonNullExpression":
1731
+ return true;
1732
+ default:
1733
+ return false;
1734
+ }
1735
+ case "BinaryExpression":
1736
+ if (s.type === "UpdateExpression" || r.operator === "in" && Dc(e)) return true;
1737
+ if (r.operator === "|>" && ((p = r.extra) != null && p.parenthesized)) {
1738
+ let c = e.grandparent;
1739
+ if (c.type === "BinaryExpression" && c.operator === "|>") return true;
1740
+ }
1741
+ case "TSTypeAssertion":
1742
+ case "TSAsExpression":
1743
+ case "TSSatisfiesExpression":
1744
+ case "AsExpression":
1745
+ case "AsConstExpression":
1746
+ case "SatisfiesExpression":
1747
+ case "LogicalExpression":
1748
+ switch (s.type) {
1749
+ case "TSAsExpression":
1750
+ case "TSSatisfiesExpression":
1751
+ case "AsExpression":
1752
+ case "AsConstExpression":
1753
+ case "SatisfiesExpression":
1754
+ return !xe(r);
1755
+ case "ConditionalExpression":
1756
+ return xe(r) || fu(r);
1757
+ case "CallExpression":
1758
+ case "NewExpression":
1759
+ case "OptionalCallExpression":
1760
+ return n === "callee";
1761
+ case "ClassExpression":
1762
+ case "ClassDeclaration":
1763
+ return n === "superClass";
1764
+ case "TSTypeAssertion":
1765
+ case "TaggedTemplateExpression":
1766
+ case "UnaryExpression":
1767
+ case "JSXSpreadAttribute":
1768
+ case "SpreadElement":
1769
+ case "BindExpression":
1770
+ case "AwaitExpression":
1771
+ case "TSNonNullExpression":
1772
+ case "UpdateExpression":
1773
+ return true;
1774
+ case "MemberExpression":
1775
+ case "OptionalMemberExpression":
1776
+ return n === "object";
1777
+ case "AssignmentExpression":
1778
+ case "AssignmentPattern":
1779
+ return n === "left" && (r.type === "TSTypeAssertion" || xe(r));
1780
+ case "LogicalExpression":
1781
+ if (r.type === "LogicalExpression") return s.operator !== r.operator;
1782
+ case "BinaryExpression": {
1783
+ let { operator: c, type: A } = r;
1784
+ if (!c && A !== "TSTypeAssertion") return true;
1785
+ let T = sr(c), B = s.operator, g = sr(B);
1786
+ return g > T || n === "right" && g === T || g === T && !ar(B, c) ? true : g < T && c === "%" ? B === "+" || B === "-" : !!Tu(B);
1787
+ }
1788
+ default:
1789
+ return false;
1790
+ }
1791
+ case "SequenceExpression":
1792
+ return s.type !== "ForStatement";
1793
+ case "YieldExpression":
1794
+ if (s.type === "AwaitExpression" || s.type === "TSTypeAssertion") return true;
1795
+ case "AwaitExpression":
1796
+ switch (s.type) {
1797
+ case "TaggedTemplateExpression":
1798
+ case "UnaryExpression":
1799
+ case "LogicalExpression":
1800
+ case "SpreadElement":
1801
+ case "TSAsExpression":
1802
+ case "TSSatisfiesExpression":
1803
+ case "TSNonNullExpression":
1804
+ case "AsExpression":
1805
+ case "AsConstExpression":
1806
+ case "SatisfiesExpression":
1807
+ case "BindExpression":
1808
+ return true;
1809
+ case "MemberExpression":
1810
+ case "OptionalMemberExpression":
1811
+ return n === "object";
1812
+ case "NewExpression":
1813
+ case "CallExpression":
1814
+ case "OptionalCallExpression":
1815
+ return n === "callee";
1816
+ case "ConditionalExpression":
1817
+ return n === "test";
1818
+ case "BinaryExpression":
1819
+ return !(!r.argument && s.operator === "|>");
1820
+ default:
1821
+ return false;
1822
+ }
1823
+ case "TSFunctionType":
1824
+ if (e.match((c) => c.type === "TSFunctionType", (c, A) => A === "typeAnnotation" && c.type === "TSTypeAnnotation", (c, A) => A === "returnType" && c.type === "ArrowFunctionExpression")) return true;
1825
+ case "TSConditionalType":
1826
+ case "TSConstructorType":
1827
+ case "ConditionalTypeAnnotation":
1828
+ if (n === "extendsType" && Je(r) && s.type === r.type || n === "checkType" && Je(s)) return true;
1829
+ if (n === "extendsType" && s.type === "TSConditionalType") {
1830
+ let { typeAnnotation: c } = r.returnType || r.typeAnnotation;
1831
+ if (c.type === "TSTypePredicate" && c.typeAnnotation && (c = c.typeAnnotation.typeAnnotation), c.type === "TSInferType" && c.typeParameter.constraint) return true;
1832
+ }
1833
+ case "TSUnionType":
1834
+ case "TSIntersectionType":
1835
+ if ((Oe(s) || qt(s)) && s.types.length > 1 && (!r.types || r.types.length > 1)) return true;
1836
+ case "TSInferType":
1837
+ if (r.type === "TSInferType") {
1838
+ if (s.type === "TSRestType") return false;
1839
+ if (n === "types" && (s.type === "TSUnionType" || s.type === "TSIntersectionType") && r.typeParameter.type === "TSTypeParameter" && r.typeParameter.constraint) return true;
1840
+ }
1841
+ case "TSTypeOperator":
1842
+ return s.type === "TSArrayType" || s.type === "TSOptionalType" || s.type === "TSRestType" || n === "objectType" && s.type === "TSIndexedAccessType" || s.type === "TSTypeOperator" || s.type === "TSTypeAnnotation" && e.grandparent.type.startsWith("TSJSDoc");
1843
+ case "TSTypeQuery":
1844
+ return n === "objectType" && s.type === "TSIndexedAccessType" || n === "elementType" && s.type === "TSArrayType";
1845
+ case "TypeOperator":
1846
+ return s.type === "ArrayTypeAnnotation" || s.type === "NullableTypeAnnotation" || n === "objectType" && (s.type === "IndexedAccessType" || s.type === "OptionalIndexedAccessType") || s.type === "TypeOperator";
1847
+ case "TypeofTypeAnnotation":
1848
+ return n === "objectType" && (s.type === "IndexedAccessType" || s.type === "OptionalIndexedAccessType") || n === "elementType" && s.type === "ArrayTypeAnnotation";
1849
+ case "ArrayTypeAnnotation":
1850
+ return s.type === "NullableTypeAnnotation";
1851
+ case "IntersectionTypeAnnotation":
1852
+ case "UnionTypeAnnotation":
1853
+ return s.type === "TypeOperator" || s.type === "ArrayTypeAnnotation" || s.type === "NullableTypeAnnotation" || s.type === "IntersectionTypeAnnotation" || s.type === "UnionTypeAnnotation" || n === "objectType" && (s.type === "IndexedAccessType" || s.type === "OptionalIndexedAccessType");
1854
+ case "InferTypeAnnotation":
1855
+ case "NullableTypeAnnotation":
1856
+ return s.type === "ArrayTypeAnnotation" || n === "objectType" && (s.type === "IndexedAccessType" || s.type === "OptionalIndexedAccessType");
1857
+ case "ComponentTypeAnnotation":
1858
+ case "FunctionTypeAnnotation": {
1859
+ if (r.type === "ComponentTypeAnnotation" && (r.rendersType === null || r.rendersType === void 0)) return false;
1860
+ if (e.match(void 0, (A, T) => T === "typeAnnotation" && A.type === "TypeAnnotation", (A, T) => T === "returnType" && A.type === "ArrowFunctionExpression") || e.match(void 0, (A, T) => T === "typeAnnotation" && A.type === "TypePredicate", (A, T) => T === "typeAnnotation" && A.type === "TypeAnnotation", (A, T) => T === "returnType" && A.type === "ArrowFunctionExpression")) return true;
1861
+ let c = s.type === "NullableTypeAnnotation" ? e.grandparent : s;
1862
+ return c.type === "UnionTypeAnnotation" || c.type === "IntersectionTypeAnnotation" || c.type === "ArrayTypeAnnotation" || n === "objectType" && (c.type === "IndexedAccessType" || c.type === "OptionalIndexedAccessType") || n === "checkType" && s.type === "ConditionalTypeAnnotation" || n === "extendsType" && s.type === "ConditionalTypeAnnotation" && ((m = r.returnType) == null ? void 0 : m.type) === "InferTypeAnnotation" && ((f = r.returnType) == null ? void 0 : f.typeParameter.bound) || c.type === "NullableTypeAnnotation" || s.type === "FunctionTypeParam" && s.name === null && Q(r).some((A) => {
1863
+ var T;
1864
+ return ((T = A.typeAnnotation) == null ? void 0 : T.type) === "NullableTypeAnnotation";
1865
+ });
1866
+ }
1867
+ case "OptionalIndexedAccessType":
1868
+ return n === "objectType" && s.type === "IndexedAccessType";
1869
+ case "StringLiteral":
1870
+ case "NumericLiteral":
1871
+ case "Literal":
1872
+ if (typeof r.value == "string" && s.type === "ExpressionStatement" && typeof s.directive != "string") {
1873
+ let c = e.grandparent;
1874
+ return c.type === "Program" || c.type === "BlockStatement";
1875
+ }
1876
+ return n === "object" && G(s) && ye(r);
1877
+ case "AssignmentExpression":
1878
+ return !((n === "init" || n === "update") && s.type === "ForStatement" || n === "expression" && r.left.type !== "ObjectPattern" && s.type === "ExpressionStatement" || n === "key" && s.type === "TSPropertySignature" || s.type === "AssignmentExpression" || n === "expressions" && s.type === "SequenceExpression" && e.match(void 0, void 0, (c, A) => (A === "init" || A === "update") && c.type === "ForStatement") || n === "value" && s.type === "Property" && e.match(void 0, void 0, (c, A) => A === "properties" && c.type === "ObjectPattern") || s.type === "NGChainedExpression" || n === "node" && s.type === "JsExpressionRoot");
1879
+ case "ConditionalExpression":
1880
+ switch (s.type) {
1881
+ case "TaggedTemplateExpression":
1882
+ case "UnaryExpression":
1883
+ case "SpreadElement":
1884
+ case "BinaryExpression":
1885
+ case "LogicalExpression":
1886
+ case "NGPipeExpression":
1887
+ case "ExportDefaultDeclaration":
1888
+ case "AwaitExpression":
1889
+ case "JSXSpreadAttribute":
1890
+ case "TSTypeAssertion":
1891
+ case "TypeCastExpression":
1892
+ case "TSAsExpression":
1893
+ case "TSSatisfiesExpression":
1894
+ case "AsExpression":
1895
+ case "AsConstExpression":
1896
+ case "SatisfiesExpression":
1897
+ case "TSNonNullExpression":
1898
+ return true;
1899
+ case "NewExpression":
1900
+ case "CallExpression":
1901
+ case "OptionalCallExpression":
1902
+ return n === "callee";
1903
+ case "ConditionalExpression":
1904
+ return t.experimentalTernaries ? false : n === "test";
1905
+ case "MemberExpression":
1906
+ case "OptionalMemberExpression":
1907
+ return n === "object";
1908
+ default:
1909
+ return false;
1910
+ }
1911
+ case "FunctionExpression":
1912
+ switch (s.type) {
1913
+ case "NewExpression":
1914
+ case "CallExpression":
1915
+ case "OptionalCallExpression":
1916
+ return n === "callee";
1917
+ case "TaggedTemplateExpression":
1918
+ return true;
1919
+ default:
1920
+ return false;
1921
+ }
1922
+ case "ArrowFunctionExpression":
1923
+ switch (s.type) {
1924
+ case "BinaryExpression":
1925
+ return s.operator !== "|>" || ((y = r.extra) == null ? void 0 : y.parenthesized);
1926
+ case "NewExpression":
1927
+ case "CallExpression":
1928
+ case "OptionalCallExpression":
1929
+ return n === "callee";
1930
+ case "MemberExpression":
1931
+ case "OptionalMemberExpression":
1932
+ return n === "object";
1933
+ case "TSAsExpression":
1934
+ case "TSSatisfiesExpression":
1935
+ case "AsExpression":
1936
+ case "AsConstExpression":
1937
+ case "SatisfiesExpression":
1938
+ case "TSNonNullExpression":
1939
+ case "BindExpression":
1940
+ case "TaggedTemplateExpression":
1941
+ case "UnaryExpression":
1942
+ case "LogicalExpression":
1943
+ case "AwaitExpression":
1944
+ case "TSTypeAssertion":
1945
+ return true;
1946
+ case "ConditionalExpression":
1947
+ return n === "test";
1948
+ default:
1949
+ return false;
1950
+ }
1951
+ case "ClassExpression":
1952
+ switch (s.type) {
1953
+ case "NewExpression":
1954
+ return n === "callee";
1955
+ default:
1956
+ return false;
1957
+ }
1958
+ case "OptionalMemberExpression":
1959
+ case "OptionalCallExpression":
1960
+ case "CallExpression":
1961
+ case "MemberExpression":
1962
+ if (Cc(e)) return true;
1963
+ case "TaggedTemplateExpression":
1964
+ case "TSNonNullExpression":
1965
+ if (n === "callee" && (s.type === "BindExpression" || s.type === "NewExpression")) {
1966
+ let c = r;
1967
+ for (; c; ) switch (c.type) {
1968
+ case "CallExpression":
1969
+ case "OptionalCallExpression":
1970
+ return true;
1971
+ case "MemberExpression":
1972
+ case "OptionalMemberExpression":
1973
+ case "BindExpression":
1974
+ c = c.object;
1975
+ break;
1976
+ case "TaggedTemplateExpression":
1977
+ c = c.tag;
1978
+ break;
1979
+ case "TSNonNullExpression":
1980
+ c = c.expression;
1981
+ break;
1982
+ default:
1983
+ return false;
1984
+ }
1985
+ }
1986
+ return false;
1987
+ case "BindExpression":
1988
+ return n === "callee" && (s.type === "BindExpression" || s.type === "NewExpression") || n === "object" && G(s);
1989
+ case "NGPipeExpression":
1990
+ return !(s.type === "NGRoot" || s.type === "NGMicrosyntaxExpression" || s.type === "ObjectProperty" && !((C = r.extra) != null && C.parenthesized) || U(s) || n === "arguments" && w(s) || n === "right" && s.type === "NGPipeExpression" || n === "property" && s.type === "MemberExpression" || s.type === "AssignmentExpression");
1991
+ case "JSXFragment":
1992
+ case "JSXElement":
1993
+ return n === "callee" || n === "left" && s.type === "BinaryExpression" && s.operator === "<" || !U(s) && s.type !== "ArrowFunctionExpression" && s.type !== "AssignmentExpression" && s.type !== "AssignmentPattern" && s.type !== "BinaryExpression" && s.type !== "NewExpression" && s.type !== "ConditionalExpression" && s.type !== "ExpressionStatement" && s.type !== "JsExpressionRoot" && s.type !== "JSXAttribute" && s.type !== "JSXElement" && s.type !== "JSXExpressionContainer" && s.type !== "JSXFragment" && s.type !== "LogicalExpression" && !w(s) && !Te(s) && s.type !== "ReturnStatement" && s.type !== "ThrowStatement" && s.type !== "TypeCastExpression" && s.type !== "VariableDeclarator" && s.type !== "YieldExpression";
1994
+ case "TSInstantiationExpression":
1995
+ return n === "object" && G(s);
1996
+ }
1997
+ return false;
1998
+ }
1999
+ var fc = R(["BlockStatement", "BreakStatement", "ComponentDeclaration", "ClassBody", "ClassDeclaration", "ClassMethod", "ClassProperty", "PropertyDefinition", "ClassPrivateProperty", "ContinueStatement", "DebuggerStatement", "DeclareComponent", "DeclareClass", "DeclareExportAllDeclaration", "DeclareExportDeclaration", "DeclareFunction", "DeclareHook", "DeclareInterface", "DeclareModule", "DeclareModuleExports", "DeclareNamespace", "DeclareVariable", "DeclareEnum", "DoWhileStatement", "EnumDeclaration", "ExportAllDeclaration", "ExportDefaultDeclaration", "ExportNamedDeclaration", "ExpressionStatement", "ForInStatement", "ForOfStatement", "ForStatement", "FunctionDeclaration", "HookDeclaration", "IfStatement", "ImportDeclaration", "InterfaceDeclaration", "LabeledStatement", "MethodDefinition", "ReturnStatement", "SwitchStatement", "ThrowStatement", "TryStatement", "TSDeclareFunction", "TSEnumDeclaration", "TSImportEqualsDeclaration", "TSInterfaceDeclaration", "TSModuleDeclaration", "TSNamespaceExportDeclaration", "TypeAlias", "VariableDeclaration", "WhileStatement", "WithStatement"]);
2000
+ function Dc(e) {
2001
+ let t = 0, { node: r } = e;
2002
+ for (; r; ) {
2003
+ let n = e.getParentNode(t++);
2004
+ if ((n == null ? void 0 : n.type) === "ForStatement" && n.init === r) return true;
2005
+ r = n;
2006
+ }
2007
+ return false;
2008
+ }
2009
+ function Ec(e) {
2010
+ return ur(e, (t) => t.type === "ObjectTypeAnnotation" && ur(t, (r) => r.type === "FunctionTypeAnnotation"));
2011
+ }
2012
+ function Fc(e) {
2013
+ return ue(e);
2014
+ }
2015
+ function yr(e) {
2016
+ let { parent: t, key: r } = e;
2017
+ switch (t.type) {
2018
+ case "NGPipeExpression":
2019
+ if (r === "arguments" && e.isLast) return e.callParent(yr);
2020
+ break;
2021
+ case "ObjectProperty":
2022
+ if (r === "value") return e.callParent(() => e.key === "properties" && e.isLast);
2023
+ break;
2024
+ case "BinaryExpression":
2025
+ case "LogicalExpression":
2026
+ if (r === "right") return e.callParent(yr);
2027
+ break;
2028
+ case "ConditionalExpression":
2029
+ if (r === "alternate") return e.callParent(yr);
2030
+ break;
2031
+ case "UnaryExpression":
2032
+ if (t.prefix) return e.callParent(yr);
2033
+ break;
2034
+ }
2035
+ return false;
2036
+ }
2037
+ function xi(e, t) {
2038
+ let { node: r, parent: n } = e;
2039
+ return r.type === "FunctionExpression" || r.type === "ClassExpression" ? n.type === "ExportDefaultDeclaration" || !ls(e, t) : !Jt(r) || n.type !== "ExportDefaultDeclaration" && ls(e, t) ? false : e.call(() => xi(e, t), ...Lr(r));
2040
+ }
2041
+ function Cc(e) {
2042
+ return !!(e.match(void 0, (t, r) => r === "expression" && t.type === "ChainExpression", (t, r) => r === "tag" && t.type === "TaggedTemplateExpression") || e.match((t) => t.type === "OptionalCallExpression" || t.type === "OptionalMemberExpression", (t, r) => r === "tag" && t.type === "TaggedTemplateExpression") || e.match((t) => t.type === "OptionalCallExpression" || t.type === "OptionalMemberExpression", (t, r) => r === "expression" && t.type === "TSNonNullExpression", (t, r) => r === "tag" && t.type === "TaggedTemplateExpression") || e.match(void 0, (t, r) => r === "expression" && t.type === "ChainExpression", (t, r) => r === "expression" && t.type === "TSNonNullExpression", (t, r) => r === "tag" && t.type === "TaggedTemplateExpression") || e.match(void 0, (t, r) => r === "expression" && t.type === "TSNonNullExpression", (t, r) => r === "expression" && t.type === "ChainExpression", (t, r) => r === "tag" && t.type === "TaggedTemplateExpression") || e.match((t) => t.type === "OptionalMemberExpression" || t.type === "OptionalCallExpression", (t, r) => r === "object" && t.type === "MemberExpression" || r === "callee" && (t.type === "CallExpression" || t.type === "NewExpression")) || e.match((t) => t.type === "OptionalMemberExpression" || t.type === "OptionalCallExpression", (t, r) => r === "expression" && t.type === "TSNonNullExpression", (t, r) => r === "object" && t.type === "MemberExpression" || r === "callee" && t.type === "CallExpression") || e.match((t) => t.type === "CallExpression" || t.type === "MemberExpression", (t, r) => r === "expression" && t.type === "ChainExpression") && (e.match(void 0, void 0, (t, r) => r === "callee" && (t.type === "CallExpression" && !t.optional || t.type === "NewExpression") || r === "object" && t.type === "MemberExpression" && !t.optional) || e.match(void 0, void 0, (t, r) => r === "expression" && t.type === "TSNonNullExpression", (t, r) => r === "object" && t.type === "MemberExpression" || r === "callee" && t.type === "CallExpression")) || e.match((t) => t.type === "CallExpression" || t.type === "MemberExpression", (t, r) => r === "expression" && t.type === "TSNonNullExpression", (t, r) => r === "expression" && t.type === "ChainExpression", (t, r) => r === "object" && t.type === "MemberExpression" || r === "callee" && t.type === "CallExpression"));
2043
+ }
2044
+ function ms(e) {
2045
+ return e.type === "Identifier" ? true : G(e) ? !e.computed && !e.optional && e.property.type === "Identifier" && ms(e.object) : false;
2046
+ }
2047
+ function Ac(e) {
2048
+ return e.type === "ChainExpression" && (e = e.expression), ms(e) || w(e) && !e.optional && ms(e.callee);
2049
+ }
2050
+ var Le = ls;
2051
+ function dc(e, t) {
2052
+ let r = t - 1;
2053
+ r = Ye(e, r, { backwards: true }), r = He(e, r, { backwards: true }), r = Ye(e, r, { backwards: true });
2054
+ let n = He(e, r, { backwards: true });
2055
+ return r !== n;
2056
+ }
2057
+ var hi = dc;
2058
+ var Tc = () => true;
2059
+ function ys(e, t) {
2060
+ let r = e.node;
2061
+ return r.printed = true, t.printer.printComment(e, t);
2062
+ }
2063
+ function xc(e, t) {
2064
+ var m;
2065
+ let r = e.node, n = [ys(e, t)], { printer: s, originalText: u, locStart: i, locEnd: a } = t;
2066
+ if ((m = s.isBlockComment) == null ? void 0 : m.call(s, r)) {
2067
+ let f = ee(u, a(r)) ? ee(u, i(r), { backwards: true }) ? F : x : " ";
2068
+ n.push(f);
2069
+ } else n.push(F);
2070
+ let p = He(u, Ye(u, a(r)));
2071
+ return p !== false && ee(u, p) && n.push(F), n;
2072
+ }
2073
+ function hc(e, t, r) {
2074
+ var p;
2075
+ let n = e.node, s = ys(e, t), { printer: u, originalText: i, locStart: a } = t, o = (p = u.isBlockComment) == null ? void 0 : p.call(u, n);
2076
+ if (r != null && r.hasLineSuffix && !(r != null && r.isBlock) || ee(i, a(n), { backwards: true })) {
2077
+ let m = hi(i, a(n));
2078
+ return { doc: Xn([F, m ? F : "", s]), isBlock: o, hasLineSuffix: true };
2079
+ }
2080
+ return !o || r != null && r.hasLineSuffix ? { doc: [Xn([" ", s]), Ce], isBlock: o, hasLineSuffix: true } : { doc: [" ", s], isBlock: o, hasLineSuffix: false };
2081
+ }
2082
+ function N(e, t, r = {}) {
2083
+ let { node: n } = e;
2084
+ if (!O(n == null ? void 0 : n.comments)) return "";
2085
+ let { indent: s = false, marker: u, filter: i = Tc } = r, a = [];
2086
+ if (e.each(({ node: p }) => {
2087
+ p.leading || p.trailing || p.marker !== u || !i(p) || a.push(ys(e, t));
2088
+ }, "comments"), a.length === 0) return "";
2089
+ let o = b(F, a);
2090
+ return s ? D([F, o]) : o;
2091
+ }
2092
+ function fs(e, t) {
2093
+ let r = e.node;
2094
+ if (!r) return {};
2095
+ let n = t[/* @__PURE__ */ Symbol.for("printedComments")];
2096
+ if ((r.comments || []).filter((o) => !n.has(o)).length === 0) return { leading: "", trailing: "" };
2097
+ let u = [], i = [], a;
2098
+ return e.each(() => {
2099
+ let o = e.node;
2100
+ if (n != null && n.has(o)) return;
2101
+ let { leading: p, trailing: m } = o;
2102
+ p ? u.push(xc(e, t)) : m && (a = hc(e, t, a), i.push(a.doc));
2103
+ }, "comments"), { leading: u, trailing: i };
2104
+ }
2105
+ function Ee(e, t, r) {
2106
+ let { leading: n, trailing: s } = fs(e, r);
2107
+ return !n && !s ? t : lr(t, (u) => [n, u, s]);
2108
+ }
2109
+ var Ds = class extends Error {
2110
+ constructor(t, r, n = "type") {
2111
+ super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`);
2112
+ __publicField(this, "name", "UnexpectedNodeError");
2113
+ this.node = t;
2114
+ }
2115
+ };
2116
+ var qe = Ds;
2117
+ function Es(e) {
2118
+ if (typeof e != "string") throw new TypeError("Expected a string");
2119
+ return e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
2120
+ }
2121
+ var We;
2122
+ var Fs = class {
2123
+ constructor(t) {
2124
+ Ys(this, We);
2125
+ Hs(this, We, new Set(t));
2126
+ }
2127
+ getLeadingWhitespaceCount(t) {
2128
+ let r = mt(this, We), n = 0;
2129
+ for (let s = 0; s < t.length && r.has(t.charAt(s)); s++) n++;
2130
+ return n;
2131
+ }
2132
+ getTrailingWhitespaceCount(t) {
2133
+ let r = mt(this, We), n = 0;
2134
+ for (let s = t.length - 1; s >= 0 && r.has(t.charAt(s)); s--) n++;
2135
+ return n;
2136
+ }
2137
+ getLeadingWhitespace(t) {
2138
+ let r = this.getLeadingWhitespaceCount(t);
2139
+ return t.slice(0, r);
2140
+ }
2141
+ getTrailingWhitespace(t) {
2142
+ let r = this.getTrailingWhitespaceCount(t);
2143
+ return t.slice(t.length - r);
2144
+ }
2145
+ hasLeadingWhitespace(t) {
2146
+ return mt(this, We).has(t.charAt(0));
2147
+ }
2148
+ hasTrailingWhitespace(t) {
2149
+ return mt(this, We).has(v(false, t, -1));
2150
+ }
2151
+ trimStart(t) {
2152
+ let r = this.getLeadingWhitespaceCount(t);
2153
+ return t.slice(r);
2154
+ }
2155
+ trimEnd(t) {
2156
+ let r = this.getTrailingWhitespaceCount(t);
2157
+ return t.slice(0, t.length - r);
2158
+ }
2159
+ trim(t) {
2160
+ return this.trimEnd(this.trimStart(t));
2161
+ }
2162
+ split(t, r = false) {
2163
+ let n = `[${Es([...mt(this, We)].join(""))}]+`, s = new RegExp(r ? `(${n})` : n, "u");
2164
+ return t.split(s);
2165
+ }
2166
+ hasWhitespaceCharacter(t) {
2167
+ let r = mt(this, We);
2168
+ return Array.prototype.some.call(t, (n) => r.has(n));
2169
+ }
2170
+ hasNonWhitespaceCharacter(t) {
2171
+ let r = mt(this, We);
2172
+ return Array.prototype.some.call(t, (n) => !r.has(n));
2173
+ }
2174
+ isWhitespaceOnly(t) {
2175
+ let r = mt(this, We);
2176
+ return Array.prototype.every.call(t, (n) => r.has(n));
2177
+ }
2178
+ };
2179
+ We = /* @__PURE__ */ new WeakMap();
2180
+ var gi = Fs;
2181
+ var Hr = new gi(`
2182
+ \r `);
2183
+ var Cs = (e) => e === "" || e === x || e === F || e === E;
2184
+ function gc(e, t, r) {
2185
+ var _, M, J, I, q;
2186
+ let { node: n } = e;
2187
+ if (n.type === "JSXElement" && Jc(n)) return [r("openingElement"), r("closingElement")];
2188
+ let s = n.type === "JSXElement" ? r("openingElement") : r("openingFragment"), u = n.type === "JSXElement" ? r("closingElement") : r("closingFragment");
2189
+ if (n.children.length === 1 && n.children[0].type === "JSXExpressionContainer" && (n.children[0].expression.type === "TemplateLiteral" || n.children[0].expression.type === "TaggedTemplateExpression")) return [s, ...e.map(r, "children"), u];
2190
+ n.children = n.children.map((k) => Nc(k) ? { type: "JSXText", value: " ", raw: " " } : k);
2191
+ let i = n.children.some(Y), a = n.children.filter((k) => k.type === "JSXExpressionContainer").length > 1, o = n.type === "JSXElement" && n.openingElement.attributes.length > 1, p = re(s) || i || o || a, m = e.parent.rootMarker === "mdx", f = t.singleQuote ? "{' '}" : '{" "}', y = m ? x : S([f, E], " "), C = ((M = (_ = n.openingElement) == null ? void 0 : _.name) == null ? void 0 : M.name) === "fbt", c = Sc(e, t, r, y, C), A = n.children.some((k) => fr(k));
2192
+ for (let k = c.length - 2; k >= 0; k--) {
2193
+ let W = c[k] === "" && c[k + 1] === "", ne = c[k] === F && c[k + 1] === "" && c[k + 2] === F, Z = (c[k] === E || c[k] === F) && c[k + 1] === "" && c[k + 2] === y, lt = c[k] === y && c[k + 1] === "" && (c[k + 2] === E || c[k + 2] === F), L = c[k] === y && c[k + 1] === "" && c[k + 2] === y, se = c[k] === E && c[k + 1] === "" && c[k + 2] === F || c[k] === F && c[k + 1] === "" && c[k + 2] === E;
2194
+ ne && A || W || Z || L || se ? c.splice(k, 2) : lt && c.splice(k + 1, 2);
2195
+ }
2196
+ for (; c.length > 0 && Cs(v(false, c, -1)); ) c.pop();
2197
+ for (; c.length > 1 && Cs(c[0]) && Cs(c[1]); ) c.shift(), c.shift();
2198
+ let T = [""];
2199
+ for (let [k, W] of c.entries()) {
2200
+ if (W === y) {
2201
+ if (k === 1 && wu(c[k - 1])) {
2202
+ if (c.length === 2) {
2203
+ T.push([T.pop(), f]);
2204
+ continue;
2205
+ }
2206
+ T.push([f, F], "");
2207
+ continue;
2208
+ } else if (k === c.length - 1) {
2209
+ T.push([T.pop(), f]);
2210
+ continue;
2211
+ } else if (c[k - 1] === "" && c[k - 2] === F) {
2212
+ T.push([T.pop(), f]);
2213
+ continue;
2214
+ }
2215
+ }
2216
+ k % 2 === 0 ? T.push([T.pop(), W]) : T.push(W, ""), re(W) && (p = true);
2217
+ }
2218
+ let B = A ? Nr(T) : l(T, { shouldBreak: true });
2219
+ if (((J = t.cursorNode) == null ? void 0 : J.type) === "JSXText" && n.children.includes(t.cursorNode) ? B = [mr, B, mr] : ((I = t.nodeBeforeCursor) == null ? void 0 : I.type) === "JSXText" && n.children.includes(t.nodeBeforeCursor) ? B = [mr, B] : ((q = t.nodeAfterCursor) == null ? void 0 : q.type) === "JSXText" && n.children.includes(t.nodeAfterCursor) && (B = [B, mr]), m) return B;
2220
+ let g = l([s, D([F, B]), F, u]);
2221
+ return p ? g : tt([l([s, ...c, u]), g]);
2222
+ }
2223
+ function Sc(e, t, r, n, s) {
2224
+ let u = "", i = [u];
2225
+ function a(p) {
2226
+ u = p, i.push([i.pop(), p]);
2227
+ }
2228
+ function o(p) {
2229
+ p !== "" && (u = p, i.push(p, ""));
2230
+ }
2231
+ return e.each(({ node: p, next: m }) => {
2232
+ if (p.type === "JSXText") {
2233
+ let f = ae(p);
2234
+ if (fr(p)) {
2235
+ let y = Hr.split(f, true);
2236
+ y[0] === "" && (y.shift(), /\n/u.test(y[0]) ? o(Bi(s, y[1], p, m)) : o(n), y.shift());
2237
+ let C;
2238
+ if (v(false, y, -1) === "" && (y.pop(), C = y.pop()), y.length === 0) return;
2239
+ for (let [c, A] of y.entries()) c % 2 === 1 ? o(x) : a(A);
2240
+ C !== void 0 ? /\n/u.test(C) ? o(Bi(s, u, p, m)) : o(n) : o(Si(s, u, p, m));
2241
+ } else /\n/u.test(f) ? f.match(/\n/gu).length > 1 && o(F) : o(n);
2242
+ } else {
2243
+ let f = r();
2244
+ if (a(f), m && fr(m)) {
2245
+ let C = Hr.trim(ae(m)), [c] = Hr.split(C);
2246
+ o(Si(s, c, p, m));
2247
+ } else o(F);
2248
+ }
2249
+ }, "children"), i;
2250
+ }
2251
+ function Si(e, t, r, n) {
2252
+ return e ? "" : r.type === "JSXElement" && !r.closingElement || (n == null ? void 0 : n.type) === "JSXElement" && !n.closingElement ? t.length === 1 ? E : F : E;
2253
+ }
2254
+ function Bi(e, t, r, n) {
2255
+ return e ? F : t.length === 1 ? r.type === "JSXElement" && !r.closingElement || (n == null ? void 0 : n.type) === "JSXElement" && !n.closingElement ? F : E : F;
2256
+ }
2257
+ var Bc = /* @__PURE__ */ new Set(["ArrayExpression", "JSXAttribute", "JSXElement", "JSXExpressionContainer", "JSXFragment", "ExpressionStatement", "CallExpression", "OptionalCallExpression", "ConditionalExpression", "JsExpressionRoot"]);
2258
+ function bc(e, t, r) {
2259
+ let { parent: n } = e;
2260
+ if (Bc.has(n.type)) return t;
2261
+ let s = Pc(e), u = Le(e, r);
2262
+ return l([u ? "" : S("("), D([E, t]), E, u ? "" : S(")")], { shouldBreak: s });
2263
+ }
2264
+ function Pc(e) {
2265
+ return e.match(void 0, (t) => t.type === "ArrowFunctionExpression", w) && (e.match(void 0, void 0, void 0, (t) => t.type === "JSXExpressionContainer") || e.match(void 0, void 0, void 0, (t) => t.type === "ChainExpression", (t) => t.type === "JSXExpressionContainer"));
2266
+ }
2267
+ function kc(e, t, r) {
2268
+ let { node: n } = e, s = [];
2269
+ if (s.push(r("name")), n.value) {
2270
+ let u;
2271
+ if (K(n.value)) {
2272
+ let i = ae(n.value), a = X(false, X(false, i.slice(1, -1), "&apos;", "'"), "&quot;", '"'), o = Sr(a, t.jsxSingleQuote);
2273
+ a = o === '"' ? X(false, a, '"', "&quot;") : X(false, a, "'", "&apos;"), u = e.call(() => Ee(e, ve(o + a + o), t), "value");
2274
+ } else u = r("value");
2275
+ s.push("=", u);
2276
+ }
2277
+ return s;
2278
+ }
2279
+ function Ic(e, t, r) {
2280
+ let { node: n } = e, s = (u, i) => u.type === "JSXEmptyExpression" || !d(u) && (U(u) || ue(u) || u.type === "ArrowFunctionExpression" || u.type === "AwaitExpression" && (s(u.argument, u) || u.argument.type === "JSXElement") || w(u) || u.type === "ChainExpression" && w(u.expression) || u.type === "FunctionExpression" || u.type === "TemplateLiteral" || u.type === "TaggedTemplateExpression" || u.type === "DoExpression" || Y(i) && (u.type === "ConditionalExpression" || Fe(u)));
2281
+ return s(n.expression, e.parent) ? l(["{", r("expression"), je, "}"]) : l(["{", D([E, r("expression")]), E, je, "}"]);
2282
+ }
2283
+ function Lc(e, t, r) {
2284
+ var a, o;
2285
+ let { node: n } = e, s = d(n.name) || d(n.typeParameters) || d(n.typeArguments);
2286
+ if (n.selfClosing && n.attributes.length === 0 && !s) return ["<", r("name"), n.typeArguments ? r("typeArguments") : r("typeParameters"), " />"];
2287
+ if (((a = n.attributes) == null ? void 0 : a.length) === 1 && K(n.attributes[0].value) && !n.attributes[0].value.value.includes(`
2288
+ `) && !s && !d(n.attributes[0])) return l(["<", r("name"), n.typeArguments ? r("typeArguments") : r("typeParameters"), " ", ...e.map(r, "attributes"), n.selfClosing ? " />" : ">"]);
2289
+ let u = (o = n.attributes) == null ? void 0 : o.some((p) => K(p.value) && p.value.value.includes(`
2290
+ `)), i = t.singleAttributePerLine && n.attributes.length > 1 ? F : x;
2291
+ return l(["<", r("name"), n.typeArguments ? r("typeArguments") : r("typeParameters"), D(e.map(() => [i, r()], "attributes")), ...wc(n, t, s)], { shouldBreak: u });
2292
+ }
2293
+ function wc(e, t, r) {
2294
+ return e.selfClosing ? [x, "/>"] : Oc(e, t, r) ? [">"] : [E, ">"];
2295
+ }
2296
+ function Oc(e, t, r) {
2297
+ let n = e.attributes.length > 0 && d(v(false, e.attributes, -1), h.Trailing);
2298
+ return e.attributes.length === 0 && !r || (t.bracketSameLine || t.jsxBracketSameLine) && (!r || e.attributes.length > 0) && !n;
2299
+ }
2300
+ function _c(e, t, r) {
2301
+ let { node: n } = e, s = [];
2302
+ s.push("</");
2303
+ let u = r("name");
2304
+ return d(n.name, h.Leading | h.Line) ? s.push(D([F, u]), F) : d(n.name, h.Leading | h.Block) ? s.push(" ", u) : s.push(u), s.push(">"), s;
2305
+ }
2306
+ function Mc(e, t) {
2307
+ let { node: r } = e, n = d(r), s = d(r, h.Line), u = r.type === "JSXOpeningFragment";
2308
+ return [u ? "<" : "</", D([s ? F : n && !u ? " " : "", N(e, t)]), s ? F : "", ">"];
2309
+ }
2310
+ function vc(e, t, r) {
2311
+ let n = Ee(e, gc(e, t, r), t);
2312
+ return bc(e, n, t);
2313
+ }
2314
+ function jc(e, t) {
2315
+ let { node: r } = e, n = d(r, h.Line);
2316
+ return [N(e, t, { indent: n }), n ? F : ""];
2317
+ }
2318
+ function Rc(e, t, r) {
2319
+ let { node: n } = e;
2320
+ return ["{", e.call(({ node: s }) => {
2321
+ let u = ["...", r()];
2322
+ return !d(s) || !rs(e) ? u : [D([E, Ee(e, u, t)]), E];
2323
+ }, n.type === "JSXSpreadAttribute" ? "argument" : "expression"), "}"];
2324
+ }
2325
+ function bi(e, t, r) {
2326
+ let { node: n } = e;
2327
+ if (n.type.startsWith("JSX")) switch (n.type) {
2328
+ case "JSXAttribute":
2329
+ return kc(e, t, r);
2330
+ case "JSXIdentifier":
2331
+ return n.name;
2332
+ case "JSXNamespacedName":
2333
+ return b(":", [r("namespace"), r("name")]);
2334
+ case "JSXMemberExpression":
2335
+ return b(".", [r("object"), r("property")]);
2336
+ case "JSXSpreadAttribute":
2337
+ case "JSXSpreadChild":
2338
+ return Rc(e, t, r);
2339
+ case "JSXExpressionContainer":
2340
+ return Ic(e, t, r);
2341
+ case "JSXFragment":
2342
+ case "JSXElement":
2343
+ return vc(e, t, r);
2344
+ case "JSXOpeningElement":
2345
+ return Lc(e, t, r);
2346
+ case "JSXClosingElement":
2347
+ return _c(e, t, r);
2348
+ case "JSXOpeningFragment":
2349
+ case "JSXClosingFragment":
2350
+ return Mc(e, t);
2351
+ case "JSXEmptyExpression":
2352
+ return jc(e, t);
2353
+ case "JSXText":
2354
+ throw new Error("JSXText should be handled by JSXElement");
2355
+ default:
2356
+ throw new qe(n, "JSX");
2357
+ }
2358
+ }
2359
+ function Jc(e) {
2360
+ if (e.children.length === 0) return true;
2361
+ if (e.children.length > 1) return false;
2362
+ let t = e.children[0];
2363
+ return t.type === "JSXText" && !fr(t);
2364
+ }
2365
+ function fr(e) {
2366
+ return e.type === "JSXText" && (Hr.hasNonWhitespaceCharacter(ae(e)) || !/\n/u.test(ae(e)));
2367
+ }
2368
+ function Nc(e) {
2369
+ return e.type === "JSXExpressionContainer" && K(e.expression) && e.expression.value === " " && !d(e.expression);
2370
+ }
2371
+ function Pi(e) {
2372
+ let { node: t, parent: r } = e;
2373
+ if (!Y(t) || !Y(r)) return false;
2374
+ let { index: n, siblings: s } = e, u;
2375
+ for (let i = n; i > 0; i--) {
2376
+ let a = s[i - 1];
2377
+ if (!(a.type === "JSXText" && !fr(a))) {
2378
+ u = a;
2379
+ break;
2380
+ }
2381
+ }
2382
+ return (u == null ? void 0 : u.type) === "JSXExpressionContainer" && u.expression.type === "JSXEmptyExpression" && kt(u.expression);
2383
+ }
2384
+ function Gc(e) {
2385
+ return kt(e.node) || Pi(e);
2386
+ }
2387
+ var Vr = Gc;
2388
+ var qc = 0;
2389
+ function $r(e, t, r) {
2390
+ var M;
2391
+ let { node: n, parent: s, grandparent: u, key: i } = e, a = i !== "body" && (s.type === "IfStatement" || s.type === "WhileStatement" || s.type === "SwitchStatement" || s.type === "DoWhileStatement"), o = n.operator === "|>" && ((M = e.root.extra) == null ? void 0 : M.__isUsingHackPipeline), p = As(e, t, r, false, a);
2392
+ if (a) return p;
2393
+ if (o) return l(p);
2394
+ if (w(s) && s.callee === n || s.type === "UnaryExpression" || G(s) && !s.computed) return l([D([E, ...p]), E]);
2395
+ let m = s.type === "ReturnStatement" || s.type === "ThrowStatement" || s.type === "JSXExpressionContainer" && u.type === "JSXAttribute" || n.operator !== "|" && s.type === "JsExpressionRoot" || n.type !== "NGPipeExpression" && (s.type === "NGRoot" && t.parser === "__ng_binding" || s.type === "NGMicrosyntaxExpression" && u.type === "NGMicrosyntax" && u.body.length === 1) || n === s.body && s.type === "ArrowFunctionExpression" || n !== s.body && s.type === "ForStatement" || s.type === "ConditionalExpression" && u.type !== "ReturnStatement" && u.type !== "ThrowStatement" && !w(u) || s.type === "TemplateLiteral", f = s.type === "AssignmentExpression" || s.type === "VariableDeclarator" || s.type === "ClassProperty" || s.type === "PropertyDefinition" || s.type === "TSAbstractPropertyDefinition" || s.type === "ClassPrivateProperty" || Te(s), y = Fe(n.left) && ar(n.operator, n.left.operator);
2396
+ if (m || Ht(n) && !y || !Ht(n) && f) return l(p);
2397
+ if (p.length === 0) return "";
2398
+ let C = Y(n.right), c = p.findIndex((J) => typeof J != "string" && !Array.isArray(J) && J.type === fe), A = p.slice(0, c === -1 ? 1 : c + 1), T = p.slice(A.length, C ? -1 : void 0), B = /* @__PURE__ */ Symbol("logicalChain-" + ++qc), g = l([...A, D(T)], { id: B });
2399
+ if (!C) return g;
2400
+ let _ = v(false, p, -1);
2401
+ return l([g, xt(_, { groupId: B })]);
2402
+ }
2403
+ function As(e, t, r, n, s) {
2404
+ var B;
2405
+ let { node: u } = e;
2406
+ if (!Fe(u)) return [l(r())];
2407
+ let i = [];
2408
+ ar(u.operator, u.left.operator) ? i = e.call((g) => As(g, t, r, true, s), "left") : i.push(l(r("left")));
2409
+ let a = Ht(u), o = (u.operator === "|>" || u.type === "NGPipeExpression" || Wc(e, t)) && !de(t.originalText, u.right), m = !d(u.right, h.Leading, Gr) && de(t.originalText, u.right), f = u.type === "NGPipeExpression" ? "|" : u.operator, y = u.type === "NGPipeExpression" && u.arguments.length > 0 ? l(D([E, ": ", b([x, ": "], e.map(() => be(2, l(r())), "arguments"))])) : "", C;
2410
+ if (a) C = [f, de(t.originalText, u.right) ? D([x, r("right"), y]) : [" ", r("right"), y]];
2411
+ else {
2412
+ let _ = f === "|>" && ((B = e.root.extra) == null ? void 0 : B.__isUsingHackPipeline) ? e.call((M) => As(M, t, r, true, s), "right") : r("right");
2413
+ if (t.experimentalOperatorPosition === "start") {
2414
+ let M = "";
2415
+ if (m) switch (Be(_)) {
2416
+ case ge:
2417
+ M = _.splice(0, 1)[0];
2418
+ break;
2419
+ case Se:
2420
+ M = _.contents.splice(0, 1)[0];
2421
+ break;
2422
+ }
2423
+ C = [x, M, f, " ", _, y];
2424
+ } else C = [o ? x : "", f, o ? " " : x, _, y];
2425
+ }
2426
+ let { parent: c } = e, A = d(u.left, h.Trailing | h.Line);
2427
+ if ((A || !(s && u.type === "LogicalExpression") && c.type !== u.type && u.left.type !== u.type && u.right.type !== u.type) && (C = l(C, { shouldBreak: A })), t.experimentalOperatorPosition === "start" ? i.push(a || m ? " " : "", C) : i.push(o ? "" : " ", C), n && d(u)) {
2428
+ let g = Ut(Ee(e, i, t));
2429
+ return g.type === _e ? g.parts : Array.isArray(g) ? g : [g];
2430
+ }
2431
+ return i;
2432
+ }
2433
+ function Ht(e) {
2434
+ return e.type !== "LogicalExpression" ? false : !!(ue(e.right) && e.right.properties.length > 0 || U(e.right) && e.right.elements.length > 0 || Y(e.right));
2435
+ }
2436
+ var ki = (e) => e.type === "BinaryExpression" && e.operator === "|";
2437
+ function Wc(e, t) {
2438
+ return (t.parser === "__vue_expression" || t.parser === "__vue_ts_expression") && ki(e.node) && !e.hasAncestor((r) => !ki(r) && r.type !== "JsExpressionRoot");
2439
+ }
2440
+ function Li(e, t, r) {
2441
+ let { node: n } = e;
2442
+ if (n.type.startsWith("NG")) switch (n.type) {
2443
+ case "NGRoot":
2444
+ return [r("node"), d(n.node) ? " //" + Ve(n.node)[0].value.trimEnd() : ""];
2445
+ case "NGPipeExpression":
2446
+ return $r(e, t, r);
2447
+ case "NGChainedExpression":
2448
+ return l(b([";", x], e.map(() => Yc(e) ? r() : ["(", r(), ")"], "expressions")));
2449
+ case "NGEmptyExpression":
2450
+ return "";
2451
+ case "NGMicrosyntax":
2452
+ return e.map(() => [e.isFirst ? "" : Ii(e) ? " " : [";", x], r()], "body");
2453
+ case "NGMicrosyntaxKey":
2454
+ return /^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/iu.test(n.name) ? n.name : JSON.stringify(n.name);
2455
+ case "NGMicrosyntaxExpression":
2456
+ return [r("expression"), n.alias === null ? "" : [" as ", r("alias")]];
2457
+ case "NGMicrosyntaxKeyedExpression": {
2458
+ let { index: s, parent: u } = e, i = Ii(e) || Uc(e) || (s === 1 && (n.key.name === "then" || n.key.name === "else" || n.key.name === "as") || s === 2 && (n.key.name === "else" && u.body[s - 1].type === "NGMicrosyntaxKeyedExpression" && u.body[s - 1].key.name === "then" || n.key.name === "track")) && u.body[0].type === "NGMicrosyntaxExpression";
2459
+ return [r("key"), i ? " " : ": ", r("expression")];
2460
+ }
2461
+ case "NGMicrosyntaxLet":
2462
+ return ["let ", r("key"), n.value === null ? "" : [" = ", r("value")]];
2463
+ case "NGMicrosyntaxAs":
2464
+ return [r("key"), " as ", r("alias")];
2465
+ default:
2466
+ throw new qe(n, "Angular");
2467
+ }
2468
+ }
2469
+ function Ii({ node: e, index: t }) {
2470
+ return e.type === "NGMicrosyntaxKeyedExpression" && e.key.name === "of" && t === 1;
2471
+ }
2472
+ function Uc(e) {
2473
+ let { node: t } = e;
2474
+ return e.parent.body[1].key.name === "of" && t.type === "NGMicrosyntaxKeyedExpression" && t.key.name === "track" && t.key.type === "NGMicrosyntaxKey";
2475
+ }
2476
+ var Xc = R(["CallExpression", "OptionalCallExpression", "AssignmentExpression"]);
2477
+ function Yc({ node: e }) {
2478
+ return ur(e, Xc);
2479
+ }
2480
+ function ds(e, t, r) {
2481
+ let { node: n } = e;
2482
+ return l([b(x, e.map(r, "decorators")), _i(n, t) ? F : x]);
2483
+ }
2484
+ function wi(e, t, r) {
2485
+ return Mi(e.node) ? [b(F, e.map(r, "declaration", "decorators")), F] : "";
2486
+ }
2487
+ function Oi(e, t, r) {
2488
+ let { node: n, parent: s } = e, { decorators: u } = n;
2489
+ if (!O(u) || Mi(s) || Vr(e)) return "";
2490
+ let i = n.type === "ClassExpression" || n.type === "ClassDeclaration" || _i(n, t);
2491
+ return [e.key === "declaration" && yu(s) ? F : i ? Ce : "", b(x, e.map(r, "decorators")), x];
2492
+ }
2493
+ function _i(e, t) {
2494
+ return e.decorators.some((r) => ee(t.originalText, P(r)));
2495
+ }
2496
+ function Mi(e) {
2497
+ var r;
2498
+ if (e.type !== "ExportDefaultDeclaration" && e.type !== "ExportNamedDeclaration" && e.type !== "DeclareExportDeclaration") return false;
2499
+ let t = (r = e.declaration) == null ? void 0 : r.decorators;
2500
+ return O(t) && Bt(e, t[0]);
2501
+ }
2502
+ var Dt = class extends Error {
2503
+ constructor() {
2504
+ super(...arguments);
2505
+ __publicField(this, "name", "ArgExpansionBailout");
2506
+ }
2507
+ };
2508
+ function Hc(e, t, r) {
2509
+ let { node: n } = e, s = le(n);
2510
+ if (s.length === 0) return ["(", N(e, t), ")"];
2511
+ let u = s.length - 1;
2512
+ if (Kc(s)) {
2513
+ let f = ["("];
2514
+ return Gt(e, (y, C) => {
2515
+ f.push(r()), C !== u && f.push(", ");
2516
+ }), f.push(")"), f;
2517
+ }
2518
+ let i = false, a = [];
2519
+ Gt(e, ({ node: f }, y) => {
2520
+ let C = r();
2521
+ y === u || (me(f, t) ? (i = true, C = [C, ",", F, F]) : C = [C, ",", x]), a.push(C);
2522
+ });
2523
+ let o = !t.parser.startsWith("__ng_") && n.type !== "ImportExpression" && n.type !== "TSImportType" && ce(t, "all") ? "," : "";
2524
+ if (n.type === "TSImportType" && s.length === 1 && (s[0].type === "TSLiteralType" && K(s[0].literal) || K(s[0])) && !d(s[0])) return l(["(", ...a, S(o), ")"]);
2525
+ function p() {
2526
+ return l(["(", D([x, ...a]), o, x, ")"], { shouldBreak: true });
2527
+ }
2528
+ if (i || e.parent.type !== "Decorator" && Au(s)) return p();
2529
+ if ($c(s)) {
2530
+ let f = a.slice(1);
2531
+ if (f.some(re)) return p();
2532
+ let y;
2533
+ try {
2534
+ y = r(Gn(n, 0), { expandFirstArg: true });
2535
+ } catch (C) {
2536
+ if (C instanceof Dt) return p();
2537
+ throw C;
2538
+ }
2539
+ return re(y) ? [Ce, tt([["(", l(y, { shouldBreak: true }), ", ", ...f, ")"], p()])] : tt([["(", y, ", ", ...f, ")"], ["(", l(y, { shouldBreak: true }), ", ", ...f, ")"], p()]);
2540
+ }
2541
+ if (Vc(s, a, t)) {
2542
+ let f = a.slice(0, -1);
2543
+ if (f.some(re)) return p();
2544
+ let y;
2545
+ try {
2546
+ y = r(Gn(n, -1), { expandLastArg: true });
2547
+ } catch (C) {
2548
+ if (C instanceof Dt) return p();
2549
+ throw C;
2550
+ }
2551
+ return re(y) ? [Ce, tt([["(", ...f, l(y, { shouldBreak: true }), ")"], p()])] : tt([["(", ...f, y, ")"], ["(", ...f, l(y, { shouldBreak: true }), ")"], p()]);
2552
+ }
2553
+ let m = ["(", D([E, ...a]), S(o), E, ")"];
2554
+ return vr(e) ? m : l(m, { shouldBreak: a.some(re) || i });
2555
+ }
2556
+ function Dr(e, t = false) {
2557
+ return ue(e) && (e.properties.length > 0 || d(e)) || U(e) && (e.elements.length > 0 || d(e)) || e.type === "TSTypeAssertion" && Dr(e.expression) || xe(e) && Dr(e.expression) || e.type === "FunctionExpression" || e.type === "ArrowFunctionExpression" && (!e.returnType || !e.returnType.typeAnnotation || e.returnType.typeAnnotation.type !== "TSTypeReference" || Qc(e.body)) && (e.body.type === "BlockStatement" || e.body.type === "ArrowFunctionExpression" && Dr(e.body, true) || ue(e.body) || U(e.body) || !t && (w(e.body) || e.body.type === "ConditionalExpression") || Y(e.body)) || e.type === "DoExpression" || e.type === "ModuleExpression";
2558
+ }
2559
+ function Vc(e, t, r) {
2560
+ var u, i;
2561
+ let n = v(false, e, -1);
2562
+ if (e.length === 1) {
2563
+ let a = v(false, t, -1);
2564
+ if ((u = a.label) != null && u.embed && ((i = a.label) == null ? void 0 : i.hug) !== false) return true;
2565
+ }
2566
+ let s = v(false, e, -2);
2567
+ return !d(n, h.Leading) && !d(n, h.Trailing) && Dr(n) && (!s || s.type !== n.type) && (e.length !== 2 || s.type !== "ArrowFunctionExpression" || !U(n)) && !(e.length > 1 && Ts(n, r));
2568
+ }
2569
+ function $c(e) {
2570
+ if (e.length !== 2) return false;
2571
+ let [t, r] = e;
2572
+ return t.type === "ModuleExpression" && zc(r) ? true : !d(t) && (t.type === "FunctionExpression" || t.type === "ArrowFunctionExpression" && t.body.type === "BlockStatement") && r.type !== "FunctionExpression" && r.type !== "ArrowFunctionExpression" && r.type !== "ConditionalExpression" && ji(r) && !Dr(r);
2573
+ }
2574
+ function ji(e) {
2575
+ var _a2;
2576
+ if (e.type === "ParenthesizedExpression") return ji(e.expression);
2577
+ if (xe(e) || e.type === "TypeCastExpression") {
2578
+ let { typeAnnotation: t } = e;
2579
+ if (t.type === "TypeAnnotation" && (t = t.typeAnnotation), t.type === "TSArrayType" && (t = t.elementType, t.type === "TSArrayType" && (t = t.elementType)), t.type === "GenericTypeAnnotation" || t.type === "TSTypeReference") {
2580
+ let r = (_a2 = t.typeArguments) != null ? _a2 : t.typeParameters;
2581
+ (r == null ? void 0 : r.params.length) === 1 && (t = r.params[0]);
2582
+ }
2583
+ return Nt(t) && we(e.expression, 1);
2584
+ }
2585
+ return yt(e) && le(e).length > 1 ? false : Fe(e) ? we(e.left, 1) && we(e.right, 1) : Jn(e) || we(e);
2586
+ }
2587
+ function Kc(e) {
2588
+ return e.length === 2 ? vi(e, 0) : e.length === 3 ? e[0].type === "Identifier" && vi(e, 1) : false;
2589
+ }
2590
+ function vi(e, t) {
2591
+ let r = e[t], n = e[t + 1];
2592
+ return r.type === "ArrowFunctionExpression" && Q(r).length === 0 && r.body.type === "BlockStatement" && n.type === "ArrayExpression" && !e.some((s) => d(s));
2593
+ }
2594
+ function Qc(e) {
2595
+ return e.type === "BlockStatement" && (e.body.some((t) => t.type !== "EmptyStatement") || d(e, h.Dangling));
2596
+ }
2597
+ function zc(e) {
2598
+ if (!(e.type === "ObjectExpression" && e.properties.length === 1)) return false;
2599
+ let [t] = e.properties;
2600
+ return Te(t) ? !t.computed && (t.key.type === "Identifier" && t.key.name === "type" || K(t.key) && t.key.value === "type") && K(t.value) && t.value.value === "module" : false;
2601
+ }
2602
+ var Lt = Hc;
2603
+ var Zc = (e) => ((e.type === "ChainExpression" || e.type === "TSNonNullExpression") && (e = e.expression), w(e) && le(e).length > 0);
2604
+ function Ri(e, t, r) {
2605
+ var p;
2606
+ let n = r("object"), s = xs(e, t, r), { node: u } = e, i = e.findAncestor((m) => !(G(m) || m.type === "TSNonNullExpression")), a = e.findAncestor((m) => !(m.type === "ChainExpression" || m.type === "TSNonNullExpression")), o = i && (i.type === "NewExpression" || i.type === "BindExpression" || i.type === "AssignmentExpression" && i.left.type !== "Identifier") || u.computed || u.object.type === "Identifier" && u.property.type === "Identifier" && !G(a) || (a.type === "AssignmentExpression" || a.type === "VariableDeclarator") && (Zc(u.object) || ((p = n.label) == null ? void 0 : p.memberChain));
2607
+ return at(n.label, [n, o ? s : l(D([E, s]))]);
2608
+ }
2609
+ function xs(e, t, r) {
2610
+ let n = r("property"), { node: s } = e, u = V(e);
2611
+ return s.computed ? !s.property || ye(s.property) ? [u, "[", n, "]"] : l([u, "[", D([E, n]), E, "]"]) : [u, ".", n];
2612
+ }
2613
+ function Ji(e, t, r) {
2614
+ if (e.node.type === "ChainExpression") return e.call(() => Ji(e, t, r), "expression");
2615
+ let n = (e.parent.type === "ChainExpression" ? e.grandparent : e.parent).type === "ExpressionStatement", s = [];
2616
+ function u(L) {
2617
+ let { originalText: se } = t, Ae = ot(se, P(L));
2618
+ return se.charAt(Ae) === ")" ? Ae !== false && vt(se, Ae + 1) : me(L, t);
2619
+ }
2620
+ function i() {
2621
+ let { node: L } = e;
2622
+ if (L.type === "ChainExpression") return e.call(i, "expression");
2623
+ if (w(L) && (dt(L.callee) || w(L.callee))) {
2624
+ let se = u(L);
2625
+ s.unshift({ node: L, hasTrailingEmptyLine: se, printed: [Ee(e, [V(e), rt(e, t, r), Lt(e, t, r)], t), se ? F : ""] }), e.call(i, "callee");
2626
+ } else dt(L) ? (s.unshift({ node: L, needsParens: Le(e, t), printed: Ee(e, G(L) ? xs(e, t, r) : Kr(e, t, r), t) }), e.call(i, "object")) : L.type === "TSNonNullExpression" ? (s.unshift({ node: L, printed: Ee(e, "!", t) }), e.call(i, "expression")) : s.unshift({ node: L, printed: r() });
2627
+ }
2628
+ let { node: a } = e;
2629
+ s.unshift({ node: a, printed: [V(e), rt(e, t, r), Lt(e, t, r)] }), a.callee && e.call(i, "callee");
2630
+ let o = [], p = [s[0]], m = 1;
2631
+ for (; m < s.length && (s[m].node.type === "TSNonNullExpression" || w(s[m].node) || G(s[m].node) && s[m].node.computed && ye(s[m].node.property)); ++m) p.push(s[m]);
2632
+ if (!w(s[0].node)) for (; m + 1 < s.length && (dt(s[m].node) && dt(s[m + 1].node)); ++m) p.push(s[m]);
2633
+ o.push(p), p = [];
2634
+ let f = false;
2635
+ for (; m < s.length; ++m) {
2636
+ if (f && dt(s[m].node)) {
2637
+ if (s[m].node.computed && ye(s[m].node.property)) {
2638
+ p.push(s[m]);
2639
+ continue;
2640
+ }
2641
+ o.push(p), p = [], f = false;
2642
+ }
2643
+ (w(s[m].node) || s[m].node.type === "ImportExpression") && (f = true), p.push(s[m]), d(s[m].node, h.Trailing) && (o.push(p), p = [], f = false);
2644
+ }
2645
+ p.length > 0 && o.push(p);
2646
+ function y(L) {
2647
+ return /^[A-Z]|^[$_]+$/u.test(L);
2648
+ }
2649
+ function C(L) {
2650
+ return L.length <= t.tabWidth;
2651
+ }
2652
+ function c(L) {
2653
+ var Ot;
2654
+ let se = (Ot = L[1][0]) == null ? void 0 : Ot.node.computed;
2655
+ if (L[0].length === 1) {
2656
+ let nt = L[0][0].node;
2657
+ return nt.type === "ThisExpression" || nt.type === "Identifier" && (y(nt.name) || n && C(nt.name) || se);
2658
+ }
2659
+ let Ae = v(false, L[0], -1).node;
2660
+ return G(Ae) && Ae.property.type === "Identifier" && (y(Ae.property.name) || se);
2661
+ }
2662
+ let A = o.length >= 2 && !d(o[1][0].node) && c(o);
2663
+ function T(L) {
2664
+ let se = L.map((Ae) => Ae.printed);
2665
+ return L.length > 0 && v(false, L, -1).needsParens ? ["(", ...se, ")"] : se;
2666
+ }
2667
+ function B(L) {
2668
+ return L.length === 0 ? "" : D([F, b(F, L.map(T))]);
2669
+ }
2670
+ let g = o.map(T), _ = g, M = A ? 3 : 2, J = o.flat(), I = J.slice(1, -1).some((L) => d(L.node, h.Leading)) || J.slice(0, -1).some((L) => d(L.node, h.Trailing)) || o[M] && d(o[M][0].node, h.Leading);
2671
+ if (o.length <= M && !I && !o.some((L) => v(false, L, -1).hasTrailingEmptyLine)) return vr(e) ? _ : l(_);
2672
+ let q = v(false, o[A ? 1 : 0], -1).node, k = !w(q) && u(q), W = [T(o[0]), A ? o.slice(1, 2).map(T) : "", k ? F : "", B(o.slice(A ? 2 : 1))], ne = s.map(({ node: L }) => L).filter(w);
2673
+ function Z() {
2674
+ let L = v(false, v(false, o, -1), -1).node, se = v(false, g, -1);
2675
+ return w(L) && re(se) && ne.slice(0, -1).some((Ae) => Ae.arguments.some(Rt));
2676
+ }
2677
+ let lt;
2678
+ return I || ne.length > 2 && ne.some((L) => !L.arguments.every((se) => we(se))) || g.slice(0, -1).some(re) || Z() ? lt = l(W) : lt = [re(_) || k ? Ce : "", tt([_, W])], at({ memberChain: true }, lt);
2679
+ }
2680
+ var Ni = Ji;
2681
+ function Qr(e, t, r) {
2682
+ var m;
2683
+ let { node: n } = e, s = n.type === "NewExpression", u = n.type === "ImportExpression", i = V(e), a = le(n), o = a.length === 1 && _r(a[0], t.originalText);
2684
+ if (o || el(e) || Pt(n, e.parent)) {
2685
+ let f = [];
2686
+ if (Gt(e, () => {
2687
+ f.push(r());
2688
+ }), !(o && ((m = f[0].label) != null && m.embed))) return [s ? "new " : "", Gi(e, r), i, rt(e, t, r), "(", b(", ", f), ")"];
2689
+ }
2690
+ if (!u && !s && dt(n.callee) && !e.call((f) => Le(f, t), "callee", ...n.callee.type === "ChainExpression" ? ["expression"] : [])) return Ni(e, t, r);
2691
+ let p = [s ? "new " : "", Gi(e, r), i, rt(e, t, r), Lt(e, t, r)];
2692
+ return u || w(n.callee) ? l(p) : p;
2693
+ }
2694
+ function Gi(e, t) {
2695
+ let { node: r } = e;
2696
+ return r.type === "ImportExpression" ? `import${r.phase ? `.${r.phase}` : ""}` : t("callee");
2697
+ }
2698
+ function el(e) {
2699
+ let { node: t } = e;
2700
+ if (t.type !== "CallExpression" || t.optional || t.callee.type !== "Identifier") return false;
2701
+ let r = le(t);
2702
+ return t.callee.name === "require" ? r.length === 1 && K(r[0]) || r.length > 1 : t.callee.name === "define" && e.parent.type === "ExpressionStatement" ? r.length === 1 || r.length === 2 && r[0].type === "ArrayExpression" || r.length === 3 && K(r[0]) && r[1].type === "ArrayExpression" : false;
2703
+ }
2704
+ function ht(e, t, r, n, s, u) {
2705
+ let i = tl(e, t, r, n, u), a = u ? r(u, { assignmentLayout: i }) : "";
2706
+ switch (i) {
2707
+ case "break-after-operator":
2708
+ return l([l(n), s, l(D([x, a]))]);
2709
+ case "never-break-after-operator":
2710
+ return l([l(n), s, " ", a]);
2711
+ case "fluid": {
2712
+ let o = /* @__PURE__ */ Symbol("assignment");
2713
+ return l([l(n), s, l(D(x), { id: o }), je, xt(a, { groupId: o })]);
2714
+ }
2715
+ case "break-lhs":
2716
+ return l([n, s, " ", l(a)]);
2717
+ case "chain":
2718
+ return [l(n), s, x, a];
2719
+ case "chain-tail":
2720
+ return [l(n), s, D([x, a])];
2721
+ case "chain-tail-arrow-chain":
2722
+ return [l(n), s, a];
2723
+ case "only-left":
2724
+ return n;
2725
+ }
2726
+ }
2727
+ function Wi(e, t, r) {
2728
+ let { node: n } = e;
2729
+ return ht(e, t, r, r("left"), [" ", n.operator], "right");
2730
+ }
2731
+ function Ui(e, t, r) {
2732
+ return ht(e, t, r, r("id"), " =", "init");
2733
+ }
2734
+ function tl(e, t, r, n, s) {
2735
+ let { node: u } = e, i = u[s];
2736
+ if (!i) return "only-left";
2737
+ let a = !zr(i);
2738
+ if (e.match(zr, Xi, (y) => !a || y.type !== "ExpressionStatement" && y.type !== "VariableDeclaration")) return a ? i.type === "ArrowFunctionExpression" && i.body.type === "ArrowFunctionExpression" ? "chain-tail-arrow-chain" : "chain-tail" : "chain";
2739
+ if (!a && zr(i.right) || de(t.originalText, i)) return "break-after-operator";
2740
+ if (u.type === "ImportAttribute" || i.type === "CallExpression" && i.callee.name === "require" || t.parser === "json5" || t.parser === "jsonc" || t.parser === "json") return "never-break-after-operator";
2741
+ let m = Lu(n);
2742
+ if (nl(u) || al(u) || hs(u) && m) return "break-lhs";
2743
+ let f = pl(u, n, t);
2744
+ return e.call(() => rl(e, t, r, f), s) ? "break-after-operator" : sl(u) ? "break-lhs" : !m && (f || i.type === "TemplateLiteral" || i.type === "TaggedTemplateExpression" || Du(i) || ye(i) || i.type === "ClassExpression") ? "never-break-after-operator" : "fluid";
2745
+ }
2746
+ function rl(e, t, r, n) {
2747
+ let s = e.node;
2748
+ if (Fe(s) && !Ht(s)) return true;
2749
+ switch (s.type) {
2750
+ case "StringLiteralTypeAnnotation":
2751
+ case "SequenceExpression":
2752
+ return true;
2753
+ case "TSConditionalType":
2754
+ case "ConditionalTypeAnnotation":
2755
+ if (!t.experimentalTernaries && !ml(s)) break;
2756
+ return true;
2757
+ case "ConditionalExpression": {
2758
+ if (!t.experimentalTernaries) {
2759
+ let { test: p } = s;
2760
+ return Fe(p) && !Ht(p);
2761
+ }
2762
+ let { consequent: a, alternate: o } = s;
2763
+ return a.type === "ConditionalExpression" || o.type === "ConditionalExpression";
2764
+ }
2765
+ case "ClassExpression":
2766
+ return O(s.decorators);
2767
+ }
2768
+ if (n) return false;
2769
+ let u = s, i = [];
2770
+ for (; ; ) if (u.type === "UnaryExpression" || u.type === "AwaitExpression" || u.type === "YieldExpression" && u.argument !== null) u = u.argument, i.push("argument");
2771
+ else if (u.type === "TSNonNullExpression") u = u.expression, i.push("expression");
2772
+ else break;
2773
+ return !!(K(u) || e.call(() => Yi(e, t, r), ...i));
2774
+ }
2775
+ function nl(e) {
2776
+ if (Xi(e)) {
2777
+ let t = e.left || e.id;
2778
+ return t.type === "ObjectPattern" && t.properties.length > 2 && t.properties.some((r) => {
2779
+ var n;
2780
+ return Te(r) && (!r.shorthand || ((n = r.value) == null ? void 0 : n.type) === "AssignmentPattern");
2781
+ });
2782
+ }
2783
+ return false;
2784
+ }
2785
+ function zr(e) {
2786
+ return e.type === "AssignmentExpression";
2787
+ }
2788
+ function Xi(e) {
2789
+ return zr(e) || e.type === "VariableDeclarator";
2790
+ }
2791
+ function sl(e) {
2792
+ let t = il(e);
2793
+ if (O(t)) {
2794
+ let r = e.type === "TSTypeAliasDeclaration" ? "constraint" : "bound";
2795
+ if (t.length > 1 && t.some((n) => n[r] || n.default)) return true;
2796
+ }
2797
+ return false;
2798
+ }
2799
+ var ul = R(["TSTypeAliasDeclaration", "TypeAlias"]);
2800
+ function il(e) {
2801
+ var t;
2802
+ if (ul(e)) return (t = e.typeParameters) == null ? void 0 : t.params;
2803
+ }
2804
+ function al(e) {
2805
+ if (e.type !== "VariableDeclarator") return false;
2806
+ let { typeAnnotation: t } = e.id;
2807
+ if (!t || !t.typeAnnotation) return false;
2808
+ let r = qi(t.typeAnnotation);
2809
+ return O(r) && r.length > 1 && r.some((n) => O(qi(n)) || n.type === "TSConditionalType");
2810
+ }
2811
+ function hs(e) {
2812
+ var t;
2813
+ return e.type === "VariableDeclarator" && ((t = e.init) == null ? void 0 : t.type) === "ArrowFunctionExpression";
2814
+ }
2815
+ var ol = R(["TSTypeReference", "GenericTypeAnnotation"]);
2816
+ function qi(e) {
2817
+ var _a2;
2818
+ var t;
2819
+ if (ol(e)) return (t = (_a2 = e.typeArguments) != null ? _a2 : e.typeParameters) == null ? void 0 : t.params;
2820
+ }
2821
+ function Yi(e, t, r, n = false) {
2822
+ var i;
2823
+ let { node: s } = e, u = () => Yi(e, t, r, true);
2824
+ if (s.type === "ChainExpression" || s.type === "TSNonNullExpression") return e.call(u, "expression");
2825
+ if (w(s)) {
2826
+ if ((i = Qr(e, t, r).label) != null && i.memberChain) return false;
2827
+ let o = le(s);
2828
+ return !(o.length === 0 || o.length === 1 && ir(o[0], t)) || cl(s, r) ? false : e.call(u, "callee");
2829
+ }
2830
+ return G(s) ? e.call(u, "object") : n && (s.type === "Identifier" || s.type === "ThisExpression");
2831
+ }
2832
+ function pl(e, t, r) {
2833
+ return Te(e) ? (t = Ut(t), typeof t == "string" && st(t) < r.tabWidth + 3) : false;
2834
+ }
2835
+ function cl(e, t) {
2836
+ let r = ll(e);
2837
+ if (O(r)) {
2838
+ if (r.length > 1) return true;
2839
+ if (r.length === 1) {
2840
+ let s = r[0];
2841
+ if (Oe(s) || qt(s) || s.type === "TSTypeLiteral" || s.type === "ObjectTypeAnnotation") return true;
2842
+ }
2843
+ let n = e.typeParameters ? "typeParameters" : "typeArguments";
2844
+ if (re(t(n))) return true;
2845
+ }
2846
+ return false;
2847
+ }
2848
+ function ll(e) {
2849
+ var _a2;
2850
+ var t;
2851
+ return (t = (_a2 = e.typeParameters) != null ? _a2 : e.typeArguments) == null ? void 0 : t.params;
2852
+ }
2853
+ function ml(e) {
2854
+ function t(r) {
2855
+ var _a2;
2856
+ switch (r.type) {
2857
+ case "FunctionTypeAnnotation":
2858
+ case "GenericTypeAnnotation":
2859
+ case "TSFunctionType":
2860
+ return !!r.typeParameters;
2861
+ case "TSTypeReference":
2862
+ return !!((_a2 = r.typeArguments) != null ? _a2 : r.typeParameters);
2863
+ default:
2864
+ return false;
2865
+ }
2866
+ }
2867
+ return t(e.checkType) || t(e.extendsType);
2868
+ }
2869
+ function Ue(e, t, r, n, s) {
2870
+ let u = e.node, i = Q(u), a = s ? rt(e, t, r) : "";
2871
+ if (i.length === 0) return [a, "(", N(e, t, { filter: (c) => ke(t.originalText, P(c)) === ")" }), ")"];
2872
+ let { parent: o } = e, p = Pt(o), m = gs(u), f = [];
2873
+ if (hu(e, (c, A) => {
2874
+ let T = A === i.length - 1;
2875
+ T && u.rest && f.push("..."), f.push(r()), !T && (f.push(","), p || m ? f.push(" ") : me(i[A], t) ? f.push(F, F) : f.push(x));
2876
+ }), n && !fl(e)) {
2877
+ if (re(a) || re(f)) throw new Dt();
2878
+ return l([cr(a), "(", cr(f), ")"]);
2879
+ }
2880
+ let y = i.every((c) => !O(c.decorators));
2881
+ return m && y ? [a, "(", ...f, ")"] : p ? [a, "(", ...f, ")"] : (Or(o) || Eu(o) || o.type === "TypeAlias" || o.type === "UnionTypeAnnotation" || o.type === "IntersectionTypeAnnotation" || o.type === "FunctionTypeAnnotation" && o.returnType === u) && i.length === 1 && i[0].name === null && u.this !== i[0] && i[0].typeAnnotation && u.typeParameters === null && Nt(i[0].typeAnnotation) && !u.rest ? t.arrowParens === "always" || u.type === "HookTypeAnnotation" ? ["(", ...f, ")"] : f : [a, "(", D([E, ...f]), S(!xu(u) && ce(t, "all") ? "," : ""), E, ")"];
2882
+ }
2883
+ function gs(e) {
2884
+ if (!e) return false;
2885
+ let t = Q(e);
2886
+ if (t.length !== 1) return false;
2887
+ let [r] = t;
2888
+ return !d(r) && (r.type === "ObjectPattern" || r.type === "ArrayPattern" || r.type === "Identifier" && r.typeAnnotation && (r.typeAnnotation.type === "TypeAnnotation" || r.typeAnnotation.type === "TSTypeAnnotation") && Re(r.typeAnnotation.typeAnnotation) || r.type === "FunctionTypeParam" && Re(r.typeAnnotation) && r !== e.rest || r.type === "AssignmentPattern" && (r.left.type === "ObjectPattern" || r.left.type === "ArrayPattern") && (r.right.type === "Identifier" || ue(r.right) && r.right.properties.length === 0 || U(r.right) && r.right.elements.length === 0));
2889
+ }
2890
+ function yl(e) {
2891
+ let t;
2892
+ return e.returnType ? (t = e.returnType, t.typeAnnotation && (t = t.typeAnnotation)) : e.typeAnnotation && (t = e.typeAnnotation), t;
2893
+ }
2894
+ function ct(e, t) {
2895
+ var s;
2896
+ let r = yl(e);
2897
+ if (!r) return false;
2898
+ let n = (s = e.typeParameters) == null ? void 0 : s.params;
2899
+ if (n) {
2900
+ if (n.length > 1) return false;
2901
+ if (n.length === 1) {
2902
+ let u = n[0];
2903
+ if (u.constraint || u.default) return false;
2904
+ }
2905
+ }
2906
+ return Q(e).length === 1 && (Re(r) || re(t));
2907
+ }
2908
+ function fl(e) {
2909
+ return e.match((t) => t.type === "ArrowFunctionExpression" && t.body.type === "BlockStatement", (t, r) => {
2910
+ if (t.type === "CallExpression" && r === "arguments" && t.arguments.length === 1 && t.callee.type === "CallExpression") {
2911
+ let n = t.callee.callee;
2912
+ return n.type === "Identifier" || n.type === "MemberExpression" && !n.computed && n.object.type === "Identifier" && n.property.type === "Identifier";
2913
+ }
2914
+ return false;
2915
+ }, (t, r) => t.type === "VariableDeclarator" && r === "init" || t.type === "ExportDefaultDeclaration" && r === "declaration" || t.type === "TSExportAssignment" && r === "expression" || t.type === "AssignmentExpression" && r === "right" && t.left.type === "MemberExpression" && t.left.object.type === "Identifier" && t.left.object.name === "module" && t.left.property.type === "Identifier" && t.left.property.name === "exports", (t) => t.type !== "VariableDeclaration" || t.kind === "const" && t.declarations.length === 1);
2916
+ }
2917
+ function Hi(e) {
2918
+ let t = Q(e);
2919
+ return t.length > 1 && t.some((r) => r.type === "TSParameterProperty");
2920
+ }
2921
+ var Dl = R(["VoidTypeAnnotation", "TSVoidKeyword", "NullLiteralTypeAnnotation", "TSNullKeyword"]);
2922
+ var El = R(["ObjectTypeAnnotation", "TSTypeLiteral", "GenericTypeAnnotation", "TSTypeReference"]);
2923
+ function Fl(e) {
2924
+ let { types: t } = e;
2925
+ if (t.some((n) => d(n))) return false;
2926
+ let r = t.find((n) => El(n));
2927
+ return r ? t.every((n) => n === r || Dl(n)) : false;
2928
+ }
2929
+ function Ss(e) {
2930
+ return Nt(e) || Re(e) ? true : Oe(e) ? Fl(e) : false;
2931
+ }
2932
+ function Vi(e, t, r) {
2933
+ let n = t.semi ? ";" : "", { node: s } = e, u = [$(e), "opaque type ", r("id"), r("typeParameters")];
2934
+ return s.supertype && u.push(": ", r("supertype")), s.impltype && u.push(" = ", r("impltype")), u.push(n), u;
2935
+ }
2936
+ function Zr(e, t, r) {
2937
+ let n = t.semi ? ";" : "", { node: s } = e, u = [$(e)];
2938
+ u.push("type ", r("id"), r("typeParameters"));
2939
+ let i = s.type === "TSTypeAliasDeclaration" ? "typeAnnotation" : "right";
2940
+ return [ht(e, t, r, u, " =", i), n];
2941
+ }
2942
+ function en(e, t, r) {
2943
+ let n = false;
2944
+ return l(e.map(({ isFirst: s, previous: u, node: i, index: a }) => {
2945
+ let o = r();
2946
+ if (s) return o;
2947
+ let p = Re(i), m = Re(u);
2948
+ return m && p ? [" & ", n ? D(o) : o] : !m && !p || de(t.originalText, i) ? t.experimentalOperatorPosition === "start" ? D([x, "& ", o]) : D([" &", x, o]) : (a > 1 && (n = true), [" & ", a > 1 ? D(o) : o]);
2949
+ }, "types"));
2950
+ }
2951
+ function tn(e, t, r) {
2952
+ let { node: n } = e, { parent: s } = e, u = s.type !== "TypeParameterInstantiation" && (!Je(s) || !t.experimentalTernaries) && s.type !== "TSTypeParameterInstantiation" && s.type !== "GenericTypeAnnotation" && s.type !== "TSTypeReference" && s.type !== "TSTypeAssertion" && s.type !== "TupleTypeAnnotation" && s.type !== "TSTupleType" && !(s.type === "FunctionTypeParam" && !s.name && e.grandparent.this !== s) && !((s.type === "TypeAlias" || s.type === "VariableDeclarator" || s.type === "TSTypeAliasDeclaration") && de(t.originalText, n)), i = Ss(n), a = e.map((m) => {
2953
+ let f = r();
2954
+ return i || (f = be(2, f)), Ee(m, f, t);
2955
+ }, "types");
2956
+ if (i) return b(" | ", a);
2957
+ let o = u && !de(t.originalText, n), p = [S([o ? x : "", "| "]), b([x, "| "], a)];
2958
+ return Le(e, t) ? l([D(p), E]) : (s.type === "TupleTypeAnnotation" || s.type === "TSTupleType") && s[s.type === "TupleTypeAnnotation" && s.types ? "types" : "elementTypes"].length > 1 ? l([D([S(["(", E]), p]), E, S(")")]) : l(u ? D(p) : p);
2959
+ }
2960
+ function Cl(e) {
2961
+ var n;
2962
+ let { node: t, parent: r } = e;
2963
+ return t.type === "FunctionTypeAnnotation" && (Or(r) || !((r.type === "ObjectTypeProperty" || r.type === "ObjectTypeInternalSlot") && !r.variance && !r.optional && Bt(r, t) || r.type === "ObjectTypeCallProperty" || ((n = e.getParentNode(2)) == null ? void 0 : n.type) === "DeclareFunction"));
2964
+ }
2965
+ function rn(e, t, r) {
2966
+ let { node: n } = e, s = [Vt(e)];
2967
+ (n.type === "TSConstructorType" || n.type === "TSConstructSignatureDeclaration") && s.push("new ");
2968
+ let u = Ue(e, t, r, false, true), i = [];
2969
+ return n.type === "FunctionTypeAnnotation" ? i.push(Cl(e) ? " => " : ": ", r("returnType")) : i.push(H(e, r, n.returnType ? "returnType" : "typeAnnotation")), ct(n, i) && (u = l(u)), s.push(u, i), l(s);
2970
+ }
2971
+ function nn(e, t, r) {
2972
+ return [r("objectType"), V(e), "[", r("indexType"), "]"];
2973
+ }
2974
+ function sn(e, t, r) {
2975
+ return ["infer ", r("typeParameter")];
2976
+ }
2977
+ function Bs(e, t, r) {
2978
+ let { node: n } = e;
2979
+ return [n.postfix ? "" : r, H(e, t), n.postfix ? r : ""];
2980
+ }
2981
+ function un(e, t, r) {
2982
+ let { node: n } = e;
2983
+ return ["...", ...n.type === "TupleTypeSpreadElement" && n.label ? [r("label"), ": "] : [], r("typeAnnotation")];
2984
+ }
2985
+ function an(e, t, r) {
2986
+ let { node: n } = e;
2987
+ return [n.variance ? r("variance") : "", r("label"), n.optional ? "?" : "", ": ", r("elementType")];
2988
+ }
2989
+ var Al = /* @__PURE__ */ new WeakSet();
2990
+ function H(e, t, r = "typeAnnotation") {
2991
+ let { node: { [r]: n } } = e;
2992
+ if (!n) return "";
2993
+ let s = false;
2994
+ if (n.type === "TSTypeAnnotation" || n.type === "TypeAnnotation") {
2995
+ let u = e.call($i, r);
2996
+ (u === "=>" || u === ":" && d(n, h.Leading)) && (s = true), Al.add(n);
2997
+ }
2998
+ return s ? [" ", t(r)] : t(r);
2999
+ }
3000
+ var $i = (e) => e.match((t) => t.type === "TSTypeAnnotation", (t, r) => (r === "returnType" || r === "typeAnnotation") && (t.type === "TSFunctionType" || t.type === "TSConstructorType")) ? "=>" : e.match((t) => t.type === "TSTypeAnnotation", (t, r) => r === "typeAnnotation" && (t.type === "TSJSDocNullableType" || t.type === "TSJSDocNonNullableType" || t.type === "TSTypePredicate")) || e.match((t) => t.type === "TypeAnnotation", (t, r) => r === "typeAnnotation" && t.type === "Identifier", (t, r) => r === "id" && t.type === "DeclareFunction") || e.match((t) => t.type === "TypeAnnotation", (t, r) => r === "typeAnnotation" && t.type === "Identifier", (t, r) => r === "id" && t.type === "DeclareHook") || e.match((t) => t.type === "TypeAnnotation", (t, r) => r === "bound" && t.type === "TypeParameter" && t.usesExtendsBound) ? "" : ":";
3001
+ function on(e, t, r) {
3002
+ let n = $i(e);
3003
+ return n ? [n, " ", r("typeAnnotation")] : r("typeAnnotation");
3004
+ }
3005
+ function pn(e) {
3006
+ return [e("elementType"), "[]"];
3007
+ }
3008
+ function cn({ node: e }, t) {
3009
+ let r = e.type === "TSTypeQuery" ? "exprName" : "argument", n = e.type === "TypeofTypeAnnotation" || e.typeArguments ? "typeArguments" : "typeParameters";
3010
+ return ["typeof ", t(r), t(n)];
3011
+ }
3012
+ function ln(e, t) {
3013
+ let { node: r } = e;
3014
+ return [r.type === "TSTypePredicate" && r.asserts ? "asserts " : r.type === "TypePredicate" && r.kind ? `${r.kind} ` : "", t("parameterName"), r.typeAnnotation ? [" is ", H(e, t)] : ""];
3015
+ }
3016
+ function V(e) {
3017
+ let { node: t } = e;
3018
+ return !t.optional || t.type === "Identifier" && t === e.parent.key ? "" : w(t) || G(t) && t.computed || t.type === "OptionalIndexedAccessType" ? "?." : "?";
3019
+ }
3020
+ function mn(e) {
3021
+ return e.node.definite || e.match(void 0, (t, r) => r === "id" && t.type === "VariableDeclarator" && t.definite) ? "!" : "";
3022
+ }
3023
+ var dl = /* @__PURE__ */ new Set(["DeclareClass", "DeclareComponent", "DeclareFunction", "DeclareHook", "DeclareVariable", "DeclareExportDeclaration", "DeclareExportAllDeclaration", "DeclareOpaqueType", "DeclareTypeAlias", "DeclareEnum", "DeclareInterface"]);
3024
+ function $(e) {
3025
+ let { node: t } = e;
3026
+ return t.declare || dl.has(t.type) && e.parent.type !== "DeclareExportDeclaration" ? "declare " : "";
3027
+ }
3028
+ var Tl = /* @__PURE__ */ new Set(["TSAbstractMethodDefinition", "TSAbstractPropertyDefinition", "TSAbstractAccessorProperty"]);
3029
+ function Vt({ node: e }) {
3030
+ return e.abstract || Tl.has(e.type) ? "abstract " : "";
3031
+ }
3032
+ function rt(e, t, r) {
3033
+ let n = e.node;
3034
+ return n.typeArguments ? r("typeArguments") : n.typeParameters ? r("typeParameters") : "";
3035
+ }
3036
+ function Kr(e, t, r) {
3037
+ return ["::", r("callee")];
3038
+ }
3039
+ function Et(e, t, r) {
3040
+ return e.type === "EmptyStatement" ? ";" : e.type === "BlockStatement" || r ? [" ", t] : D([x, t]);
3041
+ }
3042
+ function yn(e, t) {
3043
+ return ["...", t("argument"), H(e, t)];
3044
+ }
3045
+ function $t(e) {
3046
+ return e.accessibility ? e.accessibility + " " : "";
3047
+ }
3048
+ function xl(e, t, r, n) {
3049
+ let { node: s } = e, u = s.inexact ? "..." : "";
3050
+ return d(s, h.Dangling) ? l([r, u, N(e, t, { indent: true }), E, n]) : [r, u, n];
3051
+ }
3052
+ function Kt(e, t, r) {
3053
+ let { node: n } = e, s = [], u = "[", i = "]", a = n.type === "TupleTypeAnnotation" && n.types ? "types" : n.type === "TSTupleType" || n.type === "TupleTypeAnnotation" ? "elementTypes" : "elements", o = n[a];
3054
+ if (o.length === 0) s.push(xl(e, t, u, i));
3055
+ else {
3056
+ let p = v(false, o, -1), m = (p == null ? void 0 : p.type) !== "RestElement" && !n.inexact, f = p === null, y = /* @__PURE__ */ Symbol("array"), C = !t.__inJestEach && o.length > 1 && o.every((T, B, g) => {
3057
+ let _ = T == null ? void 0 : T.type;
3058
+ if (!U(T) && !ue(T)) return false;
3059
+ let M = g[B + 1];
3060
+ if (M && _ !== M.type) return false;
3061
+ let J = U(T) ? "elements" : "properties";
3062
+ return T[J] && T[J].length > 1;
3063
+ }), c = Ts(n, t), A = m ? f ? "," : ce(t) ? c ? S(",", "", { groupId: y }) : S(",") : "" : "";
3064
+ s.push(l([u, D([E, c ? gl(e, t, r, A) : [hl(e, t, r, a, n.inexact), A], N(e, t)]), E, i], { shouldBreak: C, id: y }));
3065
+ }
3066
+ return s.push(V(e), H(e, r)), s;
3067
+ }
3068
+ function Ts(e, t) {
3069
+ return U(e) && e.elements.length > 1 && e.elements.every((r) => r && (ye(r) || Rn(r) && !d(r.argument)) && !d(r, h.Trailing | h.Line, (n) => !ee(t.originalText, j(n), { backwards: true })));
3070
+ }
3071
+ function Ki({ node: e }, { originalText: t }) {
3072
+ let r = (s) => _t(t, Mt(t, s)), n = (s) => t[s] === "," ? s : n(r(s + 1));
3073
+ return vt(t, n(P(e)));
3074
+ }
3075
+ function hl(e, t, r, n, s) {
3076
+ let u = [];
3077
+ return e.each(({ node: i, isLast: a }) => {
3078
+ u.push(i ? l(r()) : ""), (!a || s) && u.push([",", x, i && Ki(e, t) ? E : ""]);
3079
+ }, n), s && u.push("..."), u;
3080
+ }
3081
+ function gl(e, t, r, n) {
3082
+ let s = [];
3083
+ return e.each(({ isLast: u, next: i }) => {
3084
+ s.push([r(), u ? n : ","]), u || s.push(Ki(e, t) ? [F, F] : d(i, h.Leading | h.Line) ? F : x);
3085
+ }, "elements"), Nr(s);
3086
+ }
3087
+ var Sl = /^[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC][\$0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]*$/;
3088
+ var Bl = (e) => Sl.test(e);
3089
+ var Qi = Bl;
3090
+ function bl(e) {
3091
+ return e.length === 1 ? e : e.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/u, "$1$2").replace(/^([+-]?[\d.]+)e[+-]?0+$/u, "$1").replace(/^([+-])?\./u, "$10.").replace(/(\.\d+?)0+(?=e|$)/u, "$1").replace(/\.(?=e|$)/u, "");
3092
+ }
3093
+ var Ft = bl;
3094
+ var fn = /* @__PURE__ */ new WeakMap();
3095
+ function Zi(e) {
3096
+ return /^(?:\d+|\d+\.\d+)$/u.test(e);
3097
+ }
3098
+ function zi(e, t) {
3099
+ return t.parser === "json" || t.parser === "jsonc" || !K(e.key) || ut(ae(e.key), t).slice(1, -1) !== e.key.value ? false : !!(Qi(e.key.value) && !(t.parser === "babel-ts" && e.type === "ClassProperty" || (t.parser === "typescript" || t.parser === "oxc-ts") && e.type === "PropertyDefinition") || Zi(e.key.value) && String(Number(e.key.value)) === e.key.value && e.type !== "ImportAttribute" && (t.parser === "babel" || t.parser === "acorn" || t.parser === "oxc" || t.parser === "espree" || t.parser === "meriyah" || t.parser === "__babel_estree"));
3100
+ }
3101
+ function Pl(e, t) {
3102
+ let { key: r } = e.node;
3103
+ return (r.type === "Identifier" || ye(r) && Zi(Ft(ae(r))) && String(r.value) === Ft(ae(r)) && !(t.parser === "typescript" || t.parser === "babel-ts" || t.parser === "oxc-ts")) && (t.parser === "json" || t.parser === "jsonc" || t.quoteProps === "consistent" && fn.get(e.parent));
3104
+ }
3105
+ function Ct(e, t, r) {
3106
+ let { node: n } = e;
3107
+ if (n.computed) return ["[", r("key"), "]"];
3108
+ let { parent: s } = e, { key: u } = n;
3109
+ if (t.quoteProps === "consistent" && !fn.has(s)) {
3110
+ let i = e.siblings.some((a) => !a.computed && K(a.key) && !zi(a, t));
3111
+ fn.set(s, i);
3112
+ }
3113
+ if (Pl(e, t)) {
3114
+ let i = ut(JSON.stringify(u.type === "Identifier" ? u.name : u.value.toString()), t);
3115
+ return e.call((a) => Ee(a, i, t), "key");
3116
+ }
3117
+ return zi(n, t) && (t.quoteProps === "as-needed" || t.quoteProps === "consistent" && !fn.get(s)) ? e.call((i) => Ee(i, /^\d/u.test(u.value) ? Ft(u.value) : u.value, t), "key") : r("key");
3118
+ }
3119
+ function Dn(e, t, r) {
3120
+ let { node: n } = e;
3121
+ return n.shorthand ? r("value") : ht(e, t, r, Ct(e, t, r), ":", "value");
3122
+ }
3123
+ var kl = ({ node: e, key: t, parent: r }) => t === "value" && e.type === "FunctionExpression" && (r.type === "ObjectMethod" || r.type === "ClassMethod" || r.type === "ClassPrivateMethod" || r.type === "MethodDefinition" || r.type === "TSAbstractMethodDefinition" || r.type === "TSDeclareMethod" || r.type === "Property" && bt(r));
3124
+ function En(e, t, r, n) {
3125
+ if (kl(e)) return Fn(e, t, r);
3126
+ let { node: s } = e, u = false;
3127
+ if ((s.type === "FunctionDeclaration" || s.type === "FunctionExpression") && (n != null && n.expandLastArg)) {
3128
+ let { parent: m } = e;
3129
+ w(m) && (le(m).length > 1 || Q(s).every((f) => f.type === "Identifier" && !f.typeAnnotation)) && (u = true);
3130
+ }
3131
+ let i = [$(e), s.async ? "async " : "", `function${s.generator ? "*" : ""} `, s.id ? r("id") : ""], a = Ue(e, t, r, u), o = Qt(e, r), p = ct(s, o);
3132
+ return i.push(rt(e, t, r), l([p ? l(a) : a, o]), s.body ? " " : "", r("body")), t.semi && (s.declare || !s.body) && i.push(";"), i;
3133
+ }
3134
+ function Er(e, t, r) {
3135
+ let { node: n } = e, { kind: s } = n, u = n.value || n, i = [];
3136
+ return !s || s === "init" || s === "method" || s === "constructor" ? u.async && i.push("async ") : (jt.ok(s === "get" || s === "set"), i.push(s, " ")), u.generator && i.push("*"), i.push(Ct(e, t, r), n.optional ? "?" : "", n === u ? Fn(e, t, r) : r("value")), i;
3137
+ }
3138
+ function Fn(e, t, r) {
3139
+ let { node: n } = e, s = Ue(e, t, r), u = Qt(e, r), i = Hi(n), a = ct(n, u), o = [rt(e, t, r), l([i ? l(s, { shouldBreak: true }) : a ? l(s) : s, u])];
3140
+ return n.body ? o.push(" ", r("body")) : o.push(t.semi ? ";" : ""), o;
3141
+ }
3142
+ function Il(e) {
3143
+ let t = Q(e);
3144
+ return t.length === 1 && !e.typeParameters && !d(e, h.Dangling) && t[0].type === "Identifier" && !t[0].typeAnnotation && !d(t[0]) && !t[0].optional && !e.predicate && !e.returnType;
3145
+ }
3146
+ function Cn(e, t) {
3147
+ if (t.arrowParens === "always") return false;
3148
+ if (t.arrowParens === "avoid") {
3149
+ let { node: r } = e;
3150
+ return Il(r);
3151
+ }
3152
+ return false;
3153
+ }
3154
+ function Qt(e, t) {
3155
+ let { node: r } = e, s = [H(e, t, "returnType")];
3156
+ return r.predicate && s.push(t("predicate")), s;
3157
+ }
3158
+ function ea(e, t, r) {
3159
+ let { node: n } = e, s = t.semi ? ";" : "", u = [];
3160
+ if (n.argument) {
3161
+ let o = r("argument");
3162
+ Ll(t, n.argument) ? o = ["(", D([F, o]), F, ")"] : (Fe(n.argument) || t.experimentalTernaries && n.argument.type === "ConditionalExpression" && (n.argument.consequent.type === "ConditionalExpression" || n.argument.alternate.type === "ConditionalExpression")) && (o = l([S("("), D([E, o]), E, S(")")])), u.push(" ", o);
3163
+ }
3164
+ let i = d(n, h.Dangling), a = s && i && d(n, h.Last | h.Line);
3165
+ return a && u.push(s), i && u.push(" ", N(e, t)), a || u.push(s), u;
3166
+ }
3167
+ function ta(e, t, r) {
3168
+ return ["return", ea(e, t, r)];
3169
+ }
3170
+ function ra(e, t, r) {
3171
+ return ["throw", ea(e, t, r)];
3172
+ }
3173
+ function Ll(e, t) {
3174
+ if (de(e.originalText, t) || d(t, h.Leading, (r) => ie(e.originalText, j(r), P(r))) && !Y(t)) return true;
3175
+ if (Jt(t)) {
3176
+ let r = t, n;
3177
+ for (; n = mu(r); ) if (r = n, de(e.originalText, r)) return true;
3178
+ }
3179
+ return false;
3180
+ }
3181
+ var bs = /* @__PURE__ */ new WeakMap();
3182
+ function na(e) {
3183
+ return bs.has(e) || bs.set(e, e.type === "ConditionalExpression" && !pe(e, (t) => t.type === "ObjectExpression")), bs.get(e);
3184
+ }
3185
+ var wl = (e) => e.type === "SequenceExpression";
3186
+ function sa(e, t, r, n = {}) {
3187
+ let s = [], u, i = [], a = false, o = !n.expandLastArg && e.node.body.type === "ArrowFunctionExpression", p;
3188
+ (function B() {
3189
+ let { node: g } = e, _ = Ol(e, t, r, n);
3190
+ if (s.length === 0) s.push(_);
3191
+ else {
3192
+ let { leading: M, trailing: J } = fs(e, t);
3193
+ s.push([M, _]), i.unshift(J);
3194
+ }
3195
+ o && (a || (a = g.returnType && Q(g).length > 0 || g.typeParameters || Q(g).some((M) => M.type !== "Identifier"))), !o || g.body.type !== "ArrowFunctionExpression" ? (u = r("body", n), p = g.body) : e.call(B, "body");
3196
+ })();
3197
+ let m = !de(t.originalText, p) && (wl(p) || _l(p, u, t) || !a && na(p)), f = e.key === "callee" && yt(e.parent), y = /* @__PURE__ */ Symbol("arrow-chain"), C = Ml(e, n, { signatureDocs: s, shouldBreak: a }), c = false, A = false, T = false;
3198
+ return o && (f || n.assignmentLayout) && (A = true, T = !d(e.node, h.Leading & h.Line), c = n.assignmentLayout === "chain-tail-arrow-chain" || f && !m), u = vl(e, t, n, { bodyDoc: u, bodyComments: i, functionBody: p, shouldPutBodyOnSameLine: m }), l([l(A ? D([T ? E : "", C]) : C, { shouldBreak: c, id: y }), " =>", o ? xt(u, { groupId: y }) : l(u), o && f ? S(E, "", { groupId: y }) : ""]);
3199
+ }
3200
+ function Ol(e, t, r, n) {
3201
+ let { node: s } = e, u = [];
3202
+ if (s.async && u.push("async "), Cn(e, t)) u.push(r(["params", 0]));
3203
+ else {
3204
+ let a = n.expandLastArg || n.expandFirstArg, o = Qt(e, r);
3205
+ if (a) {
3206
+ if (re(o)) throw new Dt();
3207
+ o = l(cr(o));
3208
+ }
3209
+ u.push(l([Ue(e, t, r, a, true), o]));
3210
+ }
3211
+ let i = N(e, t, { filter(a) {
3212
+ let o = ot(t.originalText, P(a));
3213
+ return o !== false && t.originalText.slice(o, o + 2) === "=>";
3214
+ } });
3215
+ return i && u.push(" ", i), u;
3216
+ }
3217
+ function _l(e, t, r) {
3218
+ var n, s;
3219
+ return U(e) || ue(e) || e.type === "ArrowFunctionExpression" || e.type === "DoExpression" || e.type === "BlockStatement" || Y(e) || ((n = t.label) == null ? void 0 : n.hug) !== false && (((s = t.label) == null ? void 0 : s.embed) || _r(e, r.originalText));
3220
+ }
3221
+ function Ml(e, t, { signatureDocs: r, shouldBreak: n }) {
3222
+ if (r.length === 1) return r[0];
3223
+ let { parent: s, key: u } = e;
3224
+ return u !== "callee" && yt(s) || Fe(s) ? l([r[0], " =>", D([x, b([" =>", x], r.slice(1))])], { shouldBreak: n }) : u === "callee" && yt(s) || t.assignmentLayout ? l(b([" =>", x], r), { shouldBreak: n }) : l(D(b([" =>", x], r)), { shouldBreak: n });
3225
+ }
3226
+ function vl(e, t, r, { bodyDoc: n, bodyComments: s, functionBody: u, shouldPutBodyOnSameLine: i }) {
3227
+ let { node: a, parent: o } = e, p = r.expandLastArg && ce(t, "all") ? S(",") : "", m = (r.expandLastArg || o.type === "JSXExpressionContainer") && !d(a) ? E : "";
3228
+ return i && na(u) ? [" ", l([S("", "("), D([E, n]), S("", ")"), p, m]), s] : i ? [" ", n, s] : [D([x, n, s]), p, m];
3229
+ }
3230
+ var jl = (e, t, r) => {
3231
+ if (!(e && t == null)) {
3232
+ if (t.findLast) return t.findLast(r);
3233
+ for (let n = t.length - 1; n >= 0; n--) {
3234
+ let s = t[n];
3235
+ if (r(s, n, t)) return s;
3236
+ }
3237
+ }
3238
+ };
3239
+ var ua = jl;
3240
+ function Fr(e, t, r, n) {
3241
+ let { node: s } = e, u = [], i = ua(false, s[n], (a) => a.type !== "EmptyStatement");
3242
+ return e.each(({ node: a }) => {
3243
+ a.type !== "EmptyStatement" && (u.push(r()), a !== i && (u.push(F), me(a, t) && u.push(F)));
3244
+ }, n), u;
3245
+ }
3246
+ function An(e, t, r) {
3247
+ let n = Rl(e, t, r), { node: s, parent: u } = e;
3248
+ if (s.type === "Program" && (u == null ? void 0 : u.type) !== "ModuleExpression") return n ? [n, F] : "";
3249
+ let i = [];
3250
+ if (s.type === "StaticBlock" && i.push("static "), i.push("{"), n) i.push(D([F, n]), F);
3251
+ else {
3252
+ let a = e.grandparent;
3253
+ u.type === "ArrowFunctionExpression" || u.type === "FunctionExpression" || u.type === "FunctionDeclaration" || u.type === "ComponentDeclaration" || u.type === "HookDeclaration" || u.type === "ObjectMethod" || u.type === "ClassMethod" || u.type === "ClassPrivateMethod" || u.type === "ForStatement" || u.type === "WhileStatement" || u.type === "DoWhileStatement" || u.type === "DoExpression" || u.type === "ModuleExpression" || u.type === "CatchClause" && !a.finalizer || u.type === "TSModuleDeclaration" || s.type === "StaticBlock" || i.push(F);
3254
+ }
3255
+ return i.push("}"), i;
3256
+ }
3257
+ function Rl(e, t, r) {
3258
+ let { node: n } = e, s = O(n.directives), u = n.body.some((o) => o.type !== "EmptyStatement"), i = d(n, h.Dangling);
3259
+ if (!s && !u && !i) return "";
3260
+ let a = [];
3261
+ return s && (a.push(Fr(e, t, r, "directives")), (u || i) && (a.push(F), me(v(false, n.directives, -1), t) && a.push(F))), u && a.push(Fr(e, t, r, "body")), i && a.push(N(e, t)), a;
3262
+ }
3263
+ function Jl(e) {
3264
+ let t = /* @__PURE__ */ new WeakMap();
3265
+ return function(r) {
3266
+ return t.has(r) || t.set(r, Symbol(e)), t.get(r);
3267
+ };
3268
+ }
3269
+ var dn = Jl;
3270
+ var Cr = dn("typeParameters");
3271
+ function Nl(e, t, r) {
3272
+ let { node: n } = e;
3273
+ return Q(n).length === 1 && n.type.startsWith("TS") && !n[r][0].constraint && e.parent.type === "ArrowFunctionExpression" && !(t.filepath && /\.ts$/u.test(t.filepath));
3274
+ }
3275
+ function wt(e, t, r, n) {
3276
+ let { node: s } = e;
3277
+ if (!s[n]) return "";
3278
+ if (!Array.isArray(s[n])) return r(n);
3279
+ let u = Pt(e.grandparent), i = e.match((p) => !(p[n].length === 1 && Re(p[n][0])), void 0, (p, m) => m === "typeAnnotation", (p) => p.type === "Identifier", hs);
3280
+ if (s[n].length === 0 || !i && (u || s[n].length === 1 && (s[n][0].type === "NullableTypeAnnotation" || Ss(s[n][0])))) return ["<", b(", ", e.map(r, n)), Gl(e, t), ">"];
3281
+ let o = s.type === "TSTypeParameterInstantiation" ? "" : Nl(e, t, n) ? "," : ce(t) ? S(",") : "";
3282
+ return l(["<", D([E, b([",", x], e.map(r, n))]), o, E, ">"], { id: Cr(s) });
3283
+ }
3284
+ function Gl(e, t) {
3285
+ let { node: r } = e;
3286
+ if (!d(r, h.Dangling)) return "";
3287
+ let n = !d(r, h.Line), s = N(e, t, { indent: !n });
3288
+ return n ? s : [s, F];
3289
+ }
3290
+ function Tn(e, t, r) {
3291
+ let { node: n } = e, s = [n.const ? "const " : ""], u = n.type === "TSTypeParameter" ? r("name") : n.name;
3292
+ if (n.variance && s.push(r("variance")), n.in && s.push("in "), n.out && s.push("out "), s.push(u), n.bound && (n.usesExtendsBound && s.push(" extends "), s.push(H(e, r, "bound"))), n.constraint) {
3293
+ let i = /* @__PURE__ */ Symbol("constraint");
3294
+ s.push(" extends", l(D(x), { id: i }), je, xt(r("constraint"), { groupId: i }));
3295
+ }
3296
+ return n.default && s.push(" = ", r("default")), l(s);
3297
+ }
3298
+ var ia = R(["ClassProperty", "PropertyDefinition", "ClassPrivateProperty", "ClassAccessorProperty", "AccessorProperty", "TSAbstractPropertyDefinition", "TSAbstractAccessorProperty"]);
3299
+ function xn(e, t, r) {
3300
+ let { node: n } = e, s = [$(e), Vt(e), "class"], u = d(n.id, h.Trailing) || d(n.typeParameters, h.Trailing) || d(n.superClass) || O(n.extends) || O(n.mixins) || O(n.implements), i = [], a = [];
3301
+ if (n.id && i.push(" ", r("id")), i.push(r("typeParameters")), n.superClass) {
3302
+ let m = [Wl(e, t, r), r(n.superTypeArguments ? "superTypeArguments" : "superTypeParameters")], f = e.call((y) => ["extends ", Ee(y, m, t)], "superClass");
3303
+ u ? a.push(x, l(f)) : a.push(" ", f);
3304
+ } else a.push(Ps(e, t, r, "extends"));
3305
+ a.push(Ps(e, t, r, "mixins"), Ps(e, t, r, "implements"));
3306
+ let o;
3307
+ if (u) {
3308
+ let m;
3309
+ pa(n) ? m = [...i, D(a)] : m = D([...i, a]), o = aa(n), s.push(l(m, { id: o }));
3310
+ } else s.push(...i, ...a);
3311
+ let p = n.body;
3312
+ return u && O(p.body) ? s.push(S(F, " ", { groupId: o })) : s.push(" "), s.push(r("body")), s;
3313
+ }
3314
+ var aa = dn("heritageGroup");
3315
+ function oa(e) {
3316
+ return S(F, "", { groupId: aa(e) });
3317
+ }
3318
+ function ql(e) {
3319
+ return ["extends", "mixins", "implements"].reduce((t, r) => t + (Array.isArray(e[r]) ? e[r].length : 0), e.superClass ? 1 : 0) > 1;
3320
+ }
3321
+ function pa(e) {
3322
+ return e.typeParameters && !d(e.typeParameters, h.Trailing | h.Line) && !ql(e);
3323
+ }
3324
+ function Ps(e, t, r, n) {
3325
+ let { node: s } = e;
3326
+ if (!O(s[n])) return "";
3327
+ let u = N(e, t, { marker: n });
3328
+ return [pa(s) ? S(" ", x, { groupId: Cr(s.typeParameters) }) : x, u, u && F, n, l(D([x, b([",", x], e.map(r, n))]))];
3329
+ }
3330
+ function Wl(e, t, r) {
3331
+ let n = r("superClass"), { parent: s } = e;
3332
+ return s.type === "AssignmentExpression" ? l(S(["(", D([E, n]), E, ")"], n)) : n;
3333
+ }
3334
+ function hn(e, t, r) {
3335
+ let { node: n } = e, s = [];
3336
+ return O(n.decorators) && s.push(ds(e, t, r)), s.push($t(n)), n.static && s.push("static "), s.push(Vt(e)), n.override && s.push("override "), s.push(Er(e, t, r)), s;
3337
+ }
3338
+ function gn(e, t, r) {
3339
+ let { node: n } = e, s = [], u = t.semi ? ";" : "";
3340
+ O(n.decorators) && s.push(ds(e, t, r)), s.push($(e), $t(n)), n.static && s.push("static "), s.push(Vt(e)), n.override && s.push("override "), n.readonly && s.push("readonly "), n.variance && s.push(r("variance")), (n.type === "ClassAccessorProperty" || n.type === "AccessorProperty" || n.type === "TSAbstractAccessorProperty") && s.push("accessor "), s.push(Ct(e, t, r), V(e), mn(e), H(e, r));
3341
+ let i = n.type === "TSAbstractPropertyDefinition" || n.type === "TSAbstractAccessorProperty";
3342
+ return [ht(e, t, r, s, " =", i ? void 0 : "value"), u];
3343
+ }
3344
+ function ca(e, t, r) {
3345
+ let { node: n } = e, s = [];
3346
+ return e.each(({ node: u, next: i, isLast: a }) => {
3347
+ s.push(r()), !t.semi && ia(u) && Ul(u, i) && s.push(";"), a || (s.push(F), me(u, t) && s.push(F));
3348
+ }, "body"), d(n, h.Dangling) && s.push(N(e, t)), ["{", s.length > 0 ? [D([F, s]), F] : "", "}"];
3349
+ }
3350
+ function Ul(e, t) {
3351
+ var s;
3352
+ let { type: r, name: n } = e.key;
3353
+ if (!e.computed && r === "Identifier" && (n === "static" || n === "get" || n === "set") && !e.value && !e.typeAnnotation) return true;
3354
+ if (!t || t.static || t.accessibility || t.readonly) return false;
3355
+ if (!t.computed) {
3356
+ let u = (s = t.key) == null ? void 0 : s.name;
3357
+ if (u === "in" || u === "instanceof") return true;
3358
+ }
3359
+ if (ia(t) && t.variance && !t.static && !t.declare) return true;
3360
+ switch (t.type) {
3361
+ case "ClassProperty":
3362
+ case "PropertyDefinition":
3363
+ case "TSAbstractPropertyDefinition":
3364
+ return t.computed;
3365
+ case "MethodDefinition":
3366
+ case "TSAbstractMethodDefinition":
3367
+ case "ClassMethod":
3368
+ case "ClassPrivateMethod": {
3369
+ if ((t.value ? t.value.async : t.async) || t.kind === "get" || t.kind === "set") return false;
3370
+ let i = t.value ? t.value.generator : t.generator;
3371
+ return !!(t.computed || i);
3372
+ }
3373
+ case "TSIndexSignature":
3374
+ return true;
3375
+ }
3376
+ return false;
3377
+ }
3378
+ var Xl = R(["TSAsExpression", "TSTypeAssertion", "TSNonNullExpression", "TSInstantiationExpression", "TSSatisfiesExpression"]);
3379
+ function ks(e) {
3380
+ return Xl(e) ? ks(e.expression) : e;
3381
+ }
3382
+ var la = R(["FunctionExpression", "ArrowFunctionExpression"]);
3383
+ function ma(e) {
3384
+ return e.type === "MemberExpression" || e.type === "OptionalMemberExpression" || e.type === "Identifier" && e.name !== "undefined";
3385
+ }
3386
+ function ya(e, t) {
3387
+ if (t.semi || Is(e, t) || Ls(e, t)) return false;
3388
+ let { node: r, key: n, parent: s } = e;
3389
+ return !!(r.type === "ExpressionStatement" && (n === "body" && (s.type === "Program" || s.type === "BlockStatement" || s.type === "StaticBlock" || s.type === "TSModuleBlock") || n === "consequent" && s.type === "SwitchCase") && e.call(() => fa(e, t), "expression"));
3390
+ }
3391
+ function fa(e, t) {
3392
+ let { node: r } = e;
3393
+ switch (r.type) {
3394
+ case "ParenthesizedExpression":
3395
+ case "TypeCastExpression":
3396
+ case "ArrayExpression":
3397
+ case "ArrayPattern":
3398
+ case "TemplateLiteral":
3399
+ case "TemplateElement":
3400
+ case "RegExpLiteral":
3401
+ return true;
3402
+ case "ArrowFunctionExpression":
3403
+ if (!Cn(e, t)) return true;
3404
+ break;
3405
+ case "UnaryExpression": {
3406
+ let { prefix: n, operator: s } = r;
3407
+ if (n && (s === "+" || s === "-")) return true;
3408
+ break;
3409
+ }
3410
+ case "BindExpression":
3411
+ if (!r.object) return true;
3412
+ break;
3413
+ case "Literal":
3414
+ if (r.regex) return true;
3415
+ break;
3416
+ default:
3417
+ if (Y(r)) return true;
3418
+ }
3419
+ return Le(e, t) ? true : Jt(r) ? e.call(() => fa(e, t), ...Lr(r)) : false;
3420
+ }
3421
+ function Is({ node: e, parent: t }, r) {
3422
+ return (r.parentParser === "markdown" || r.parentParser === "mdx") && e.type === "ExpressionStatement" && Y(e.expression) && t.type === "Program" && t.body.length === 1;
3423
+ }
3424
+ function Ls({ node: e, parent: t }, r) {
3425
+ return (r.parser === "__vue_event_binding" || r.parser === "__vue_ts_event_binding") && e.type === "ExpressionStatement" && t.type === "Program" && t.body.length === 1;
3426
+ }
3427
+ function Da(e, t, r) {
3428
+ let n = [r("expression")];
3429
+ if (Ls(e, t)) {
3430
+ let s = ks(e.node.expression);
3431
+ (la(s) || ma(s)) && n.push(";");
3432
+ } else Is(e, t) || t.semi && n.push(";");
3433
+ return n;
3434
+ }
3435
+ function Ea(e, t, r) {
3436
+ if (t.__isVueBindings || t.__isVueForBindingLeft) {
3437
+ let n = e.map(r, "program", "body", 0, "params");
3438
+ if (n.length === 1) return n[0];
3439
+ let s = b([",", x], n);
3440
+ return t.__isVueForBindingLeft ? ["(", D([E, l(s)]), E, ")"] : s;
3441
+ }
3442
+ if (t.__isEmbeddedTypescriptGenericParameters) {
3443
+ let n = e.map(r, "program", "body", 0, "typeParameters", "params");
3444
+ return b([",", x], n);
3445
+ }
3446
+ }
3447
+ function Aa(e, t) {
3448
+ let { node: r } = e;
3449
+ switch (r.type) {
3450
+ case "RegExpLiteral":
3451
+ return Fa(r);
3452
+ case "BigIntLiteral":
3453
+ return Sn(r.extra.raw);
3454
+ case "NumericLiteral":
3455
+ return Ft(r.extra.raw);
3456
+ case "StringLiteral":
3457
+ return ve(ut(r.extra.raw, t));
3458
+ case "NullLiteral":
3459
+ return "null";
3460
+ case "BooleanLiteral":
3461
+ return String(r.value);
3462
+ case "DirectiveLiteral":
3463
+ return Ca(r.extra.raw, t);
3464
+ case "Literal": {
3465
+ if (r.regex) return Fa(r.regex);
3466
+ if (r.bigint) return Sn(r.raw);
3467
+ let { value: n } = r;
3468
+ return typeof n == "number" ? Ft(r.raw) : typeof n == "string" ? Yl(e) ? Ca(r.raw, t) : ve(ut(r.raw, t)) : String(n);
3469
+ }
3470
+ }
3471
+ }
3472
+ function Yl(e) {
3473
+ if (e.key !== "expression") return;
3474
+ let { parent: t } = e;
3475
+ return t.type === "ExpressionStatement" && typeof t.directive == "string";
3476
+ }
3477
+ function Sn(e) {
3478
+ return e.toLowerCase();
3479
+ }
3480
+ function Fa({ pattern: e, flags: t }) {
3481
+ return t = [...t].sort().join(""), `/${e}/${t}`;
3482
+ }
3483
+ function Ca(e, t) {
3484
+ let r = e.slice(1, -1);
3485
+ if (r.includes('"') || r.includes("'")) return e;
3486
+ let n = t.singleQuote ? "'" : '"';
3487
+ return n + r + n;
3488
+ }
3489
+ function Hl(e, t, r) {
3490
+ let n = e.originalText.slice(t, r);
3491
+ for (let s of e[/* @__PURE__ */ Symbol.for("comments")]) {
3492
+ let u = j(s);
3493
+ if (u > r) break;
3494
+ let i = P(s);
3495
+ if (i < t) continue;
3496
+ let a = i - u;
3497
+ n = n.slice(0, u - t) + " ".repeat(a) + n.slice(i - t);
3498
+ }
3499
+ return n;
3500
+ }
3501
+ var Ar = Hl;
3502
+ function da(e, t, r) {
3503
+ let { node: n } = e;
3504
+ return ["import", n.phase ? ` ${n.phase}` : "", Os(n), ha(e, t, r), xa(e, t, r), Sa(e, t, r), t.semi ? ";" : ""];
3505
+ }
3506
+ var Ta = (e) => e.type === "ExportDefaultDeclaration" || e.type === "DeclareExportDeclaration" && e.default;
3507
+ function Bn(e, t, r) {
3508
+ let { node: n } = e, s = [wi(e, t, r), $(e), "export", Ta(n) ? " default" : ""], { declaration: u, exported: i } = n;
3509
+ return d(n, h.Dangling) && (s.push(" ", N(e, t)), Mr(n) && s.push(F)), u ? s.push(" ", r("declaration")) : (s.push(Kl(n)), n.type === "ExportAllDeclaration" || n.type === "DeclareExportAllDeclaration" ? (s.push(" *"), i && s.push(" as ", r("exported"))) : s.push(ha(e, t, r)), s.push(xa(e, t, r), Sa(e, t, r))), s.push($l(n, t)), s;
3510
+ }
3511
+ var Vl = R(["ClassDeclaration", "ComponentDeclaration", "FunctionDeclaration", "TSInterfaceDeclaration", "DeclareClass", "DeclareComponent", "DeclareFunction", "DeclareHook", "HookDeclaration", "TSDeclareFunction", "EnumDeclaration"]);
3512
+ function $l(e, t) {
3513
+ return t.semi && (!e.declaration || Ta(e) && !Vl(e.declaration)) ? ";" : "";
3514
+ }
3515
+ function ws(e, t = true) {
3516
+ return e && e !== "value" ? `${t ? " " : ""}${e}${t ? "" : " "}` : "";
3517
+ }
3518
+ function Os(e, t) {
3519
+ return ws(e.importKind, t);
3520
+ }
3521
+ function Kl(e) {
3522
+ return ws(e.exportKind);
3523
+ }
3524
+ function xa(e, t, r) {
3525
+ let { node: n } = e;
3526
+ if (!n.source) return "";
3527
+ let s = [];
3528
+ return ga(n, t) && s.push(" from"), s.push(" ", r("source")), s;
3529
+ }
3530
+ function ha(e, t, r) {
3531
+ let { node: n } = e;
3532
+ if (!ga(n, t)) return "";
3533
+ let s = [" "];
3534
+ if (O(n.specifiers)) {
3535
+ let u = [], i = [];
3536
+ e.each(() => {
3537
+ let a = e.node.type;
3538
+ if (a === "ExportNamespaceSpecifier" || a === "ExportDefaultSpecifier" || a === "ImportNamespaceSpecifier" || a === "ImportDefaultSpecifier") u.push(r());
3539
+ else if (a === "ExportSpecifier" || a === "ImportSpecifier") i.push(r());
3540
+ else throw new qe(n, "specifier");
3541
+ }, "specifiers"), s.push(b(", ", u)), i.length > 0 && (u.length > 0 && s.push(", "), i.length > 1 || u.length > 0 || n.specifiers.some((o) => d(o)) ? s.push(l(["{", D([t.bracketSpacing ? x : E, b([",", x], i)]), S(ce(t) ? "," : ""), t.bracketSpacing ? x : E, "}"])) : s.push(["{", t.bracketSpacing ? " " : "", ...i, t.bracketSpacing ? " " : "", "}"]));
3542
+ } else s.push("{}");
3543
+ return s;
3544
+ }
3545
+ function ga(e, t) {
3546
+ return e.type !== "ImportDeclaration" || O(e.specifiers) || e.importKind === "type" ? true : Ar(t, j(e), j(e.source)).trimEnd().endsWith("from");
3547
+ }
3548
+ function Ql(e, t) {
3549
+ var n, s;
3550
+ if ((n = e.extra) != null && n.deprecatedAssertSyntax) return "assert";
3551
+ let r = Ar(t, P(e.source), (s = e.attributes) != null && s[0] ? j(e.attributes[0]) : P(e)).trimStart();
3552
+ return r.startsWith("assert") ? "assert" : r.startsWith("with") || O(e.attributes) ? "with" : void 0;
3553
+ }
3554
+ function Sa(e, t, r) {
3555
+ let { node: n } = e;
3556
+ if (!n.source) return "";
3557
+ let s = Ql(n, t);
3558
+ if (!s) return "";
3559
+ let u = [` ${s} {`];
3560
+ return O(n.attributes) && (t.bracketSpacing && u.push(" "), u.push(b(", ", e.map(r, "attributes"))), t.bracketSpacing && u.push(" ")), u.push("}"), u;
3561
+ }
3562
+ function Ba(e, t, r) {
3563
+ let { node: n } = e, { type: s } = n, u = s.startsWith("Import"), i = u ? "imported" : "local", a = u ? "local" : "exported", o = n[i], p = n[a], m = "", f = "";
3564
+ return s === "ExportNamespaceSpecifier" || s === "ImportNamespaceSpecifier" ? m = "*" : o && (m = r(i)), p && !zl(n) && (f = r(a)), [ws(s === "ImportSpecifier" ? n.importKind : n.exportKind, false), m, m && f ? " as " : "", f];
3565
+ }
3566
+ function zl(e) {
3567
+ if (e.type !== "ImportSpecifier" && e.type !== "ExportSpecifier") return false;
3568
+ let { local: t, [e.type === "ImportSpecifier" ? "imported" : "exported"]: r } = e;
3569
+ if (t.type !== r.type || !au(t, r)) return false;
3570
+ if (K(t)) return t.value === r.value && ae(t) === ae(r);
3571
+ switch (t.type) {
3572
+ case "Identifier":
3573
+ return t.name === r.name;
3574
+ default:
3575
+ return false;
3576
+ }
3577
+ }
3578
+ function gt(e, t, r) {
3579
+ var J;
3580
+ let n = t.semi ? ";" : "", { node: s } = e, u = s.type === "ObjectTypeAnnotation", i = s.type === "TSEnumBody" || s.type === "EnumBooleanBody" || s.type === "EnumNumberBody" || s.type === "EnumBigIntBody" || s.type === "EnumStringBody" || s.type === "EnumSymbolBody", a = [s.type === "TSTypeLiteral" || i ? "members" : s.type === "TSInterfaceBody" ? "body" : "properties"];
3581
+ u && a.push("indexers", "callProperties", "internalSlots");
3582
+ let o = a.flatMap((I) => e.map(({ node: q }) => ({ node: q, printed: r(), loc: j(q) }), I));
3583
+ a.length > 1 && o.sort((I, q) => I.loc - q.loc);
3584
+ let { parent: p, key: m } = e, f = u && m === "body" && (p.type === "InterfaceDeclaration" || p.type === "DeclareInterface" || p.type === "DeclareClass"), y = s.type === "TSInterfaceBody" || i || f || s.type === "ObjectPattern" && p.type !== "FunctionDeclaration" && p.type !== "FunctionExpression" && p.type !== "ArrowFunctionExpression" && p.type !== "ObjectMethod" && p.type !== "ClassMethod" && p.type !== "ClassPrivateMethod" && p.type !== "AssignmentPattern" && p.type !== "CatchClause" && s.properties.some((I) => I.value && (I.value.type === "ObjectPattern" || I.value.type === "ArrayPattern")) || s.type !== "ObjectPattern" && t.objectWrap === "preserve" && o.length > 0 && ie(t.originalText, j(s), o[0].loc), C = f ? ";" : s.type === "TSInterfaceBody" || s.type === "TSTypeLiteral" ? S(n, ";") : ",", c = s.exact ? "{|" : "{", A = s.exact ? "|}" : "}", T = [], B = o.map((I) => {
3585
+ let q = [...T, l(I.printed)];
3586
+ return T = [C, x], (I.node.type === "TSPropertySignature" || I.node.type === "TSMethodSignature" || I.node.type === "TSConstructSignatureDeclaration" || I.node.type === "TSCallSignatureDeclaration") && d(I.node, h.PrettierIgnore) && T.shift(), me(I.node, t) && T.push(F), q;
3587
+ });
3588
+ if (s.inexact || s.hasUnknownMembers) {
3589
+ let I;
3590
+ if (d(s, h.Dangling)) {
3591
+ let q = d(s, h.Line);
3592
+ I = [N(e, t), q || ee(t.originalText, P(v(false, Ve(s), -1))) ? F : x, "..."];
3593
+ } else I = ["..."];
3594
+ B.push([...T, ...I]);
3595
+ }
3596
+ let g = (J = v(false, o, -1)) == null ? void 0 : J.node, _ = !(s.inexact || s.hasUnknownMembers || g && (g.type === "RestElement" || (g.type === "TSPropertySignature" || g.type === "TSCallSignatureDeclaration" || g.type === "TSMethodSignature" || g.type === "TSConstructSignatureDeclaration" || g.type === "TSIndexSignature") && d(g, h.PrettierIgnore)) || e.match(void 0, (I, q) => I.type === "TSImportType" && q === "options")), M;
3597
+ if (B.length === 0) {
3598
+ if (!d(s, h.Dangling)) return [c, A, H(e, r)];
3599
+ M = l([c, N(e, t, { indent: true }), E, A, V(e), H(e, r)]);
3600
+ } else M = [f && O(s.properties) ? oa(p) : "", c, D([t.bracketSpacing ? x : E, ...B]), S(_ && (C !== "," || ce(t)) ? C : ""), t.bracketSpacing ? x : E, A, V(e), H(e, r)];
3601
+ return e.match((I) => I.type === "ObjectPattern" && !O(I.decorators), _s) || Re(s) && (e.match(void 0, (I, q) => q === "typeAnnotation", (I, q) => q === "typeAnnotation", _s) || e.match(void 0, (I, q) => I.type === "FunctionTypeParam" && q === "typeAnnotation", _s)) || !y && e.match((I) => I.type === "ObjectPattern", (I) => I.type === "AssignmentExpression" || I.type === "VariableDeclarator") ? M : l(M, { shouldBreak: y });
3602
+ }
3603
+ function _s(e, t) {
3604
+ return (t === "params" || t === "parameters" || t === "this" || t === "rest") && gs(e);
3605
+ }
3606
+ function Zl(e) {
3607
+ let t = [e];
3608
+ for (let r = 0; r < t.length; r++) {
3609
+ let n = t[r];
3610
+ for (let s of ["test", "consequent", "alternate"]) {
3611
+ let u = n[s];
3612
+ if (Y(u)) return true;
3613
+ u.type === "ConditionalExpression" && t.push(u);
3614
+ }
3615
+ }
3616
+ return false;
3617
+ }
3618
+ function em(e, t, r) {
3619
+ let { node: n } = e, s = n.type === "ConditionalExpression", u = s ? "alternate" : "falseType", { parent: i } = e, a = s ? r("test") : [r("checkType"), " ", "extends", " ", r("extendsType")];
3620
+ return i.type === n.type && i[u] === n ? be(2, a) : a;
3621
+ }
3622
+ var tm = /* @__PURE__ */ new Map([["AssignmentExpression", "right"], ["VariableDeclarator", "init"], ["ReturnStatement", "argument"], ["ThrowStatement", "argument"], ["UnaryExpression", "argument"], ["YieldExpression", "argument"], ["AwaitExpression", "argument"]]);
3623
+ function rm(e) {
3624
+ let { node: t } = e;
3625
+ if (t.type !== "ConditionalExpression") return false;
3626
+ let r, n = t;
3627
+ for (let s = 0; !r; s++) {
3628
+ let u = e.getParentNode(s);
3629
+ if (u.type === "ChainExpression" && u.expression === n || w(u) && u.callee === n || G(u) && u.object === n || u.type === "TSNonNullExpression" && u.expression === n) {
3630
+ n = u;
3631
+ continue;
3632
+ }
3633
+ u.type === "NewExpression" && u.callee === n || xe(u) && u.expression === n ? (r = e.getParentNode(s + 1), n = u) : r = u;
3634
+ }
3635
+ return n === t ? false : r[tm.get(r.type)] === n;
3636
+ }
3637
+ function ba(e, t, r) {
3638
+ let { node: n } = e, s = n.type === "ConditionalExpression", u = s ? "consequent" : "trueType", i = s ? "alternate" : "falseType", a = s ? ["test"] : ["checkType", "extendsType"], o = n[u], p = n[i], m = [], f = false, { parent: y } = e, C = y.type === n.type && a.some((W) => y[W] === n), c = y.type === n.type && !C, A, T, B = 0;
3639
+ do
3640
+ T = A || n, A = e.getParentNode(B), B++;
3641
+ while (A && A.type === n.type && a.every((W) => A[W] !== T));
3642
+ let g = A || y, _ = T;
3643
+ if (s && (Y(n[a[0]]) || Y(o) || Y(p) || Zl(_))) {
3644
+ f = true, c = true;
3645
+ let W = (Z) => [S("("), D([E, Z]), E, S(")")], ne = (Z) => Z.type === "NullLiteral" || Z.type === "Literal" && Z.value === null || Z.type === "Identifier" && Z.name === "undefined";
3646
+ m.push(" ? ", ne(o) ? r(u) : W(r(u)), " : ", p.type === n.type || ne(p) ? r(i) : W(r(i)));
3647
+ } else {
3648
+ let W = (Z) => t.useTabs ? D(r(Z)) : be(2, r(Z)), ne = [x, "? ", o.type === n.type ? S("", "(") : "", W(u), o.type === n.type ? S("", ")") : "", x, ": ", W(i)];
3649
+ m.push(y.type !== n.type || y[i] === n || C ? ne : t.useTabs ? Jr(D(ne)) : be(Math.max(0, t.tabWidth - 2), ne));
3650
+ }
3651
+ let M = [u, i, ...a].some((W) => d(n[W], (ne) => te(ne) && ie(t.originalText, j(ne), P(ne)))), J = (W) => y === g ? l(W, { shouldBreak: M }) : M ? [W, Ce] : W, I = !f && (G(y) || y.type === "NGPipeExpression" && y.left === n) && !y.computed, q = rm(e), k = J([em(e, t, r), c ? m : D(m), s && I && !q ? E : ""]);
3652
+ return C || q ? l([D([E, k]), E]) : k;
3653
+ }
3654
+ function nm(e, t) {
3655
+ return (G(t) || t.type === "NGPipeExpression" && t.left === e) && !t.computed;
3656
+ }
3657
+ function sm(e, t, r, n) {
3658
+ return [...e.map((u) => Ve(u)), Ve(t), Ve(r)].flat().some((u) => te(u) && ie(n.originalText, j(u), P(u)));
3659
+ }
3660
+ var um = /* @__PURE__ */ new Map([["AssignmentExpression", "right"], ["VariableDeclarator", "init"], ["ReturnStatement", "argument"], ["ThrowStatement", "argument"], ["UnaryExpression", "argument"], ["YieldExpression", "argument"], ["AwaitExpression", "argument"]]);
3661
+ function im(e) {
3662
+ let { node: t } = e;
3663
+ if (t.type !== "ConditionalExpression") return false;
3664
+ let r, n = t;
3665
+ for (let s = 0; !r; s++) {
3666
+ let u = e.getParentNode(s);
3667
+ if (u.type === "ChainExpression" && u.expression === n || w(u) && u.callee === n || G(u) && u.object === n || u.type === "TSNonNullExpression" && u.expression === n) {
3668
+ n = u;
3669
+ continue;
3670
+ }
3671
+ u.type === "NewExpression" && u.callee === n || xe(u) && u.expression === n ? (r = e.getParentNode(s + 1), n = u) : r = u;
3672
+ }
3673
+ return n === t ? false : r[um.get(r.type)] === n;
3674
+ }
3675
+ var Ms = (e) => [S("("), D([E, e]), E, S(")")];
3676
+ function zt(e, t, r, n) {
3677
+ if (!t.experimentalTernaries) return ba(e, t, r);
3678
+ let { node: s } = e, u = s.type === "ConditionalExpression", i = Je(s), a = u ? "consequent" : "trueType", o = u ? "alternate" : "falseType", p = u ? ["test"] : ["checkType", "extendsType"], m = s[a], f = s[o], y = p.map((Xe) => s[Xe]), { parent: C } = e, c = C.type === s.type, A = c && p.some((Xe) => C[Xe] === s), T = c && C[o] === s, B = m.type === s.type, g = f.type === s.type, _ = g || T, M = t.tabWidth > 2 || t.useTabs, J, I, q = 0;
3679
+ do
3680
+ I = J || s, J = e.getParentNode(q), q++;
3681
+ while (J && J.type === s.type && p.every((Xe) => J[Xe] !== I));
3682
+ let k = J || C, W = n && n.assignmentLayout && n.assignmentLayout !== "break-after-operator" && (C.type === "AssignmentExpression" || C.type === "VariableDeclarator" || C.type === "ClassProperty" || C.type === "PropertyDefinition" || C.type === "ClassPrivateProperty" || C.type === "ObjectProperty" || C.type === "Property"), ne = (C.type === "ReturnStatement" || C.type === "ThrowStatement") && !(B || g), Z = u && k.type === "JSXExpressionContainer" && e.grandparent.type !== "JSXAttribute", lt = im(e), L = nm(s, C), se = i && Le(e, t), Ae = M ? t.useTabs ? " " : " ".repeat(t.tabWidth - 1) : "", Ot = sm(y, m, f, t) || B || g, nt = !_ && !c && !i && (Z ? m.type === "NullLiteral" || m.type === "Literal" && m.value === null : ir(m, t) && Nn(s.test, 3)), Js = _ || T || i && !c || c && u && Nn(s.test, 1) || nt, Ns = [];
3683
+ !B && d(m, h.Dangling) && e.call((Xe) => {
3684
+ Ns.push(N(Xe, t), F);
3685
+ }, "consequent");
3686
+ let er = [];
3687
+ d(s.test, h.Dangling) && e.call((Xe) => {
3688
+ er.push(N(Xe, t));
3689
+ }, "test"), !g && d(f, h.Dangling) && e.call((Xe) => {
3690
+ er.push(N(Xe, t));
3691
+ }, "alternate"), d(s, h.Dangling) && er.push(N(e, t));
3692
+ let Gs = /* @__PURE__ */ Symbol("test"), Va = /* @__PURE__ */ Symbol("consequent"), dr = /* @__PURE__ */ Symbol("test-and-consequent"), $a = u ? [Ms(r("test")), s.test.type === "ConditionalExpression" ? Ce : ""] : [r("checkType"), " ", "extends", " ", Je(s.extendsType) || s.extendsType.type === "TSMappedType" ? r("extendsType") : l(Ms(r("extendsType")))], qs = l([$a, " ?"], { id: Gs }), Ka = r(a), Tr = D([B || Z && (Y(m) || c || _) ? F : x, Ns, Ka]), Qa = Js ? l([qs, _ ? Tr : S(Tr, l(Tr, { id: Va }), { groupId: Gs })], { id: dr }) : [qs, Tr], wn = r(o), Ws = nt ? S(wn, Jr(Ms(wn)), { groupId: dr }) : wn, tr = [Qa, er.length > 0 ? [D([F, er]), F] : g ? F : nt ? S(x, " ", { groupId: dr }) : x, ":", g ? " " : M ? Js ? S(Ae, S(_ || nt ? " " : Ae, " "), { groupId: dr }) : S(Ae, " ") : " ", g ? Ws : l([D(Ws), Z && !nt ? E : ""]), L && !lt ? E : "", Ot ? Ce : ""];
3693
+ return W && !Ot ? l(D([E, l(tr)])) : W || ne ? l(D(tr)) : lt || i && A ? l([D([E, tr]), se ? E : ""]) : C === k ? l(tr) : tr;
3694
+ }
3695
+ function Pa(e, t, r, n) {
3696
+ var _a2;
3697
+ let { node: s } = e;
3698
+ if (wr(s)) return Aa(e, t);
3699
+ let u = t.semi ? ";" : "", i = [];
3700
+ switch (s.type) {
3701
+ case "JsExpressionRoot":
3702
+ return r("node");
3703
+ case "JsonRoot":
3704
+ return [N(e, t), r("node"), F];
3705
+ case "File":
3706
+ return (_a2 = Ea(e, t, r)) != null ? _a2 : r("program");
3707
+ case "EmptyStatement":
3708
+ return "";
3709
+ case "ExpressionStatement":
3710
+ return Da(e, t, r);
3711
+ case "ChainExpression":
3712
+ return r("expression");
3713
+ case "ParenthesizedExpression":
3714
+ return !d(s.expression) && (ue(s.expression) || U(s.expression)) ? ["(", r("expression"), ")"] : l(["(", D([E, r("expression")]), E, ")"]);
3715
+ case "AssignmentExpression":
3716
+ return Wi(e, t, r);
3717
+ case "VariableDeclarator":
3718
+ return Ui(e, t, r);
3719
+ case "BinaryExpression":
3720
+ case "LogicalExpression":
3721
+ return $r(e, t, r);
3722
+ case "AssignmentPattern":
3723
+ return [r("left"), " = ", r("right")];
3724
+ case "OptionalMemberExpression":
3725
+ case "MemberExpression":
3726
+ return Ri(e, t, r);
3727
+ case "MetaProperty":
3728
+ return [r("meta"), ".", r("property")];
3729
+ case "BindExpression":
3730
+ return s.object && i.push(r("object")), i.push(l(D([E, Kr(e, t, r)]))), i;
3731
+ case "Identifier":
3732
+ return [s.name, V(e), mn(e), H(e, r)];
3733
+ case "V8IntrinsicIdentifier":
3734
+ return ["%", s.name];
3735
+ case "SpreadElement":
3736
+ case "SpreadElementPattern":
3737
+ case "SpreadPropertyPattern":
3738
+ case "RestElement":
3739
+ return yn(e, r);
3740
+ case "FunctionDeclaration":
3741
+ case "FunctionExpression":
3742
+ return En(e, t, r, n);
3743
+ case "ArrowFunctionExpression":
3744
+ return sa(e, t, r, n);
3745
+ case "YieldExpression":
3746
+ return i.push("yield"), s.delegate && i.push("*"), s.argument && i.push(" ", r("argument")), i;
3747
+ case "AwaitExpression":
3748
+ if (i.push("await"), s.argument) {
3749
+ i.push(" ", r("argument"));
3750
+ let { parent: a } = e;
3751
+ if (w(a) && a.callee === s || G(a) && a.object === s) {
3752
+ i = [D([E, ...i]), E];
3753
+ let o = e.findAncestor((p) => p.type === "AwaitExpression" || p.type === "BlockStatement");
3754
+ if ((o == null ? void 0 : o.type) !== "AwaitExpression" || !pe(o.argument, (p) => p === s)) return l(i);
3755
+ }
3756
+ }
3757
+ return i;
3758
+ case "ExportDefaultDeclaration":
3759
+ case "ExportNamedDeclaration":
3760
+ case "ExportAllDeclaration":
3761
+ return Bn(e, t, r);
3762
+ case "ImportDeclaration":
3763
+ return da(e, t, r);
3764
+ case "ImportSpecifier":
3765
+ case "ExportSpecifier":
3766
+ case "ImportNamespaceSpecifier":
3767
+ case "ExportNamespaceSpecifier":
3768
+ case "ImportDefaultSpecifier":
3769
+ case "ExportDefaultSpecifier":
3770
+ return Ba(e, t, r);
3771
+ case "ImportAttribute":
3772
+ return Dn(e, t, r);
3773
+ case "Program":
3774
+ case "BlockStatement":
3775
+ case "StaticBlock":
3776
+ return An(e, t, r);
3777
+ case "ClassBody":
3778
+ return ca(e, t, r);
3779
+ case "ThrowStatement":
3780
+ return ra(e, t, r);
3781
+ case "ReturnStatement":
3782
+ return ta(e, t, r);
3783
+ case "NewExpression":
3784
+ case "ImportExpression":
3785
+ case "OptionalCallExpression":
3786
+ case "CallExpression":
3787
+ return Qr(e, t, r);
3788
+ case "ObjectExpression":
3789
+ case "ObjectPattern":
3790
+ return gt(e, t, r);
3791
+ case "Property":
3792
+ return bt(s) ? Er(e, t, r) : Dn(e, t, r);
3793
+ case "ObjectProperty":
3794
+ return Dn(e, t, r);
3795
+ case "ObjectMethod":
3796
+ return Er(e, t, r);
3797
+ case "Decorator":
3798
+ return ["@", r("expression")];
3799
+ case "ArrayExpression":
3800
+ case "ArrayPattern":
3801
+ return Kt(e, t, r);
3802
+ case "SequenceExpression": {
3803
+ let { parent: a } = e;
3804
+ if (a.type === "ExpressionStatement" || a.type === "ForStatement") {
3805
+ let p = [];
3806
+ return e.each(({ isFirst: m }) => {
3807
+ m ? p.push(r()) : p.push(",", D([x, r()]));
3808
+ }, "expressions"), l(p);
3809
+ }
3810
+ let o = b([",", x], e.map(r, "expressions"));
3811
+ return (a.type === "ReturnStatement" || a.type === "ThrowStatement") && e.key === "argument" || a.type === "ArrowFunctionExpression" && e.key === "body" ? l(S([D([E, o]), E], o)) : l(o);
3812
+ }
3813
+ case "ThisExpression":
3814
+ return "this";
3815
+ case "Super":
3816
+ return "super";
3817
+ case "Directive":
3818
+ return [r("value"), u];
3819
+ case "UnaryExpression":
3820
+ return i.push(s.operator), /[a-z]$/u.test(s.operator) && i.push(" "), d(s.argument) ? i.push(l(["(", D([E, r("argument")]), E, ")"])) : i.push(r("argument")), i;
3821
+ case "UpdateExpression":
3822
+ return [s.prefix ? s.operator : "", r("argument"), s.prefix ? "" : s.operator];
3823
+ case "ConditionalExpression":
3824
+ return zt(e, t, r, n);
3825
+ case "VariableDeclaration": {
3826
+ let a = e.map(r, "declarations"), o = e.parent, p = o.type === "ForStatement" || o.type === "ForInStatement" || o.type === "ForOfStatement", m = s.declarations.some((y) => y.init), f;
3827
+ return a.length === 1 && !d(s.declarations[0]) ? f = a[0] : a.length > 0 && (f = D(a[0])), i = [$(e), s.kind, f ? [" ", f] : "", D(a.slice(1).map((y) => [",", m && !p ? F : x, y]))], p && o.body !== s || i.push(u), l(i);
3828
+ }
3829
+ case "WithStatement":
3830
+ return l(["with (", r("object"), ")", Et(s.body, r("body"))]);
3831
+ case "IfStatement": {
3832
+ let a = Et(s.consequent, r("consequent")), o = l(["if (", l([D([E, r("test")]), E]), ")", a]);
3833
+ if (i.push(o), s.alternate) {
3834
+ let p = d(s.consequent, h.Trailing | h.Line) || Mr(s), m = s.consequent.type === "BlockStatement" && !p;
3835
+ i.push(m ? " " : F), d(s, h.Dangling) && i.push(N(e, t), p ? F : " "), i.push("else", l(Et(s.alternate, r("alternate"), s.alternate.type === "IfStatement")));
3836
+ }
3837
+ return i;
3838
+ }
3839
+ case "ForStatement": {
3840
+ let a = Et(s.body, r("body")), o = N(e, t), p = o ? [o, E] : "";
3841
+ return !s.init && !s.test && !s.update ? [p, l(["for (;;)", a])] : [p, l(["for (", l([D([E, r("init"), ";", x, r("test"), ";", x, r("update")]), E]), ")", a])];
3842
+ }
3843
+ case "WhileStatement":
3844
+ return l(["while (", l([D([E, r("test")]), E]), ")", Et(s.body, r("body"))]);
3845
+ case "ForInStatement":
3846
+ return l(["for (", r("left"), " in ", r("right"), ")", Et(s.body, r("body"))]);
3847
+ case "ForOfStatement":
3848
+ return l(["for", s.await ? " await" : "", " (", r("left"), " of ", r("right"), ")", Et(s.body, r("body"))]);
3849
+ case "DoWhileStatement": {
3850
+ let a = Et(s.body, r("body"));
3851
+ return i = [l(["do", a])], s.body.type === "BlockStatement" ? i.push(" ") : i.push(F), i.push("while (", l([D([E, r("test")]), E]), ")", u), i;
3852
+ }
3853
+ case "DoExpression":
3854
+ return [s.async ? "async " : "", "do ", r("body")];
3855
+ case "BreakStatement":
3856
+ case "ContinueStatement":
3857
+ return i.push(s.type === "BreakStatement" ? "break" : "continue"), s.label && i.push(" ", r("label")), i.push(u), i;
3858
+ case "LabeledStatement":
3859
+ return s.body.type === "EmptyStatement" ? [r("label"), ":;"] : [r("label"), ": ", r("body")];
3860
+ case "TryStatement":
3861
+ return ["try ", r("block"), s.handler ? [" ", r("handler")] : "", s.finalizer ? [" finally ", r("finalizer")] : ""];
3862
+ case "CatchClause":
3863
+ if (s.param) {
3864
+ let a = d(s.param, (p) => !te(p) || p.leading && ee(t.originalText, P(p)) || p.trailing && ee(t.originalText, j(p), { backwards: true })), o = r("param");
3865
+ return ["catch ", a ? ["(", D([E, o]), E, ") "] : ["(", o, ") "], r("body")];
3866
+ }
3867
+ return ["catch ", r("body")];
3868
+ case "SwitchStatement":
3869
+ return [l(["switch (", D([E, r("discriminant")]), E, ")"]), " {", s.cases.length > 0 ? D([F, b(F, e.map(({ node: a, isLast: o }) => [r(), !o && me(a, t) ? F : ""], "cases"))]) : "", F, "}"];
3870
+ case "SwitchCase": {
3871
+ s.test ? i.push("case ", r("test"), ":") : i.push("default:"), d(s, h.Dangling) && i.push(" ", N(e, t));
3872
+ let a = s.consequent.filter((o) => o.type !== "EmptyStatement");
3873
+ if (a.length > 0) {
3874
+ let o = Fr(e, t, r, "consequent");
3875
+ i.push(a.length === 1 && a[0].type === "BlockStatement" ? [" ", o] : D([F, o]));
3876
+ }
3877
+ return i;
3878
+ }
3879
+ case "DebuggerStatement":
3880
+ return ["debugger", u];
3881
+ case "ClassDeclaration":
3882
+ case "ClassExpression":
3883
+ return xn(e, t, r);
3884
+ case "ClassMethod":
3885
+ case "ClassPrivateMethod":
3886
+ case "MethodDefinition":
3887
+ return hn(e, t, r);
3888
+ case "ClassProperty":
3889
+ case "PropertyDefinition":
3890
+ case "ClassPrivateProperty":
3891
+ case "ClassAccessorProperty":
3892
+ case "AccessorProperty":
3893
+ return gn(e, t, r);
3894
+ case "TemplateElement":
3895
+ return ve(s.value.raw);
3896
+ case "TemplateLiteral":
3897
+ return Wr(e, t, r);
3898
+ case "TaggedTemplateExpression":
3899
+ return Zu(e, t, r);
3900
+ case "PrivateIdentifier":
3901
+ return ["#", s.name];
3902
+ case "PrivateName":
3903
+ return ["#", r("id")];
3904
+ case "TopicReference":
3905
+ return "%";
3906
+ case "ArgumentPlaceholder":
3907
+ return "?";
3908
+ case "ModuleExpression":
3909
+ return ["module ", r("body")];
3910
+ case "InterpreterDirective":
3911
+ default:
3912
+ throw new qe(s, "ESTree");
3913
+ }
3914
+ }
3915
+ function bn(e, t, r) {
3916
+ let { parent: n, node: s, key: u } = e, i = [r("expression")];
3917
+ switch (s.type) {
3918
+ case "AsConstExpression":
3919
+ i.push(" as const");
3920
+ break;
3921
+ case "AsExpression":
3922
+ case "TSAsExpression":
3923
+ i.push(" as ", r("typeAnnotation"));
3924
+ break;
3925
+ case "SatisfiesExpression":
3926
+ case "TSSatisfiesExpression":
3927
+ i.push(" satisfies ", r("typeAnnotation"));
3928
+ break;
3929
+ }
3930
+ return u === "callee" && w(n) || u === "object" && G(n) ? l([D([E, ...i]), E]) : i;
3931
+ }
3932
+ function ka(e, t, r) {
3933
+ let { node: n } = e, s = [$(e), "component"];
3934
+ n.id && s.push(" ", r("id")), s.push(r("typeParameters"));
3935
+ let u = am(e, t, r);
3936
+ return n.rendersType ? s.push(l([u, " ", r("rendersType")])) : s.push(l([u])), n.body && s.push(" ", r("body")), t.semi && n.type === "DeclareComponent" && s.push(";"), s;
3937
+ }
3938
+ function am(e, t, r) {
3939
+ let { node: n } = e, s = n.params;
3940
+ if (n.rest && (s = [...s, n.rest]), s.length === 0) return ["(", N(e, t, { filter: (i) => ke(t.originalText, P(i)) === ")" }), ")"];
3941
+ let u = [];
3942
+ return pm(e, (i, a) => {
3943
+ let o = a === s.length - 1;
3944
+ o && n.rest && u.push("..."), u.push(r()), !o && (u.push(","), me(s[a], t) ? u.push(F, F) : u.push(x));
3945
+ }), ["(", D([E, ...u]), S(ce(t, "all") && !om(n, s) ? "," : ""), E, ")"];
3946
+ }
3947
+ function om(e, t) {
3948
+ var r;
3949
+ return e.rest || ((r = v(false, t, -1)) == null ? void 0 : r.type) === "RestElement";
3950
+ }
3951
+ function pm(e, t) {
3952
+ let { node: r } = e, n = 0, s = (u) => t(u, n++);
3953
+ e.each(s, "params"), r.rest && e.call(s, "rest");
3954
+ }
3955
+ function Ia(e, t, r) {
3956
+ let { node: n } = e;
3957
+ return n.shorthand ? r("local") : [r("name"), " as ", r("local")];
3958
+ }
3959
+ function La(e, t, r) {
3960
+ let { node: n } = e, s = [];
3961
+ return n.name && s.push(r("name"), n.optional ? "?: " : ": "), s.push(r("typeAnnotation")), s;
3962
+ }
3963
+ function Pn(e, t, r) {
3964
+ return gt(e, t, r);
3965
+ }
3966
+ function kn(e, t) {
3967
+ let { node: r } = e, n = t("id");
3968
+ r.computed && (n = ["[", n, "]"]);
3969
+ let s = "";
3970
+ return r.initializer && (s = t("initializer")), r.init && (s = t("init")), s ? [n, " = ", s] : n;
3971
+ }
3972
+ function In(e, t) {
3973
+ let { node: r } = e;
3974
+ return [$(e), r.const ? "const " : "", "enum ", t("id"), " ", t("body")];
3975
+ }
3976
+ function Oa(e, t, r) {
3977
+ let { node: n } = e, s = ["hook"];
3978
+ n.id && s.push(" ", r("id"));
3979
+ let u = Ue(e, t, r, false, true), i = Qt(e, r), a = ct(n, i);
3980
+ return s.push(l([a ? l(u) : u, i]), n.body ? " " : "", r("body")), s;
3981
+ }
3982
+ function _a(e, t, r) {
3983
+ let { node: n } = e, s = [$(e), "hook"];
3984
+ return n.id && s.push(" ", r("id")), t.semi && s.push(";"), s;
3985
+ }
3986
+ function wa(e) {
3987
+ var r;
3988
+ let { node: t } = e;
3989
+ return t.type === "HookTypeAnnotation" && ((r = e.getParentNode(2)) == null ? void 0 : r.type) === "DeclareHook";
3990
+ }
3991
+ function Ma(e, t, r) {
3992
+ let { node: n } = e, s = [];
3993
+ s.push(wa(e) ? "" : "hook ");
3994
+ let u = Ue(e, t, r, false, true), i = [];
3995
+ return i.push(wa(e) ? ": " : " => ", r("returnType")), ct(n, i) && (u = l(u)), s.push(u, i), l(s);
3996
+ }
3997
+ function Ln(e, t, r) {
3998
+ let { node: n } = e, s = [$(e), "interface"], u = [], i = [];
3999
+ n.type !== "InterfaceTypeAnnotation" && u.push(" ", r("id"), r("typeParameters"));
4000
+ let a = n.typeParameters && !d(n.typeParameters, h.Trailing | h.Line);
4001
+ return O(n.extends) && i.push(a ? S(" ", x, { groupId: Cr(n.typeParameters) }) : x, "extends ", (n.extends.length === 1 ? du : D)(b([",", x], e.map(r, "extends")))), d(n.id, h.Trailing) || O(n.extends) ? a ? s.push(l([...u, D(i)])) : s.push(l(D([...u, ...i]))) : s.push(...u, ...i), s.push(" ", r("body")), l(s);
4002
+ }
4003
+ function cm(e) {
4004
+ switch (e) {
4005
+ case null:
4006
+ return "";
4007
+ case "PlusOptional":
4008
+ return "+?";
4009
+ case "MinusOptional":
4010
+ return "-?";
4011
+ case "Optional":
4012
+ return "?";
4013
+ }
4014
+ }
4015
+ function ja(e, t, r) {
4016
+ let { node: n } = e;
4017
+ return l([n.variance ? r("variance") : "", "[", D([r("keyTparam"), " in ", r("sourceType")]), "]", cm(n.optional), ": ", r("propType")]);
4018
+ }
4019
+ function va(e, t) {
4020
+ return e === "+" || e === "-" ? e + t : t;
4021
+ }
4022
+ function Ra(e, t, r) {
4023
+ let { node: n } = e, s = false;
4024
+ if (t.objectWrap === "preserve") {
4025
+ let u = j(n), i = Ar(t, u + 1, j(n.key)), a = u + 1 + i.search(/\S/u);
4026
+ ie(t.originalText, u, a) && (s = true);
4027
+ }
4028
+ return l(["{", D([t.bracketSpacing ? x : E, d(n, h.Dangling) ? l([N(e, t), F]) : "", l([n.readonly ? [va(n.readonly, "readonly"), " "] : "", "[", r("key"), " in ", r("constraint"), n.nameType ? [" as ", r("nameType")] : "", "]", n.optional ? va(n.optional, "?") : "", n.typeAnnotation ? ": " : "", r("typeAnnotation")]), t.semi ? S(";") : ""]), t.bracketSpacing ? x : E, "}"], { shouldBreak: s });
4029
+ }
4030
+ function Ja(e, t, r) {
4031
+ var _a2;
4032
+ let { node: n } = e;
4033
+ if (Pr(n)) return n.type.slice(0, -14).toLowerCase();
4034
+ let s = t.semi ? ";" : "";
4035
+ switch (n.type) {
4036
+ case "ComponentDeclaration":
4037
+ case "DeclareComponent":
4038
+ case "ComponentTypeAnnotation":
4039
+ return ka(e, t, r);
4040
+ case "ComponentParameter":
4041
+ return Ia(e, t, r);
4042
+ case "ComponentTypeParameter":
4043
+ return La(e, t, r);
4044
+ case "HookDeclaration":
4045
+ return Oa(e, t, r);
4046
+ case "DeclareHook":
4047
+ return _a(e, t, r);
4048
+ case "HookTypeAnnotation":
4049
+ return Ma(e, t, r);
4050
+ case "DeclareClass":
4051
+ return xn(e, t, r);
4052
+ case "DeclareFunction":
4053
+ return [$(e), "function ", r("id"), r("predicate"), s];
4054
+ case "DeclareModule":
4055
+ return ["declare module ", r("id"), " ", r("body")];
4056
+ case "DeclareModuleExports":
4057
+ return ["declare module.exports", H(e, r), s];
4058
+ case "DeclareNamespace":
4059
+ return ["declare namespace ", r("id"), " ", r("body")];
4060
+ case "DeclareVariable":
4061
+ return [$(e), (_a2 = n.kind) != null ? _a2 : "var", " ", r("id"), s];
4062
+ case "DeclareExportDeclaration":
4063
+ case "DeclareExportAllDeclaration":
4064
+ return Bn(e, t, r);
4065
+ case "DeclareOpaqueType":
4066
+ case "OpaqueType":
4067
+ return Vi(e, t, r);
4068
+ case "DeclareTypeAlias":
4069
+ case "TypeAlias":
4070
+ return Zr(e, t, r);
4071
+ case "IntersectionTypeAnnotation":
4072
+ return en(e, t, r);
4073
+ case "UnionTypeAnnotation":
4074
+ return tn(e, t, r);
4075
+ case "ConditionalTypeAnnotation":
4076
+ return zt(e, t, r);
4077
+ case "InferTypeAnnotation":
4078
+ return sn(e, t, r);
4079
+ case "FunctionTypeAnnotation":
4080
+ return rn(e, t, r);
4081
+ case "TupleTypeAnnotation":
4082
+ return Kt(e, t, r);
4083
+ case "TupleTypeLabeledElement":
4084
+ return an(e, t, r);
4085
+ case "TupleTypeSpreadElement":
4086
+ return un(e, t, r);
4087
+ case "GenericTypeAnnotation":
4088
+ return [r("id"), wt(e, t, r, "typeParameters")];
4089
+ case "IndexedAccessType":
4090
+ case "OptionalIndexedAccessType":
4091
+ return nn(e, t, r);
4092
+ case "TypeAnnotation":
4093
+ return on(e, t, r);
4094
+ case "TypeParameter":
4095
+ return Tn(e, t, r);
4096
+ case "TypeofTypeAnnotation":
4097
+ return cn(e, r);
4098
+ case "ExistsTypeAnnotation":
4099
+ return "*";
4100
+ case "ArrayTypeAnnotation":
4101
+ return pn(r);
4102
+ case "DeclareEnum":
4103
+ case "EnumDeclaration":
4104
+ return In(e, r);
4105
+ case "EnumBooleanBody":
4106
+ case "EnumNumberBody":
4107
+ case "EnumBigIntBody":
4108
+ case "EnumStringBody":
4109
+ case "EnumSymbolBody":
4110
+ return [n.type === "EnumSymbolBody" || n.explicitType ? `of ${n.type.slice(4, -4).toLowerCase()} ` : "", Pn(e, t, r)];
4111
+ case "EnumBooleanMember":
4112
+ case "EnumNumberMember":
4113
+ case "EnumBigIntMember":
4114
+ case "EnumStringMember":
4115
+ case "EnumDefaultedMember":
4116
+ return kn(e, r);
4117
+ case "FunctionTypeParam": {
4118
+ let u = n.name ? r("name") : e.parent.this === n ? "this" : "";
4119
+ return [u, V(e), u ? ": " : "", r("typeAnnotation")];
4120
+ }
4121
+ case "DeclareInterface":
4122
+ case "InterfaceDeclaration":
4123
+ case "InterfaceTypeAnnotation":
4124
+ return Ln(e, t, r);
4125
+ case "ClassImplements":
4126
+ case "InterfaceExtends":
4127
+ return [r("id"), r("typeParameters")];
4128
+ case "NullableTypeAnnotation":
4129
+ return ["?", r("typeAnnotation")];
4130
+ case "Variance": {
4131
+ let { kind: u } = n;
4132
+ return jt.ok(u === "plus" || u === "minus"), u === "plus" ? "+" : "-";
4133
+ }
4134
+ case "KeyofTypeAnnotation":
4135
+ return ["keyof ", r("argument")];
4136
+ case "ObjectTypeCallProperty":
4137
+ return [n.static ? "static " : "", r("value")];
4138
+ case "ObjectTypeMappedTypeProperty":
4139
+ return ja(e, t, r);
4140
+ case "ObjectTypeIndexer":
4141
+ return [n.static ? "static " : "", n.variance ? r("variance") : "", "[", r("id"), n.id ? ": " : "", r("key"), "]: ", r("value")];
4142
+ case "ObjectTypeProperty": {
4143
+ let u = "";
4144
+ return n.proto ? u = "proto " : n.static && (u = "static "), [u, n.kind !== "init" ? n.kind + " " : "", n.variance ? r("variance") : "", Ct(e, t, r), V(e), bt(n) ? "" : ": ", r("value")];
4145
+ }
4146
+ case "ObjectTypeAnnotation":
4147
+ return gt(e, t, r);
4148
+ case "ObjectTypeInternalSlot":
4149
+ return [n.static ? "static " : "", "[[", r("id"), "]]", V(e), n.method ? "" : ": ", r("value")];
4150
+ case "ObjectTypeSpreadProperty":
4151
+ return yn(e, r);
4152
+ case "QualifiedTypeofIdentifier":
4153
+ case "QualifiedTypeIdentifier":
4154
+ return [r("qualification"), ".", r("id")];
4155
+ case "NullLiteralTypeAnnotation":
4156
+ return "null";
4157
+ case "BooleanLiteralTypeAnnotation":
4158
+ return String(n.value);
4159
+ case "StringLiteralTypeAnnotation":
4160
+ return ve(ut(ae(n), t));
4161
+ case "NumberLiteralTypeAnnotation":
4162
+ return Ft(ae(n));
4163
+ case "BigIntLiteralTypeAnnotation":
4164
+ return Sn(ae(n));
4165
+ case "TypeCastExpression":
4166
+ return ["(", r("expression"), H(e, r), ")"];
4167
+ case "TypePredicate":
4168
+ return ln(e, r);
4169
+ case "TypeOperator":
4170
+ return [n.operator, " ", r("typeAnnotation")];
4171
+ case "TypeParameterDeclaration":
4172
+ case "TypeParameterInstantiation":
4173
+ return wt(e, t, r, "params");
4174
+ case "InferredPredicate":
4175
+ case "DeclaredPredicate":
4176
+ return [e.key === "predicate" && e.parent.type !== "DeclareFunction" && !e.parent.returnType ? ": " : " ", "%checks", ...n.type === "DeclaredPredicate" ? ["(", r("value"), ")"] : []];
4177
+ case "AsExpression":
4178
+ case "AsConstExpression":
4179
+ case "SatisfiesExpression":
4180
+ return bn(e, t, r);
4181
+ }
4182
+ }
4183
+ function Na(e, t, r) {
4184
+ var i;
4185
+ let { node: n } = e;
4186
+ if (!n.type.startsWith("TS")) return;
4187
+ if (kr(n)) return n.type.slice(2, -7).toLowerCase();
4188
+ let s = t.semi ? ";" : "", u = [];
4189
+ switch (n.type) {
4190
+ case "TSThisType":
4191
+ return "this";
4192
+ case "TSTypeAssertion": {
4193
+ let a = !(U(n.expression) || ue(n.expression)), o = l(["<", D([E, r("typeAnnotation")]), E, ">"]), p = [S("("), D([E, r("expression")]), E, S(")")];
4194
+ return a ? tt([[o, r("expression")], [o, l(p, { shouldBreak: true })], [o, r("expression")]]) : l([o, r("expression")]);
4195
+ }
4196
+ case "TSDeclareFunction":
4197
+ return En(e, t, r);
4198
+ case "TSExportAssignment":
4199
+ return ["export = ", r("expression"), s];
4200
+ case "TSModuleBlock":
4201
+ return An(e, t, r);
4202
+ case "TSInterfaceBody":
4203
+ case "TSTypeLiteral":
4204
+ return gt(e, t, r);
4205
+ case "TSTypeAliasDeclaration":
4206
+ return Zr(e, t, r);
4207
+ case "TSQualifiedName":
4208
+ return [r("left"), ".", r("right")];
4209
+ case "TSAbstractMethodDefinition":
4210
+ case "TSDeclareMethod":
4211
+ return hn(e, t, r);
4212
+ case "TSAbstractAccessorProperty":
4213
+ case "TSAbstractPropertyDefinition":
4214
+ return gn(e, t, r);
4215
+ case "TSInterfaceHeritage":
4216
+ case "TSClassImplements":
4217
+ case "TSExpressionWithTypeArguments":
4218
+ case "TSInstantiationExpression":
4219
+ return [r("expression"), r(n.typeArguments ? "typeArguments" : "typeParameters")];
4220
+ case "TSTemplateLiteralType":
4221
+ return Wr(e, t, r);
4222
+ case "TSNamedTupleMember":
4223
+ return an(e, t, r);
4224
+ case "TSRestType":
4225
+ return un(e, t, r);
4226
+ case "TSOptionalType":
4227
+ return [r("typeAnnotation"), "?"];
4228
+ case "TSInterfaceDeclaration":
4229
+ return Ln(e, t, r);
4230
+ case "TSTypeParameterDeclaration":
4231
+ case "TSTypeParameterInstantiation":
4232
+ return wt(e, t, r, "params");
4233
+ case "TSTypeParameter":
4234
+ return Tn(e, t, r);
4235
+ case "TSAsExpression":
4236
+ case "TSSatisfiesExpression":
4237
+ return bn(e, t, r);
4238
+ case "TSArrayType":
4239
+ return pn(r);
4240
+ case "TSPropertySignature":
4241
+ return [n.readonly ? "readonly " : "", Ct(e, t, r), V(e), H(e, r)];
4242
+ case "TSParameterProperty":
4243
+ return [$t(n), n.static ? "static " : "", n.override ? "override " : "", n.readonly ? "readonly " : "", r("parameter")];
4244
+ case "TSTypeQuery":
4245
+ return cn(e, r);
4246
+ case "TSIndexSignature": {
4247
+ let a = n.parameters.length > 1 ? S(ce(t) ? "," : "") : "", o = l([D([E, b([", ", E], e.map(r, "parameters"))]), a, E]), p = e.parent.type === "ClassBody" && e.key === "body";
4248
+ return [p && n.static ? "static " : "", n.readonly ? "readonly " : "", "[", n.parameters ? o : "", "]", H(e, r), p ? s : ""];
4249
+ }
4250
+ case "TSTypePredicate":
4251
+ return ln(e, r);
4252
+ case "TSNonNullExpression":
4253
+ return [r("expression"), "!"];
4254
+ case "TSImportType":
4255
+ return ["import", Lt(e, t, r), n.qualifier ? [".", r("qualifier")] : "", wt(e, t, r, n.typeArguments ? "typeArguments" : "typeParameters")];
4256
+ case "TSLiteralType":
4257
+ return r("literal");
4258
+ case "TSIndexedAccessType":
4259
+ return nn(e, t, r);
4260
+ case "TSTypeOperator":
4261
+ return [n.operator, " ", r("typeAnnotation")];
4262
+ case "TSMappedType":
4263
+ return Ra(e, t, r);
4264
+ case "TSMethodSignature": {
4265
+ let a = n.kind && n.kind !== "method" ? `${n.kind} ` : "";
4266
+ u.push($t(n), a, n.computed ? "[" : "", r("key"), n.computed ? "]" : "", V(e));
4267
+ let o = Ue(e, t, r, false, true), p = n.returnType ? "returnType" : "typeAnnotation", m = n[p], f = m ? H(e, r, p) : "", y = ct(n, f);
4268
+ return u.push(y ? l(o) : o), m && u.push(l(f)), l(u);
4269
+ }
4270
+ case "TSNamespaceExportDeclaration":
4271
+ return ["export as namespace ", r("id"), t.semi ? ";" : ""];
4272
+ case "TSEnumDeclaration":
4273
+ return In(e, r);
4274
+ case "TSEnumBody":
4275
+ return Pn(e, t, r);
4276
+ case "TSEnumMember":
4277
+ return kn(e, r);
4278
+ case "TSImportEqualsDeclaration":
4279
+ return [n.isExport ? "export " : "", "import ", Os(n, false), r("id"), " = ", r("moduleReference"), t.semi ? ";" : ""];
4280
+ case "TSExternalModuleReference":
4281
+ return ["require(", r("expression"), ")"];
4282
+ case "TSModuleDeclaration": {
4283
+ let { parent: a } = e, o = a.type === "TSModuleDeclaration", p = ((i = n.body) == null ? void 0 : i.type) === "TSModuleDeclaration";
4284
+ return o ? u.push(".") : (u.push($(e)), n.kind !== "global" && u.push(n.kind, " ")), u.push(r("id")), p ? u.push(r("body")) : n.body ? u.push(" ", l(r("body"))) : u.push(s), u;
4285
+ }
4286
+ case "TSConditionalType":
4287
+ return zt(e, t, r);
4288
+ case "TSInferType":
4289
+ return sn(e, t, r);
4290
+ case "TSIntersectionType":
4291
+ return en(e, t, r);
4292
+ case "TSUnionType":
4293
+ return tn(e, t, r);
4294
+ case "TSFunctionType":
4295
+ case "TSCallSignatureDeclaration":
4296
+ case "TSConstructorType":
4297
+ case "TSConstructSignatureDeclaration":
4298
+ return rn(e, t, r);
4299
+ case "TSTupleType":
4300
+ return Kt(e, t, r);
4301
+ case "TSTypeReference":
4302
+ return [r("typeName"), wt(e, t, r, n.typeArguments ? "typeArguments" : "typeParameters")];
4303
+ case "TSTypeAnnotation":
4304
+ return on(e, t, r);
4305
+ case "TSEmptyBodyFunctionExpression":
4306
+ return Fn(e, t, r);
4307
+ case "TSJSDocAllType":
4308
+ return "*";
4309
+ case "TSJSDocUnknownType":
4310
+ return "?";
4311
+ case "TSJSDocNullableType":
4312
+ return Bs(e, r, "?");
4313
+ case "TSJSDocNonNullableType":
4314
+ return Bs(e, r, "!");
4315
+ case "TSParenthesizedType":
4316
+ default:
4317
+ throw new qe(n, "TypeScript");
4318
+ }
4319
+ }
4320
+ function lm(e, t, r, n) {
4321
+ if (Vr(e)) return Ti(e, t);
4322
+ for (let s of [Li, bi, Ja, Na, Pa]) {
4323
+ let u = s(e, t, r, n);
4324
+ if (u !== void 0) return u;
4325
+ }
4326
+ }
4327
+ var mm = R(["ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassAccessorProperty", "AccessorProperty", "TSAbstractAccessorProperty", "PropertyDefinition", "TSAbstractPropertyDefinition", "ClassPrivateProperty", "MethodDefinition", "TSAbstractMethodDefinition", "TSDeclareMethod"]);
4328
+ function ym(e, t, r, n) {
4329
+ var f;
4330
+ e.isRoot && ((f = t.__onHtmlBindingRoot) == null || f.call(t, e.node, t));
4331
+ let s = lm(e, t, r, n);
4332
+ if (!s) return "";
4333
+ let { node: u } = e;
4334
+ if (mm(u)) return s;
4335
+ let i = O(u.decorators), a = Oi(e, t, r), o = u.type === "ClassExpression";
4336
+ if (i && !o) return lr(s, (y) => l([a, y]));
4337
+ let p = Le(e, t), m = ya(e, t);
4338
+ return !a && !p && !m ? s : lr(s, (y) => [m ? ";" : "", p ? "(" : "", p && o && i ? [D([x, a, y]), x] : [a, y], p ? ")" : ""]);
4339
+ }
4340
+ var Ga = ym;
4341
+ var fm = { avoidAstMutation: true };
4342
+ var qa = [{ name: "JSON.stringify", type: "data", extensions: [".importmap"], tmScope: "source.json", aceMode: "json", aliases: ["geojson", "jsonl", "sarif", "topojson"], codemirrorMode: "javascript", codemirrorMimeType: "application/json", filenames: ["package.json", "package-lock.json", "composer.json"], parsers: ["json-stringify"], vscodeLanguageIds: ["json"], linguistLanguageId: 174 }, { name: "JSON", type: "data", extensions: [".json", ".4DForm", ".4DProject", ".avsc", ".geojson", ".gltf", ".har", ".ice", ".JSON-tmLanguage", ".json.example", ".mcmeta", ".sarif", ".tact", ".tfstate", ".tfstate.backup", ".topojson", ".webapp", ".webmanifest", ".yy", ".yyp"], tmScope: "source.json", aceMode: "json", aliases: ["geojson", "jsonl", "sarif", "topojson"], codemirrorMode: "javascript", codemirrorMimeType: "application/json", filenames: [".all-contributorsrc", ".arcconfig", ".auto-changelog", ".c8rc", ".htmlhintrc", ".imgbotconfig", ".nycrc", ".tern-config", ".tern-project", ".watchmanconfig", ".babelrc", ".jscsrc", ".jshintrc", ".jslintrc", ".swcrc"], parsers: ["json"], vscodeLanguageIds: ["json"], linguistLanguageId: 174 }, { name: "JSON with Comments", type: "data", extensions: [".jsonc", ".code-snippets", ".code-workspace", ".sublime-build", ".sublime-color-scheme", ".sublime-commands", ".sublime-completions", ".sublime-keymap", ".sublime-macro", ".sublime-menu", ".sublime-mousemap", ".sublime-project", ".sublime-settings", ".sublime-theme", ".sublime-workspace", ".sublime_metrics", ".sublime_session"], tmScope: "source.json.comments", aceMode: "javascript", aliases: ["jsonc"], codemirrorMode: "javascript", codemirrorMimeType: "text/javascript", group: "JSON", filenames: [], parsers: ["jsonc"], vscodeLanguageIds: ["jsonc"], linguistLanguageId: 423 }, { name: "JSON5", type: "data", extensions: [".json5"], tmScope: "source.js", aceMode: "javascript", codemirrorMode: "javascript", codemirrorMimeType: "application/json", parsers: ["json5"], vscodeLanguageIds: ["json5"], linguistLanguageId: 175 }];
4343
+ var js = {};
4344
+ xr(js, { getVisitorKeys: () => Ua, massageAstNode: () => Ya, print: () => Fm });
4345
+ var Dm = { JsonRoot: ["node"], ArrayExpression: ["elements"], ObjectExpression: ["properties"], ObjectProperty: ["key", "value"], UnaryExpression: ["argument"], NullLiteral: [], BooleanLiteral: [], StringLiteral: [], NumericLiteral: [], Identifier: [], TemplateLiteral: ["quasis"], TemplateElement: [] };
4346
+ var Wa = Dm;
4347
+ var Em = Br(Wa);
4348
+ var Ua = Em;
4349
+ function Fm(e, t, r) {
4350
+ let { node: n } = e;
4351
+ switch (n.type) {
4352
+ case "JsonRoot":
4353
+ return [r("node"), F];
4354
+ case "ArrayExpression": {
4355
+ if (n.elements.length === 0) return "[]";
4356
+ let s = e.map(() => e.node === null ? "null" : r(), "elements");
4357
+ return ["[", D([F, b([",", F], s)]), F, "]"];
4358
+ }
4359
+ case "ObjectExpression":
4360
+ return n.properties.length === 0 ? "{}" : ["{", D([F, b([",", F], e.map(r, "properties"))]), F, "}"];
4361
+ case "ObjectProperty":
4362
+ return [r("key"), ": ", r("value")];
4363
+ case "UnaryExpression":
4364
+ return [n.operator === "+" ? "" : n.operator, r("argument")];
4365
+ case "NullLiteral":
4366
+ return "null";
4367
+ case "BooleanLiteral":
4368
+ return n.value ? "true" : "false";
4369
+ case "StringLiteral":
4370
+ return JSON.stringify(n.value);
4371
+ case "NumericLiteral":
4372
+ return Xa(e) ? JSON.stringify(String(n.value)) : JSON.stringify(n.value);
4373
+ case "Identifier":
4374
+ return Xa(e) ? JSON.stringify(n.name) : n.name;
4375
+ case "TemplateLiteral":
4376
+ return r(["quasis", 0]);
4377
+ case "TemplateElement":
4378
+ return JSON.stringify(n.value.cooked);
4379
+ default:
4380
+ throw new qe(n, "JSON");
4381
+ }
4382
+ }
4383
+ function Xa(e) {
4384
+ return e.key === "key" && e.parent.type === "ObjectProperty";
4385
+ }
4386
+ var Cm = /* @__PURE__ */ new Set(["start", "end", "extra", "loc", "comments", "leadingComments", "trailingComments", "innerComments", "errors", "range", "tokens"]);
4387
+ function Ya(e, t) {
4388
+ let { type: r } = e;
4389
+ if (r === "ObjectProperty") {
4390
+ let { key: n } = e;
4391
+ n.type === "Identifier" ? t.key = { type: "StringLiteral", value: n.name } : n.type === "NumericLiteral" && (t.key = { type: "StringLiteral", value: String(n.value) });
4392
+ return;
4393
+ }
4394
+ if (r === "UnaryExpression" && e.operator === "+") return t.argument;
4395
+ if (r === "ArrayExpression") {
4396
+ for (let [n, s] of e.elements.entries()) s === null && t.elements.splice(n, 0, { type: "NullLiteral" });
4397
+ return;
4398
+ }
4399
+ if (r === "TemplateLiteral") return { type: "StringLiteral", value: e.quasis[0].value.cooked };
4400
+ }
4401
+ Ya.ignoredProperties = Cm;
4402
+ var Zt = { bracketSpacing: { category: "Common", type: "boolean", default: true, description: "Print spaces between brackets.", oppositeDescription: "Do not print spaces between brackets." }, objectWrap: { category: "Common", type: "choice", default: "preserve", description: "How to wrap object literals.", choices: [{ value: "preserve", description: "Keep as multi-line, if there is a newline between the opening brace and first property." }, { value: "collapse", description: "Fit to a single line when possible." }] }, singleQuote: { category: "Common", type: "boolean", default: false, description: "Use single quotes instead of double quotes." }, proseWrap: { category: "Common", type: "choice", default: "preserve", description: "How to wrap prose.", choices: [{ value: "always", description: "Wrap prose if it exceeds the print width." }, { value: "never", description: "Do not wrap prose." }, { value: "preserve", description: "Wrap prose as-is." }] }, bracketSameLine: { category: "Common", type: "boolean", default: false, description: "Put > of opening tags on the last line instead of on a new line." }, singleAttributePerLine: { category: "Common", type: "boolean", default: false, description: "Enforce single attribute per line in HTML, Vue and JSX." } };
4403
+ var St = "JavaScript";
4404
+ var Am = { arrowParens: { category: St, type: "choice", default: "always", description: "Include parentheses around a sole arrow function parameter.", choices: [{ value: "always", description: "Always include parens. Example: `(x) => x`" }, { value: "avoid", description: "Omit parens when possible. Example: `x => x`" }] }, bracketSameLine: Zt.bracketSameLine, objectWrap: Zt.objectWrap, bracketSpacing: Zt.bracketSpacing, jsxBracketSameLine: { category: St, type: "boolean", description: "Put > on the last line instead of at a new line.", deprecated: "2.4.0" }, semi: { category: St, type: "boolean", default: true, description: "Print semicolons.", oppositeDescription: "Do not print semicolons, except at the beginning of lines which may need them." }, experimentalOperatorPosition: { category: St, type: "choice", default: "end", description: "Where to print operators when binary expressions wrap lines.", choices: [{ value: "start", description: "Print operators at the start of new lines." }, { value: "end", description: "Print operators at the end of previous lines." }] }, experimentalTernaries: { category: St, type: "boolean", default: false, description: "Use curious ternaries, with the question mark after the condition.", oppositeDescription: "Default behavior of ternaries; keep question marks on the same line as the consequent." }, singleQuote: Zt.singleQuote, jsxSingleQuote: { category: St, type: "boolean", default: false, description: "Use single quotes in JSX." }, quoteProps: { category: St, type: "choice", default: "as-needed", description: "Change when properties in objects are quoted.", choices: [{ value: "as-needed", description: "Only add quotes around object properties where required." }, { value: "consistent", description: "If at least one property in an object requires quotes, quote all properties." }, { value: "preserve", description: "Respect the input use of quotes in object properties." }] }, trailingComma: { category: St, type: "choice", default: "all", description: "Print trailing commas wherever possible when multi-line.", choices: [{ value: "all", description: "Trailing commas wherever possible (including function arguments)." }, { value: "es5", description: "Trailing commas where valid in ES5 (objects, arrays, etc.)" }, { value: "none", description: "No trailing commas." }] }, singleAttributePerLine: Zt.singleAttributePerLine };
4405
+ var Ha = Am;
4406
+ var dm = { estree: vs, "estree-json": js };
4407
+ var Tm = [...Vs, ...qa];
4408
+ var Nx = Rs;
4409
+ export {
4410
+ Nx as default,
4411
+ Tm as languages,
4412
+ Ha as options,
4413
+ dm as printers
4414
+ };