neutralino-python 0.1.0__py3-none-any.whl

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 (521) hide show
  1. neutralino/__init__.py +88 -0
  2. neutralino/_catalog.py +297 -0
  3. neutralino/_data/LICENSE.neutralino-js-client +21 -0
  4. neutralino/_data/LICENSE.neutralinojs +1066 -0
  5. neutralino/_data/docs/cli.md +315 -0
  6. neutralino/_data/docs/custom-components.md +107 -0
  7. neutralino/_data/docs/custom-frontends.md +80 -0
  8. neutralino/_data/docs/desktop-helpers.md +296 -0
  9. neutralino/_data/docs/guide.md +131 -0
  10. neutralino/_data/docs/llms-full.txt +3921 -0
  11. neutralino/_data/docs/llms.txt +43 -0
  12. neutralino/_data/docs/manifests/components.json +20128 -0
  13. neutralino/_data/docs/manifests/examples.json +52 -0
  14. neutralino/_data/docs/manifests/native.json +3024 -0
  15. neutralino/_data/docs/manifests/schema.json +43 -0
  16. neutralino/_data/docs/manual-checklist.md +189 -0
  17. neutralino/_data/docs/packaging.md +252 -0
  18. neutralino/_data/docs/performance.md +15 -0
  19. neutralino/_data/docs/platforms.md +15 -0
  20. neutralino/_data/docs/reference/components.md +1685 -0
  21. neutralino/_data/docs/reference/native.md +148 -0
  22. neutralino/_data/docs/security.md +60 -0
  23. neutralino/_data/docs/ui.md +249 -0
  24. neutralino/_data/docs/updates.md +366 -0
  25. neutralino/_data/examples/README.md +6 -0
  26. neutralino/_data/examples/crud/README.md +36 -0
  27. neutralino/_data/examples/crud/app.py +243 -0
  28. neutralino/_data/examples/dashboard/README.md +36 -0
  29. neutralino/_data/examples/dashboard/app.py +367 -0
  30. neutralino/_data/examples/editor/README.md +35 -0
  31. neutralino/_data/examples/editor/app.py +190 -0
  32. neutralino/_data/examples/file-manager/README.md +40 -0
  33. neutralino/_data/examples/file-manager/app.py +120 -0
  34. neutralino/_data/examples/file-manager/frontend/index.html +20 -0
  35. neutralino/_data/examples/file-manager/frontend/main.js +55 -0
  36. neutralino/_data/examples/file-manager/frontend/neutralino.js +1 -0
  37. neutralino/_data/examples/file-manager/frontend/python-bridge.d.ts +207 -0
  38. neutralino/_data/examples/file-manager/frontend/python-bridge.mjs +854 -0
  39. neutralino/_data/examples/file-manager/frontend/style.css +4 -0
  40. neutralino/_data/examples/hybrid/README.md +48 -0
  41. neutralino/_data/examples/hybrid/app.py +80 -0
  42. neutralino/_data/examples/hybrid/components/counter.mjs +37 -0
  43. neutralino/_data/examples/hybrid/components/widget.mjs +23 -0
  44. neutralino/_data/examples/hybrid/styles.css +21 -0
  45. neutralino/_data/examples/hybrid/widget/package.json +20 -0
  46. neutralino/_data/examples/hybrid/widget/src/Widget.jsx +25 -0
  47. neutralino/_data/examples/hybrid/widget/vite.config.mjs +19 -0
  48. neutralino/_data/examples/monitor/README.md +36 -0
  49. neutralino/_data/examples/monitor/app.py +375 -0
  50. neutralino/_data/examples/react/README.md +90 -0
  51. neutralino/_data/examples/react/app.py +68 -0
  52. neutralino/_data/examples/react/frontend/.gitignore +5 -0
  53. neutralino/_data/examples/react/frontend/index.html +17 -0
  54. neutralino/_data/examples/react/frontend/package-lock.json +1232 -0
  55. neutralino/_data/examples/react/frontend/package.json +25 -0
  56. neutralino/_data/examples/react/frontend/scripts/prepare-bridge.mjs +49 -0
  57. neutralino/_data/examples/react/frontend/src/App.tsx +157 -0
  58. neutralino/_data/examples/react/frontend/src/backend.ts +21 -0
  59. neutralino/_data/examples/react/frontend/src/calls.test.ts +206 -0
  60. neutralino/_data/examples/react/frontend/src/calls.ts +306 -0
  61. neutralino/_data/examples/react/frontend/src/globals.d.ts +14 -0
  62. neutralino/_data/examples/react/frontend/src/hooks.ts +45 -0
  63. neutralino/_data/examples/react/frontend/src/main.tsx +13 -0
  64. neutralino/_data/examples/react/frontend/src/styles.css +11 -0
  65. neutralino/_data/examples/react/frontend/tsconfig.json +18 -0
  66. neutralino/_data/examples/react/frontend/vite.config.ts +9 -0
  67. neutralino/_data/examples/settings/README.md +38 -0
  68. neutralino/_data/examples/settings/app.py +440 -0
  69. neutralino/_data/examples/updater/.gitignore +2 -0
  70. neutralino/_data/examples/updater/README.md +82 -0
  71. neutralino/_data/examples/updater/app.py +160 -0
  72. neutralino/_data/examples/updater/app.toml +21 -0
  73. neutralino/_data/examples/updater/demo.py +107 -0
  74. neutralino/_data/examples/updater/requirements.txt +2 -0
  75. neutralino/_data/examples/updater/sources/github-private.toml +21 -0
  76. neutralino/_data/examples/updater/sources/github-public.toml +21 -0
  77. neutralino/_data/examples/vanilla/README.md +35 -0
  78. neutralino/_data/examples/vanilla/app.py +46 -0
  79. neutralino/_data/examples/vanilla/frontend/index.html +17 -0
  80. neutralino/_data/examples/vanilla/frontend/main.js +29 -0
  81. neutralino/_data/examples/vanilla/frontend/neutralino.js +1 -0
  82. neutralino/_data/examples/vanilla/frontend/python-bridge.d.ts +207 -0
  83. neutralino/_data/examples/vanilla/frontend/python-bridge.mjs +854 -0
  84. neutralino/_data/examples/vanilla/frontend/style.css +4 -0
  85. neutralino/_data/explorer/app.py +1328 -0
  86. neutralino/_data/explorer/catalogue.json +48179 -0
  87. neutralino/_data/explorer/explorer_previews.py +247 -0
  88. neutralino/_data/explorer/sources/native/always_on_top.py +55 -0
  89. neutralino/_data/explorer/sources/native/binary.py +125 -0
  90. neutralino/_data/explorer/sources/native/borderless.py +99 -0
  91. neutralino/_data/explorer/sources/native/broadcast.py +90 -0
  92. neutralino/_data/explorer/sources/native/config.py +78 -0
  93. neutralino/_data/explorer/sources/native/controls.py +140 -0
  94. neutralino/_data/explorer/sources/native/directory.py +163 -0
  95. neutralino/_data/explorer/sources/native/displays.py +75 -0
  96. neutralino/_data/explorer/sources/native/env.py +98 -0
  97. neutralino/_data/explorer/sources/native/events.py +124 -0
  98. neutralino/_data/explorer/sources/native/exec_command.py +79 -0
  99. neutralino/_data/explorer/sources/native/folder.py +70 -0
  100. neutralino/_data/explorer/sources/native/icon_badge.py +101 -0
  101. neutralino/_data/explorer/sources/native/image.py +119 -0
  102. neutralino/_data/explorer/sources/native/lifecycle.py +99 -0
  103. neutralino/_data/explorer/sources/native/locale.py +70 -0
  104. neutralino/_data/explorer/sources/native/main_menu.py +103 -0
  105. neutralino/_data/explorer/sources/native/message_box.py +101 -0
  106. neutralino/_data/explorer/sources/native/mouse.py +70 -0
  107. neutralino/_data/explorer/sources/native/multi_window.py +134 -0
  108. neutralino/_data/explorer/sources/native/notification.py +74 -0
  109. neutralino/_data/explorer/sources/native/open_external.py +81 -0
  110. neutralino/_data/explorer/sources/native/open_file.py +102 -0
  111. neutralino/_data/explorer/sources/native/paths.py +77 -0
  112. neutralino/_data/explorer/sources/native/print_snapshot.py +84 -0
  113. neutralino/_data/explorer/sources/native/read_write.py +192 -0
  114. neutralino/_data/explorer/sources/native/resources.py +110 -0
  115. neutralino/_data/explorer/sources/native/save_file.py +101 -0
  116. neutralino/_data/explorer/sources/native/server_mount.py +106 -0
  117. neutralino/_data/explorer/sources/native/sound.py +84 -0
  118. neutralino/_data/explorer/sources/native/spawn_process.py +128 -0
  119. neutralino/_data/explorer/sources/native/states.py +122 -0
  120. neutralino/_data/explorer/sources/native/stats_permissions.py +147 -0
  121. neutralino/_data/explorer/sources/native/storage.py +108 -0
  122. neutralino/_data/explorer/sources/native/system_info.py +115 -0
  123. neutralino/_data/explorer/sources/native/text.py +133 -0
  124. neutralino/_data/explorer/sources/native/trash.py +98 -0
  125. neutralino/_data/explorer/sources/native/tray.py +109 -0
  126. neutralino/_data/explorer/sources/native/watcher.py +167 -0
  127. neutralino/_data/explorer/sources/patterns/content_blocks.py +119 -0
  128. neutralino/_data/explorer/sources/patterns/dynamic_dashboard.py +121 -0
  129. neutralino/_data/explorer/sources/patterns/dynamic_form.py +120 -0
  130. neutralino/_data/explorer/sources/patterns/dynamic_table.py +109 -0
  131. neutralino/_data/explorer/sources/patterns/error_reporting.mjs +24 -0
  132. neutralino/_data/explorer/sources/patterns/error_reporting.py +124 -0
  133. neutralino/_data/explorer/sources/patterns/errors_timeouts.py +108 -0
  134. neutralino/_data/explorer/sources/patterns/feature_flags.py +99 -0
  135. neutralino/_data/explorer/sources/patterns/file_drop.py +126 -0
  136. neutralino/_data/explorer/sources/patterns/http_from_python.py +152 -0
  137. neutralino/_data/explorer/sources/patterns/keyboard_shortcuts.py +153 -0
  138. neutralino/_data/explorer/sources/patterns/live_config_reload.py +160 -0
  139. neutralino/_data/explorer/sources/patterns/logging.py +184 -0
  140. neutralino/_data/explorer/sources/patterns/long_tasks.py +121 -0
  141. neutralino/_data/explorer/sources/patterns/multi_window_sync.py +68 -0
  142. neutralino/_data/explorer/sources/patterns/navigation_from_backend.py +109 -0
  143. neutralino/_data/explorer/sources/patterns/onboarding.py +123 -0
  144. neutralino/_data/explorer/sources/patterns/optimistic_updates.py +89 -0
  145. neutralino/_data/explorer/sources/patterns/persistence.py +114 -0
  146. neutralino/_data/explorer/sources/patterns/python_calls_page.mjs +10 -0
  147. neutralino/_data/explorer/sources/patterns/python_calls_page.py +64 -0
  148. neutralino/_data/explorer/sources/patterns/python_push.py +84 -0
  149. neutralino/_data/explorer/sources/patterns/recurring_events.py +114 -0
  150. neutralino/_data/explorer/sources/patterns/roles_permissions.py +104 -0
  151. neutralino/_data/explorer/sources/patterns/scheduled_jobs.py +194 -0
  152. neutralino/_data/explorer/sources/patterns/settings_page.py +165 -0
  153. neutralino/_data/explorer/sources/patterns/sqlite.py +181 -0
  154. neutralino/_data/explorer/sources/patterns/streaming.py +102 -0
  155. neutralino/_data/explorer/sources/patterns/texts_i18n.py +81 -0
  156. neutralino/_data/explorer/sources/patterns/theme_from_backend.py +86 -0
  157. neutralino/_data/explorer/sources/patterns/updater.py +232 -0
  158. neutralino/_data/explorer/sources/workspace/calendar/app.py +547 -0
  159. neutralino/_data/explorer/sources/workspace/customers/app.py +467 -0
  160. neutralino/_data/explorer/sources/workspace/dashboard/README.md +36 -0
  161. neutralino/_data/explorer/sources/workspace/dashboard/app.py +367 -0
  162. neutralino/_data/explorer/sources/workspace/documents/app.py +511 -0
  163. neutralino/_data/explorer/sources/workspace/inbox/app.py +439 -0
  164. neutralino/_data/explorer/sources/workspace/orders/app.py +491 -0
  165. neutralino/_data/explorer/sources/workspace/reports/app.py +386 -0
  166. neutralino/_data/explorer/sources/workspace/settings/README.md +38 -0
  167. neutralino/_data/explorer/sources/workspace/settings/app.py +440 -0
  168. neutralino/_data/explorer/sources/workspace/system/README.md +36 -0
  169. neutralino/_data/explorer/sources/workspace/system/app.py +375 -0
  170. neutralino/_data/explorer/sources/workspace/tasks/app.py +462 -0
  171. neutralino/_data/renderer/LICENSES/@babel__runtime@7.29.17/LICENSE +22 -0
  172. neutralino/_data/renderer/LICENSES/@codemirror__autocomplete@6.20.4/LICENSE +21 -0
  173. neutralino/_data/renderer/LICENSES/@codemirror__commands@6.11.2/LICENSE +21 -0
  174. neutralino/_data/renderer/LICENSES/@codemirror__lang-css@6.3.1/LICENSE +21 -0
  175. neutralino/_data/renderer/LICENSES/@codemirror__lang-html@6.4.12/LICENSE +21 -0
  176. neutralino/_data/renderer/LICENSES/@codemirror__lang-javascript@6.2.5/LICENSE +21 -0
  177. neutralino/_data/renderer/LICENSES/@codemirror__lang-json@6.0.2/LICENSE +21 -0
  178. neutralino/_data/renderer/LICENSES/@codemirror__lang-markdown@6.5.3/LICENSE +21 -0
  179. neutralino/_data/renderer/LICENSES/@codemirror__lang-python@6.2.1/LICENSE +21 -0
  180. neutralino/_data/renderer/LICENSES/@codemirror__lang-sql@6.10.0/LICENSE +21 -0
  181. neutralino/_data/renderer/LICENSES/@codemirror__lang-yaml@6.1.3/LICENSE +21 -0
  182. neutralino/_data/renderer/LICENSES/@codemirror__language@6.13.1/LICENSE +21 -0
  183. neutralino/_data/renderer/LICENSES/@codemirror__search@6.7.3/LICENSE +21 -0
  184. neutralino/_data/renderer/LICENSES/@codemirror__state@6.7.6/LICENSE +21 -0
  185. neutralino/_data/renderer/LICENSES/@codemirror__view@6.44.2/LICENSE +21 -0
  186. neutralino/_data/renderer/LICENSES/@dnd-kit__accessibility@3.1.1/LICENSE +21 -0
  187. neutralino/_data/renderer/LICENSES/@dnd-kit__core@6.3.1/LICENSE +21 -0
  188. neutralino/_data/renderer/LICENSES/@dnd-kit__sortable@10.0.0/LICENSE +21 -0
  189. neutralino/_data/renderer/LICENSES/@dnd-kit__utilities@3.2.2/LICENSE +21 -0
  190. neutralino/_data/renderer/LICENSES/@emoji-mart__data@1.2.1/LICENSE +21 -0
  191. neutralino/_data/renderer/LICENSES/@floating-ui__core@1.8.0/LICENSE +20 -0
  192. neutralino/_data/renderer/LICENSES/@floating-ui__dom@1.8.0/LICENSE +20 -0
  193. neutralino/_data/renderer/LICENSES/@floating-ui__react-dom@2.1.9/LICENSE +20 -0
  194. neutralino/_data/renderer/LICENSES/@floating-ui__react@0.27.20/LICENSE +20 -0
  195. neutralino/_data/renderer/LICENSES/@floating-ui__utils@0.2.12/LICENSE +20 -0
  196. neutralino/_data/renderer/LICENSES/@lezer__common@1.5.7/LICENSE +21 -0
  197. neutralino/_data/renderer/LICENSES/@lezer__css@1.3.9/LICENSE +21 -0
  198. neutralino/_data/renderer/LICENSES/@lezer__highlight@1.2.5/LICENSE +21 -0
  199. neutralino/_data/renderer/LICENSES/@lezer__html@1.3.13/LICENSE +21 -0
  200. neutralino/_data/renderer/LICENSES/@lezer__javascript@1.5.7/LICENSE +21 -0
  201. neutralino/_data/renderer/LICENSES/@lezer__json@1.0.3/LICENSE +21 -0
  202. neutralino/_data/renderer/LICENSES/@lezer__lr@1.4.13/LICENSE +21 -0
  203. neutralino/_data/renderer/LICENSES/@lezer__markdown@1.8.3/LICENSE +21 -0
  204. neutralino/_data/renderer/LICENSES/@lezer__python@1.1.21/LICENSE +21 -0
  205. neutralino/_data/renderer/LICENSES/@lezer__yaml@1.0.4/LICENSE +21 -0
  206. neutralino/_data/renderer/LICENSES/@mantine__carousel@9.8.3/LICENSE +21 -0
  207. neutralino/_data/renderer/LICENSES/@mantine__charts@9.8.3/LICENSE +21 -0
  208. neutralino/_data/renderer/LICENSES/@mantine__code-highlight@9.8.3/LICENSE +21 -0
  209. neutralino/_data/renderer/LICENSES/@mantine__core@9.8.3/LICENSE +21 -0
  210. neutralino/_data/renderer/LICENSES/@mantine__dates@9.8.3/LICENSE +21 -0
  211. neutralino/_data/renderer/LICENSES/@mantine__dropzone@9.8.3/LICENSE +21 -0
  212. neutralino/_data/renderer/LICENSES/@mantine__emoji@9.8.3/LICENSE +21 -0
  213. neutralino/_data/renderer/LICENSES/@mantine__hooks@9.8.3/LICENSE +21 -0
  214. neutralino/_data/renderer/LICENSES/@mantine__lightbox@9.8.3/LICENSE +21 -0
  215. neutralino/_data/renderer/LICENSES/@mantine__notifications@9.8.3/LICENSE +21 -0
  216. neutralino/_data/renderer/LICENSES/@mantine__nprogress@9.8.3/LICENSE +21 -0
  217. neutralino/_data/renderer/LICENSES/@mantine__schedule@9.8.3/LICENSE +21 -0
  218. neutralino/_data/renderer/LICENSES/@mantine__spotlight@9.8.3/LICENSE +21 -0
  219. neutralino/_data/renderer/LICENSES/@mantine__store@9.8.3/LICENSE +21 -0
  220. neutralino/_data/renderer/LICENSES/@mantine__tiptap@9.8.3/LICENSE +21 -0
  221. neutralino/_data/renderer/LICENSES/@marijn__find-cluster-break@1.0.4/LICENSE +21 -0
  222. neutralino/_data/renderer/LICENSES/@reduxjs__toolkit@2.16.0/LICENSE +21 -0
  223. neutralino/_data/renderer/LICENSES/@tabler__icons-react@3.55.0/LICENSE +21 -0
  224. neutralino/_data/renderer/LICENSES/@tanstack__react-virtual@3.14.32/LICENSE +21 -0
  225. neutralino/_data/renderer/LICENSES/@tanstack__virtual-core@3.19.17/LICENSE +21 -0
  226. neutralino/_data/renderer/LICENSES/@tiptap__core@3.35.1/LICENSE.md +21 -0
  227. neutralino/_data/renderer/LICENSES/@tiptap__extension-blockquote@3.35.1/LICENSE.md +21 -0
  228. neutralino/_data/renderer/LICENSES/@tiptap__extension-bold@3.35.1/LICENSE.md +21 -0
  229. neutralino/_data/renderer/LICENSES/@tiptap__extension-code-block@3.35.1/LICENSE.md +21 -0
  230. neutralino/_data/renderer/LICENSES/@tiptap__extension-code@3.35.1/LICENSE.md +21 -0
  231. neutralino/_data/renderer/LICENSES/@tiptap__extension-document@3.35.1/LICENSE.md +21 -0
  232. neutralino/_data/renderer/LICENSES/@tiptap__extension-hard-break@3.35.1/LICENSE.md +21 -0
  233. neutralino/_data/renderer/LICENSES/@tiptap__extension-heading@3.35.1/LICENSE.md +21 -0
  234. neutralino/_data/renderer/LICENSES/@tiptap__extension-horizontal-rule@3.35.1/LICENSE.md +21 -0
  235. neutralino/_data/renderer/LICENSES/@tiptap__extension-italic@3.35.1/LICENSE.md +21 -0
  236. neutralino/_data/renderer/LICENSES/@tiptap__extension-link@3.35.1/LICENSE.md +21 -0
  237. neutralino/_data/renderer/LICENSES/@tiptap__extension-list@3.35.1/LICENSE.md +21 -0
  238. neutralino/_data/renderer/LICENSES/@tiptap__extension-paragraph@3.35.1/LICENSE.md +21 -0
  239. neutralino/_data/renderer/LICENSES/@tiptap__extension-strike@3.35.1/LICENSE.md +21 -0
  240. neutralino/_data/renderer/LICENSES/@tiptap__extension-text@3.35.1/LICENSE.md +21 -0
  241. neutralino/_data/renderer/LICENSES/@tiptap__extension-underline@3.35.1/LICENSE.md +21 -0
  242. neutralino/_data/renderer/LICENSES/@tiptap__extensions@3.35.1/LICENSE.md +21 -0
  243. neutralino/_data/renderer/LICENSES/@tiptap__react@3.35.1/LICENSE.md +21 -0
  244. neutralino/_data/renderer/LICENSES/@tiptap__starter-kit@3.35.1/LICENSE.md +21 -0
  245. neutralino/_data/renderer/LICENSES/attr-accept@4.0.1/LICENSE +22 -0
  246. neutralino/_data/renderer/LICENSES/clsx@2.1.1/license +9 -0
  247. neutralino/_data/renderer/LICENSES/crelt@1.0.7/LICENSE +19 -0
  248. neutralino/_data/renderer/LICENSES/d3-array@3.2.5/LICENSE +13 -0
  249. neutralino/_data/renderer/LICENSES/d3-color@3.1.1/LICENSE +13 -0
  250. neutralino/_data/renderer/LICENSES/d3-format@3.1.3/LICENSE +13 -0
  251. neutralino/_data/renderer/LICENSES/d3-interpolate@3.0.2/LICENSE +13 -0
  252. neutralino/_data/renderer/LICENSES/d3-path@3.1.1/LICENSE +13 -0
  253. neutralino/_data/renderer/LICENSES/d3-scale@4.0.3/LICENSE +13 -0
  254. neutralino/_data/renderer/LICENSES/d3-shape@3.2.1/LICENSE +13 -0
  255. neutralino/_data/renderer/LICENSES/d3-time-format@4.1.1/LICENSE +13 -0
  256. neutralino/_data/renderer/LICENSES/d3-time@3.1.1/LICENSE +13 -0
  257. neutralino/_data/renderer/LICENSES/dayjs@1.11.23/LICENSE +21 -0
  258. neutralino/_data/renderer/LICENSES/decimal.js-light@2.5.1/LICENCE.md +23 -0
  259. neutralino/_data/renderer/LICENSES/diff@9.0.0/LICENSE +29 -0
  260. neutralino/_data/renderer/LICENSES/dompurify@3.5.1/LICENSE +202 -0
  261. neutralino/_data/renderer/LICENSES/dompurify@3.5.1/LICENSE-MPL +373 -0
  262. neutralino/_data/renderer/LICENSES/embla-carousel-react@8.6.0/MIT-embla-carousel.txt +21 -0
  263. neutralino/_data/renderer/LICENSES/embla-carousel-reactive-utils@8.6.0/MIT-embla-carousel.txt +21 -0
  264. neutralino/_data/renderer/LICENSES/embla-carousel@8.6.0/MIT-embla-carousel.txt +21 -0
  265. neutralino/_data/renderer/LICENSES/es-toolkit@1.53.2/LICENSE +21 -0
  266. neutralino/_data/renderer/LICENSES/es-toolkit@1.53.2/NOTICE +39 -0
  267. neutralino/_data/renderer/LICENSES/eventemitter3@5.0.4/LICENSE +21 -0
  268. neutralino/_data/renderer/LICENSES/fast-equals@5.4.7/LICENSE +21 -0
  269. neutralino/_data/renderer/LICENSES/file-selector@5.0.3/LICENSE +21 -0
  270. neutralino/_data/renderer/LICENSES/get-nonce@1.0.1/LICENSE +21 -0
  271. neutralino/_data/renderer/LICENSES/immer@11.2.14/LICENSE +21 -0
  272. neutralino/_data/renderer/LICENSES/linkifyjs@4.4.0/LICENSE +19 -0
  273. neutralino/_data/renderer/LICENSES/marked@18.4.0/LICENSE +44 -0
  274. neutralino/_data/renderer/LICENSES/neutralino.js@6.11.0/LICENSE +21 -0
  275. neutralino/_data/renderer/LICENSES/orderedmap@2.1.1/LICENSE +19 -0
  276. neutralino/_data/renderer/LICENSES/packages.json +1838 -0
  277. neutralino/_data/renderer/LICENSES/prosemirror-commands@1.7.2/LICENSE +19 -0
  278. neutralino/_data/renderer/LICENSES/prosemirror-dropcursor@1.8.4/LICENSE +19 -0
  279. neutralino/_data/renderer/LICENSES/prosemirror-gapcursor@1.4.1/LICENSE +19 -0
  280. neutralino/_data/renderer/LICENSES/prosemirror-history@1.5.2/LICENSE +19 -0
  281. neutralino/_data/renderer/LICENSES/prosemirror-keymap@1.2.3/LICENSE +19 -0
  282. neutralino/_data/renderer/LICENSES/prosemirror-model@1.25.13/LICENSE +19 -0
  283. neutralino/_data/renderer/LICENSES/prosemirror-schema-list@1.6.1/LICENSE +19 -0
  284. neutralino/_data/renderer/LICENSES/prosemirror-state@1.4.4/LICENSE +19 -0
  285. neutralino/_data/renderer/LICENSES/prosemirror-transform@1.12.7/LICENSE +19 -0
  286. neutralino/_data/renderer/LICENSES/prosemirror-view@1.44.0/LICENSE +19 -0
  287. neutralino/_data/renderer/LICENSES/react-dom@19.3.1/LICENSE +21 -0
  288. neutralino/_data/renderer/LICENSES/react-dropzone@20.1.4/LICENSE +22 -0
  289. neutralino/_data/renderer/LICENSES/react-is@19.3.1/LICENSE +21 -0
  290. neutralino/_data/renderer/LICENSES/react-number-format@5.4.5/LICENSE +21 -0
  291. neutralino/_data/renderer/LICENSES/react-redux@9.3.1/LICENSE.md +21 -0
  292. neutralino/_data/renderer/LICENSES/react-remove-scroll-bar@2.3.8/MIT-react-remove-scroll-bar.txt +21 -0
  293. neutralino/_data/renderer/LICENSES/react-remove-scroll@2.7.2/LICENSE +21 -0
  294. neutralino/_data/renderer/LICENSES/react-style-singleton@2.2.3/LICENSE +21 -0
  295. neutralino/_data/renderer/LICENSES/react-transition-group@4.4.5/LICENSE +30 -0
  296. neutralino/_data/renderer/LICENSES/react@19.3.1/LICENSE +21 -0
  297. neutralino/_data/renderer/LICENSES/recharts@3.11.3/LICENSE +22 -0
  298. neutralino/_data/renderer/LICENSES/redux-thunk@3.1.0/LICENSE.md +21 -0
  299. neutralino/_data/renderer/LICENSES/redux@5.0.1/LICENSE.md +21 -0
  300. neutralino/_data/renderer/LICENSES/reselect@5.2.0/LICENSE +21 -0
  301. neutralino/_data/renderer/LICENSES/rolldown@1.3.4/LICENSE +25 -0
  302. neutralino/_data/renderer/LICENSES/rope-sequence@1.3.4/LICENSE +19 -0
  303. neutralino/_data/renderer/LICENSES/rrule@2.8.1/LICENCE +65 -0
  304. neutralino/_data/renderer/LICENSES/scheduler@0.28.0/LICENSE +21 -0
  305. neutralino/_data/renderer/LICENSES/style-mod@4.1.5/LICENSE +19 -0
  306. neutralino/_data/renderer/LICENSES/tiny-invariant@1.3.3/LICENSE +21 -0
  307. neutralino/_data/renderer/LICENSES/tslib@2.9.1/LICENSE.txt +12 -0
  308. neutralino/_data/renderer/LICENSES/use-callback-ref@1.3.3/LICENSE +21 -0
  309. neutralino/_data/renderer/LICENSES/use-sidecar@1.1.3/LICENSE +21 -0
  310. neutralino/_data/renderer/LICENSES/use-sync-external-store@1.7.0/LICENSE +21 -0
  311. neutralino/_data/renderer/LICENSES/victory-vendor@38.1.1/LICENSE.txt +150 -0
  312. neutralino/_data/renderer/LICENSES/vite@8.4.1/LICENSE.md +2320 -0
  313. neutralino/_data/renderer/LICENSES/w3c-keyname@2.2.8/LICENSE +19 -0
  314. neutralino/_data/renderer/assets/IconGripVertical-BlJrWVuo.js +1 -0
  315. neutralino/_data/renderer/assets/carousel-D1j1SkWR.css +1 -0
  316. neutralino/_data/renderer/assets/carousel-DniHwTLK.js +1 -0
  317. neutralino/_data/renderer/assets/chunk-CCkLOSkX.css +1 -0
  318. neutralino/_data/renderer/assets/chunk-Du0h7lB-.js +9 -0
  319. neutralino/_data/renderer/assets/codehighlight-CCe_blv1.js +10 -0
  320. neutralino/_data/renderer/assets/codehighlight-THJMNDh8.css +1 -0
  321. neutralino/_data/renderer/assets/codemirror-CinrNxVJ.js +2 -0
  322. neutralino/_data/renderer/assets/css-CMUk25uq.js +1 -0
  323. neutralino/_data/renderer/assets/dist-70Le0T2N.js +1 -0
  324. neutralino/_data/renderer/assets/dist-BCHbQlae.js +11 -0
  325. neutralino/_data/renderer/assets/dist-BXts23GT.js +1 -0
  326. neutralino/_data/renderer/assets/dist-D2RX2UgP.js +23 -0
  327. neutralino/_data/renderer/assets/dist-DikJK2lp.js +1 -0
  328. neutralino/_data/renderer/assets/dist-acbbRM1z.js +1 -0
  329. neutralino/_data/renderer/assets/dnd-DaaaVala.js +5 -0
  330. neutralino/_data/renderer/assets/dropzone-CeqF5SZx.js +1 -0
  331. neutralino/_data/renderer/assets/dropzone-aPCBPjDN.css +1 -0
  332. neutralino/_data/renderer/assets/embla-carousel-react.esm-CbyYjwMN.js +1 -0
  333. neutralino/_data/renderer/assets/emoji-BfRPfoVw.js +1 -0
  334. neutralino/_data/renderer/assets/emoji-DV8OzU1E.css +1 -0
  335. neutralino/_data/renderer/assets/esm-C5ZYjSBQ.js +82 -0
  336. neutralino/_data/renderer/assets/highlight-CB6hGb5A.js +3 -0
  337. neutralino/_data/renderer/assets/highlight-Dlb5DJwL.css +1 -0
  338. neutralino/_data/renderer/assets/html-Dad3kwIa.js +1 -0
  339. neutralino/_data/renderer/assets/icon-chunk-X3Kr0nh-.js +1 -0
  340. neutralino/_data/renderer/assets/index-CU0HB-J7.js +69 -0
  341. neutralino/_data/renderer/assets/index-TWpF4Lef.css +1 -0
  342. neutralino/_data/renderer/assets/javascript-BQb8vpw3.js +1 -0
  343. neutralino/_data/renderer/assets/json-BCFmxlML.js +1 -0
  344. neutralino/_data/renderer/assets/lightbox-BHtgbsUV.js +1 -0
  345. neutralino/_data/renderer/assets/lightbox-BzKDpkAD.css +1 -0
  346. neutralino/_data/renderer/assets/markdown-DSuAylvy.js +5 -0
  347. neutralino/_data/renderer/assets/markdown-DjaNWMgH.js +77 -0
  348. neutralino/_data/renderer/assets/python-pdbIAveZ.js +9 -0
  349. neutralino/_data/renderer/assets/richtext-DIAsHMuK.css +1 -0
  350. neutralino/_data/renderer/assets/richtext-Z6fG9G2_.js +137 -0
  351. neutralino/_data/renderer/assets/spotlight-Ccstaz1-.css +1 -0
  352. neutralino/_data/renderer/assets/spotlight-knlyJw_A.js +1 -0
  353. neutralino/_data/renderer/assets/sql-DLoQFEde.js +2 -0
  354. neutralino/_data/renderer/assets/with-selector-BOM9_OlN.js +1 -0
  355. neutralino/_data/renderer/assets/yaml-BJNzokSe.js +1 -0
  356. neutralino/_data/renderer/index.html +22 -0
  357. neutralino/_data/renderer/manifest.json +202 -0
  358. neutralino/_data/renderer/neutralino.js +1 -0
  359. neutralino/_data/renderer/shared/mantine-core.mjs +5 -0
  360. neutralino/_data/renderer/shared/mantine-hooks.mjs +5 -0
  361. neutralino/_data/renderer/shared/react-dom-client.mjs +5 -0
  362. neutralino/_data/renderer/shared/react-dom.mjs +6 -0
  363. neutralino/_data/renderer/shared/react-jsx-runtime.mjs +5 -0
  364. neutralino/_data/renderer/shared/react.mjs +6 -0
  365. neutralino/_data/skills/README.md +6 -0
  366. neutralino/_data/skills/neutralino-app-patterns/SKILL.md +101 -0
  367. neutralino/_data/skills/neutralino-app-patterns/references/dashboards-and-background-work.md +55 -0
  368. neutralino/_data/skills/neutralino-app-patterns/references/storage-and-settings.md +57 -0
  369. neutralino/_data/skills/neutralino-app-patterns/references/tables-and-crud.md +81 -0
  370. neutralino/_data/skills/neutralino-frontend/SKILL.md +121 -0
  371. neutralino/_data/skills/neutralino-frontend/references/bridge.md +63 -0
  372. neutralino/_data/skills/neutralino-frontend/references/custom-components.md +84 -0
  373. neutralino/_data/skills/neutralino-frontend/references/frameworks.md +61 -0
  374. neutralino/_data/skills/neutralino-maintenance/SKILL.md +85 -0
  375. neutralino/_data/skills/neutralino-maintenance/references/platforms-and-gates.md +35 -0
  376. neutralino/_data/skills/neutralino-maintenance/references/records.md +38 -0
  377. neutralino/_data/skills/neutralino-maintenance/references/review-process.md +36 -0
  378. neutralino/_data/skills/neutralino-native/SKILL.md +107 -0
  379. neutralino/_data/skills/neutralino-native/references/api-conventions.md +72 -0
  380. neutralino/_data/skills/neutralino-native/references/desktop-helpers.md +53 -0
  381. neutralino/_data/skills/neutralino-native/references/permissions-windows.md +53 -0
  382. neutralino/_data/skills/neutralino-packaging/SKILL.md +99 -0
  383. neutralino/_data/skills/neutralino-packaging/references/build-layout.md +51 -0
  384. neutralino/_data/skills/neutralino-packaging/references/managed-install.md +59 -0
  385. neutralino/_data/skills/neutralino-packaging/references/templates-and-config.md +63 -0
  386. neutralino/_data/skills/neutralino-python/SKILL.md +109 -0
  387. neutralino/_data/skills/neutralino-python/references/architecture.md +53 -0
  388. neutralino/_data/skills/neutralino-python/references/cli.md +60 -0
  389. neutralino/_data/skills/neutralino-python/references/platforms-security.md +44 -0
  390. neutralino/_data/skills/neutralino-rpc/SKILL.md +114 -0
  391. neutralino/_data/skills/neutralino-rpc/references/errors-and-limits.md +44 -0
  392. neutralino/_data/skills/neutralino-rpc/references/expose-and-context.md +74 -0
  393. neutralino/_data/skills/neutralino-rpc/references/streams-and-cancellation.md +53 -0
  394. neutralino/_data/skills/neutralino-ui/SKILL.md +115 -0
  395. neutralino/_data/skills/neutralino-ui/references/components-and-tree.md +74 -0
  396. neutralino/_data/skills/neutralino-ui/references/state-forms-events.md +85 -0
  397. neutralino/_data/skills/neutralino-ui/references/themes-profiles-assets.md +105 -0
  398. neutralino/_data/skills/neutralino-updates/SKILL.md +94 -0
  399. neutralino/_data/skills/neutralino-updates/references/config-and-api.md +80 -0
  400. neutralino/_data/skills/neutralino-updates/references/releases-and-install.md +77 -0
  401. neutralino/_data/skills/neutralino-updates/references/security-rollback.md +48 -0
  402. neutralino/_data/ui/contracts.json +32927 -0
  403. neutralino/_data/ui/emoji.json +1 -0
  404. neutralino/_data/upstream-lock.json +97 -0
  405. neutralino/_managed.py +1099 -0
  406. neutralino/_paths.py +220 -0
  407. neutralino/_platform.py +150 -0
  408. neutralino/_scaffold.py +344 -0
  409. neutralino/api/_base.py +99 -0
  410. neutralino/api/_custom.py +1350 -0
  411. neutralino/api/_dec.py +21 -0
  412. neutralino/api/_enc.py +80 -0
  413. neutralino/api/app.py +119 -0
  414. neutralino/api/clipboard.py +101 -0
  415. neutralino/api/computer.py +261 -0
  416. neutralino/api/custom.py +36 -0
  417. neutralino/api/debug.py +41 -0
  418. neutralino/api/extensions.py +57 -0
  419. neutralino/api/filesystem.py +633 -0
  420. neutralino/api/net.py +22 -0
  421. neutralino/api/os.py +508 -0
  422. neutralino/api/resources.py +124 -0
  423. neutralino/api/server.py +66 -0
  424. neutralino/api/storage.py +98 -0
  425. neutralino/api/types.py +342 -0
  426. neutralino/api/updater.py +22 -0
  427. neutralino/api/window.py +397 -0
  428. neutralino/application.py +1260 -0
  429. neutralino/bundle.py +187 -0
  430. neutralino/cli.py +629 -0
  431. neutralino/client.py +496 -0
  432. neutralino/config.py +671 -0
  433. neutralino/devtools.py +1973 -0
  434. neutralino/errors.py +142 -0
  435. neutralino/events.py +579 -0
  436. neutralino/execution.py +293 -0
  437. neutralino/extension.py +134 -0
  438. neutralino/frontend/python-bridge.d.ts +207 -0
  439. neutralino/frontend/python-bridge.mjs +854 -0
  440. neutralino/protocol.py +456 -0
  441. neutralino/py.typed +0 -0
  442. neutralino/rpc.py +1625 -0
  443. neutralino/runtime.py +591 -0
  444. neutralino/supervisor.py +866 -0
  445. neutralino/sync_client.py +376 -0
  446. neutralino/templates/default/app.py +32 -0
  447. neutralino/templates/default/frontend/app.js +28 -0
  448. neutralino/templates/default/frontend/index.html +26 -0
  449. neutralino/templates/default/frontend/neutralino.js +1 -0
  450. neutralino/templates/default/frontend/styles.css +8 -0
  451. neutralino/templates/default/gitignore.txt +3 -0
  452. neutralino/templates/default/neutralino.config.json +25 -0
  453. neutralino/templates/hybrid/README.md +17 -0
  454. neutralino/templates/hybrid/app.py +49 -0
  455. neutralino/templates/hybrid/components/counter.mjs +37 -0
  456. neutralino/templates/hybrid/styles.css +21 -0
  457. neutralino/templates/python-ui/README.md +15 -0
  458. neutralino/templates/python-ui/app.py +44 -0
  459. neutralino/templates/python-ui/gitignore.txt +3 -0
  460. neutralino/templates/python-ui/requirements.txt +4 -0
  461. neutralino/templates/react/README.md +28 -0
  462. neutralino/templates/react/app.py +52 -0
  463. neutralino/templates/react/components/widget.mjs +23 -0
  464. neutralino/templates/react/widget/package.json +20 -0
  465. neutralino/templates/react/widget/src/Widget.jsx +25 -0
  466. neutralino/templates/react/widget/vite.config.mjs +19 -0
  467. neutralino/transport.py +661 -0
  468. neutralino/types.py +93 -0
  469. neutralino/ui/__init__.py +139 -0
  470. neutralino/ui/_app.py +1529 -0
  471. neutralino/ui/_assets.py +407 -0
  472. neutralino/ui/_bases.py +1210 -0
  473. neutralino/ui/_behaviours.py +1066 -0
  474. neutralino/ui/_charts.py +732 -0
  475. neutralino/ui/_component.py +882 -0
  476. neutralino/ui/_dates.py +168 -0
  477. neutralino/ui/_desktop.py +879 -0
  478. neutralino/ui/_events.py +192 -0
  479. neutralino/ui/_filters.py +427 -0
  480. neutralino/ui/_forms.py +282 -0
  481. neutralino/ui/_protocol.py +201 -0
  482. neutralino/ui/_schedule.py +543 -0
  483. neutralino/ui/_security.py +106 -0
  484. neutralino/ui/_session.py +969 -0
  485. neutralino/ui/_state.py +199 -0
  486. neutralino/ui/_tables.py +256 -0
  487. neutralino/ui/_theme.py +154 -0
  488. neutralino/ui/blocks/__init__.py +19 -0
  489. neutralino/ui/blocks/_data.py +2239 -0
  490. neutralino/ui/blocks/_interactive.py +622 -0
  491. neutralino/ui/blocks/_layout.py +2967 -0
  492. neutralino/ui/components/__init__.py +81 -0
  493. neutralino/ui/components/_dates.py +879 -0
  494. neutralino/ui/components/_editors.py +217 -0
  495. neutralino/ui/components/_extensions.py +790 -0
  496. neutralino/ui/components/_extras.py +303 -0
  497. neutralino/ui/components/_generated.py +30565 -0
  498. neutralino/ui/components/_types.py +17 -0
  499. neutralino/ui/schema.py +824 -0
  500. neutralino/ui/validators.py +362 -0
  501. neutralino/updates/__init__.py +96 -0
  502. neutralino/updates/_http.py +320 -0
  503. neutralino/updates/_layout.py +762 -0
  504. neutralino/updates/archive.py +216 -0
  505. neutralino/updates/config.py +256 -0
  506. neutralino/updates/errors.py +97 -0
  507. neutralino/updates/install.sh.in +201 -0
  508. neutralino/updates/launcher.py +18 -0
  509. neutralino/updates/manager.py +808 -0
  510. neutralino/updates/manifest.py +196 -0
  511. neutralino/updates/release.py +314 -0
  512. neutralino/updates/semver.py +84 -0
  513. neutralino/updates/sources.py +392 -0
  514. neutralino/windows.py +316 -0
  515. neutralino_python-0.1.0.dist-info/METADATA +121 -0
  516. neutralino_python-0.1.0.dist-info/RECORD +521 -0
  517. neutralino_python-0.1.0.dist-info/WHEEL +4 -0
  518. neutralino_python-0.1.0.dist-info/entry_points.txt +3 -0
  519. neutralino_python-0.1.0.dist-info/licenses/LICENSE +21 -0
  520. neutralino_python-0.1.0.dist-info/licenses/THIRD_PARTY_NOTICES.md +16 -0
  521. neutralino_python-0.1.0.dist-info/licenses/src/neutralino/_data/renderer/LICENSES/packages.json +1838 -0
@@ -0,0 +1,10 @@
1
+ import{Dt as e,Ht as t,It as n,Jt as r,Qt as i,U as a,Ut as o,X as s,Yt as c,Z as l,b as u,ct as d,d as f,dt as p,et as m,ft as h,ht as g,in as _,l as v,lt as y,mt as b,nt as x,st as S,tn as C,tt as w,vt as T,yt as E}from"./index-CU0HB-J7.js";import{a as D,n as O,o as k,r as A,t as j}from"./highlight-CB6hGb5A.js";var M={getHighlighter:()=>({code:e})=>({highlightedCode:e,isHighlighted:!1})},N=_(C(),1),P=_(p(),1);function F(){}function I(){return!0}var L=(0,N.createContext)({adapter:M,highlight:M.getHighlighter(null),loadLanguage:F,isLanguageLoaded:I});function R({adapter:e,children:t}){let[n,r]=(0,N.useState)({adapter:e,epoch:0,ctx:null,loaded:!1}),[i,a]=(0,N.useState)([]),[o,s]=(0,N.useState)(0),c=(0,N.useRef)(new Set),l=(0,N.useRef)(0),u=(0,N.useRef)(e),d=(0,N.useRef)(null),f=n.adapter===e&&n.epoch===o,p=f?n.ctx:null,m=!e.loadContext||f&&n.loaded,h=(0,N.useMemo)(()=>e.getHighlighter(p),[e,p]);(0,N.useEffect)(()=>{if(u.current!==e&&(u.current=e,l.current+=1,c.current.clear(),a([]),s(l.current)),!e.loadContext||d.current===l.current)return;let t=l.current;d.current=t,e.loadContext().then(n=>{t===l.current&&r({adapter:e,epoch:t,ctx:n,loaded:!0})})},[e]);let g=(0,N.useCallback)(t=>{if(!m||!t||!e.loadLanguage||c.current.has(t))return;let n=e.loadLanguage(p,t);if(c.current.add(t),!n)return;let r=l.current;n.then(()=>{r===l.current&&a(e=>e.includes(t)?e:[...e,t])},()=>{r===l.current&&c.current.delete(t)})},[e,p,m,o]),_=(0,N.useCallback)(e=>!e||i.includes(e),[i]),v=(0,N.useMemo)(()=>({adapter:e,highlight:h,loadLanguage:g,isLanguageLoaded:_}),[e,h,g,_]);return(0,P.jsx)(L,{value:v,children:t})}function ee(){return(0,N.use)(L)?.highlight||M.getHighlighter(null)}function te(){return(0,N.use)(L)?.loadLanguage||F}function z(){return(0,N.use)(L)?.isLanguageLoaded||I}function B(e,{withFirstLineIndentation:t}={}){return t?e.replace(/^(?:[^\S\r\n]*\r?\n)+/,``).trimEnd():e.trim()}var[ne,V]=c(`CodeHighlightProvider was not found in the component tree`),H=w(e=>{let{children:t,vars:n,tooltipLabel:r,...i}=y(`CodeHighlightControl`,null,e),o=V(),s=o.getStyles(`controlTooltip`),c=(0,P.jsx)(a,{...o.getStyles(`control`),...i,variant:`none`,"data-code-color-scheme":o.codeColorScheme,children:t});return r?(0,P.jsx)(u,{label:r,fz:`sm`,position:`bottom`,classNames:{tooltip:s.className},styles:{tooltip:s.style},"data-code-color-scheme":o.codeColorScheme,transitionProps:{duration:0},children:c}):c});H.displayName=`@mantine/code-highlight/CodeHighlightControl`;function re({copied:e,...t}){return(0,P.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,...t,children:e?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,P.jsx)(`path`,{d:`M5 12l5 5l10 -10`})]}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,P.jsx)(`path`,{d:`M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z`}),(0,P.jsx)(`path`,{d:`M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2`})]})})}re.displayName=`@mantine/code-highlight/CopyIcon`;function ie({code:e,copyLabel:t=`Copy`,copiedLabel:r=`Copied`}){let i=n();return(0,P.jsx)(H,{onClick:()=>i.copy(e),variant:`none`,tooltipLabel:i.copied?r:t,"aria-label":i.copied?r:`${t} code`,children:(0,P.jsx)(re,{copied:i.copied})})}ie.displayName=`@mantine/code-highlight/CopyCodeButton`;function U({expanded:e,style:t,...n}){return(0,P.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,...n,children:e?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,P.jsx)(`path`,{d:`M12 13v-8l-3 3m6 0l-3 -3`}),(0,P.jsx)(`path`,{d:`M9 17l1 0`}),(0,P.jsx)(`path`,{d:`M14 17l1 0`}),(0,P.jsx)(`path`,{d:`M19 17l1 0`}),(0,P.jsx)(`path`,{d:`M4 17l1 0`})]}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,P.jsx)(`path`,{d:`M12 11v8l3 -3m-6 0l3 3`}),(0,P.jsx)(`path`,{d:`M9 7l1 0`}),(0,P.jsx)(`path`,{d:`M14 7l1 0`}),(0,P.jsx)(`path`,{d:`M19 7l1 0`}),(0,P.jsx)(`path`,{d:`M4 7l1 0`})]})})}U.displayName=`@mantine/code-highlight/ExpandIcon`;function W({expanded:e,onExpand:t,expandCodeLabel:n=`Expand code`,collapseCodeLabel:r=`Collapse code`}){return(0,P.jsx)(H,{onClick:()=>t(!e),tooltipLabel:e?r:n,"aria-label":e?r:n,children:(0,P.jsx)(U,{expanded:e})})}W.displayName=`@mantine/code-highlight/ExpandCodeButton`;var G={root:`m_5cb1b9c8`,codeHighlight:`m_e597c321`,inlineCodeHighlight:`m_dfe9c588`,pre:`m_2c47c4fd`,code:`m_5caae6d3`,controls:`m_be7e9c9c`,control:`m_d498bab7`,controlTooltip:`m_4c3d814c`,codeWrapper:`m_9f507240`,lineNumbers:`m_15f77410`,scrollarea:`m_f744fd40`,showCodeButton:`m_c9378bc2`,file:`m_5cac2e62`,fileIcon:`m_b46cddfb`,filesScrollarea:`m_7b14120b`,files:`m_38d99e51`},K={withCopyButton:!0,expandCodeLabel:`Expand code`,collapseCodeLabel:`Collapse code`},ae=E((e,{maxCollapsedHeight:t,background:n,radius:r})=>({codeHighlight:{"--ch-max-height":i(t),"--ch-background":n?g(n,e):void 0,"--ch-radius":r===void 0?void 0:o(r)}})),q=x(t=>{let n=y(`CodeHighlight`,K,t),{classNames:r,className:i,style:a,styles:o,unstyled:c,vars:u,code:d,copiedLabel:f,copyLabel:p,defaultExpanded:g,expanded:_,onExpandedChange:v,maxCollapsedHeight:b,withCopyButton:x,withExpandButton:C,expandCodeLabel:w,collapseCodeLabel:E,radius:D,background:O,withBorder:k,withLineNumbers:A,controls:j,language:M,codeColorScheme:F,withFirstLineIndentation:I,__withOffset:L,__inline:R,__staticSelector:V,attributes:H,...re}=n,U=S({name:V||`CodeHighlight`,classes:G,props:n,className:i,style:a,classNames:r,styles:o,unstyled:c,attributes:H,vars:u,varsResolver:ae,rootSelector:`codeHighlight`}),[q,oe]=e({value:_,defaultValue:g,finalValue:!0,onChange:v}),se=j&&j.length>0||C||x,ce=h(),le=ee(),J=te(),Y=z();(0,N.useEffect)(()=>{J(M)},[M,J]);let X=B(d,{withFirstLineIndentation:I}),ue=F??ce,de=Y(M),Z=(0,N.useMemo)(()=>le({code:X,language:M,colorScheme:ue}),[le,X,M,ue,de]),fe=Z.isHighlighted?{dangerouslySetInnerHTML:{__html:Z.highlightedCode}}:{children:X};return R?(0,P.jsx)(m,{component:`code`,...re,...Z.codeElementProps,...U(`codeHighlight`,{className:T(Z.codeElementProps?.className,i),style:[{...Z.codeElementProps?.style},a]}),"data-with-border":k||void 0,...fe}):(0,P.jsx)(ne,{value:{getStyles:U,codeColorScheme:F},children:(0,P.jsxs)(m,{...U(`codeHighlight`),...re,dir:`ltr`,"data-code-color-scheme":F,"data-with-border":k||void 0,children:[se&&(0,P.jsxs)(`div`,{...U(`controls`),"data-with-offset":L||void 0,children:[j,C&&(0,P.jsx)(W,{expanded:q,onExpand:oe,expandCodeLabel:w,collapseCodeLabel:E}),x&&(0,P.jsx)(ie,{code:X,copiedLabel:f,copyLabel:p})]}),(0,P.jsx)(l,{type:`hover`,scrollbarSize:4,dir:`ltr`,offsetScrollbars:!1,"data-collapsed":!q||void 0,styles:{viewport:{overscrollBehaviorInline:`none`}},...U(`scrollarea`),children:(0,P.jsxs)(`div`,{...U(`codeWrapper`),children:[A&&(0,P.jsx)(`div`,{...U(`lineNumbers`),"data-with-offset":L||void 0,children:X.split(`
2
+ `).map((e,t)=>(0,P.jsx)(`div`,{children:t+1},t))}),(0,P.jsx)(`pre`,{...U(`pre`),"data-with-offset":L||void 0,children:(0,P.jsx)(`code`,{...Z.codeElementProps,...U(`code`,{className:Z.codeElementProps?.className,style:Z.codeElementProps?.style}),...fe})})]})}),(0,P.jsx)(s,{...U(`showCodeButton`),mod:{hidden:q},onClick:()=>oe(!0),"data-code-color-scheme":F,children:w})]})})});q.displayName=`@mantine/code-highlight/CodeHighlight`,q.classes=G,q.varsResolver=ae,q.Control=H;var oe=E((e,{background:t,radius:n})=>({inlineCodeHighlight:{"--ch-background":t?g(t,e):void 0,"--ch-radius":n===void 0?void 0:o(n)}})),se=x(e=>{let t=y(`InlineCodeHighlight`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,ref:l,...u}=t,d=S({name:`InlineCodeHighlight`,classes:G,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,vars:s,varsResolver:oe,rootSelector:`inlineCodeHighlight`});return(0,P.jsx)(q,{...u,ref:l,...d(`inlineCodeHighlight`),__inline:!0})});se.displayName=`@mantine/code-highlight/InlineCodeHighlight`,se.classes=G,se.varsResolver=oe;function ce({fileIcon:e,fileName:t,getFileIcon:n,className:r,style:i}){return e?(0,P.jsx)(`span`,{className:r,style:i,children:e}):n&&t?(0,P.jsx)(`span`,{className:r,style:i,children:n(t)}):null}var le=x(t=>{let n=y(`CodeHighlightTabs`,null,t),{classNames:r,className:i,style:a,styles:o,unstyled:c,vars:u,defaultActiveTab:f,activeTab:p,onTabChange:h,defaultExpanded:g,expanded:_,onExpandedChange:v,code:b,getFileIcon:x,withCopyButton:C,withExpandButton:w,withBorder:T,radius:E,maxCollapsedHeight:D,copyLabel:O,copiedLabel:k,expandCodeLabel:A,collapseCodeLabel:j,background:M,controls:F,codeColorScheme:I,withLineNumbers:L,withFirstLineIndentation:R,attributes:ee,...te}=n,z=S({name:`CodeHighlightTabs`,classes:G,props:n,className:i,style:a,classNames:r,styles:o,unstyled:c,attributes:ee,vars:u}),[B,ne]=e({defaultValue:f,value:p,finalValue:0,onChange:h}),[V,H]=e({defaultValue:g,value:_,finalValue:!0,onChange:v}),{resolvedClassNames:re,resolvedStyles:ie}=d({classNames:r,styles:o,props:n});if((0,N.useEffect)(()=>{B>=b.length&&ne(b.length-1)},[B,b]),b.length<=0)return null;let U=b[B]||{code:``,language:`tsx`,fileName:``},W=b.map((e,t)=>(0,N.createElement)(s,{...z(`file`),key:e.fileName,mod:{active:t===B},onClick:()=>ne(t),"data-color-scheme":I},(0,P.jsx)(ce,{fileIcon:e.icon,getFileIcon:x,fileName:e.fileName,...z(`fileIcon`)},`file-icon`),(0,P.jsx)(`span`,{children:e.fileName},`file-name`)));return(0,P.jsxs)(m,{...z(`root`),...te,children:[(0,P.jsx)(l,{type:`never`,dir:`ltr`,offsetScrollbars:!1,...z(`filesScrollarea`),children:(0,P.jsx)(`div`,{...z(`files`),children:W})}),(0,P.jsx)(q,{code:U.code,language:U.language,expanded:V,onExpandedChange:H,withCopyButton:C,withExpandButton:w,withBorder:T,radius:E,maxCollapsedHeight:D,copiedLabel:k,copyLabel:O,expandCodeLabel:A,collapseCodeLabel:j,background:M,controls:F,codeColorScheme:I,withLineNumbers:L,withFirstLineIndentation:R,__withOffset:!0,__staticSelector:`CodeHighlightTabs`,classNames:re,styles:ie,attributes:ee})]})});le.displayName=`@mantine/code-highlight/CodeHighlightTabs`,le.classes=G;function J(e){return e.join(`\0`)}function Y(e,t){if(t===!1)return null;let n=Math.floor(t);if(!(n>=1)||e<=t)return null;let r=[];for(let t=0;t<e;t+=n)r.push({start:t,end:Math.min(t+n,e)-1});return r}function X(e){return`[${e.start}...${e.end}]`}function ue(e){if(typeof e==`object`&&e&&typeof e.toJSON==`function`)try{return e.toJSON()}catch{return e}return e}function de(e){return typeof e==`object`&&!!e}function Z(e){return Array.isArray(e)?e.map((e,t)=>[String(t),e]):Object.entries(e)}function fe(e,{depth:t=1/0,groupArraysAfterLength:n=!1}={}){let r=[],i=new WeakSet,a=(e,t,n)=>{for(let[r,i]of e)o(i,[...t,r],n)},o=(e,o,s)=>{let c=ue(e);if(!de(c)||i.has(c)||s>t)return;let l=Z(c);if(l.length===0)return;o.length>0&&r.push(J(o)),i.add(c);let u=Array.isArray(c)?Y(l.length,n):null;if(u){if(s+1<=t)for(let e of u)r.push(J([...o,X(e)])),a(l.slice(e.start,e.end+1),o,s+2)}else a(l,o,s+1);i.delete(c)};return o(e,[],1),r}function pe(e){return e===null?`null`:Array.isArray(e)?`array`:typeof e}function me(e){let t=pe(e);switch(t){case`string`:return`string`;case`number`:return Number.isInteger(e)?`int`:`float`;case`boolean`:return`bool`;case`null`:return`null`;case`undefined`:return`undefined`;case`array`:return`array`;case`object`:return`object`;default:return t}}function he(e,t,n){if(e===null)return{display:`null`,collapsed:!1};if(e===void 0)return{display:`undefined`,collapsed:!1};if(typeof e==`boolean`||typeof e==`number`)return{display:String(e),collapsed:!1};if(typeof e==`string`){if(n!==!1&&e.length>n){let r=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.slice(n-1)),i=e.slice(0,n-+!!r);return{display:t?`${JSON.stringify(i).slice(0,-1)}..."`:`${i}...`,collapsed:!0}}return{display:t?JSON.stringify(e):e,collapsed:!1}}return{display:String(e),collapsed:!1}}function ge(){let e=[];return function(t,n){if(typeof n==`bigint`)return n.toString();if(typeof n!=`object`||!n)return n;for(;e.length>0&&e[e.length-1]!==this;)e.pop();return e.includes(n)?`[Circular]`:(e.push(n),n)}}function _e(e){try{return JSON.stringify(e,ge(),2)??String(e)}catch{return String(e)}}function ve(e){let t=r(e,`[data-jv-node-wrapper]`);(t?r(t,`[data-jv-node-wrapper]`):null)?.querySelector(`[data-jv-node]`)?.focus()}function ye(e){let t=r(e,`[data-jv-node-wrapper]`);(t?Array.from(t.children).find(e=>e.getAttribute(`role`)===`group`):void 0)?.querySelector(`[data-jv-node]`)?.focus()}function be(e,t){let n=r(e,`[data-jv-root]`);if(!n)return;let i=Array.from(n.querySelectorAll(`[data-jv-node]`)),a=i.indexOf(e);a!==-1&&i[a+t]?.focus()}function xe(e,{expanded:t,onToggle:n,onSelect:r}={}){let{code:i}=e.nativeEvent,a=e.currentTarget;if(i===`KeyC`&&(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey){let t=a.querySelector(`[data-jv-copy]`);t&&!window.getSelection()?.toString()&&(e.stopPropagation(),e.preventDefault(),t.click())}else if(i===`Enter`||i===`Space`){if(e.target!==a)return;e.stopPropagation(),e.preventDefault(),(n??r)?.()}else i===`ArrowDown`||i===`ArrowUp`?(e.stopPropagation(),e.preventDefault(),be(a,i===`ArrowDown`?1:-1)):i===`ArrowRight`?(e.stopPropagation(),e.preventDefault(),t?ye(a):t===!1&&n?.()):i===`ArrowLeft`&&(e.stopPropagation(),e.preventDefault(),t&&n?n():ve(a))}function Se({value:e,getStyles:t,copyLabel:r,copiedLabel:i}){let a=n({timeout:1e3});return(0,P.jsx)(u,{label:a.copied?i:r,position:`top`,fz:`xs`,children:(0,P.jsx)(s,{tabIndex:-1,"data-jv-copy":!0,onClick:t=>{t.stopPropagation(),a.copy(_e(e))},onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&e.stopPropagation()},...t(`copyButton`),"aria-label":a.copied?i:r,children:a.copied?(0,P.jsx)(`svg`,{viewBox:`0 0 16 16`,width:`14`,height:`14`,fill:`currentColor`,children:(0,P.jsx)(`path`,{d:`M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z`})}):(0,P.jsxs)(`svg`,{viewBox:`0 0 16 16`,width:`14`,height:`14`,fill:`currentColor`,children:[(0,P.jsx)(`path`,{d:`M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z`}),(0,P.jsx)(`path`,{d:`M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z`})]})})})}var Ce=20,we=(0,P.jsx)(`svg`,{viewBox:`0 0 16 16`,width:`12`,height:`12`,fill:`currentColor`,children:(0,P.jsx)(`path`,{d:`M6.22 3.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L9.94 8 6.22 4.28a.75.75 0 0 1 0-1.06Z`})});function Te({nodeKey:e,withKeyQuotes:t,getStyles:n}){return e===void 0?null:(0,P.jsxs)(`span`,{...n(`key`),"data-key":!0,children:[t?JSON.stringify(e):e,`: `]})}function Ee({nodeKey:e,value:t,path:n,level:r,ancestors:i,expandedPaths:a,togglePath:o,getStyles:s,maxDisplayLength:c,withTypes:l,withSize:u,withCopy:d,withQuotes:f,withKeyQuotes:p,collapseStringsAfterLength:m,sortKeys:h,groupArraysAfterLength:g,copyLabel:_,copiedLabel:v,onValueSelect:y,highlightItems:b,allExpanded:x,withChevrons:S,isRoot:C}){let w=J(n),T=Array.isArray(t),E=T?`[`:`{`,D=T?`]`:`}`,O=b?.[w],k=[...i,t],A=Z(t);if(!T&&h){let e=typeof h==`function`?h:void 0;A=A.sort((t,n)=>e?e(t[0],n[0]):t[0].localeCompare(n[0]))}let j=A.length,M=j===0,N=!M&&(C||x||a.includes(w)),F=!M&&!C&&!x,I=F&&S,L=T?Y(j,g):null,R=A,ee=!L&&j>c;ee&&(R=A.slice(0,c));let te=T?`${j} items`:`${j} keys`,z=F?()=>o(w):void 0,B={expandedPaths:a,togglePath:o,getStyles:s,maxDisplayLength:c,withTypes:l,withSize:u,withCopy:d,withQuotes:f,withKeyQuotes:p,collapseStringsAfterLength:m,sortKeys:h,groupArraysAfterLength:g,copyLabel:_,copiedLabel:v,onValueSelect:y,highlightItems:b,allExpanded:x,withChevrons:S},ne=(0,P.jsxs)(P.Fragment,{children:[I&&(0,P.jsx)(`span`,{...s(`toggle`),"data-expanded":N||void 0,children:we}),(0,P.jsx)(Te,{nodeKey:e,withKeyQuotes:p,getStyles:s}),M?(0,P.jsxs)(`span`,{...s(`bracket`),children:[E,D]}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`span`,{...s(`bracket`),children:E}),!N&&(0,P.jsx)(`span`,{...s(`ellipsis`),children:`...`}),!N&&(0,P.jsx)(`span`,{...s(`bracket`),children:D})]}),l&&(0,P.jsx)(`span`,{...s(`type`),"data-value-type":T?`array`:`object`,children:T?`array`:`object`}),u&&(0,P.jsx)(`span`,{...s(`size`),children:te}),d&&(0,P.jsx)(Se,{value:t,getStyles:s,copyLabel:_,copiedLabel:v})]}),V=N?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`div`,{role:`group`,style:{paddingLeft:`var(--jv-indent)`},children:[L?L.map(e=>(0,P.jsx)(De,{chunk:e,entries:A.slice(e.start,e.end+1),parentPath:n,level:r+1,ancestors:k,nodeProps:B},e.start)):R.map(([e,t])=>(0,P.jsx)(ke,{value:t,path:[...n,e],nodeKey:T?void 0:e,level:r+1,ancestors:k,...B},e)),ee&&(0,P.jsx)(`div`,{...s(`row`),"data-jv-row":!0,children:(0,P.jsxs)(`span`,{...s(`size`),children:[`... `,j-c,` more `,T?`items`:`keys`]})})]}),(0,P.jsx)(`div`,{...s(`row`),"data-jv-row":!0,"aria-hidden":!0,children:(0,P.jsx)(`span`,{...s(`bracket`),children:D})})]}):null;return(0,P.jsxs)(`div`,{...s(`node`),"data-type":T?`array`:`object`,"data-jv-node-wrapper":!0,"data-highlight":O||void 0,children:[(0,P.jsx)(`div`,{...s(`row`),role:`treeitem`,"aria-expanded":M?void 0:N,"aria-level":r,"data-hoverable":!0,"data-jv-node":!0,"data-jv-row":!0,"data-root":C||void 0,tabIndex:C?0:-1,onClick:z?e=>{e.stopPropagation(),z()}:void 0,onKeyDown:e=>xe(e,{expanded:M?void 0:N,onToggle:z}),children:ne}),V]})}function De({chunk:e,entries:t,parentPath:n,level:r,ancestors:i,nodeProps:a}){let o=X(e),s=J([...n,o]),c=a.allExpanded||a.expandedPaths.includes(s),l=a.allExpanded?void 0:()=>a.togglePath(s);return(0,P.jsxs)(`div`,{...a.getStyles(`node`),"data-type":`array`,"data-jv-node-wrapper":!0,children:[(0,P.jsxs)(`div`,{...a.getStyles(`row`),role:`treeitem`,"aria-expanded":c,"aria-level":r,"data-hoverable":!0,"data-jv-node":!0,"data-jv-row":!0,tabIndex:-1,onClick:l?e=>{e.stopPropagation(),l()}:void 0,onKeyDown:e=>xe(e,{expanded:c,onToggle:l}),children:[l&&a.withChevrons&&(0,P.jsx)(`span`,{...a.getStyles(`toggle`),"data-expanded":c||void 0,children:we}),(0,P.jsx)(`span`,{...a.getStyles(`key`),"data-key":!0,children:o}),(0,P.jsx)(`span`,{...a.getStyles(`bracket`),children:`[`}),!c&&(0,P.jsx)(`span`,{...a.getStyles(`ellipsis`),children:`...`}),!c&&(0,P.jsx)(`span`,{...a.getStyles(`bracket`),children:`]`}),a.withSize&&(0,P.jsxs)(`span`,{...a.getStyles(`size`),children:[t.length,` items`]})]}),c&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`div`,{role:`group`,style:{paddingLeft:`var(--jv-indent)`},children:t.map(([e,t])=>(0,P.jsx)(ke,{value:t,path:[...n,e],level:r+1,ancestors:i,...a},e))}),(0,P.jsx)(`div`,{...a.getStyles(`row`),"data-jv-row":!0,"aria-hidden":!0,children:(0,P.jsx)(`span`,{...a.getStyles(`bracket`),children:`]`})})]})]})}function Oe({nodeKey:e,value:t,path:n,level:r,getStyles:i,withTypes:a,withCopy:o,withQuotes:c,withKeyQuotes:l,collapseStringsAfterLength:u,copyLabel:d,copiedLabel:f,onValueSelect:p,highlightItems:m,isRoot:h,circular:g}){let[_,v]=(0,N.useState)(!1),y=g?`circular`:pe(t),b=m?.[J(n)],x=p?()=>p(n,t):void 0,S=typeof t==`string`&&u!==!1&&t.length>u,C;return C=g?{display:`[Circular]`,collapsed:!1}:S&&!_?he(t,c,u):he(t,c,!1),(0,P.jsx)(`div`,{...i(`node`),"data-type":y,"data-jv-node-wrapper":!0,"data-highlight":b||void 0,children:(0,P.jsxs)(`div`,{...i(`row`),role:`treeitem`,"aria-level":r,"aria-selected":!p&&void 0,"data-hoverable":!0,"data-jv-node":!0,"data-jv-row":!0,"data-root":h||void 0,tabIndex:h?0:-1,onClick:x?e=>{e.stopPropagation(),x()}:void 0,onKeyDown:e=>xe(e,{onSelect:x}),children:[(0,P.jsx)(Te,{nodeKey:e,withKeyQuotes:l,getStyles:i}),(0,P.jsx)(`span`,{...i(`value`),"data-value-type":y,"data-wrap":y===`string`&&C.display.length>Ce||void 0,children:C.display}),S&&(0,P.jsx)(s,{onClick:e=>{e.stopPropagation(),v(!_)},"aria-expanded":_,...i(`ellipsis`),"data-clickable":!0,children:_?`show less`:`show more`}),a&&(0,P.jsx)(`span`,{...i(`type`),"data-value-type":y,children:g?`circular`:me(t)}),o&&(0,P.jsx)(Se,{value:t,getStyles:i,copyLabel:d,copiedLabel:f})]})})}function ke(e){let t=ue(e.value);return de(t)&&e.ancestors.includes(t)?(0,P.jsx)(Oe,{...e,value:t,circular:!0}):de(t)?(0,P.jsx)(Ee,{...e,value:t}):(0,P.jsx)(Oe,{...e,value:t})}var Ae={root:`m_4cdfbd95`,controls:`m_1d3bf1e9`,copyAllButton:`m_c6b170eb`,control:`m_cf6507ca`,content:`m_cf64d6e6`,wrapper:`m_f5c72700`,lineNumbers:`m_8e0ffa3`,node:`m_4cddeab5`,row:`m_65939ac7`,toggle:`m_974c9747`,copyButton:`m_44b8417a`,key:`m_65937f4c`,value:`m_4f49eb1e`,bracket:`m_9ede4f15`,type:`m_4ce0cbed`,size:`m_4ce01cb4`,ellipsis:`m_4a460c04`},je={defaultExpandDepth:1,maxDisplayLength:100,withTypes:!1,withSize:!1,withCopy:!1,withCopyButton:!1,withQuotes:!0,withKeyQuotes:!1,collapseStringsAfterLength:!1,sortKeys:!1,groupArraysAfterLength:!1,rootName:!1,indentWidth:16,withBorder:!1,copyLabel:`Copy`,copiedLabel:`Copied`,expandAllLabel:`Expand all`,collapseAllLabel:`Collapse all`,withControls:!1,allExpanded:!1,withLineNumbers:!1,withChevrons:!1},Me=E((e,{radius:n,fontSize:r,indentWidth:a})=>({root:{"--jv-radius":n===void 0?void 0:o(n),"--jv-fz":r===void 0?void 0:t(r),"--jv-indent":a===void 0?void 0:i(a)}})),Ne=[],Pe=x(t=>{let r=y(`JsonViewer`,je,t),{classNames:i,className:a,style:o,styles:c,unstyled:d,vars:f,value:p,rootName:h,defaultExpandDepth:g,expandedPaths:_,onExpandedPathsChange:v,maxDisplayLength:b,withTypes:x,withSize:C,withCopy:w,withCopyButton:T,withQuotes:E,withKeyQuotes:D,collapseStringsAfterLength:O,sortKeys:k,groupArraysAfterLength:A,radius:j,fontSize:M,indentWidth:F,withBorder:I,copyLabel:L,copiedLabel:R,onValueSelect:ee,expandAllLabel:te,collapseAllLabel:z,withControls:B,highlightItems:ne,allExpanded:V,withLineNumbers:H,withChevrons:re,attributes:ie,...U}=r,W=S({name:`JsonViewer`,classes:Ae,props:r,className:a,style:o,classNames:i,styles:c,unstyled:d,attributes:ie,vars:f,varsResolver:Me,rootSelector:`root`}),[G]=(0,N.useState)(()=>fe(p,{depth:g,groupArraysAfterLength:A})),[K,ae]=e({value:_,defaultValue:G,finalValue:[],onChange:v}),q=(0,N.useCallback)(e=>{V||ae(K.includes(e)?K.filter(t=>t!==e):[...K,e])},[K,V,ae]),oe=()=>{ae(fe(p,{groupArraysAfterLength:A}))},se=()=>{ae([])},ce=(0,N.useRef)(null),[le,J]=(0,N.useState)([]);(0,N.useEffect)(()=>{if(!H||!ce.current)return;let e=()=>{let e=ce.current.querySelectorAll(`:scope [data-jv-row]`),t=[];e.forEach(e=>{t.push(e.getBoundingClientRect().height)}),J(t)};e();let t=new ResizeObserver(e);return t.observe(ce.current),()=>t.disconnect()},[H,K,V,p]);let Y=n();return(0,P.jsxs)(m,{...W(`root`),...U,"data-with-border":I||void 0,"data-jv-root":!0,children:[T&&(0,P.jsx)(u,{label:Y.copied?R:L,position:`left`,fz:`xs`,children:(0,P.jsx)(s,{...W(`copyAllButton`),onClick:()=>Y.copy(_e(p)),"aria-label":Y.copied?R:`${L} JSON`,children:(0,P.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,width:16,height:16,children:Y.copied?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,P.jsx)(`path`,{d:`M5 12l5 5l10 -10`})]}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,P.jsx)(`path`,{d:`M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z`}),(0,P.jsx)(`path`,{d:`M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2`})]})})})}),B&&!V&&(0,P.jsxs)(`div`,{...W(`controls`),children:[(0,P.jsx)(s,{onClick:oe,...W(`control`),children:te}),(0,P.jsx)(s,{onClick:se,...W(`control`),children:z})]}),(0,P.jsx)(l,{type:`hover`,scrollbarSize:4,...W(`scrollarea`),children:(0,P.jsxs)(`div`,{...W(`wrapper`),children:[H&&(0,P.jsx)(`div`,{...W(`lineNumbers`),"aria-hidden":!0,children:le.map((e,t)=>(0,P.jsx)(`div`,{style:{height:e},children:t+1},t))}),(0,P.jsx)(`div`,{...W(`content`),ref:ce,role:`tree`,"aria-label":h||`JSON`,children:(0,P.jsx)(ke,{value:p,path:[],nodeKey:h||void 0,level:1,ancestors:Ne,expandedPaths:K,togglePath:q,getStyles:W,maxDisplayLength:b,withTypes:x,withSize:C,withCopy:w,withQuotes:E,withKeyQuotes:D,collapseStringsAfterLength:O,sortKeys:k,groupArraysAfterLength:A,copyLabel:L,copiedLabel:R,onValueSelect:ee,highlightItems:ne,allExpanded:V,withChevrons:re,isRoot:!0})})]})})]})});Pe.displayName=`@mantine/code-highlight/JsonViewer`,Pe.classes=Ae,Pe.varsResolver=Me;function Fe(e,t,n){if(!isFinite(t))return e;let r=[];for(let t=0;t<e.length;t++)e[t].kind===`block`&&r.push(t);if(r.length===0)return e;let i=new Set;for(let n of r)for(let r=Math.max(0,n-t);r<=Math.min(e.length-1,n+t);r++)i.add(r);let a=[],o=0,s=0;for(;s<e.length;)if(i.has(s))a.push(e[s]),s++;else{let t=o++,r=0,c=s;for(;s<e.length&&!i.has(s);)r++,s++;if(n.has(t)){a.push({...e[c],revealedSectionIndex:t});for(let t=c+1;t<s;t++)a.push(e[t])}else a.push({kind:`expand`,sectionIndex:t,hiddenCount:r})}return a}var Q=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r)setTimeout(function(){r(e)},0);else return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h)d[r]=void 0;else{if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}},Ie=new class extends Q{};function Le(e,t,n){return Ie.diff(e,t,n)}function Re(e,t){let n=0;for(;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function ze(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function Be(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function Ve(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function He(e,t){return Be(e,t,``)}function Ue(e,t){return Ve(e,t,``)}function We(e,t){return t.slice(0,Ge(e,t))}function Ge(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function Ke(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function qe(e,t){if(t)return Ye(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function Je(e,t){if(t)return Ye(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function Ye(e,t){if(!t)return[Je(e),qe(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=Ke(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}var Xe=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,Ze=RegExp(`[${Xe}]+|\\s+|[^${Xe}]`,`ug`);new class extends Q{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=Ke(e,r)}else n=e.match(Ze)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&Qe(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&Qe(n,i,r,null,t.intlSegmenter),e}};function Qe(e,t,n,r,i){if(t&&n){let[a,o]=Ye(t.value,i),[s,c]=Ye(n.value,i);if(e){let r=Re(a,s);e.value=Ve(e.value,s,r),t.value=He(t.value,r),n.value=He(n.value,r)}if(r){let e=ze(o,c);r.value=Be(r.value,c,e),t.value=Ue(t.value,e),n.value=Ue(n.value,e)}}else if(n){if(e){let e=Je(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=Je(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=Je(r.value,i),[a,o]=Ye(t.value,i),s=Re(n,a);t.value=He(t.value,s);let c=ze(He(n,s),o);t.value=Ue(t.value,c),r.value=Be(r.value,n,c),e.value=Ve(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=Je(r.value,i),n=We(qe(t.value,i),e);t.value=Ue(t.value,n)}else if(e){let n=We(qe(e.value,i),Je(t.value,i));t.value=He(t.value,n)}}var $e=new class extends Q{tokenize(e){let t=RegExp(`(\\r?\\n)|[${Xe}]+|[^\\S\\n\\r]+|[^${Xe}]`,`ug`);return e.match(t)||[]}};function et(e,t,n){return $e.diff(e,t,n)}var tt=new class extends Q{constructor(){super(...arguments),this.tokenize=rt}equals(e,t,n){return n.ignoreWhitespace?(n.newlineIsToken&&e.includes(`
3
+ `)||(e=e.trim()),n.newlineIsToken&&t.includes(`
4
+ `)||(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
5
+ `)&&(e=e.slice(0,-1)),t.endsWith(`
6
+ `)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function nt(e,t,n){return tt.diff(e,t,n)}function rt(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
7
+ `));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function it(e){return e==`.`||e==`!`||e==`?`}new class extends Q{tokenize(e){let t=[],n=0;for(let r=0;r<e.length;r++){if(r==e.length-1){t.push(e.slice(n));break}if(it(e[r])&&e[r+1].match(/\s/)){for(t.push(e.slice(n,r+1)),r=n=r+1;e[r+1]?.match(/\s/);)r++;t.push(e.slice(n,r+1)),n=r+1}}return t}},new class extends Q{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},new class extends Q{constructor(){super(...arguments),this.tokenize=rt}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>t===void 0?n:t}=t;return typeof e==`string`?e:JSON.stringify(at(e,null,null,r),null,` `)}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`),n)}};function at(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i===void 0?``:i,e));let a=0;for(;a<t.length;a+=1)if(t[a]===e)return n[a];let o;if(Object.prototype.toString.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=at(e[a],t,n,r,String(a));return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==`object`&&e){t.push(e),o={},n.push(o);let i=[],s;for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.push(s);for(i.sort(),a=0;a<i.length;a+=1)s=i[a],o[s]=at(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}new class extends Q{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};function ot(e){return e.map(e=>({type:e.added?`add`:e.removed?`remove`:`equal`,value:e.value}))}function st(e,t){return ot(Le(e,t))}function ct(e,t){return ot(et(e,t))}function lt(e,t){return ot(nt(e,t))}var ut=.4;function dt(e,t){if(e.length===0&&t.length===0)return 1;if(e.length===0||t.length===0)return 0;let n=new Map,r=new Map;for(let t of e)n.set(t,(n.get(t)||0)+1);for(let e of t)r.set(e,(r.get(e)||0)+1);let i=0;for(let[e,t]of n)i+=Math.min(t,r.get(e)||0);return 2*i/(e.length+t.length)}function ft(e,t,n){let r=Math.min(e.length,t.length),i=[],a=n===`chars`?st:ct;for(let o=0;o<r;o++){let r=e[o].value,s=t[o].value,c=n!==`lines`&&r!==``&&s!==``&&dt(r.trim(),s.trim())>=ut;i.push(c?a(r,s):void 0)}return i}function pt(e,t){let n=[],r=0;for(;r<e.length;){if(e[r].type===`equal`){n.push({...e[r],kind:`line`}),r++;continue}let i=[],a=[];for(;r<e.length&&e[r].type===`remove`;)i.push(e[r]),r++;for(;r<e.length&&e[r].type===`add`;)a.push(e[r]),r++;n.push({kind:`block`,removed:i,added:a,inlineDiffs:ft(i,a,t)})}return n}function mt(e){let t=[],n=1,r=1;for(let i of e){let e=i.value.split(`
8
+ `);for(let a=0;a<e.length&&(a!==e.length-1||e[a]!==``);a++){let o=a<e.length-1?e[a].replace(/\r$/,``):e[a],s={type:i.type,value:o};i.type===`equal`?(s.oldLineNumber=n++,s.newLineNumber=r++):i.type===`remove`?s.oldLineNumber=n++:s.newLineNumber=r++,t.push(s)}}return t}var ht={root:`m_4202718a`,table:`m_fe616026`,row:`m_7e001432`,lineNumber:`m_33d18305`,content:`m_80d0a2d1`,changeMarker:`m_19fcd8b2`,addedLine:`m_c548bd6c`,removedLine:`m_953f8ecc`,addedHighlight:`m_cbd52a3c`,removedHighlight:`m_ce4a34dc`,expandControl:`m_7c19a9bb`,splitDivider:`m_7bbb8747`},gt={mode:`unified`,diffMethod:`words`,contextLines:1/0,withLineNumbers:!0,addColor:`teal`,removeColor:`red`,expandLabel:e=>`Show ${e} hidden ${e===1?`line`:`lines`}`},_t=E((e,{addColor:t,removeColor:n})=>({root:{"--diff-add-color":t===`teal`?void 0:b(g(t,e),.1),"--diff-add-highlight-color":t===`teal`?void 0:b(g(t,e),.25),"--diff-remove-color":n===`red`?void 0:b(g(n,e),.1),"--diff-remove-highlight-color":n===`red`?void 0:b(g(n,e),.25)}})),vt=new Set;function yt(e,t,n){return e.rows===t&&e.contextLines===n?e.expanded:vt}var bt={add:`addedLine`,remove:`removedLine`,equal:`unchangedLine`},xt={add:`+ `,remove:`- `};function St(e,t,n){if(!n)return e(t);let{className:r,style:i,...a}=e(bt[n]);return{...e(t,{className:r,style:i}),...a}}function Ct({inlineDiff:e,side:t,getStyles:n}){return(0,P.jsx)(P.Fragment,{children:e.map((e,r)=>e.type===`equal`?(0,P.jsx)(`span`,{children:e.value},r):e.type===t?(0,P.jsx)(`mark`,{...n(t===`add`?`addedHighlight`:`removedHighlight`),children:e.value},r):null)})}function $({entry:e,gutters:t,inlineDiff:n,withLineNumbers:r,getStyles:i}){let a=e?.type,o=e&&e.type!==`equal`?e.type:void 0,s=t===`both`?[e?.oldLineNumber,e?.newLineNumber]:[t===`old`?e?.oldLineNumber:e?.newLineNumber];return(0,P.jsxs)(P.Fragment,{children:[r&&s.map((e,t)=>(0,P.jsx)(`td`,{...St(i,`lineNumber`,a),children:e},t)),(0,P.jsxs)(`td`,{...St(i,`content`,a),children:[o&&(0,P.jsx)(`span`,{...i(`changeMarker`),children:xt[o]}),o&&n?(0,P.jsx)(Ct,{inlineDiff:n,side:o,getStyles:i}):e&&(e.value||`
9
+ `)]})]})}function wt({row:e,colSpan:t,getStyles:n,onExpand:r,expandLabel:i}){return(0,P.jsx)(`tr`,{...n(`row`),children:(0,P.jsx)(`td`,{colSpan:t,children:(0,P.jsx)(`button`,{type:`button`,...n(`expandControl`,{focusable:!0}),onClick:()=>r(e.sectionIndex),children:i(e.hiddenCount)})})})}function Tt(e,t,n){return`revealedSectionIndex`in e?{...t(`row`,{focusable:!0}),tabIndex:-1,"data-section":e.revealedSectionIndex,ref:n}:t(`row`)}function Et({processedRows:e,withLineNumbers:t,getStyles:n,onExpand:r,expandLabel:i,revealedRowRef:a}){let o=t?3:1;return(0,P.jsx)(`table`,{...n(`table`),children:(0,P.jsx)(`tbody`,{children:e.map((e,s)=>e.kind===`expand`?(0,P.jsx)(wt,{row:e,colSpan:o,getStyles:n,onExpand:r,expandLabel:i},`expand-${e.sectionIndex}`):e.kind===`block`?[...e.removed.map((r,i)=>(0,P.jsx)(`tr`,{...n(`row`),children:(0,P.jsx)($,{entry:r,gutters:`both`,inlineDiff:e.inlineDiffs[i],withLineNumbers:t,getStyles:n})},`${s}-remove-${i}`)),...e.added.map((r,i)=>(0,P.jsx)(`tr`,{...n(`row`),children:(0,P.jsx)($,{entry:r,gutters:`both`,inlineDiff:e.inlineDiffs[i],withLineNumbers:t,getStyles:n})},`${s}-add-${i}`))]:(0,P.jsx)(`tr`,{...Tt(e,n,a),children:(0,P.jsx)($,{entry:e,gutters:`both`,withLineNumbers:t,getStyles:n})},s))})})}function Dt({processedRows:e,withLineNumbers:t,getStyles:n,onExpand:r,expandLabel:i,revealedRowRef:a}){let o=t?5:3;return(0,P.jsx)(`table`,{...n(`table`),children:(0,P.jsx)(`tbody`,{children:e.map((e,s)=>e.kind===`expand`?(0,P.jsx)(wt,{row:e,colSpan:o,getStyles:n,onExpand:r,expandLabel:i},`expand-${e.sectionIndex}`):e.kind===`block`?Array.from({length:Math.max(e.removed.length,e.added.length)},(r,i)=>(0,P.jsxs)(`tr`,{...n(`row`),children:[(0,P.jsx)($,{entry:e.removed[i],gutters:`old`,inlineDiff:e.inlineDiffs[i],withLineNumbers:t,getStyles:n}),(0,P.jsx)(`td`,{...n(`splitDivider`)}),(0,P.jsx)($,{entry:e.added[i],gutters:`new`,inlineDiff:e.inlineDiffs[i],withLineNumbers:t,getStyles:n})]},`${s}-${i}`)):(0,P.jsxs)(`tr`,{...Tt(e,n,a),children:[(0,P.jsx)($,{entry:e,gutters:`old`,withLineNumbers:t,getStyles:n}),(0,P.jsx)(`td`,{...n(`splitDivider`)}),(0,P.jsx)($,{entry:e,gutters:`new`,withLineNumbers:t,getStyles:n})]},s))})})}var Ot=x(e=>{let t=y(`Diff`,gt,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,previousValue:c,currentValue:l,mode:u,diffMethod:d,contextLines:f,withLineNumbers:p,addColor:h,removeColor:g,expandLabel:_,mod:v,attributes:b,...x}=t,C=S({name:`Diff`,props:t,classes:ht,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:b,vars:s,varsResolver:_t}),w=(0,N.useMemo)(()=>pt(mt(lt(c,l)),d),[c,l,d]),[T,E]=(0,N.useState)(()=>({rows:w,contextLines:f,expanded:vt})),D=yt(T,w,f),O=(0,N.useRef)(null),k={processedRows:(0,N.useMemo)(()=>Fe(w,f,D),[w,f,D]),withLineNumbers:p,getStyles:C,onExpand:e=>{O.current=e,E(t=>({rows:w,contextLines:f,expanded:new Set(yt(t,w,f)).add(e)}))},expandLabel:_,revealedRowRef:(0,N.useCallback)(e=>{e&&Number(e.dataset.section)===O.current&&(O.current=null,e.focus())},[])};return(0,P.jsx)(m,{...C(`root`),mod:[{split:u===`split`},v],...x,children:u===`split`?(0,P.jsx)(Dt,{...k}):(0,P.jsx)(Et,{...k})})});Ot.classes=ht,Ot.varsResolver=_t,Ot.displayName=`@mantine/code-highlight/Diff`;var kt={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},At=e=>e.replace(/[&<>"']/g,e=>kt[e]);function jt(e,t){let n=A(t);if(!n)return null;let r=``;return k(e,n.language.parser.parse(e),D,(e,t)=>{r+=t?`<span class="${At(t)}">${At(e)}</span>`:At(e)},()=>{r+=`
10
+ `}),r}var Mt={getHighlighter:()=>({code:e,language:t})=>{let n=jt(e,t);return n===null?{highlightedCode:e,isHighlighted:!1}:{highlightedCode:n,isHighlighted:!0,codeElementProps:{"data-highlighted":t}}},loadLanguage:(e,t)=>j[t]&&!A(t)?O(t).then(()=>void 0):void 0},Nt=({children:e})=>(0,P.jsx)(R,{adapter:Mt,children:e}),Pt=e=>typeof e==`string`&&e!==`plain`?e:void 0;function Ft({node:e,contract:t}){let n=e.props,r=v(e,t,[`code`,`language`,`inline`]),i=String(n.code??``);return n.inline===!0?(0,P.jsx)(Nt,{children:(0,P.jsx)(se,{"data-ui-id":e.id,code:i,language:Pt(n.language),className:r.className})}):(0,P.jsx)(Nt,{children:(0,P.jsx)(q,{...r,code:i,language:Pt(n.language)})})}function It({node:e,contract:t}){let n=f(),r=e.props,i=(Array.isArray(r.code)?r.code:[]).map(e=>({code:String(e.code??``),language:Pt(e.language),fileName:e.file_name})),a=typeof r.value==`number`?r.value:0,[o,s]=(0,N.useState)(a);return(0,N.useEffect)(()=>{n.store.drafts.get(e.id)||s(a)},[n,e.id,e.vrev,a]),(0,P.jsx)(Nt,{children:(0,P.jsx)(le,{...v(e,t,[`code`,`value`]),code:i,activeTab:Math.min(o,Math.max(i.length-1,0)),onTabChange:t=>{s(t),n.edit(e.id,t,`change`,0)}})})}function Lt({node:e,contract:t}){let n=e.props;return(0,P.jsx)(Ot,{...v(e,t,[`previousValue`,`currentValue`]),previousValue:String(n.previousValue??``),currentValue:String(n.currentValue??``)})}function Rt({node:e,contract:t}){let n=f();return(0,P.jsx)(Pe,{...v(e,t,[`value`]),value:e.props.value??null,onValueSelect:e.events.has(`select`)?t=>n.emit(e.id,`select`,{value:t.slice(0,64).map(String)}):void 0})}export{Ft as CodeHighlightAdapter,It as CodeHighlightTabsAdapter,Lt as DiffAdapter,Rt as JsonViewerAdapter};
@@ -0,0 +1 @@
1
+ .m_5cb1b9c8{position:relative}.m_e597c321{border-radius:var(--ch-radius,0px);position:relative;overflow:hidden}:where([data-mantine-color-scheme=light]) .m_e597c321:where([data-with-border]){border:1px solid var(--mantine-color-gray-2)}:where([data-mantine-color-scheme=dark]) .m_e597c321:where([data-with-border]),.m_e597c321:where([data-with-border]):where([data-code-color-scheme=dark]){border:1px solid var(--mantine-color-dark-6)}.m_e597c321:where([data-with-border]):where([data-code-color-scheme=light]){border:1px solid var(--mantine-color-gray-2)}:where([data-mantine-color-scheme=light]) .m_e597c321{--ch-background:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_e597c321{--ch-background:var(--mantine-color-dark-8)}.m_dfe9c588{border-radius:var(--ch-radius,var(--mantine-radius-sm));background-color:var(--ch-background);font-size:calc(.8125rem * var(--mantine-scale));padding:calc(.1875rem * var(--mantine-scale)) calc(.3125rem * var(--mantine-scale));overflow:hidden}:where([data-mantine-color-scheme=light]) .m_dfe9c588:where([data-with-border]){border:1px solid var(--mantine-color-gray-2)}:where([data-mantine-color-scheme=dark]) .m_dfe9c588:where([data-with-border]),.m_dfe9c588:where([data-with-border]):where([data-code-color-scheme=dark]){border:1px solid var(--mantine-color-dark-6)}.m_dfe9c588:where([data-with-border]):where([data-code-color-scheme=light]){border:1px solid var(--mantine-color-gray-2)}:where([data-mantine-color-scheme=light]) .m_dfe9c588{--ch-background:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_dfe9c588{--ch-background:var(--mantine-color-dark-8)}.m_2c47c4fd{--code-line-height:1.7;flex:1;min-width:0;margin:0;display:block}.m_2c47c4fd[data-with-offset] .m_5caae6d3{padding-top:calc(3.125rem * var(--mantine-scale))}.m_5caae6d3{padding:var(--mantine-spacing-xs) var(--mantine-spacing-md);background-color:var(--ch-background);font-size:calc(.8125rem * var(--mantine-scale));line-height:var(--code-line-height,var(--mantine-line-height));font-family:var(--mantine-font-family-monospace);width:fit-content;min-width:100%;display:block}.m_5caae6d3:where([data-inline]){padding:calc(.1875rem * var(--mantine-scale)) calc(.3125rem * var(--mantine-scale));background-color:var(--ch-background);display:inline-block}.m_be7e9c9c{top:calc(.5rem * var(--mantine-scale));right:calc(.5rem * var(--mantine-scale));z-index:1;background-color:var(--ch-background);border-bottom-left-radius:var(--mantine-radius-md);position:absolute}.m_be7e9c9c:where([data-with-offset]){top:calc(.75rem * var(--mantine-scale))}.m_d498bab7{color:var(--mantine-color-text);opacity:.5}@media (hover:hover){.m_d498bab7:hover{color:var(--mantine-color-bright);opacity:1}}@media (hover:none){.m_d498bab7:active{color:var(--mantine-color-bright);opacity:1}}.m_d498bab7:where([data-code-color-scheme=dark]){color:var(--mantine-color-dark-0)}@media (hover:hover){.m_d498bab7:where([data-code-color-scheme=dark]):hover{color:var(--mantine-color-white)}}@media (hover:none){.m_d498bab7:where([data-code-color-scheme=dark]):active{color:var(--mantine-color-white)}}.m_d498bab7:where([data-code-color-scheme=light]){color:var(--mantine-color-black)}@media (hover:hover){.m_d498bab7:where([data-code-color-scheme=light]):hover{color:var(--mantine-color-black)}}@media (hover:none){.m_d498bab7:where([data-code-color-scheme=light]):active{color:var(--mantine-color-black)}}.m_d498bab7 :where(svg){width:calc(1.125rem * var(--mantine-scale));height:calc(1.125rem * var(--mantine-scale));display:block}.m_4c3d814c:where([data-code-color-scheme=light]){background-color:var(--mantine-color-gray-9);color:var(--mantine-color-white)}.m_4c3d814c:where([data-code-color-scheme=dark]){background-color:var(--mantine-color-gray-2);color:var(--mantine-color-black)}.m_9f507240{--code-line-height:1.7;flex-direction:row;display:flex}.m_15f77410{-webkit-user-select:none;user-select:none;text-align:right;padding:var(--mantine-spacing-xs) var(--mantine-spacing-xs);padding-left:var(--mantine-spacing-md);font-family:var(--mantine-font-family-monospace);font-size:calc(.8125rem * var(--mantine-scale));line-height:var(--code-line-height,var(--mantine-line-height));color:var(--mantine-color-dimmed);background-color:var(--ch-background);flex-shrink:0}.m_15f77410[data-with-offset]{padding-top:calc(3.125rem * var(--mantine-scale))}.m_f744fd40[data-collapsed]{max-height:var(--ch-max-height,180px);position:relative;overflow:hidden}.m_f744fd40[data-collapsed]:after{content:"";height:calc(5rem * var(--mantine-scale));pointer-events:none;background:linear-gradient(0deg, var(--ch-background) 0%, var(--ch-background) 25%, transparent 100%);z-index:1;position:absolute;bottom:0;left:0;right:0}.m_c9378bc2{z-index:2;bottom:0;font-size:var(--mantine-font-size-sm);color:var(--mantine-color-anchor);text-align:center;width:100%;padding-top:var(--mantine-spacing-xs);padding-bottom:var(--mantine-spacing-xs);white-space:nowrap;position:absolute;inset-inline-start:50%;transform:translate(-50%)}.m_c9378bc2[data-hidden]{display:none}.m_c9378bc2:where([data-code-color-scheme=dark]){color:var(--mantine-primary-color-5)}.m_c9378bc2:where([data-code-color-scheme=light]){color:var(--mantine-primary-color-6)}.m_5cac2e62{font-size:var(--mantine-font-size-xs);justify-content:center;align-items:center;gap:calc(.4375rem * var(--mantine-scale));padding:calc(.3125rem * var(--mantine-scale)) calc(.5625rem * var(--mantine-scale));font-family:var(--mantine-font-family-monospace);font-weight:var(--mantine-font-weight-bold);-webkit-user-select:none;user-select:none;cursor:pointer;opacity:.8;border:calc(.0625rem * var(--mantine-scale)) solid transparent;white-space:nowrap;border-radius:var(--mantine-radius-default);margin:0;line-height:1;display:flex}.m_5cac2e62:where([data-active]){opacity:1}:where([data-mantine-color-scheme=light]) .m_5cac2e62{border-color:var(--mantine-color-gray-3);color:var(--mantine-color-gray-8)}:where([data-mantine-color-scheme=light]) .m_5cac2e62:where([data-active]){background-color:var(--mantine-color-white);color:var(--mantine-color-black)}:where([data-mantine-color-scheme=dark]) .m_5cac2e62{border-color:var(--mantine-color-dark-4);color:var(--mantine-color-dark-0)}:where([data-mantine-color-scheme=dark]) .m_5cac2e62:where([data-active]){background-color:var(--mantine-color-dark-5);color:var(--mantine-color-white)}.m_5cac2e62:where([data-color-scheme=light]){border-color:var(--mantine-color-gray-3);color:var(--mantine-color-gray-8)}.m_5cac2e62:where([data-color-scheme=light]):where([data-active]){background-color:var(--mantine-color-white);color:var(--mantine-color-black)}.m_5cac2e62:where([data-color-scheme=dark]){border-color:var(--mantine-color-dark-4);color:var(--mantine-color-dark-0)}.m_5cac2e62:where([data-color-scheme=dark]):where([data-active]){background-color:var(--mantine-color-dark-5);color:var(--mantine-color-white)}@media (hover:hover){.m_5cac2e62:hover{opacity:1}}@media (hover:none){.m_5cac2e62:active{opacity:1}}.m_5cac2e62:where(:only-child){cursor:default}.m_b46cddfb :where(svg){display:block}.m_7b14120b{z-index:2;top:0;left:0;right:calc(4.375rem * var(--mantine-scale));position:absolute}.m_38d99e51{padding:calc(.75rem * var(--mantine-scale)) calc(.625rem * var(--mantine-scale));gap:var(--mantine-spacing-xs);padding-bottom:0;display:flex}.m_4cdfbd95{--jv-radius:var(--mantine-radius-sm);--jv-fz:calc(.8125rem * var(--mantine-scale));--jv-indent:calc(1rem * var(--mantine-scale));font-family:var(--mantine-font-family-monospace);font-size:var(--jv-fz);border-radius:var(--jv-radius);direction:ltr;line-height:1.55;position:relative}:where([data-mantine-color-scheme=light]) .m_4cdfbd95{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_4cdfbd95{background-color:var(--mantine-color-dark-8)}.m_4cdfbd95[data-with-border]{border:calc(.0625rem * var(--mantine-scale)) solid}:where([data-mantine-color-scheme=light]) .m_4cdfbd95[data-with-border]{border-color:var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_4cdfbd95[data-with-border]{border-color:var(--mantine-color-dark-4)}.m_1d3bf1e9{gap:var(--mantine-spacing-xs);padding:var(--mantine-spacing-xs) var(--mantine-spacing-sm);border-bottom:calc(.0625rem * var(--mantine-scale)) solid;flex-wrap:wrap;display:flex}.m_c6b170eb~.m_1d3bf1e9{padding-right:calc(44px + var(--mantine-spacing-xs))}:where([data-mantine-color-scheme=light]) .m_1d3bf1e9{border-color:var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_1d3bf1e9{border-color:var(--mantine-color-dark-4)}.m_cf6507ca{font-size:var(--mantine-font-size-xs);white-space:nowrap;padding:calc(.125rem * var(--mantine-scale)) calc(.5rem * var(--mantine-scale));border-radius:var(--mantine-radius-sm)}:where([data-mantine-color-scheme=light]) .m_cf6507ca{background-color:var(--mantine-color-gray-1);color:var(--mantine-color-gray-7)}:where([data-mantine-color-scheme=dark]) .m_cf6507ca{background-color:var(--mantine-color-dark-6);color:var(--mantine-color-dark-1)}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_cf6507ca:hover{background-color:var(--mantine-color-gray-2)}:where([data-mantine-color-scheme=dark]) .m_cf6507ca:hover{background-color:var(--mantine-color-dark-5)}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_cf6507ca:active{background-color:var(--mantine-color-gray-2)}:where([data-mantine-color-scheme=dark]) .m_cf6507ca:active{background-color:var(--mantine-color-dark-5)}}.m_cf64d6e6{padding:var(--mantine-spacing-xs) var(--mantine-spacing-sm);overflow:hidden}.m_f5c72700>.m_cf64d6e6{flex:1;min-width:min-content}.m_8e0ffa3{-webkit-user-select:none;user-select:none;text-align:right;padding:var(--mantine-spacing-xs) var(--mantine-spacing-xs);padding-left:var(--mantine-spacing-sm);margin-right:var(--mantine-spacing-xs);border-right:calc(.0625rem * var(--mantine-scale)) solid;box-sizing:content-box;flex-direction:column;min-width:2ch;display:flex}:where([data-mantine-color-scheme=light]) .m_8e0ffa3{color:var(--mantine-color-gray-7);border-color:var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_8e0ffa3{color:var(--mantine-color-dark-2);border-color:var(--mantine-color-dark-4)}.m_8e0ffa3>div{padding:calc(.0625rem * var(--mantine-scale)) 0;box-sizing:border-box;justify-content:flex-end;align-items:flex-start;line-height:1.55;display:flex}.m_f5c72700{align-items:stretch;display:flex}.m_4cddeab5,.m_4cddeab5[data-highlight]>.m_65939ac7{position:relative}.m_4cddeab5[data-highlight]>.m_65939ac7>*{z-index:1}.m_4cddeab5[data-highlight]>.m_65939ac7>:not(.m_974c9747){position:relative}.m_4cddeab5[data-highlight]>.m_65939ac7:before{content:"";top:0;bottom:0;left:calc(-62.5rem * var(--mantine-scale));right:calc(-62.5rem * var(--mantine-scale));z-index:0;pointer-events:none;position:absolute}:where([data-mantine-color-scheme=light]) .m_4cddeab5[data-highlight=added]>.m_65939ac7:before{background-color:var(--mantine-color-green-1)}:where([data-mantine-color-scheme=dark]) .m_4cddeab5[data-highlight=added]>.m_65939ac7:before{background-color:#40c05726}:where([data-mantine-color-scheme=light]) .m_4cddeab5[data-highlight=removed]>.m_65939ac7:before{background-color:var(--mantine-color-red-1)}:where([data-mantine-color-scheme=dark]) .m_4cddeab5[data-highlight=removed]>.m_65939ac7:before{background-color:#fa525226}.m_65939ac7{align-items:flex-start;gap:calc(.375rem * var(--mantine-scale));min-height:calc(1.5rem * var(--mantine-scale));padding:calc(.0625rem * var(--mantine-scale)) calc(.25rem * var(--mantine-scale));border-radius:var(--mantine-radius-sm);text-align:left;width:100%;font-family:inherit;font-size:inherit;line-height:inherit;display:flex}.m_65939ac7:focus-visible{outline:2px solid var(--mantine-primary-color-filled);outline-offset:calc(-.125rem * var(--mantine-scale))}.m_65939ac7 .m_44b8417a{opacity:0;transition:opacity .1s}.m_65939ac7:focus-within .m_44b8417a{opacity:1}@media (hover:hover){.m_65939ac7[data-hoverable]:hover .m_44b8417a{opacity:1}}@media (hover:none){.m_65939ac7[data-hoverable]:active .m_44b8417a{opacity:1}}.m_65939ac7[data-hoverable]:not([data-root]){cursor:default}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_65939ac7[data-hoverable]:not([data-root]):hover{background-color:var(--mantine-color-gray-1)}:where([data-mantine-color-scheme=dark]) .m_65939ac7[data-hoverable]:not([data-root]):hover{background-color:var(--mantine-color-dark-6)}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_65939ac7[data-hoverable]:not([data-root]):active{background-color:var(--mantine-color-gray-1)}:where([data-mantine-color-scheme=dark]) .m_65939ac7[data-hoverable]:not([data-root]):active{background-color:var(--mantine-color-dark-6)}}.m_974c9747{left:calc(var(--mantine-spacing-sm) * -1 - 4px);width:calc(1rem * var(--mantine-scale));height:calc(1.5rem * var(--mantine-scale));cursor:pointer;flex-shrink:0;justify-content:center;align-items:center;display:inline-flex;position:absolute}:where([data-mantine-color-scheme=light]) .m_974c9747{color:var(--mantine-color-gray-6)}:where([data-mantine-color-scheme=dark]) .m_974c9747{color:var(--mantine-color-dark-3)}.m_974c9747[data-expanded]{transform:rotate(90deg)}:where([data-mantine-color-scheme=light]) .m_65937f4c{color:var(--mantine-color-violet-7)}:where([data-mantine-color-scheme=dark]) .m_65937f4c{color:var(--mantine-color-violet-4)}.m_65937f4c{white-space:nowrap;line-height:1.55}.m_4f49eb1e{white-space:pre;line-height:1.55}.m_4f49eb1e[data-wrap]{white-space:pre-wrap;overflow-wrap:anywhere;min-width:20ch}:where([data-mantine-color-scheme=light]) .m_4f49eb1e[data-value-type=string]{color:var(--mantine-color-teal-8)}:where([data-mantine-color-scheme=dark]) .m_4f49eb1e[data-value-type=string]{color:var(--mantine-color-teal-4)}:where([data-mantine-color-scheme=light]) .m_4f49eb1e[data-value-type=number]{color:var(--mantine-color-blue-7)}:where([data-mantine-color-scheme=dark]) .m_4f49eb1e[data-value-type=number]{color:var(--mantine-color-blue-4)}:where([data-mantine-color-scheme=light]) .m_4f49eb1e[data-value-type=boolean]{color:var(--mantine-color-orange-7)}:where([data-mantine-color-scheme=dark]) .m_4f49eb1e[data-value-type=boolean]{color:var(--mantine-color-orange-4)}:where([data-mantine-color-scheme=light]) .m_4f49eb1e[data-value-type=null],:where([data-mantine-color-scheme=light]) .m_4f49eb1e[data-value-type=undefined]{color:var(--mantine-color-red-7)}:where([data-mantine-color-scheme=dark]) .m_4f49eb1e[data-value-type=null],:where([data-mantine-color-scheme=dark]) .m_4f49eb1e[data-value-type=undefined]{color:var(--mantine-color-red-4)}:where([data-mantine-color-scheme=light]) .m_4f49eb1e[data-value-type=bigint]{color:var(--mantine-color-blue-7)}:where([data-mantine-color-scheme=dark]) .m_4f49eb1e[data-value-type=bigint]{color:var(--mantine-color-blue-4)}.m_4f49eb1e[data-value-type=circular]{font-style:italic}:where([data-mantine-color-scheme=light]) .m_4f49eb1e[data-value-type=circular]{color:var(--mantine-color-gray-7)}:where([data-mantine-color-scheme=dark]) .m_4f49eb1e[data-value-type=circular]{color:var(--mantine-color-dark-2)}:where([data-mantine-color-scheme=light]) .m_9ede4f15{color:var(--mantine-color-gray-7)}:where([data-mantine-color-scheme=dark]) .m_9ede4f15{color:var(--mantine-color-dark-2)}.m_4ce0cbed{font-size:calc(var(--jv-fz) * .85);padding:0 calc(.25rem * var(--mantine-scale));border-radius:var(--mantine-radius-xs);white-space:nowrap;flex-shrink:0;align-self:center}:where([data-mantine-color-scheme=light]) .m_4ce0cbed[data-value-type=string]{background-color:var(--mantine-color-teal-0);color:var(--mantine-color-teal-8)}:where([data-mantine-color-scheme=dark]) .m_4ce0cbed[data-value-type=string]{color:var(--mantine-color-teal-4);background-color:#12b88626}:where([data-mantine-color-scheme=light]) .m_4ce0cbed[data-value-type=number],:where([data-mantine-color-scheme=light]) .m_4ce0cbed[data-value-type=bigint]{background-color:var(--mantine-color-blue-0);color:var(--mantine-color-blue-7)}:where([data-mantine-color-scheme=dark]) .m_4ce0cbed[data-value-type=number],:where([data-mantine-color-scheme=dark]) .m_4ce0cbed[data-value-type=bigint]{color:var(--mantine-color-blue-4);background-color:#228be626}:where([data-mantine-color-scheme=light]) .m_4ce0cbed[data-value-type=boolean]{background-color:var(--mantine-color-orange-0);color:var(--mantine-color-orange-7)}:where([data-mantine-color-scheme=dark]) .m_4ce0cbed[data-value-type=boolean]{color:var(--mantine-color-orange-4);background-color:#fd7e1426}:where([data-mantine-color-scheme=light]) .m_4ce0cbed[data-value-type=null],:where([data-mantine-color-scheme=light]) .m_4ce0cbed[data-value-type=undefined]{background-color:var(--mantine-color-red-0);color:var(--mantine-color-red-7)}:where([data-mantine-color-scheme=dark]) .m_4ce0cbed[data-value-type=null],:where([data-mantine-color-scheme=dark]) .m_4ce0cbed[data-value-type=undefined]{color:var(--mantine-color-red-4);background-color:#fa525226}:where([data-mantine-color-scheme=light]) .m_4ce0cbed[data-value-type=circular]{background-color:var(--mantine-color-gray-1);color:var(--mantine-color-gray-7)}:where([data-mantine-color-scheme=dark]) .m_4ce0cbed[data-value-type=circular]{background-color:var(--mantine-color-dark-6);color:var(--mantine-color-dark-2)}:where([data-mantine-color-scheme=light]) .m_4ce0cbed[data-value-type=array]{background-color:var(--mantine-color-cyan-0);color:var(--mantine-color-cyan-8)}:where([data-mantine-color-scheme=dark]) .m_4ce0cbed[data-value-type=array]{color:var(--mantine-color-cyan-4);background-color:#15aabf26}:where([data-mantine-color-scheme=light]) .m_4ce0cbed[data-value-type=object]{background-color:var(--mantine-color-grape-0);color:var(--mantine-color-grape-8)}:where([data-mantine-color-scheme=dark]) .m_4ce0cbed[data-value-type=object]{color:var(--mantine-color-grape-4);background-color:#be4bdb26}.m_4ce01cb4{font-size:calc(var(--jv-fz) * .85);white-space:nowrap;flex-shrink:0;align-self:center}:where([data-mantine-color-scheme=light]) .m_4ce01cb4{color:var(--mantine-color-gray-7)}:where([data-mantine-color-scheme=dark]) .m_4ce01cb4{color:var(--mantine-color-dark-3)}:where([data-mantine-color-scheme=light]) .m_4a460c04{color:var(--mantine-color-gray-7)}:where([data-mantine-color-scheme=dark]) .m_4a460c04{color:var(--mantine-color-dark-3)}.m_4a460c04[data-clickable]{font-size:calc(var(--jv-fz) * .85);cursor:pointer;white-space:nowrap;flex-shrink:0;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}@media (hover:hover){.m_4a460c04[data-clickable]:hover{text-decoration-style:solid}}@media (hover:none){.m_4a460c04[data-clickable]:active{text-decoration-style:solid}}.m_44b8417a{width:calc(1.25rem * var(--mantine-scale));height:calc(1.25rem * var(--mantine-scale));cursor:pointer;border-radius:var(--mantine-radius-xs);flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}:where([data-mantine-color-scheme=light]) .m_44b8417a{color:var(--mantine-color-gray-6)}:where([data-mantine-color-scheme=dark]) .m_44b8417a{color:var(--mantine-color-dark-3)}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_44b8417a:hover{color:var(--mantine-color-gray-7);background-color:var(--mantine-color-gray-2)}:where([data-mantine-color-scheme=dark]) .m_44b8417a:hover{color:var(--mantine-color-dark-1);background-color:var(--mantine-color-dark-5)}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_44b8417a:active{color:var(--mantine-color-gray-7);background-color:var(--mantine-color-gray-2)}:where([data-mantine-color-scheme=dark]) .m_44b8417a:active{color:var(--mantine-color-dark-1);background-color:var(--mantine-color-dark-5)}}.m_c6b170eb{top:calc(.5rem * var(--mantine-scale));right:calc(.5rem * var(--mantine-scale));z-index:1;width:calc(1.75rem * var(--mantine-scale));height:calc(1.75rem * var(--mantine-scale));border-radius:var(--mantine-radius-sm);opacity:.5;justify-content:center;align-items:center;display:flex;position:absolute}:where([data-mantine-color-scheme=light]) .m_c6b170eb{color:var(--mantine-color-gray-7);background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_c6b170eb{color:var(--mantine-color-dark-1);background-color:var(--mantine-color-dark-8)}@media (hover:hover){.m_c6b170eb:hover{opacity:1}}@media (hover:none){.m_c6b170eb:active{opacity:1}}.m_4202718a{border:calc(.0625rem * var(--mantine-scale)) solid;border-radius:var(--mantine-radius-default);font-family:var(--mantine-font-family-monospace);font-size:calc(.8125rem * var(--mantine-scale));overflow-x:auto}:where([data-mantine-color-scheme=light]) .m_4202718a{border-color:var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_4202718a{border-color:var(--mantine-color-dark-4)}.m_fe616026{border-collapse:collapse;border-spacing:0;width:100%}.m_7e001432:focus{outline-offset:calc(-.125rem * var(--mantine-scale))}.m_33d18305{width:1%;min-width:calc(2.5rem * var(--mantine-scale));padding:0 calc(.5rem * var(--mantine-scale));text-align:right;-webkit-user-select:none;user-select:none;white-space:nowrap;vertical-align:top}:where([data-mantine-color-scheme=light]) .m_33d18305{color:var(--mantine-color-gray-5)}:where([data-mantine-color-scheme=dark]) .m_33d18305{color:var(--mantine-color-dark-3)}.m_80d0a2d1{padding:0 calc(.5rem * var(--mantine-scale));white-space:pre-wrap;overflow-wrap:anywhere;vertical-align:top}.m_4202718a:where([data-split]) .m_33d18305{width:auto}.m_4202718a:where([data-split]) .m_80d0a2d1{width:50%}.m_19fcd8b2{width:calc(.0625rem * var(--mantine-scale));height:calc(.0625rem * var(--mantine-scale));margin:calc(-.0625rem * var(--mantine-scale));clip:rect(0 0 0 0);white-space:nowrap;-webkit-user-select:none;user-select:none;border:0;padding:0;position:absolute;overflow:hidden}:where([data-mantine-color-scheme=light]) .m_c548bd6c{background-color:var(--diff-add-color,#087f5b14)}:where([data-mantine-color-scheme=dark]) .m_c548bd6c{background-color:var(--diff-add-color,#087f5b26)}:where([data-mantine-color-scheme=light]) .m_953f8ecc{background-color:var(--diff-remove-color,#c92a2a12)}:where([data-mantine-color-scheme=dark]) .m_953f8ecc{background-color:var(--diff-remove-color,#c92a2a26)}.m_cbd52a3c{color:var(--mantine-color-bright)}:where([data-mantine-color-scheme=light]) .m_cbd52a3c{background-color:var(--diff-add-highlight-color,#087f5b38)}:where([data-mantine-color-scheme=dark]) .m_cbd52a3c{background-color:var(--diff-add-highlight-color,#087f5b59)}.m_ce4a34dc{color:var(--mantine-color-bright)}:where([data-mantine-color-scheme=light]) .m_ce4a34dc{background-color:var(--diff-remove-highlight-color,#c92a2a33)}:where([data-mantine-color-scheme=dark]) .m_ce4a34dc{background-color:var(--diff-remove-highlight-color,#c92a2a59)}.m_7c19a9bb{padding:calc(.25rem * var(--mantine-scale)) calc(.5rem * var(--mantine-scale));cursor:pointer;-webkit-user-select:none;user-select:none;width:100%;font-family:var(--mantine-font-family);font-size:var(--mantine-font-size-xs);background:linear-gradient(to bottom, var(--mantine-color-body) 0%, transparent 50%, var(--mantine-color-body) 100%);color:var(--mantine-color-dimmed);border:none;justify-content:center;align-items:center;transition:color .15s;display:flex}.m_7c19a9bb:hover{color:var(--mantine-color-text)}.m_7c19a9bb:focus{outline-offset:calc(-.125rem * var(--mantine-scale))}.m_7bbb8747{width:calc(.0625rem * var(--mantine-scale));min-width:calc(.0625rem * var(--mantine-scale));padding:0}:where([data-mantine-color-scheme=light]) .m_7bbb8747{border-left:1px solid var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_7bbb8747{border-left:1px solid var(--mantine-color-dark-4)}
@@ -0,0 +1,2 @@
1
+ import{F as e,d as t,dt as n,in as r,l as i,tn as a}from"./index-CU0HB-J7.js";import{A as o,B as s,C as c,D as l,F as u,G as d,H as f,I as p,J as m,K as ee,L as h,M as g,O as _,P as te,S as v,St as ne,T as y,U as re,V as ie,Y as ae,Z as b,_t as oe,at as x,bt as se,dt as ce,et as le,gt as ue,h as de,ht as fe,it as S,j as C,k as w,lt as pe,mt as me,nt as he,ot as T,p as ge,pt as E,q as _e,rt as D,s as ve,st as ye,t as be,tt as xe,v as Se,vt as Ce,x as we,xt as O,y as Te,yt as Ee,z as De}from"./dist-BCHbQlae.js";import{a as Oe,n as ke,p as Ae}from"./highlight-CB6hGb5A.js";import{i as je,n as Me,o as Ne,r as Pe}from"./dist-70Le0T2N.js";var k=r(a(),1),Fe=e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=Be(e.state,n.from);return r.line?Le(e):r.block?ze(e):!1};function Ie(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=e(t,n);return i?(r(n.update(i)),!0):!1}}var Le=Ie(We,0),Re=Ie(Ue,0),ze=Ie((e,t)=>Ue(e,t,He(t)),0);function Be(e,t){let n=e.languageDataAt(`commentTokens`,t,1);return n.length?n[0]:{}}var A=50;function Ve(e,{open:t,close:n},r,i){let a=e.sliceDoc(r-A,r),o=e.sliceDoc(i,i+A),s=/\s*$/.exec(a)[0].length,c=/^\s*/.exec(o)[0].length,l=a.length-s;if(a.slice(l-t.length,l)==t&&o.slice(c,c+n.length)==n)return{open:{pos:r-s,margin:s&&1},close:{pos:i+c,margin:c&&1}};let u,d;i-r<=100?u=d=e.sliceDoc(r,i):(u=e.sliceDoc(r,r+A),d=e.sliceDoc(i-A,i));let f=/^\s*/.exec(u)[0].length,p=/\s*$/.exec(d)[0].length,m=d.length-p-n.length;return u.slice(f,f+t.length)==t&&d.slice(m,m+n.length)==n?{open:{pos:r+f+t.length,margin:+!!/\s/.test(u.charAt(f+t.length))},close:{pos:i-p-n.length,margin:+!!/\s/.test(d.charAt(m-1))}}:null}function He(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:e.doc.lineAt(n.to-1));let a=t.length-1;a>=0&&t[a].to>r.from?t[a].to=i.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return t}function Ue(e,t,n=t.selection.ranges){let r=n.map(e=>Be(t,e.from).block);if(!r.every(e=>e))return null;let i=n.map((e,n)=>Ve(t,r[n],e.from,e.to));if(e!=2&&!i.every(e=>e))return{changes:t.changes(n.map((e,t)=>i[t]?[]:[{from:e.from,insert:r[t].open+` `},{from:e.to,insert:` `+r[t].close}]))};if(e!=1&&i.some(e=>e)){let e=[];for(let t=0,n;t<i.length;t++)if(n=i[t]){let i=r[t],{open:a,close:o}=n;e.push({from:a.pos-i.open.length,to:a.pos+a.margin},{from:o.pos-o.margin,to:o.pos+i.close.length})}return{changes:e}}return null}function We(e,t,n=t.selection.ranges){let r=[],i=-1;e:for(let{from:e,to:a}of n){let n=r.length,o=1e9,s;for(let n=e;n<=a;){let c=t.doc.lineAt(n);if(s==null&&(s=Be(t,c.from).line,!s))continue e;if(c.from>i&&(e==a||a>c.from)){i=c.from;let e=/^\s*/.exec(c.text)[0].length,t=e==c.length,n=c.text.slice(e,e+s.length)==s?e:-1;e<c.text.length&&e<o&&(o=e),r.push({line:c,comment:n,token:s,indent:e,empty:t,single:!1})}n=c.to+1}if(o<1e9)for(let e=n;e<r.length;e++)r[e].indent<r[e].line.text.length&&(r[e].indent=o);r.length==n+1&&(r[n].single=!0)}if(e!=2&&r.some(e=>e.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:n,indent:i,empty:a,single:o}of r)(o||!a)&&e.push({from:t.from+i,insert:n+` `});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(e!=1&&r.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:n,token:i}of r)if(n>=0){let r=t.from+n,a=r+i.length;t.text[a-t.from]==` `&&a++,e.push({from:r,to:a})}return{changes:e}}return null}var Ge=le.define(),Ke=le.define(),qe=ye.define(),Je=ye.define({combine(e){return Ee(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}}),Ye=me.define({create(){return P.empty},update(e,t){let n=t.state.facet(Je),r=t.annotation(Ge);if(r){let i=M.fromTransaction(t,r.selection),a=r.side,o=a==0?e.undone:e.done;return o=i?tt(o,o.length,n.minDepth,i):ot(o,t.startState.selection),new P(a==0?r.rest:o,a==0?o:r.rest)}let i=t.annotation(Ke);if((i==`full`||i==`before`)&&(e=e.isolate()),t.annotation(ue.addToHistory)===!1)return t.changes.empty?e:e.addMapping(t.changes.desc);let a=M.fromTransaction(t),o=t.annotation(ue.time),s=t.annotation(ue.userEvent);return a?e=e.addChanges(a,o,s,n,t):t.selection&&(e=e.addSelection(t.startState.selection,o,s,n.newGroupDelay)),(i==`full`||i==`after`)&&(e=e.isolate()),e},toJSON(e){return{done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}},fromJSON(e){return new P(e.done.map(M.fromJSON),e.undone.map(M.fromJSON))}});function Xe(e={}){return[Ye,Je.of(e),C.domEventHandlers({beforeinput(e,t){let n=e.inputType==`historyUndo`?Qe:e.inputType==`historyRedo`?j:null;return n?(e.preventDefault(),n(t)):!1}})]}function Ze(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let i=n.field(Ye,!1);if(!i)return!1;let a=i.pop(e,n,t);return a?(r(a),!0):!1}}var Qe=Ze(0,!1),j=Ze(1,!1),$e=Ze(0,!0),et=Ze(1,!0),M=class e{constructor(e,t,n,r,i){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=i}setSelAfter(t){return new e(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){return{changes:this.changes?.toJSON(),mapped:this.mapped?.toJSON(),startSelection:this.startSelection?.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(t){return new e(t.changes&&he.fromJSON(t.changes),[],t.mapped&&xe.fromJSON(t.mapped),t.startSelection&&x.fromJSON(t.startSelection),t.selectionsAfter.map(x.fromJSON))}static fromTransaction(t,n){let r=N;for(let e of t.startState.facet(qe)){let n=e(t);n.length&&(r=r.concat(n))}return!r.length&&t.changes.empty?null:new e(t.changes.invert(t.startState.doc),r,void 0,n||t.startState.selection,N)}static selection(t){return new e(void 0,N,void 0,void 0,t)}};function tt(e,t,n,r){let i=t+1>n+20?t-n-1:0,a=e.slice(i,t);return a.push(r),a}function nt(e,t){let n=[],r=!1;return e.iterChangedRanges((e,t)=>n.push(e,t)),t.iterChangedRanges((e,t,i,a)=>{for(let e=0;e<n.length;){let t=n[e++],o=n[e++];a>=t&&i<=o&&(r=!0)}}),r}function rt(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((e,n)=>e.empty!=t.ranges[n].empty).length===0}function it(e,t){return e.length?t.length?e.concat(t):e:t}var N=[],at=200;function ot(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-at));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),tt(e,e.length-1,1e9,n.setSelAfter(r)))}return[M.selection([t])]}function st(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function ct(e,t){if(!e.length)return e;let n=e.length,r=N;for(;n;){let i=lt(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let t=e.slice(0,n);return t[n-1]=i,t}t=i.mapped,n--,r=i.selectionsAfter}return r.length?[M.selection(r)]:N}function lt(e,t,n){let r=it(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):N,n);if(!e.changes)return M.selection(r);let i=e.changes.map(t),a=t.mapDesc(e.changes,!0),o=e.mapped?e.mapped.composeDesc(a):a;return new M(i,E.mapEffects(e.effects,t),o,e.startSelection.map(a),r)}var ut=/^(input\.type|delete)($|\.)/,P=class e{constructor(e,t,n=0,r=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new e(this.done,this.undone):this}addChanges(t,n,r,i,a){let o=this.done,s=o[o.length-1];return o=s&&s.changes&&!s.changes.empty&&t.changes&&(!r||ut.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(a,nt(s.changes,t.changes))||r==`input.type.compose`)?tt(o,o.length-1,i.minDepth,new M(t.changes.compose(s.changes),it(E.mapEffects(t.effects,s.changes),s.effects),s.mapped,s.startSelection,N)):tt(o,o.length,i.minDepth,t),new e(o,N,n,r)}addSelection(t,n,r,i){let a=this.done.length?this.done[this.done.length-1].selectionsAfter:N;return a.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&rt(a[a.length-1],t)?this:new e(ot(this.done,t),this.undone,n,r)}addMapping(t){return new e(ct(this.done,t),ct(this.undone,t),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=e==0?this.done:this.undone;if(r.length==0)return null;let i=r[r.length-1],a=i.selectionsAfter[0]||(i.startSelection?i.startSelection.map(i.changes.invertedDesc,1):t.selection);if(n&&i.selectionsAfter.length)return t.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:Ge.of({side:e,rest:st(r),selection:a}),userEvent:e==0?`select.undo`:`select.redo`,scrollIntoView:!0});if(i.changes){let n=r.length==1?N:r.slice(0,r.length-1);return i.mapped&&(n=ct(n,i.mapped)),t.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:Ge.of({side:e,rest:n,selection:a}),filter:!1,userEvent:e==0?`undo`:`redo`,scrollIntoView:!0})}return null}};P.empty=new P(N,N);var dt=[{key:`Mod-z`,run:Qe,preventDefault:!0},{key:`Mod-y`,mac:`Mod-Shift-z`,run:j,preventDefault:!0},{linux:`Ctrl-Shift-z`,run:j,preventDefault:!0},{key:`Mod-u`,run:$e,preventDefault:!0},{key:`Alt-u`,mac:`Mod-Shift-u`,run:et,preventDefault:!0}];function F(e,t){return x.create(e.ranges.map(t),e.mainIndex)}function I(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:`select`})}function L({state:e,dispatch:t},n){let r=F(e.selection,n);return!r.eq(e.selection,!0)&&(t(I(e,r)),!0)}function R(e,t){return x.cursor(t?e.to:e.from)}function ft(e,t){return L(e,n=>n.empty?e.moveByChar(n,t):R(n,t))}function z(e){return e.textDirectionAt(e.state.selection.main.head)==o.LTR}var pt=e=>ft(e,!z(e)),mt=e=>ft(e,z(e));function ht(e,t){return L(e,n=>n.empty?e.moveByGroup(n,t):R(n,t))}var gt=e=>ht(e,!z(e)),_t=e=>ht(e,z(e));typeof Intl<`u`&&Intl.Segmenter;function vt(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function B(e,t,n){let r=_(e).resolveInner(t.head),i=n?Ae.closedBy:Ae.openedBy;for(let a=t.head;;){let t=n?r.childAfter(a):r.childBefore(a);if(!t)break;vt(e,t,i)?r=t:a=n?t.to:t.from}let a=r.type.prop(i),o,s;return s=a&&(o=n?y(e,r.from,1):y(e,r.to,-1))&&o.matched?n?o.end.to:o.end.from:n?r.to:r.from,x.cursor(s,n?-1:1)}var yt=e=>L(e,t=>B(e.state,t,!z(e))),bt=e=>L(e,t=>B(e.state,t,z(e)));function xt(e,t){return L(e,n=>{if(!n.empty)return R(n,t);let r=e.moveVertically(n,t);return r.head==n.head?e.moveToLineBoundary(n,t):r})}var St=e=>xt(e,!1),Ct=e=>xt(e,!0);function wt(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,n=0,r=0,i;if(t){for(let t of e.state.facet(C.scrollMargins)){let i=t(e);i?.top&&(n=Math.max(i?.top,n)),i?.bottom&&(r=Math.max(i?.bottom,r))}i=e.scrollDOM.clientHeight-n-r}else i=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:t,height:Math.max(e.defaultLineHeight,i-5)}}function Tt(e,t){let n=wt(e),{state:r}=e,i=F(r.selection,r=>r.empty?e.moveVertically(r,t,n.height):R(r,t));if(i.eq(r.selection))return!1;let a;if(n.selfScroll){let t=e.coordsAtPos(r.selection.main.head),o=e.scrollDOM.getBoundingClientRect(),s=o.top+n.marginTop,c=o.bottom-n.marginBottom;t&&t.top>s&&t.bottom<c&&(a=C.scrollIntoView(i.main.head,{y:`start`,yMargin:t.top-s}))}return e.dispatch(I(r,i),{effects:a}),!0}var Et=e=>Tt(e,!1),Dt=e=>Tt(e,!0);function V(e,t,n){let r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){let n=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;n&&t.head!=r.from+n&&(i=x.cursor(r.from+n))}return i}var Ot=e=>L(e,t=>V(e,t,!0)),kt=e=>L(e,t=>V(e,t,!1)),At=e=>L(e,t=>V(e,t,!z(e))),jt=e=>L(e,t=>V(e,t,z(e))),Mt=e=>L(e,t=>e.moveToLineBoundary(t,!1,!1)),Nt=e=>L(e,t=>e.moveToLineBoundary(t,!0,!1));function Pt(e,t,n){let r=!1,i=F(e.selection,t=>{let i=y(e,t.head,-1)||y(e,t.head,1)||t.head>0&&y(e,t.head-1,1)||t.head<e.doc.length&&y(e,t.head+1,-1);if(!i||!i.end)return t;r=!0;let a=i.start.from==t.head?i.end.to:i.end.from;return n?x.range(t.anchor,a):x.cursor(a)});return r?(t(I(e,i)),!0):!1}var Ft=({state:e,dispatch:t})=>Pt(e,t,!1);function H(e,t,n){let r=F(e.state.selection,e=>{e.undirectional&&e.head>=e.anchor!=t&&(e=x.range(e.head,e.anchor));let r=n(e);return x.range(e.anchor,r.head,r.goalColumn,r.bidiLevel||void 0,r.assoc)});return!r.eq(e.state.selection)&&(e.dispatch(I(e.state,r)),!0)}function It(e,t){return H(e,t,n=>e.moveByChar(n,t))}var Lt=e=>It(e,!z(e)),Rt=e=>It(e,z(e));function zt(e,t){return H(e,t,n=>e.moveByGroup(n,t))}var Bt=e=>zt(e,!z(e)),Vt=e=>zt(e,z(e)),Ht=e=>{let t=!z(e);return H(e,t,n=>B(e.state,n,t))},Ut=e=>{let t=z(e);return H(e,t,n=>B(e.state,n,t))};function Wt(e,t){return H(e,t,n=>e.moveVertically(n,t))}var Gt=e=>Wt(e,!1),Kt=e=>Wt(e,!0);function qt(e,t){return H(e,t,n=>e.moveVertically(n,t,wt(e).height))}var Jt=e=>qt(e,!1),Yt=e=>qt(e,!0),Xt=e=>H(e,!0,t=>V(e,t,!0)),Zt=e=>H(e,!1,t=>V(e,t,!1)),Qt=e=>{let t=!z(e);return H(e,t,n=>V(e,n,t))},$t=e=>{let t=z(e);return H(e,t,n=>V(e,n,t))},en=e=>H(e,!1,t=>x.cursor(e.lineBlockAt(t.head).from)),tn=e=>H(e,!0,t=>x.cursor(e.lineBlockAt(t.head).to)),nn=({state:e,dispatch:t})=>(t(I(e,{anchor:0})),!0),rn=({state:e,dispatch:t})=>(t(I(e,{anchor:e.doc.length})),!0),an=({state:e,dispatch:t})=>(t(I(e,{anchor:e.selection.main.anchor,head:0})),!0),on=({state:e,dispatch:t})=>(t(I(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),sn=({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:`select`})),!0),cn=({state:e,dispatch:t})=>{let n=Tn(e).map(({from:t,to:n})=>x.undirectionalRange(t,Math.min(n+1,e.doc.length)));return t(e.update({selection:x.create(n),userEvent:`select`})),!0},ln=({state:e,dispatch:t})=>{let n=F(e.selection,t=>{let n=_(e),r=n.resolveStack(t.from,1);if(t.empty){let e=n.resolveStack(t.from,-1);e.node.from>=r.node.from&&e.node.to<=r.node.to&&(r=e)}for(let e=r;e;e=e.next){let{node:n}=e;if((n.from<t.from&&n.to>=t.to||n.to>t.to&&n.from<=t.from)&&e.next)return x.undirectionalRange(n.from,n.to)}return t});return!n.eq(e.selection)&&(t(I(e,n)),!0)};function un(e,t){let{state:n}=e,r=n.selection,i=n.selection.ranges.slice();for(let r of n.selection.ranges){let a=n.doc.lineAt(r.head);if(t?a.to<e.state.doc.length:a.from>0)for(let n=r;;){let r=e.moveVertically(n,t);if(r.head<a.from||r.head>a.to){i.some(e=>e.head==r.head)||i.push(r);break}if(r.head==n.head)break;n=r}}return i.length!=r.ranges.length&&(e.dispatch(I(n,x.create(i,i.length-1))),!0)}var dn=e=>un(e,!1),fn=e=>un(e,!0),pn=({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=x.create([n.main]):n.main.empty||(r=x.create([x.cursor(n.main.head)])),r?(t(I(e,r)),!0):!1};function U(e,t){if(e.state.readOnly)return!1;let n=`delete.selection`,{state:r}=e,i=r.changeByRange(r=>{let{from:i,to:a}=r;if(i==a){let o=t(r);o<i?(n=`delete.backward`,o=W(e,o,!1)):o>i&&(n=`delete.forward`,o=W(e,o,!0)),i=Math.min(i,o),a=Math.max(a,o)}else i=W(e,i,!1),a=W(e,a,!0);return i==a?{range:r}:{changes:{from:i,to:a},range:x.cursor(i,i<r.head?-1:1)}});return!i.changes.empty&&(e.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n==`delete.selection`?C.announce.of(r.phrase(`Selection deleted`)):void 0})),!0)}function W(e,t,n){if(e instanceof C)for(let r of e.state.facet(C.atomicRanges).map(t=>t(e)))r.between(t,t,(e,r)=>{e<t&&r>t&&(t=n?r:e)});return t}var mn=(e,t,n)=>U(e,r=>{let i=r.from,{state:a}=e,o=a.doc.lineAt(i),s,c;if(n&&!t&&i>o.from&&i<o.from+200&&!/[^ \t]/.test(s=o.text.slice(0,i-o.from))){if(s[s.length-1]==` `)return i-1;let e=se(s,a.tabSize)%Se(a)||Se(a);for(let t=0;t<e&&s[s.length-1-t]==` `;t++)i--;c=i}else c=O(o.text,i-o.from,t,t)+o.from,c==i&&o.number!=(t?a.doc.lines:1)?c+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(o.text.slice(c-o.from,i-o.from))&&(c=O(o.text,c-o.from,!1,!1)+o.from);return c}),hn=e=>mn(e,!1,!0),gn=e=>mn(e,!0,!1),_n=(e,t)=>U(e,n=>{let r=n.head,{state:i}=e,a=i.doc.lineAt(r),o=i.charCategorizer(r);for(let e=null;;){if(r==(t?a.to:a.from)){r==n.head&&a.number!=(t?i.doc.lines:1)&&(r+=t?1:-1);break}let s=O(a.text,r-a.from,t)+a.from,c=a.text.slice(Math.min(r,s)-a.from,Math.max(r,s)-a.from),l=o(c);if(e!=null&&l!=e)break;(c!=` `||r!=n.head)&&(e=l),r=s}return r}),vn=e=>_n(e,!1),yn=e=>_n(e,!0),bn=e=>U(e,t=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),xn=e=>U(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}),Sn=e=>U(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),Cn=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:fe.of([``,``])},range:x.cursor(e.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:`input`})),!0},wn=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(t=>{if(!t.empty||t.from==0||t.from==e.doc.length)return{range:t};let n=t.from,r=e.doc.lineAt(n),i=n==r.from?n-1:O(r.text,n-r.from,!1)+r.from,a=n==r.to?n+1:O(r.text,n-r.from,!0)+r.from;return{changes:{from:i,to:a,insert:e.doc.slice(n,a).append(e.doc.slice(i,n))},range:x.cursor(a)}});return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:`move.character`})),!0)};function Tn(e){let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.from),a=e.doc.lineAt(r.to);if(!r.empty&&r.to==a.from&&(a=e.doc.lineAt(r.to-1)),n>=i.number){let e=t[t.length-1];e.to=a.to,e.ranges.push(r)}else t.push({from:i.from,to:a.to,ranges:[r]});n=a.number+1}return t}function En(e,t,n){if(e.readOnly)return!1;let r=[],i=[];for(let t of Tn(e)){if(n?t.to==e.doc.length:t.from==0)continue;let a=e.doc.lineAt(n?t.to+1:t.from-1),o=a.length+1;if(n){r.push({from:t.to,to:a.to},{from:t.from,insert:a.text+e.lineBreak});for(let n of t.ranges)i.push(x.range(Math.min(e.doc.length,n.anchor+o),Math.min(e.doc.length,n.head+o)))}else{r.push({from:a.from,to:t.from},{from:t.to,insert:e.lineBreak+a.text});for(let e of t.ranges)i.push(x.range(e.anchor-o,e.head-o))}}return r.length?(t(e.update({changes:r,scrollIntoView:!0,selection:x.create(i,e.selection.mainIndex),userEvent:`move.line`})),!0):!1}var Dn=({state:e,dispatch:t})=>En(e,t,!1),On=({state:e,dispatch:t})=>En(e,t,!0);function kn(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of Tn(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});let i=e.changes(r);return t(e.update({changes:i,selection:e.selection.map(i,n?1:-1),scrollIntoView:!0,userEvent:`input.copyline`})),!0}var An=({state:e,dispatch:t})=>kn(e,t,!1),jn=({state:e,dispatch:t})=>kn(e,t,!0),Mn=e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(Tn(t).map(({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n}))),r=F(t.selection,t=>{let n;if(e.lineWrapping){let r=e.lineBlockAt(t.head),i=e.coordsAtPos(t.head,t.assoc||1);i&&(n=r.bottom+e.documentTop-i.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)}).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:`delete.line`}),!0};function Nn(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=_(e).resolveInner(t),r=n.childBefore(t),i=n.childAfter(t),a;return r&&i&&r.to<=t&&i.from>=t&&(a=r.type.prop(Ae.closedBy))&&a.indexOf(i.name)>-1&&e.doc.lineAt(r.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}var Pn=In(!1),Fn=In(!0);function In(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange(n=>{let{from:r,to:i}=n,a=t.doc.lineAt(r),o=!e&&r==i&&Nn(t,r);e&&(r=i=(i<=a.to?a:t.doc.lineAt(i)).to);let s=new be(t,{simulateBreak:r,simulateDoubleBreak:!!o}),c=Te(s,r);for(c??=se(/^\s*/.exec(t.doc.lineAt(r).text)[0],t.tabSize);i<a.to&&/\s/.test(a.text[i-a.from]);)i++;o?{from:r,to:i}=o:r>a.from&&r<a.from+100&&!/\S/.test(a.text.slice(0,r))&&(r=a.from);let l=[``,v(t,c)];return o&&l.push(v(t,s.lineIndent(a.from,-1))),{changes:{from:r,to:i,insert:fe.of(l)},range:x.cursor(r+1+l[1].length)}});return n(t.update(r,{scrollIntoView:!0,userEvent:`input`})),!0}}function Ln(e,t){let n=-1;return e.changeByRange(r=>{let i=[];for(let a=r.from;a<=r.to;){let o=e.doc.lineAt(a);o.number>n&&(r.empty||r.to>o.from)&&(t(o,i,r),n=o.number),a=o.to+1}let a=e.changes(i);return{changes:i,range:x.range(a.mapPos(r.anchor,1),a.mapPos(r.head,1))}})}var Rn=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new be(e,{overrideIndentation:e=>n[e]??-1}),i=Ln(e,(t,i,a)=>{let o=Te(r,t.from);if(o==null)return;/\S/.test(t.text)||(o=0);let s=/^\s*/.exec(t.text)[0],c=v(e,o);(s!=c||a.from<t.from+s.length)&&(n[t.from]=o,i.push({from:t.from,to:t.from+s.length,insert:c}))});return i.changes.empty||t(e.update(i,{userEvent:`indent`})),!0},zn=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(Ln(e,(t,n)=>{n.push({from:t.from,insert:e.facet(c)})}),{userEvent:`input.indent`})),!0),Bn=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(Ln(e,(t,n)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let i=se(r,e.tabSize),a=0,o=v(e,Math.max(0,i-Se(e)));for(;a<r.length&&a<o.length&&r.charCodeAt(a)==o.charCodeAt(a);)a++;n.push({from:t.from+a,to:t.from+r.length,insert:o.slice(a)})}),{userEvent:`delete.dedent`})),!0),Vn=e=>(e.setTabFocusMode(),!0),Hn=[{key:`Ctrl-b`,run:pt,shift:Lt,preventDefault:!0},{key:`Ctrl-f`,run:mt,shift:Rt},{key:`Ctrl-p`,run:St,shift:Gt},{key:`Ctrl-n`,run:Ct,shift:Kt},{key:`Ctrl-a`,run:Mt,shift:en},{key:`Ctrl-e`,run:Nt,shift:tn},{key:`Ctrl-d`,run:gn},{key:`Ctrl-h`,run:hn},{key:`Ctrl-k`,run:bn},{key:`Ctrl-Alt-h`,run:vn},{key:`Ctrl-o`,run:Cn},{key:`Ctrl-t`,run:wn},{key:`Ctrl-v`,run:Dt}],Un=[{key:`ArrowLeft`,run:pt,shift:Lt,preventDefault:!0},{key:`Mod-ArrowLeft`,mac:`Alt-ArrowLeft`,run:gt,shift:Bt,preventDefault:!0},{mac:`Cmd-ArrowLeft`,run:At,shift:Qt,preventDefault:!0},{key:`ArrowRight`,run:mt,shift:Rt,preventDefault:!0},{key:`Mod-ArrowRight`,mac:`Alt-ArrowRight`,run:_t,shift:Vt,preventDefault:!0},{mac:`Cmd-ArrowRight`,run:jt,shift:$t,preventDefault:!0},{key:`ArrowUp`,run:St,shift:Gt,preventDefault:!0},{mac:`Cmd-ArrowUp`,run:nn,shift:an},{mac:`Ctrl-ArrowUp`,run:Et,shift:Jt},{key:`ArrowDown`,run:Ct,shift:Kt,preventDefault:!0},{mac:`Cmd-ArrowDown`,run:rn,shift:on},{mac:`Ctrl-ArrowDown`,run:Dt,shift:Yt},{key:`PageUp`,run:Et,shift:Jt},{key:`PageDown`,run:Dt,shift:Yt},{key:`Home`,run:kt,shift:Zt,preventDefault:!0},{key:`Mod-Home`,run:nn,shift:an},{key:`End`,run:Ot,shift:Xt,preventDefault:!0},{key:`Mod-End`,run:rn,shift:on},{key:`Enter`,run:Pn,shift:Pn},{key:`Mod-a`,run:sn},{key:`Backspace`,run:hn,shift:hn,preventDefault:!0},{key:`Delete`,run:gn,preventDefault:!0},{key:`Mod-Backspace`,mac:`Alt-Backspace`,run:vn,preventDefault:!0},{key:`Mod-Delete`,mac:`Alt-Delete`,run:yn,preventDefault:!0},{mac:`Mod-Backspace`,run:xn,preventDefault:!0},{mac:`Mod-Delete`,run:Sn,preventDefault:!0}].concat(Hn.map(e=>({mac:e.key,run:e.run,shift:e.shift}))),Wn=[{key:`Alt-ArrowLeft`,mac:`Ctrl-ArrowLeft`,run:yt,shift:Ht},{key:`Alt-ArrowRight`,mac:`Ctrl-ArrowRight`,run:bt,shift:Ut},{key:`Alt-ArrowUp`,run:Dn},{key:`Shift-Alt-ArrowUp`,run:An},{key:`Alt-ArrowDown`,run:On},{key:`Shift-Alt-ArrowDown`,run:jn},{key:`Mod-Alt-ArrowUp`,run:dn},{key:`Mod-Alt-ArrowDown`,run:fn},{key:`Escape`,run:pn},{key:`Mod-Enter`,run:Fn},{key:`Alt-l`,mac:`Ctrl-l`,run:cn},{key:`Mod-i`,run:ln,preventDefault:!0},{key:`Mod-[`,run:Bn},{key:`Mod-]`,run:zn},{key:`Mod-Alt-\\`,run:Rn},{key:`Shift-Mod-k`,run:Mn},{key:`Shift-Mod-\\`,run:Ft},{key:`Mod-/`,run:Fe},{key:`Alt-A`,mac:`Ctrl-A`,run:Re},{key:`Ctrl-m`,mac:`Shift-Alt-m`,run:Vn}].concat(Un),Gn={key:`Tab`,run:zn,shift:Bn},Kn=typeof String.prototype.normalize==`function`?e=>e.normalize(`NFKD`):e=>e,G=class{constructor(e,t,n=0,r=e.length,i,a){this.test=a,this.value={from:0,to:0,precise:!1},this.done=!1,this.matches=[],this.buffer=``,this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=i?e=>i(Kn(e)):Kn,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return oe(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=ne(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=Ce(e);let r=this.normalize(t);if(r.length)for(let e=0,i=n,a=!0;;e++){let n=r.charCodeAt(e),o=this.match(n,i,a,this.bufferPos+this.bufferStart,e==r.length-1);if(o)return this.value=o,this;if(e==r.length-1)break;a&&e<t.length&&t.charCodeAt(e)==n?i++:a=!1}}}match(e,t,n,r,i){let a=null;for(let t=0;t<this.matches.length;){let n=this.matches[t],o=!1;this.query.charCodeAt(n.index)==e&&(n.index==this.query.length-1?a={from:n.from,to:r,precise:i&&n.precise}:(n.index++,o=!0)),o?t++:this.matches.splice(t,1)}return this.query.charCodeAt(0)==e&&(this.query.length==1?a={from:t,to:r,precise:n&&i}:this.matches.push({from:t,index:1,precise:n})),a&&this.test&&!this.test(a.from,a.to,this.buffer,this.bufferStart)&&(a=null),a}};typeof Symbol<`u`&&(G.prototype[Symbol.iterator]=function(){return this});var qn={from:-1,to:-1,match:/.*/.exec(``),precise:!0},Jn=`gm`+(/x/.unicode==null?``:`u`),Yn=class{constructor(e,t,n,r=0,i=e.length){if(this.text=e,this.to=i,this.curLine=``,this.done=!1,this.value=qn,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new Qn(e,t,n,r,i);this.re=new RegExp(t,Jn+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.iter=e.iter();let a=e.lineAt(r);this.curLineStart=a.from,this.matchPos=er(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine=``:(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine=``:this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=er(this.text,r+ +(n==r)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<r||n>this.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,precise:!0,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}},Xn=new WeakMap,Zn=class e{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(t,n,r){let i=Xn.get(t);if(!i||i.from>=r||i.to<=n){let i=new e(n,t.sliceString(n,r));return Xn.set(t,i),i}if(i.from==n&&i.to==r)return i;let{text:a,from:o}=i;return o>n&&(a=t.sliceString(n,o)+a,o=n),i.to<r&&(a+=t.sliceString(i.to,r)),Xn.set(t,new e(o,a)),new e(n,a.slice(n-o,r-o))}},Qn=class{constructor(e,t,n,r,i){this.text=e,this.to=i,this.done=!1,this.value=qn,this.matchPos=er(e,r),this.re=new RegExp(t,Jn+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.flat=Zn.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if(this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10){if(this.matchPos=er(this.text,n+ +(e==n)),this.test&&!this.test(e,n,t))continue;return this.value={from:e,to:n,precise:!0,match:t},this}}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Zn.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}};typeof Symbol<`u`&&(Yn.prototype[Symbol.iterator]=Qn.prototype[Symbol.iterator]=function(){return this});function $n(e){try{return new RegExp(e,Jn),!0}catch{return!1}}function er(e,t){if(t>=e.length)return t;let n=e.lineAt(t),r;for(;t<n.to&&(r=n.text.charCodeAt(t-n.from))>=56320&&r<57344;)t++;return t}var tr=e=>{let t=p(e,`cm-goto-line`);if(t){let e=t.dom.querySelector(`input[type=text]`);return e&&e.select(),!0}let{state:n}=e,r=String(n.doc.lineAt(e.state.selection.main.head).number),{close:i,result:a}=m(e,{class:`cm-goto-line`,label:n.phrase(`Go to line`),input:{type:`text`,name:`line`,value:r},focus:!0,submitLabel:n.phrase(`go`)});return a.then(t=>{let r=t&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.elements.line.value);if(!r){e.dispatch({effects:i});return}let a=n.doc.lineAt(n.selection.main.head),[,o,s,c,l]=r,u=c?+c.slice(1):0,d=s?+s:a.number;if(s&&l){let e=d/100;o&&(e=e*(o==`-`?-1:1)+a.number/n.doc.lines),d=Math.round(n.doc.lines*e)}else s&&o&&(d=d*(o==`-`?-1:1)+a.number);let f=n.doc.line(Math.max(1,Math.min(n.doc.lines,d))),p=x.cursor(f.from+Math.max(0,Math.min(u,f.length)));e.dispatch({effects:[i,C.scrollIntoView(p.from,{y:`center`})],selection:p})}),!0},nr={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},rr=ye.define({combine(e){return Ee(e,nr,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function ir(e){let t=[ur,lr];return e&&t.push(rr.of(e)),t}var ar=w.mark({class:`cm-selectionMatch`}),or=w.mark({class:`cm-selectionMatch cm-selectionMatch-main`});function sr(e,t,n,r){return(n==0||e(t.sliceDoc(n-1,n))!=D.Word)&&(r==t.doc.length||e(t.sliceDoc(r,r+1))!=D.Word)}function cr(e,t,n,r){return e(t.sliceDoc(n,n+1))==D.Word&&e(t.sliceDoc(r-1,r))==D.Word}var lr=g.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(rr),{state:n}=e,r=n.selection;if(r.ranges.length>1)return w.none;let i=r.main,a,o=null;if(i.empty){if(!t.highlightWordAroundCursor)return w.none;let e=n.wordAt(i.head);if(!e)return w.none;o=n.charCategorizer(i.head),a=n.sliceDoc(e.from,e.to)}else{let e=i.to-i.from;if(e<t.minSelectionLength||e>200)return w.none;if(t.wholeWords){if(a=n.sliceDoc(i.from,i.to),o=n.charCategorizer(i.head),!(sr(o,n,i.from,i.to)&&cr(o,n,i.from,i.to)))return w.none}else if(a=n.sliceDoc(i.from,i.to),!a)return w.none}let s=[];for(let r of e.visibleRanges){let e=new G(n.doc,a,r.from,r.to);for(;!e.next().done;){let{from:r,to:a}=e.value;if((!o||sr(o,n,r,a))&&(i.empty&&r<=i.from&&a>=i.to?s.push(or.range(r,a)):(r>=i.to||a<=i.from)&&s.push(ar.range(r,a)),s.length>t.maxMatches))return w.none}}return w.set(s)}},{decorations:e=>e.decorations}),ur=C.baseTheme({".cm-selectionMatch":{backgroundColor:`#99ff7780`},".cm-searchMatch .cm-selectionMatch":{backgroundColor:`transparent`}}),dr=({state:e,dispatch:t})=>{let{selection:n}=e,r=x.create(n.ranges.map(t=>e.wordAt(t.head)||x.cursor(t.head)),n.mainIndex);return!r.eq(n)&&(t(e.update({selection:r})),!0)};function fr(e,t){let{main:n,ranges:r}=e.selection,i=e.wordAt(n.head),a=i&&i.from==n.from&&i.to==n.to;for(let n=!1,i=new G(e.doc,t,r[r.length-1].to);;)if(i.next(),i.done){if(n)return null;i=new G(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}else{if(n&&r.some(e=>e.from==i.value.from))continue;if(a){let t=e.wordAt(i.value.from);if(!t||t.from!=i.value.from||t.to!=i.value.to)continue}return i.value}}var pr=({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(e=>e.from===e.to))return dr({state:e,dispatch:t});let r=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some(t=>e.sliceDoc(t.from,t.to)!=r))return!1;let i=fr(e,r);return i?(t(e.update({selection:e.selection.addRange(x.range(i.from,i.to),!1),effects:C.scrollIntoView(i.to)})),!0):!1},K=ye.define({combine(e){return Ee(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new Hr(e),scrollToMatch:e=>C.scrollIntoView(e)})}}),mr=class{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||``,this.valid=!!this.search&&(!this.regexp||$n(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(e,t)=>t==`n`?`
2
+ `:t==`r`?`\r`:t==`t`?` `:`\\`)}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new Cr(this):new vr(this)}getCursor(e,t=0,n){let r=e.doc?e:T.create({doc:e});return n??=r.doc.length,this.regexp?J(this,r,t,n):q(this,r,t,n)}},hr=class{constructor(e){this.spec=e}};function gr(e,t,n){return(r,i,a,o)=>n&&!n(r,i,a,o)?!1:e(r>=o&&i<=o+a.length?a.slice(r-o,i-o):t.doc.sliceString(r,i),t,r,i)}function q(e,t,n,r){let i;return e.wholeWord&&(i=_r(t.doc,t.charCategorizer(t.selection.main.head))),e.test&&(i=gr(e.test,t,i)),new G(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),i)}function _r(e,t){return(n,r,i,a)=>((a>=n||a+i.length<=r)&&(a=Math.max(0,n-2),i=e.sliceString(a,Math.min(e.length,r+2))),(t(br(i,n-a))!=D.Word||t(xr(i,n-a))!=D.Word)&&(t(xr(i,r-a))!=D.Word||t(br(i,r-a))!=D.Word))}var vr=class extends hr{constructor(e){super(e)}nextMatch(e,t,n){let r=q(this.spec,e,n,e.doc.length).nextOverlapping();if(r.done){let n=Math.min(e.doc.length,t+this.spec.unquoted.length);r=q(this.spec,e,0,n).nextOverlapping()}return r.done||r.value.from==t&&r.value.to==n?null:r.value}prevMatchInRange(e,t,n){for(let r=n;;){let n=Math.max(t,r-1e4-this.spec.unquoted.length),i=q(this.spec,e,n,r),a=null;for(;!i.nextOverlapping().done;)a=i.value;if(a)return a;if(n==t)return null;r-=1e4}}prevMatch(e,t,n){let r=this.prevMatchInRange(e,0,t);return r||=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length),r&&(r.from!=t||r.to!=n)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=q(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=q(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}};function yr(e,t,n){return(r,i,a)=>(!n||n(r,i,a))&&e(a[0],t,r,i)}function J(e,t,n,r){let i;return e.wholeWord&&(i=Sr(t.charCategorizer(t.selection.main.head))),e.test&&(i=yr(e.test,t,i)),new Yn(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:i},n,r)}function br(e,t){return e.slice(O(e,t,!1),t)}function xr(e,t){return e.slice(t,O(e,t))}function Sr(e){return(t,n,r)=>!r[0].length||(e(br(r.input,r.index))!=D.Word||e(xr(r.input,r.index))!=D.Word)&&(e(xr(r.input,r.index+r[0].length))!=D.Word||e(br(r.input,r.index+r[0].length))!=D.Word)}var Cr=class extends hr{nextMatch(e,t,n){let r=J(this.spec,e,n,e.doc.length).next();return r.done&&(r=J(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let i=Math.max(t,n-r*1e4),a=J(this.spec,e,i,n),o=null;for(;!a.next().done;)o=a.value;if(o&&(i==t||o.from>i+10))return o;if(i==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if(n==`&`)return e.match[0];if(n==`$`)return`$`;for(let t=n.length;t>0;t--){let r=+n.slice(0,t);if(r>0&&r<e.match.length)return e.match[r]+n.slice(t)}return t})}matchAll(e,t){let n=J(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=J(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}},Y=E.define(),wr=E.define(),X=me.define({create(e){return new Tr(Ir(e).create(),null)},update(e,t){for(let n of t.effects)n.is(Y)?e=new Tr(n.value.create(),e.panel):n.is(wr)&&(e=new Tr(e.query,n.value?Fr:null));return e},provide:e=>ae.from(e,e=>e.panel)}),Tr=class{constructor(e,t){this.query=e,this.panel=t}},Er=w.mark({class:`cm-searchMatch`}),Dr=w.mark({class:`cm-searchMatch cm-searchMatch-selected`}),Or=g.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(X))}update(e){let t=e.state.field(X);(t!=e.startState.field(X)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return w.none;let{view:n}=this,r=new ce;for(let t=0,i=n.visibleRanges,a=i.length;t<a;t++){let{from:o,to:s}=i[t];for(;t<a-1&&s>i[t+1].from-500;)s=i[++t].to;e.highlight(n.state,o,s,(e,t)=>{let i=n.state.selection.ranges.some(n=>n.from==e&&n.to==t);r.add(e,t,i?Dr:Er)})}return r.finish()}},{decorations:e=>e.decorations});function Z(e){return t=>{let n=t.state.field(X,!1);return n&&n.query.spec.valid?e(t,n):zr(t)}}var kr=Z((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let i=x.single(r.from,r.to),a=e.state.facet(K);return e.dispatch({selection:i,effects:[Wr(e,r),a.scrollToMatch(i.main,e)],userEvent:`select.search`}),Rr(e),!0}),Ar=Z((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,i=t.prevMatch(n,r,r);if(!i)return!1;let a=x.single(i.from,i.to),o=e.state.facet(K);return e.dispatch({selection:a,effects:[Wr(e,i),o.scrollToMatch(a.main,e)],userEvent:`select.search`}),Rr(e),!0}),jr=Z((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!n||!n.length?!1:(e.dispatch({selection:x.create(n.map(e=>x.range(e.from,e.to))),userEvent:`select.search.matches`}),!0)}),Mr=({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,a=[],o=0;for(let t=new G(e.doc,e.sliceDoc(r,i));!t.next().done;){if(a.length>1e3)return!1;t.value.from==r&&(o=a.length),a.push(x.range(t.value.from,t.value.to))}return t(e.update({selection:x.create(a,o),userEvent:`select.search.matches`})),!0},Nr=Z((e,{query:t})=>{let{state:n}=e,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let a=t.nextMatch(n,r,r);if(!a)return!1;let o=a,s=[],c,l,u=[];o.precise?o.from==r&&o.to==i&&(l=n.toText(t.getReplacement(o)),s.push({from:o.from,to:o.to,insert:l}),o=t.nextMatch(n,o.from,o.to),u.push(C.announce.of(n.phrase(`replaced match on line $`,n.doc.lineAt(r).number)+`.`))):o=t.nextMatch(n,o.from,o.to);let d=e.state.changes(s);return o&&(c=x.single(o.from,o.to).map(d),u.push(Wr(e,o)),u.push(n.facet(K).scrollToMatch(c.main,e))),e.dispatch({changes:d,selection:c,effects:u,userEvent:`input.replace`}),!0}),Pr=Z((e,{query:t})=>{if(e.state.readOnly)return!1;let n=[];for(let r of t.matchAll(e.state,1e9)){let{from:e,to:i,precise:a}=r;a&&n.push({from:e,to:i,insert:t.getReplacement(r)})}if(!n.length)return!1;let r=e.state.phrase(`replaced $ matches`,n.length)+`.`;return e.dispatch({changes:n,effects:C.announce.of(r),userEvent:`input.replace.all`}),!0});function Fr(e){return e.state.facet(K).createPanel(e)}function Ir(e,t){let n=e.selection.main,r=n.empty||n.to>n.from+100?``:e.sliceDoc(n.from,n.to);if(t&&!r)return t;let i=e.facet(K);return new mr({search:t?.literal??i.literal?r:r.replace(/\n/g,`\\n`),caseSensitive:t?.caseSensitive??i.caseSensitive,literal:t?.literal??i.literal,regexp:t?.regexp??i.regexp,wholeWord:t?.wholeWord??i.wholeWord})}function Lr(e){let t=h(e,Fr);return t&&t.dom.querySelector(`[main-field]`)}function Rr(e){let t=Lr(e);t&&t==e.root.activeElement&&t.select()}var zr=e=>{let t=e.state.field(X,!1);if(t&&t.panel){let n=Lr(e);if(n&&n!=e.root.activeElement){let r=Ir(e.state,t.query.spec);r.valid&&e.dispatch({effects:Y.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[wr.of(!0),t?Y.of(Ir(e.state,t.query.spec)):E.appendConfig.of(Kr)]});return!0},Br=e=>{let t=e.state.field(X,!1);if(!t||!t.panel)return!1;let n=h(e,Fr);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:wr.of(!1)}),!0},Vr=[{key:`Mod-f`,run:zr,scope:`editor search-panel`},{key:`F3`,run:kr,shift:Ar,scope:`editor search-panel`,preventDefault:!0},{key:`Mod-g`,run:kr,shift:Ar,scope:`editor search-panel`,preventDefault:!0},{key:`Escape`,run:Br,scope:`editor search-panel`},{key:`Mod-Shift-l`,run:Mr},{key:`Mod-Alt-g`,run:tr},{key:`Mod-d`,run:pr,preventDefault:!0}],Hr=class{constructor(e){this.view=e;let t=this.query=e.state.field(X).query.spec;this.commit=this.commit.bind(this),this.searchField=b(`input`,{value:t.search,placeholder:Q(e,`Find`),"aria-label":Q(e,`Find`),class:`cm-textfield`,name:`search`,form:``,"main-field":`true`,onchange:this.commit,onkeyup:this.commit}),this.replaceField=b(`input`,{value:t.replace,placeholder:Q(e,`Replace`),"aria-label":Q(e,`Replace`),class:`cm-textfield`,name:`replace`,form:``,onchange:this.commit,onkeyup:this.commit}),this.caseField=b(`input`,{type:`checkbox`,name:`case`,form:``,checked:t.caseSensitive,onchange:this.commit}),this.reField=b(`input`,{type:`checkbox`,name:`re`,form:``,checked:t.regexp,onchange:this.commit}),this.wordField=b(`input`,{type:`checkbox`,name:`word`,form:``,checked:t.wholeWord,onchange:this.commit});function n(e,t,n){return b(`button`,{class:`cm-button`,name:e,onclick:t,type:`button`},n)}this.dom=b(`div`,{onkeydown:e=>this.keydown(e),class:`cm-search`},[this.searchField,n(`next`,()=>kr(e),[Q(e,`next`)]),n(`prev`,()=>Ar(e),[Q(e,`previous`)]),n(`select`,()=>jr(e),[Q(e,`all`)]),b(`label`,null,[this.caseField,Q(e,`match case`)]),b(`label`,null,[this.reField,Q(e,`regexp`)]),b(`label`,null,[this.wordField,Q(e,`by word`)]),...e.state.readOnly?[]:[b(`br`),this.replaceField,n(`replace`,()=>Nr(e),[Q(e,`replace`)]),n(`replaceAll`,()=>Pr(e),[Q(e,`replace all`)])],b(`button`,{name:`close`,onclick:()=>Br(e),"aria-label":Q(e,`close`),type:`button`},[`×`])])}commit(){let e=new mr({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:Y.of(e)}))}keydown(e){_e(this.view,e,`search-panel`)?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Ar:kr)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),Nr(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(Y)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(K).top}};function Q(e,t){return e.state.phrase(t)}var Ur=30,$=/[\s\.,:;?!]/;function Wr(e,{from:t,to:n}){let r=e.state.doc.lineAt(t),i=e.state.doc.lineAt(n).to,a=Math.max(r.from,t-Ur),o=Math.min(i,n+Ur),s=e.state.sliceDoc(a,o);if(a!=r.from){for(let e=0;e<Ur;e++)if(!$.test(s[e+1])&&$.test(s[e])){s=s.slice(e);break}}if(o!=i){for(let e=s.length-1;e>s.length-Ur;e--)if(!$.test(s[e-1])&&$.test(s[e])){s=s.slice(0,e);break}}return C.announce.of(`${e.state.phrase(`current match`)}. ${s} ${e.state.phrase(`on line`)} ${r.number}.`)}var Gr=C.baseTheme({".cm-panel.cm-search":{padding:`2px 6px 4px`,position:`relative`,"& [name=close]":{position:`absolute`,top:`0`,right:`4px`,backgroundColor:`inherit`,border:`none`,font:`inherit`,padding:0,margin:0},"& input, & button, & label":{margin:`.2em .6em .2em 0`},"& input[type=checkbox]":{marginRight:`.2em`},"& label":{fontSize:`80%`,whiteSpace:`pre`}},"&light .cm-searchMatch":{backgroundColor:`#ffff0054`},"&dark .cm-searchMatch":{backgroundColor:`#00ffff8a`},"&light .cm-searchMatch-selected":{backgroundColor:`#ff6a0054`},"&dark .cm-searchMatch-selected":{backgroundColor:`#ff00ff8a`}}),Kr=[X,pe.low(Or),Gr],qr=r(n(),1),Jr=le.define(),Yr=/[\ud800-\udfff]/;function Xr(e,t){if(!Yr.test(e))return t;let n=0;for(let r=0;r<t;r++){let i=e.charCodeAt(r);i>=55296&&i<=56319&&r+1<t&&r++,n++}return n}function Zr(e,t){if(!Yr.test(e))return Math.min(t,e.length);let n=0;for(let r=0;n<e.length&&r<t;r++){let t=e.charCodeAt(n);n+=t>=55296&&t<=56319?2:1}return Math.min(n,e.length)}function Qr(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e.charCodeAt(r)===t.charCodeAt(r);)r++;let i=0;for(;i<n-r&&e.charCodeAt(e.length-1-i)===t.charCodeAt(t.length-1-i);)i++;return{from:r,to:e.length-i,insert:t.slice(r,t.length-i)}}var $r=e=>typeof e==`number`?`${e}px`:typeof e==`string`?e:void 0,ei=C.theme({"&":{flex:`1 1 auto`,minHeight:`0`,backgroundColor:`var(--mantine-color-body)`,color:`var(--mantine-color-text)`,border:`1px solid var(--mantine-color-default-border)`,borderRadius:`var(--mantine-radius-sm)`,fontSize:`var(--mantine-font-size-sm)`},"&.cm-focused":{outline:`2px solid var(--mantine-primary-color-filled)`,outlineOffset:`-1px`},".cm-scroller":{fontFamily:`var(--mantine-font-family-monospace)`,overflow:`auto`},".cm-content":{caretColor:`var(--mantine-color-text)`},".cm-cursor, .cm-dropCursor":{borderLeftColor:`var(--mantine-color-text)`},".cm-gutters":{backgroundColor:`var(--mantine-color-default-hover)`,color:`var(--mantine-color-dimmed)`,borderRight:`1px solid var(--mantine-color-default-border)`},".cm-activeLine":{backgroundColor:`color-mix(in srgb, var(--mantine-primary-color-filled) 6%, transparent)`},".cm-activeLineGutter":{backgroundColor:`color-mix(in srgb, var(--mantine-primary-color-filled) 12%, transparent)`},".cm-placeholder":{color:`var(--mantine-color-placeholder)`}});function ti({node:e,opts:n,onDoc:r,style:i}){let a=t(),o=e.id,p=(0,k.useRef)(null),m=(0,k.useRef)(null),h=(0,k.useRef)(r);h.current=r;let g=(0,k.useMemo)(()=>({lang:new S,ro:new S,ln:new S,tab:new S,wrap:new S,ph:new S,aria:new S}),[]),_=e=>e?[re(),s(),ge()]:[],v=e=>[T.tabSize.of(e),c.of(` `.repeat(e))];(0,k.useEffect)(()=>{let e=()=>{let e=a.store.get(o)?.props.debounce;return typeof e==`number`?e:300},t=0,r=()=>{let e=m.current;if(!e||!a.store.get(o)?.events.has(`selection_change`))return;a.commitNow(o);let t=e.state.doc.toString(),n=e.state.selection.main;a.report(o,`selection_change`,{value:{anchor:Xr(t,n.anchor),head:Xr(t,n.head)}})},i=C.updateListener.of(n=>{let i=n.transactions.some(e=>e.annotation(Jr));if(n.docChanged){let t=n.state.doc.toString();h.current?.(t),i||a.edit(o,t,`debounce`,e())}n.selectionSet&&!i&&a.store.get(o)?.events.has(`selection_change`)&&(clearTimeout(t),t=window.setTimeout(r,e()))}),s=f.of([{key:`Mod-s`,preventDefault:!0,run:e=>a.store.get(o)?.events.has(`save`)?(a.commitNow(o),a.emit(o,`save`,{value:e.state.doc.toString()}),!0):!1}]),c=C.domEventHandlers({focus:()=>{a.store.get(o)?.events.has(`focus`)&&a.emit(o,`focus`)},blur:()=>{a.commitNow(o),a.store.get(o)?.events.has(`blur`)&&a.emit(o,`blur`)}}),ne=a.store.get(o),y=a.store.drafts.get(o),re=String((y?y.value:ne?.props.value)??``),ae=T.create({doc:re,extensions:[g.ln.of(_(n.lineNumbers)),ie(),Xe(),te(),u(),T.allowMultipleSelections.of(!0),we(),l(Oe),ve(),Pe(),Me(),ee(),De(),ir(),s,f.of([...je,...Wn,...Vr,...dt,...de,...Ne,Gn]),g.lang.of([]),g.ro.of(T.readOnly.of(n.readOnly)),g.tab.of(v(n.tabSize)),g.wrap.of(n.wrap?C.lineWrapping:[]),g.ph.of(n.placeholder?d(n.placeholder):[]),g.aria.of(C.contentAttributes.of(n.label?{"aria-label":n.label}:{})),i,c,ei]}),b=new C({state:ae,parent:p.current});return m.current=b,h.current?.(re),a.store.refs.set(o,{focus:()=>b.focus(),blur:()=>b.contentDOM.blur(),el:p.current,command:(e,t)=>{let n=m.current;if(!n)return null;switch(e){case`undo`:return Qe(n);case`redo`:return j(n);case`set_selection`:{let e=t??{},r=n.state.doc.toString(),i=Zr(r,Number(e.anchor??0)),a=Zr(r,Number(e.head??e.anchor??0));return n.dispatch({selection:x.single(i,a),scrollIntoView:!0}),!0}default:throw Error(`CodeEditor has no command ${e}`)}}}),()=>{clearTimeout(t),a.commitNow(o),a.store.refs.delete(o),b.destroy(),m.current=null}},[a,o]);let ne=e.props.value;return(0,k.useEffect)(()=>{let e=m.current;if(!e||a.store.drafts.get(o))return;let t=String(ne??``),n=e.state.doc.toString();t!==n&&e.dispatch({changes:Qr(n,t),annotations:[Jr.of(!0),ue.addToHistory.of(!1)]})},[a,o,e.vrev,ne]),(0,k.useEffect)(()=>{let e=!0,t=m.current;if(t)return p.current?.removeAttribute(`data-language-ready`),ke(n.language).then(r=>{e&&m.current===t&&(t.dispatch({effects:g.lang.reconfigure(r??[])}),p.current?.setAttribute(`data-language-ready`,n.language))},e=>console.error(`[neutralino-ui] language pack failed to load`,e)),()=>{e=!1}},[g,n.language]),(0,k.useEffect)(()=>{m.current?.dispatch({effects:[g.ro.reconfigure(T.readOnly.of(n.readOnly)),g.ln.reconfigure(_(n.lineNumbers)),g.tab.reconfigure(v(n.tabSize)),g.wrap.reconfigure(n.wrap?C.lineWrapping:[]),g.ph.reconfigure(n.placeholder?d(n.placeholder):[]),g.aria.reconfigure(C.contentAttributes.of(n.label?{"aria-label":n.label}:{}))]})},[g,n.readOnly,n.lineNumbers,n.tabSize,n.wrap,n.placeholder,n.label]),(0,qr.jsx)(`div`,{ref:p,"data-code-editor":``,"data-language":n.language,style:{display:`flex`,flexDirection:`column`,...i}})}function ni(e,t={}){let n=e.props;return{language:typeof n.language==`string`?n.language:t.language??`plain`,readOnly:n.readOnly===!0,lineNumbers:typeof n.lineNumbers==`boolean`?n.lineNumbers:t.lineNumbers??!0,tabSize:typeof n.tabSize==`number`?n.tabSize:4,wrap:typeof n.wrap==`boolean`?n.wrap:t.wrap??!1,placeholder:typeof n.placeholder==`string`?n.placeholder:void 0,label:typeof n.label==`string`?n.label:typeof n[`aria-label`]==`string`?n[`aria-label`]:void 0}}function ri(e,t){let n=e.props;return{...i(e,t,Object.keys(t?.props??{})),label:n.label,description:n.description,error:n.error,required:n.required===!0}}function ii({node:t,contract:n}){return(0,qr.jsx)(e.Wrapper,{...ri(t,n),children:(0,qr.jsx)(ti,{node:t,opts:ni(t),style:{height:$r(t.props.height),maxHeight:$r(t.props.maxHeight)}})})}export{ti as CmEditor,ni as cmOptions,ii as default,ri as wrapperProps};
@@ -0,0 +1 @@
1
+ import{t as e}from"./dist-BXts23GT.js";var t=()=>e();export{t as load};
@@ -0,0 +1 @@
1
+ import{A as e,C as t,H as n,M as r,N as i,O as a,R as o,St as s,W as c,X as l,_t as u,at as d,ct as f,et as p,ft as m,gt as h,ht as g,j as _,k as v,lt as y,mt as b,pt as x,rt as S,st as ee,ut as te,vt as C,yt as ne}from"./dist-BCHbQlae.js";var w=class{constructor(e,t,n,r){this.state=e,this.pos=t,this.explicit=n,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=a(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(oe(e,!1));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e==`abort`&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}};function T(e){let t=Object.keys(e).join(``),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,``)),`[${n?`\\w`:``}${t.replace(/[^\w\s]/g,`\\$&`)}]`}function re(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e<r.length;e++)n[r[e]]=!0}let r=T(t)+T(n)+`*$`;return[RegExp(`^`+r),new RegExp(r)]}function E(e){let t=e.map(e=>typeof e==`string`?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:re(t);return e=>{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}function ie(e,t){return n=>{for(let t=a(n.state).resolveInner(n.pos,-1);t;t=t.parent){if(e.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(n)}}var ae=class{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}};function D(e){return e.selection.main.from}function oe(e,t){let{source:n}=e,r=t&&n[0]!=`^`,i=n[n.length-1]!=`$`;return!r&&!i?e:RegExp(`${r?`^`:``}(?:${n})${i?`$`:``}`,e.flags??(e.ignoreCase?`i`:``))}var O=p.define();function se(e,t,n,r){let{main:i}=e.selection,a=n-i.from,o=r-i.from;return{...e.changeByRange(s=>{if(s!=i&&n!=r&&e.sliceDoc(s.from+a,s.from+o)!=e.sliceDoc(n,r))return{range:s};let c=e.toText(t);return{changes:{from:s.from+a,to:r==i.from?s.to:s.from+o,insert:c},range:d.cursor(s.from+a+c.length)}}),scrollIntoView:!0,userEvent:`input.complete`}}var ce=new WeakMap;function le(e){if(!Array.isArray(e))return e;let t=ce.get(e);return t||ce.set(e,t=E(e)),t}var k=x.define(),A=x.define(),ue=class{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let n=u(e,t),r=C(n);this.chars.push(n);let i=e.slice(t,t+r),a=i.toUpperCase();this.folded.push(u(a==i?i.toLowerCase():a,0)),t+=r}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:r,precise:i,byWord:a}=this;if(t.length==1){let r=u(e,0),i=C(r),a=i==e.length?0:-100;if(r!=t[0]){if(r==n[0])a+=-200;else return null}return this.ret(a,[0,i])}let o=e.indexOf(this.pattern);if(o==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let c=t.length,l=0;if(o<0){for(let i=0,a=Math.min(e.length,200);i<a&&l<c;){let a=u(e,i);(a==t[l]||a==n[l])&&(r[l++]=i),i+=C(a)}if(l<c)return null}let d=0,f=0,p=!1,m=0,h=-1,g=-1,_=/[a-z]/.test(e),v=!0;for(let r=0,l=Math.min(e.length,200),y=0;r<l&&f<c;){let l=u(e,r);o<0&&(d<c&&l==t[d]&&(i[d++]=r),m<c&&(l==t[m]||l==n[m]?(m==0&&(h=r),g=r+1,m++):m=0));let b,x=l<255?l>=48&&l<=57||l>=97&&l<=122?2:+(l>=65&&l<=90):(b=s(l))==b.toLowerCase()?b==b.toUpperCase()?0:2:1;(!r||x==1&&_||y==0&&x!=0)&&(t[f]==l||n[f]==l&&(p=!0)?a[f++]=r:a.length&&(v=!1)),y=x,r+=C(l)}return f==c&&a[0]==0&&v?this.result(-100+(p?-200:0),a,e):m==c&&h==0?this.ret(-200-e.length+(g==e.length?0:-100),[0,g]):o>-1?this.ret(-700-e.length,[o,o+this.pattern.length]):m==c?this.ret(-900-e.length,[h,g]):f==c?this.result(-100+(p?-200:0)+-700+(v?0:-1100),a,e):t.length==2?null:this.result((r[0]?-700:0)-1300,r,e)}result(e,t,n){let r=[],i=0;for(let e of t){let t=e+(this.astral?C(u(n,e)):1);i&&r[i-1]==e?r[i-1]=t:(r[i++]=e,r[i++]=t)}return this.ret(e-n.length,r)}},de=class{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return n==null?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}},j=ee.define({combine(e){return ne(e,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>``,optionClass:()=>``,aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:fe,filterStrict:!1,compareCompletions:(e,t)=>(e.sortText||e.label).localeCompare(t.sortText||t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>M(e(n),t(n)),optionClass:(e,t)=>n=>M(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function M(e,t){return e?t?e+` `+t:e:t}function fe(t,n,r,i,a,o){let s=t.textDirection==e.RTL,c=s,l=!1,u=`top`,d,f,p=n.left-a.left,m=a.right-n.right,h=i.right-i.left,g=i.bottom-i.top;if(c&&p<Math.min(h,m)?c=!1:!c&&m<Math.min(h,p)&&(c=!0),h<=(c?p:m))d=Math.max(a.top,Math.min(r.top,a.bottom-g))-n.top,f=Math.min(400,c?p:m);else{l=!0,f=Math.min(400,(s?n.right:a.right-n.left)-30);let e=a.bottom-n.bottom;e>=g||e>n.top?d=r.bottom-n.top:(u=`bottom`,d=n.bottom-r.top)}let _=(n.bottom-n.top)/o.offsetHeight,v=(n.right-n.left)/o.offsetWidth;return{style:`${u}: ${d/_}px; max-width: ${f/v}px`,class:`cm-completionInfo-`+(l?s?`left-narrow`:`right-narrow`:c?`left`:`right`)}}var N=x.define();function pe(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement(`div`);return t.classList.add(`cm-completionIcon`),e.type&&t.classList.add(...e.type.split(/\s+/g).map(e=>`cm-completionIcon-`+e)),t.setAttribute(`aria-hidden`,`true`),t},position:20}),t.push({render(e,t,n,r){let i=document.createElement(`span`);i.className=`cm-completionLabel`;let a=e.displayLabel||e.label,o=0;for(let e=0;e<r.length;){let t=r[e++],n=r[e++];t>o&&i.appendChild(document.createTextNode(a.slice(o,t)));let s=i.appendChild(document.createElement(`span`));s.appendChild(document.createTextNode(a.slice(t,n))),s.className=`cm-completionMatchedText`,o=n}return o<a.length&&i.appendChild(document.createTextNode(a.slice(o))),i},position:50},{render(e){if(!e.detail)return null;let t=document.createElement(`span`);return t.className=`cm-completionDetail`,t.textContent=e.detail,t},position:80}),t.sort((e,t)=>e.position-t.position).map(e=>e.render)}function P(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let r=Math.ceil((e-t)/n);return{from:e-r*n,to:e-(r-1)*n}}var me=class{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass=``;let r=e.state.field(t),{options:i,selected:a}=r.open,o=e.state.facet(j);this.optionContent=pe(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=P(i.length,a,o.maxRenderedOptions),this.dom=document.createElement(`div`),this.dom.className=`cm-tooltip-autocomplete`,this.updateTooltipClass(e.state),this.dom.addEventListener(`mousedown`,n=>{let{options:r}=e.state.field(t).open;for(let t=n.target,i;t&&t!=this.dom;t=t.parentNode)if(t.nodeName==`LI`&&(i=/-(\d+)$/.exec(t.id))&&+i[1]<r.length){this.applyCompletion(e,r[+i[1]]),n.preventDefault();return}if(n.target==this.list){let t=this.list.classList.contains(`cm-completionListIncompleteTop`)&&n.clientY<this.list.firstChild.getBoundingClientRect().top?this.range.from-1:this.list.classList.contains(`cm-completionListIncompleteBottom`)&&n.clientY>this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;t!=null&&(e.dispatch({effects:N.of(t)}),n.preventDefault())}}),this.dom.addEventListener(`focusout`,t=>{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(j).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:A.of(null)})}),this.showOptions(i,r.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener(`scroll`,()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){let t=e.state.field(this.stateField),n=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),t!=n){let{options:r,selected:i,disabled:a}=t.open;n.open&&n.open.options==r||(this.range=P(r.length,i,e.state.facet(j).maxRenderedOptions),this.showOptions(r,t.id)),this.updateSel(),a!=n.open?.disabled&&this.dom.classList.toggle(`cm-tooltip-autocomplete-disabled`,!!a)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(` `))e&&this.dom.classList.remove(e);for(let e of t.split(` `))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=P(t.options.length,t.selected,this.view.state.facet(j).maxRenderedOptions),this.showOptions(t.options,e.id));let n=this.updateSelectedOption(t.selected);if(n){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:i}=r;if(!i)return;let a=typeof i==`string`?document.createTextNode(i):i(r);if(!a)return;`then`in a?a.then(t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,r)}).catch(e=>c(this.view.state,e,`completion info`)):(this.addInfoPane(a,r),n.setAttribute(`aria-describedby`,this.info.id))}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement(`div`);if(n.className=`cm-tooltip cm-completionInfo`,n.id=`cm-completionInfo-`+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:r}=e;n.appendChild(t),this.infoDestroy=r||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)n.nodeName!=`LI`||!n.id?r--:r==e?n.hasAttribute(`aria-selected`)||(n.setAttribute(`aria-selected`,`true`),t=n):n.hasAttribute(`aria-selected`)&&(n.removeAttribute(`aria-selected`),n.removeAttribute(`aria-describedby`));return t&&ge(this.list,t),t}measureInfo(){let e=this.dom.querySelector(`[aria-selected]`);if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),i=this.space;if(!i){let e=this.dom.ownerDocument.documentElement;i={left:0,top:0,right:e.clientWidth,bottom:e.clientHeight}}return r.top>Math.min(i.bottom,t.bottom)-10||r.bottom<Math.max(i.top,t.top)+10?null:this.view.state.facet(j).positionInfo(this.view,t,r,n,i,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className=`cm-tooltip cm-completionInfo `+(e.class||``)):this.info.style.cssText=`top: -1e6px`)}createListBox(e,t,n){let r=document.createElement(`ul`);r.id=t,r.setAttribute(`role`,`listbox`),r.setAttribute(`aria-expanded`,`true`),r.setAttribute(`aria-label`,this.view.state.phrase(`Completions`)),r.addEventListener(`mousedown`,e=>{e.target==r&&e.preventDefault()});let i=null;for(let a=n.from;a<n.to;a++){let{completion:o,match:s}=e[a],{section:c}=o;if(c){let e=typeof c==`string`?c:c.name;if(e!=i&&(a>n.from||n.from==0)){if(i=e,typeof c!=`string`&&c.header)r.appendChild(c.header(c));else{let t=r.appendChild(document.createElement(`completion-section`));t.textContent=e}}}let l=r.appendChild(document.createElement(`li`));l.id=t+`-`+a,l.setAttribute(`role`,`option`);let u=this.optionClass(o);u&&(l.className=u);for(let e of this.optionContent){let t=e(o,this.view.state,this.view,s);t&&l.appendChild(t)}}return n.from&&r.classList.add(`cm-completionListIncompleteTop`),n.to<e.length&&r.classList.add(`cm-completionListIncompleteBottom`),r}destroyInfo(){this.info&&=(this.infoDestroy&&this.infoDestroy(),this.info.remove(),null)}destroy(){this.destroyInfo()}};function he(e,t){return n=>new me(n,e,t)}function ge(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.height/e.offsetHeight;r.top<n.top?e.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(e.scrollTop+=(r.bottom-n.bottom)/i)}function F(e){return(e.boost||0)*100+(e.apply?10:0)+(e.info?5:0)+ +!!e.type}function _e(e,t){let n=[],r=null,i=null,a=e=>{n.push(e);let{section:t}=e.completion;if(t){r||=[];let e=typeof t==`string`?t:t.name;r.some(t=>t.name==e)||r.push(typeof t==`string`?{name:e}:t)}},o=t.facet(j);for(let r of e)if(r.hasResult()){let e=r.result.getMatch;if(r.result.filter===!1)for(let t of r.result.options)a(new ae(t,r.source,e?e(t):[],1e9-n.length));else{let n=t.sliceDoc(r.from,r.to),s,c=o.filterStrict?new de(n):new ue(n);for(let t of r.result.options)if(s=c.match(t.label)){let n=t.displayLabel?e?e(t,s.matched):[]:s.matched,o=s.score+(t.boost||0);if(a(new ae(t,r.source,n,o)),typeof t.section==`object`&&t.section.rank===`dynamic`){let{name:e}=t.section;i||=Object.create(null),i[e]=Math.max(o,i[e]||-1e9)}}}}if(r){let e=Object.create(null),t=0,a=(e,t)=>(e.rank===`dynamic`&&t.rank===`dynamic`?i[t.name]-i[e.name]:0)||(typeof e.rank==`number`?e.rank:1e9)-(typeof t.rank==`number`?t.rank:1e9)||(e.name<t.name?-1:1);for(let n of r.sort(a))t-=1e5,e[n.name]=t;for(let t of n){let{section:n}=t.completion;n&&(t.score+=e[typeof n==`string`?n:n.name])}}let s=[],c=null,l=o.compareCompletions;for(let e of n.sort((e,t)=>t.score-e.score||l(e.completion,t.completion))){let t=e.completion;!c||c.label!=t.label||c.detail!=t.detail||c.type!=null&&t.type!=null&&c.type!=t.type||c.apply!=t.apply||c.boost!=t.boost?s.push(e):F(e.completion)>F(c)&&(s[s.length-1]=e),c=e.completion}return s}var ve=class e{constructor(e,t,n,r,i,a){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=r,this.selected=i,this.disabled=a}setSelected(t,n){return t==this.selected||t>=this.options.length?this:new e(this.options,I(n,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,n,r,i,a,o){if(i&&!o&&t.some(e=>e.isPending))return i.setDisabled();let s=_e(t,n);if(!s.length)return i&&t.some(e=>e.isPending)?i.setDisabled():null;let c=n.facet(j).selectOnOpen?0:-1;if(i&&i.selected!=c&&i.selected!=-1){let e=i.options[i.selected].completion;for(let t=0;t<s.length;t++)if(s[t].completion==e){c=t;break}}return new e(s,I(r,c),{pos:t.reduce((e,t)=>t.hasResult()?Math.min(e,t.from):e,1e8),create:Te,above:a.aboveCursor},i?i.timestamp:Date.now(),c,!1)}map(t){return new e(this.options,this.attrs,{...this.tooltip,pos:t.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new e(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}},ye=class e{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new e(Ce,`cm-ac-`+Math.floor(Math.random()*2e6).toString(36),null)}update(t){let{state:n}=t,r=n.facet(j),i=(r.override||n.languageDataAt(`autocomplete`,D(n)).map(le)).map(e=>(this.active.find(t=>t.source==e)||new R(e,+!!this.active.some(e=>e.state!=0))).update(t,r));i.length==this.active.length&&i.every((e,t)=>e==this.active[t])&&(i=this.active);let a=this.open,o=t.effects.some(e=>e.is(B));a&&t.docChanged&&(a=a.map(t.changes)),t.selection||i.some(e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to))||!be(i,this.active)||o?a=ve.build(i,n,this.id,a,r,o):a&&a.disabled&&!i.some(e=>e.isPending)&&(a=null),!a&&i.every(e=>!e.isPending)&&i.some(e=>e.hasResult())&&(i=i.map(e=>e.hasResult()?new R(e.source,0):e));for(let e of t.effects)e.is(N)&&(a&&=a.setSelected(e.value,this.id));return i==this.active&&a==this.open?this:new e(i,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?xe:Se}};function be(e,t){if(e==t)return!0;for(let n=0,r=0;;){for(;n<e.length&&!e[n].hasResult();)n++;for(;r<t.length&&!t[r].hasResult();)r++;let i=n==e.length,a=r==t.length;if(i||a)return i==a;if(e[n++].result!=t[r++].result)return!1}}var xe={"aria-autocomplete":`list`},Se={};function I(e,t){let n={"aria-autocomplete":`list`,"aria-haspopup":`listbox`,"aria-controls":e};return t>-1&&(n[`aria-activedescendant`]=e+`-`+t),n}var Ce=[];function L(e,t){if(e.isUserEvent(`input.complete`)){let n=e.annotation(O);if(n&&t.activateOnCompletion(n))return 12}let n=e.isUserEvent(`input.type`);return n&&t.activateOnTyping?5:n?1:e.isUserEvent(`delete.backward`)?2:e.selection?8:e.docChanged?16:0}var R=class e{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return this.state==1}update(t,n){let r=L(t,n),i=this;(r&8||r&16&&this.touches(t))&&(i=new e(i.source,0)),r&4&&i.state==0&&(i=new e(this.source,1)),i=i.updateFor(t,r);for(let n of t.effects)if(n.is(k))i=new e(i.source,1,n.value);else if(n.is(A))i=new e(i.source,0);else if(n.is(B))for(let e of n.value)e.source==i.source&&(i=e);return i}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(D(e.state))}},z=class e extends R{constructor(e,t,n,r,i,a){super(e,3,t),this.limit=n,this.result=r,this.from=i,this.to=a}hasResult(){return!0}updateFor(t,n){if(!(n&3))return this.map(t.changes);let r=this.result;r.map&&!t.changes.empty&&(r=r.map(r,t.changes));let i=t.changes.mapPos(this.from),a=t.changes.mapPos(this.to,1),o=D(t.state);if(o>a||!r||n&2&&(D(t.startState)==this.from||o<this.limit))return new R(this.source,n&4?1:0);let s=t.changes.mapPos(this.limit);return we(r.validFor,t.state,i,a)?new e(this.source,this.explicit,s,r,i,a):r.update&&(r=r.update(r,i,a,new w(t.state,o,!1)))?new e(this.source,this.explicit,s,r,r.from,r.to??D(t.state)):new R(this.source,1,this.explicit)}map(t){if(t.empty)return this;let n=this.result.map?this.result.map(this.result,t):this.result;return n?new e(this.source,this.explicit,t.mapPos(this.limit),n,t.mapPos(this.from),t.mapPos(this.to,1)):new R(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}};function we(e,t,n,r){if(!e)return!1;let i=t.sliceDoc(n,r);return typeof e==`function`?e(i,n,r,t):oe(e,!0).test(i)}var B=x.define({map(e,t){return e.map(e=>e.map(t))}}),V=b.define({create(){return ye.start()},update(e,t){return e.update(t)},provide:e=>[l.from(e,e=>e.tooltip),_.contentAttributes.from(e,e=>e.attrs)]});function H(e,t){let n=t.completion.apply||t.completion.label,r=e.state.field(V).active.find(e=>e.source==t.source);return r instanceof z&&(typeof n==`string`?e.dispatch({...se(e.state,n,r.from,r.to),annotations:O.of(t.completion)}):n(e,t.completion,r.from,r.to),!0)}var Te=he(V,H);function U(e,t=`option`){return n=>{let r=n.state.field(V,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(j).interactionDelay)return!1;let i=1,a;t==`page`&&(a=o(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(a.dom.offsetHeight/a.dom.querySelector(`li`).offsetHeight)-1));let{length:s}=r.open.options,c=r.open.selected>-1?r.open.selected+i*(e?1:-1):e?0:s-1;return c<0?c=t==`page`?0:s-1:c>=s&&(c=t==`page`?s-1:0),n.dispatch({effects:N.of(c)}),!0}}var Ee=e=>{let t=e.state.field(V,!1);return e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(j).interactionDelay?!1:H(e,t.open.options[t.open.selected])},W=e=>e.state.field(V,!1)?(e.dispatch({effects:k.of(!0)}),!0):!1,De=e=>{let t=e.state.field(V,!1);return!t||!t.active.some(e=>e.state!=0)?!1:(e.dispatch({effects:A.of(null)}),!0)},Oe=class{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}},ke=50,Ae=1e3,je=r.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(V).active)t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(V),n=e.state.facet(j);if(!e.selectionSet&&!e.docChanged&&e.startState.field(V)==t)return;let r=e.transactions.some(e=>{let t=L(e,n);return t&8||(e.selection||e.docChanged)&&!(t&3)});for(let t=0;t<this.running.length;t++){let n=this.running[t];if(r||n.context.abortOnDocChange&&e.docChanged||n.updates.length+e.transactions.length>ke&&Date.now()-n.time>Ae){for(let e of n.context.abortListeners)try{e()}catch(e){c(this.view.state,e)}n.context.abortListeners=null,this.running.splice(t--,1)}else n.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some(e=>e.effects.some(e=>e.is(k)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some(e=>e.isPending&&!this.running.some(t=>t.active.source==e.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let t of e.transactions)t.isUserEvent(`input.type`)?this.composing=2:this.composing==2&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(V);for(let e of t.active)e.isPending&&!this.running.some(t=>t.active.source==e.source)&&this.startQuery(e);this.running.length&&t.open&&t.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(j).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=new w(t,D(t),e.explicit,this.view),r=new Oe(e,n);this.running.push(r),Promise.resolve(e.source(n)).then(e=>{r.context.aborted||(r.done=e||null,this.scheduleAccept())},e=>{this.view.dispatch({effects:A.of(null)}),c(this.view.state,e)})}scheduleAccept(){this.running.every(e=>e.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(j).updateSyncTime))}accept(){this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(j),n=this.view.state.field(V);for(let r=0;r<this.running.length;r++){let i=this.running[r];if(i.done===void 0)continue;if(this.running.splice(r--,1),i.done){let n=D(i.updates.length?i.updates[0].startState:this.view.state),r=Math.min(n,i.done.from+ +!i.active.explicit),a=new z(i.active.source,i.active.explicit,r,i.done,i.done.from,i.done.to??n);for(let e of i.updates)a=a.update(e,t);if(a.hasResult()){e.push(a);continue}}let a=n.active.find(e=>e.source==i.active.source);if(a&&a.isPending){if(i.done==null){let n=new R(i.active.source,0);for(let e of i.updates)n=n.update(e,t);n.isPending||e.push(n)}else this.startQuery(a)}}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:B.of(e)})}},{eventHandlers:{blur(e){let t=this.view.state.field(V,!1);if(t&&t.tooltip&&this.view.state.facet(j).closeOnBlur){let n=t.open&&o(this.view,t.open.tooltip);n&&n.dom.contains(e.relatedTarget)||setTimeout(()=>this.view.dispatch({effects:A.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:k.of(!1)}),20),this.composing=0}}}),Me=typeof navigator==`object`&&/Win/.test(navigator.platform),Ne=y.highest(_.domEventHandlers({keydown(e,t){let n=t.state.field(V,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||!e.key||e.key.length>1||e.ctrlKey&&!(Me&&e.altKey)||e.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(e=>e.source==r.source),a=r.completion.commitCharacters||i.result.commitCharacters;return a&&a.indexOf(e.key)>-1&&H(t,r),!1}})),G=_.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:`monospace`,whiteSpace:`nowrap`,overflow:`hidden auto`,maxWidth_fallback:`700px`,maxWidth:`min(700px, 95vw)`,minWidth:`250px`,maxHeight:`10em`,height:`100%`,listStyle:`none`,margin:0,padding:0,"& > li, & > completion-section":{padding:`1px 3px`,lineHeight:1.2},"& > li":{overflowX:`hidden`,textOverflow:`ellipsis`,cursor:`pointer`},"& > completion-section":{display:`list-item`,borderBottom:`1px solid silver`,paddingLeft:`0.5em`,opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#17c`,color:`white`},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#777`},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#347`,color:`white`},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#444`},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:`"···"`,opacity:.5,display:`block`,textAlign:`center`,cursor:`pointer`},".cm-tooltip.cm-completionInfo":{position:`absolute`,padding:`3px 9px`,width:`max-content`,maxWidth:`400px`,boxSizing:`border-box`,whiteSpace:`pre-line`},".cm-completionInfo.cm-completionInfo-left":{right:`100%`},".cm-completionInfo.cm-completionInfo-right":{left:`100%`},".cm-completionInfo.cm-completionInfo-left-narrow":{right:`30px`},".cm-completionInfo.cm-completionInfo-right-narrow":{left:`30px`},"&light .cm-snippetField":{backgroundColor:`#00000022`},"&dark .cm-snippetField":{backgroundColor:`#ffffff22`},".cm-snippetFieldPosition":{verticalAlign:`text-top`,width:0,height:`1.15em`,display:`inline-block`,margin:`0 -0.7px -.7em`,borderLeft:`1.4px dotted #888`},".cm-completionMatchedText":{textDecoration:`underline`},".cm-completionDetail":{marginLeft:`0.5em`,fontStyle:`italic`},".cm-completionIcon":{fontSize:`90%`,width:`.8em`,display:`inline-block`,textAlign:`center`,paddingRight:`.6em`,opacity:`0.6`,boxSizing:`content-box`},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:`'ƒ'`}},".cm-completionIcon-class":{"&:after":{content:`'○'`}},".cm-completionIcon-interface":{"&:after":{content:`'◌'`}},".cm-completionIcon-variable":{"&:after":{content:`'𝑥'`}},".cm-completionIcon-constant":{"&:after":{content:`'𝐶'`}},".cm-completionIcon-type":{"&:after":{content:`'𝑡'`}},".cm-completionIcon-enum":{"&:after":{content:`'∪'`}},".cm-completionIcon-property":{"&:after":{content:`'□'`}},".cm-completionIcon-keyword":{"&:after":{content:`'🔑︎'`}},".cm-completionIcon-namespace":{"&:after":{content:`'▢'`}},".cm-completionIcon-text":{"&:after":{content:`'abc'`,fontSize:`50%`,verticalAlign:`middle`}}}),Pe=class{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}},Fe=class e{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(t){let n=t.mapPos(this.from,-1,f.TrackDel),r=t.mapPos(this.to,1,f.TrackDel);return n==null||r==null?null:new e(this.field,n,r)}},Ie=class e{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,n){let r=[],i=[n],a=e.doc.lineAt(n),o=/^\s*/.exec(a.text)[0];for(let a of this.lines){if(r.length){let r=o,s=/^\t*/.exec(a)[0].length;for(let n=0;n<s;n++)r+=e.facet(t);i.push(n+r.length-s),a=r+a.slice(s)}r.push(a),n+=a.length+1}return{text:r,ranges:this.fieldPositions.map(e=>new Fe(e.field,i[e.line]+e.from,i[e.line]+e.to))}}static parse(t){let n=[],r=[],i=[],a;for(let e of t.split(/\r\n?|\n/)){for(;a=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(e);){let t=a[1]?+a[1]:null,o=a[2]||a[3]||``,s=-1;t===0&&(t=1e9);let c=o.replace(/\\[{}]/g,e=>e[1]);for(let e=0;e<n.length;e++)(t==null?c&&n[e].name==c:n[e].seq==t)&&(s=e);if(s<0){let e=0;for(;e<n.length&&(t==null||n[e].seq!=null&&n[e].seq<t);)e++;n.splice(e,0,{seq:t,name:c}),s=e;for(let e of i)e.field>=s&&e.field++}for(let e of i)if(e.line==r.length&&e.from>a.index){let t=a[2]?3+(a[1]||``).length:2;e.from-=t,e.to-=t}i.push(new Pe(s,r.length,a.index,a.index+c.length)),e=e.slice(0,a.index)+o+e.slice(a.index+a[0].length)}e=e.replace(/\\([{}])/g,(e,t,n)=>{for(let e of i)e.line==r.length&&e.from>n&&(e.from--,e.to--);return t}),r.push(e)}return new e(r,i)}},Le=v.widget({widget:new class extends i{toDOM(){let e=document.createElement(`span`);return e.className=`cm-snippetFieldPosition`,e}ignoreEvent(){return!1}}}),Re=v.mark({class:`cm-snippetField`}),K=class e{constructor(e,t){this.ranges=e,this.active=t,this.deco=v.set(e.map(e=>(e.from==e.to?Le:Re).range(e.from,e.to)),!0)}map(t){let n=[];for(let e of this.ranges){let r=e.map(t);if(!r)return null;n.push(r)}return new e(n,this.active)}selectionInsideField(e){return e.ranges.every(e=>this.ranges.some(t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))}},q=x.define({map(e,t){return e&&e.map(t)}}),ze=x.define(),J=b.define({create(){return null},update(e,t){for(let n of t.effects){if(n.is(q))return n.value;if(n.is(ze)&&e)return new K(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>_.decorations.from(e,e=>e?e.deco:v.none)});function Y(e,t){return d.create(e.filter(e=>e.field==t).map(e=>d.range(e.from,e.to)))}function Be(e){let t=Ie.parse(e);return(e,n,r,i)=>{let{text:a,ranges:o}=t.instantiate(e.state,r),{main:s}=e.state.selection,c={changes:{from:r,to:i==s.from?s.to:i,insert:g.of(a)},scrollIntoView:!0,annotations:n?[O.of(n),h.userEvent.of(`input.complete`)]:void 0};if(o.length&&(c.selection=Y(o,0)),o.some(e=>e.field>0)){let t=new K(o,0),n=c.effects=[q.of(t)];e.state.field(J,!1)===void 0&&n.push(x.appendConfig.of([J,We,Ke,G]))}e.dispatch(e.state.update(c))}}function Ve(e){return({state:t,dispatch:n})=>{let r=t.field(J,!1);if(!r||e<0&&r.active==0)return!1;let i=r.active+e,a=e>0&&!r.ranges.some(t=>t.field==i+e);return n(t.update({selection:Y(r.ranges,i),effects:q.of(a?null:new K(r.ranges,i)),scrollIntoView:!0})),!0}}var He=[{key:`Tab`,run:Ve(1),shift:Ve(-1)},{key:`Escape`,run:({state:e,dispatch:t})=>e.field(J,!1)?(t(e.update({effects:q.of(null)})),!0):!1}],Ue=ee.define({combine(e){return e.length?e[0]:He}}),We=y.highest(n.compute([Ue],e=>e.facet(Ue)));function Ge(e,t){return{...t,apply:Be(e)}}var Ke=_.domEventHandlers({mousedown(e,t){let n=t.state.field(J,!1),r;if(!n||(r=t.posAtCoords({x:e.clientX,y:e.clientY}))==null)return!1;let i=n.ranges.find(e=>e.from<=r&&e.to>=r);return!i||i.field==n.active?!1:(t.dispatch({selection:Y(n.ranges,i.field),effects:q.of(n.ranges.some(e=>e.field>i.field)?new K(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),X={brackets:[`(`,`[`,`{`,`'`,`"`],before:`)]}:;>`,stringPrefixes:[]},Z=x.define({map(e,t){return t.mapPos(e,-1,f.TrackAfter)??void 0}}),Q=new class extends m{};Q.startSide=1,Q.endSide=-1;var qe=b.define({create(){return te.empty},update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is(Z)&&(e=e.update({add:[Q.range(n.value,n.value+1)]}));return e}});function Je(){return[$e,qe]}var Ye=`()[]{}<>«»»«[]{}`;function Xe(e){for(let t=0;t<16;t+=2)if(Ye.charCodeAt(t)==e)return Ye.charAt(t+1);return s(e<128?e:e+1)}function Ze(e,t){return e.languageDataAt(`closeBrackets`,t)[0]||X}var Qe=typeof navigator==`object`&&/Android\b/.test(navigator.userAgent),$e=_.inputHandler.of((e,t,n,r)=>{if((Qe?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let i=e.state.selection.main;if(r.length>2||r.length==2&&C(u(r,0))==1||t!=i.from||n!=i.to)return!1;let a=tt(e.state,r);return a?(e.dispatch(a),!0):!1}),et=[{key:`Backspace`,run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Ze(e,e.selection.main.head).brackets||X.brackets,r=null,i=e.changeByRange(t=>{if(t.empty){let r=rt(e.doc,t.head);for(let i of n)if(i==r&&$(e.doc,t.head)==Xe(u(i,0)))return{changes:{from:t.head-i.length,to:t.head+i.length},range:d.cursor(t.head-i.length)}}return{range:r=t}});return r||t(e.update(i,{scrollIntoView:!0,userEvent:`delete.backward`})),!r}}];function tt(e,t){let n=Ze(e,e.selection.main.head),r=n.brackets||X.brackets;for(let i of r){let a=Xe(u(i,0));if(t==i)return a==i?ot(e,i,r.indexOf(i+i+i)>-1,n):it(e,i,a,n.before||X.before);if(t==a&&nt(e,e.selection.main.from))return at(e,i,a)}return null}function nt(e,t){let n=!1;return e.field(qe).between(0,e.doc.length,e=>{e==t&&(n=!0)}),n}function $(e,t){let n=e.sliceString(t,t+2);return n.slice(0,C(u(n,0)))}function rt(e,t){let n=e.sliceString(t-2,t);return C(u(n,0))==n.length?n:n.slice(1)}function it(e,t,n,r){let i=null,a=e.changeByRange(a=>{if(!a.empty)return{changes:[{insert:t,from:a.from},{insert:n,from:a.to}],effects:Z.of(a.to+t.length),range:d.range(a.anchor+t.length,a.head+t.length)};let o=$(e.doc,a.head);return!o||/\s/.test(o)||r.indexOf(o)>-1?{changes:{insert:t+n,from:a.head},effects:Z.of(a.head+t.length),range:d.cursor(a.head+t.length)}:{range:i=a}});return i?null:e.update(a,{scrollIntoView:!0,userEvent:`input.type`})}function at(e,t,n){let r=null,i=e.changeByRange(t=>t.empty&&$(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:d.cursor(t.head+n.length)}:r={range:t});return r?null:e.update(i,{scrollIntoView:!0,userEvent:`input.type`})}function ot(e,t,n,r){let i=r.stringPrefixes||X.stringPrefixes,a=null,o=e.changeByRange(r=>{if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:t,from:r.to}],effects:Z.of(r.to+t.length),range:d.range(r.anchor+t.length,r.head+t.length)};let o=r.head,s=$(e.doc,o),c;if(s==t){if(st(e,o))return{changes:{insert:t+t,from:o},effects:Z.of(o+t.length),range:d.cursor(o+t.length)};if(nt(e,o)){let r=n&&e.sliceDoc(o,o+t.length*3)==t+t+t?t+t+t:t;return{changes:{from:o,to:o+r.length,insert:r},range:d.cursor(o+r.length)}}}else if(n&&e.sliceDoc(o-2*t.length,o)==t+t&&(c=lt(e,o-2*t.length,i))>-1&&st(e,c))return{changes:{insert:t+t+t+t,from:o},effects:Z.of(o+t.length),range:d.cursor(o+t.length)};else if(e.charCategorizer(o)(s)!=S.Word&&lt(e,o,i)>-1&&!ct(e,o,t,i))return{changes:{insert:t+t,from:o},effects:Z.of(o+t.length),range:d.cursor(o+t.length)};return{range:a=r}});return a?null:e.update(o,{scrollIntoView:!0,userEvent:`input.type`})}function st(e,t){let n=a(e).resolveInner(t+1);return n.parent&&n.from==t}function ct(e,t,n,r){let i=a(e).resolveInner(t,-1),o=r.reduce((e,t)=>Math.max(e,t.length),0);for(let a=0;a<5;a++){let a=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),s=a.indexOf(n);if(!s||s>-1&&r.indexOf(a.slice(0,s))>-1){let t=i.firstChild;for(;t&&t.from==i.from&&t.to-t.from>n.length+s;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let c=i.to==t&&i.parent;if(!c)break;i=c}return!1}function lt(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=S.Word)return t;for(let i of n){let n=t-i.length;if(e.sliceDoc(n,t)==i&&r(e.sliceDoc(n-1,n))!=S.Word)return n}return-1}function ut(e={}){return[Ne,V,j.of(e),je,ft,G]}var dt=[{key:`Ctrl-Space`,run:W},{mac:"Alt-`",run:W},{mac:`Alt-i`,run:W},{key:`Escape`,run:De},{key:`ArrowDown`,run:U(!0)},{key:`ArrowUp`,run:U(!1)},{key:`PageDown`,run:U(!0,`page`)},{key:`PageUp`,run:U(!1,`page`)},{key:`Enter`,run:Ee}],ft=y.highest(n.computeN([j],e=>e.facet(j).defaultKeymap?[dt]:[]));export{E as a,Ge as c,et as i,ut as n,dt as o,Je as r,ie as s,w as t};