allyhub 0.7.1 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2295) hide show
  1. package/CHANGELOG.md +138 -0
  2. package/NOTICE +2 -2
  3. package/client.d.ts +12 -0
  4. package/dist/args.js +1 -1
  5. package/dist/audio-text.js +1 -1
  6. package/dist/cloud-hearing.js +1 -1
  7. package/dist/command.js +1 -1
  8. package/dist/commands/add.js +4 -4
  9. package/dist/commands/align.js +1 -1
  10. package/dist/commands/audio.js +1 -1
  11. package/dist/commands/auth.js +4 -4
  12. package/dist/commands/check.js +1 -1
  13. package/dist/commands/cloud-tools.js +1 -1
  14. package/dist/commands/cloud.js +1 -1
  15. package/dist/commands/dev.js +1 -1
  16. package/dist/commands/doctor.js +3 -3
  17. package/dist/commands/frames/common.js +1 -1
  18. package/dist/commands/frames/compare.js +1 -1
  19. package/dist/commands/frames/cuts.js +1 -1
  20. package/dist/commands/frames/doc.js +2 -0
  21. package/dist/commands/frames/file.js +1 -1
  22. package/dist/commands/frames/page.js +1 -1
  23. package/dist/commands/frames/piece.js +1 -1
  24. package/dist/commands/frames/sheet.js +1 -1
  25. package/dist/commands/frames.js +9 -8
  26. package/dist/commands/inspect/combos.js +1 -1
  27. package/dist/commands/inspect/common.js +1 -1
  28. package/dist/commands/inspect/contrast.js +1 -1
  29. package/dist/commands/inspect/facts.js +1 -1
  30. package/dist/commands/inspect/fidelity.js +1 -1
  31. package/dist/commands/inspect/joins.js +1 -1
  32. package/dist/commands/inspect/layout.js +1 -1
  33. package/dist/commands/inspect/motion.js +1 -1
  34. package/dist/commands/inspect/sheet.js +1 -1
  35. package/dist/commands/inspect/timeline.js +1 -1
  36. package/dist/commands/model.js +1 -1
  37. package/dist/commands/orgs.js +1 -1
  38. package/dist/commands/reference-text.js +1 -1
  39. package/dist/commands/reference.js +1 -1
  40. package/dist/commands/render.js +1 -1
  41. package/dist/commands/scenery-input.js +1 -1
  42. package/dist/commands/scenery-text.js +1 -1
  43. package/dist/commands/scenery.js +1 -1
  44. package/dist/commands/sheet.js +7 -7
  45. package/dist/commands/site.js +3 -3
  46. package/dist/commands/skills.js +1 -1
  47. package/dist/commands/slides.js +1 -1
  48. package/dist/commands/voice.js +1 -1
  49. package/dist/commands/words-text.js +1 -1
  50. package/dist/commands/words.js +1 -1
  51. package/dist/help.js +4 -3
  52. package/dist/lent/model-three.d.ts +2 -2
  53. package/dist/lent/model.d.ts +2 -2
  54. package/dist/lent/scenery-host-layer.d.ts +2 -2
  55. package/dist/main.js +4 -4
  56. package/dist/media.js +1 -1
  57. package/dist/node_modules/@allyhub/audio/dist/node/ffmpeg.js +2 -0
  58. package/dist/node_modules/@allyhub/audio/package.json +17 -0
  59. package/dist/node_modules/@allyhub/browser/dist/browser.js +2 -0
  60. package/dist/node_modules/@allyhub/browser/package.json +13 -0
  61. package/dist/node_modules/@allyhub/build/dist/code.d.ts +26 -0
  62. package/dist/node_modules/@allyhub/build/dist/code.js +4 -0
  63. package/dist/node_modules/@allyhub/build/dist/content.d.ts +69 -0
  64. package/dist/node_modules/@allyhub/build/dist/content.js +3 -0
  65. package/dist/node_modules/@allyhub/build/dist/data.d.ts +13 -0
  66. package/dist/node_modules/@allyhub/build/dist/data.js +3 -0
  67. package/dist/node_modules/@allyhub/build/dist/files.js +2 -0
  68. package/dist/node_modules/@allyhub/build/dist/fonts.d.ts +26 -0
  69. package/dist/node_modules/@allyhub/build/dist/fonts.js +4 -0
  70. package/dist/node_modules/@allyhub/build/dist/index.d.ts +21 -0
  71. package/dist/node_modules/@allyhub/build/dist/index.js +2 -0
  72. package/dist/node_modules/@allyhub/build/dist/matrix.d.ts +18 -0
  73. package/dist/node_modules/@allyhub/build/dist/matrix.js +2 -0
  74. package/dist/node_modules/@allyhub/build/dist/media.d.ts +10 -0
  75. package/dist/node_modules/@allyhub/build/dist/media.js +2 -0
  76. package/dist/node_modules/@allyhub/build/dist/messages.d.ts +48 -0
  77. package/dist/node_modules/@allyhub/build/dist/messages.js +3 -0
  78. package/dist/node_modules/@allyhub/build/dist/meta-worker.d.ts +62 -0
  79. package/dist/node_modules/@allyhub/build/dist/meta-worker.js +5 -0
  80. package/dist/node_modules/@allyhub/build/dist/meta.d.ts +24 -0
  81. package/dist/node_modules/@allyhub/build/dist/meta.js +2 -0
  82. package/dist/node_modules/@allyhub/build/dist/model-info.d.ts +6 -0
  83. package/dist/node_modules/@allyhub/build/dist/model-info.js +4 -0
  84. package/dist/node_modules/@allyhub/build/dist/plugin.d.ts +42 -0
  85. package/dist/node_modules/@allyhub/build/dist/plugin.js +13 -0
  86. package/dist/node_modules/@allyhub/build/dist/prepare.d.ts +115 -0
  87. package/dist/node_modules/@allyhub/build/dist/prepare.js +4 -0
  88. package/dist/node_modules/@allyhub/build/dist/references.d.ts +6 -0
  89. package/dist/node_modules/@allyhub/build/dist/references.js +2 -0
  90. package/dist/node_modules/@allyhub/build/dist/scan.d.ts +50 -0
  91. package/dist/node_modules/@allyhub/build/dist/scan.js +2 -0
  92. package/dist/node_modules/@allyhub/build/dist/sheet-code.d.ts +34 -0
  93. package/dist/node_modules/@allyhub/build/dist/sheet-code.js +2 -0
  94. package/dist/node_modules/@allyhub/build/dist/takes.d.ts +33 -0
  95. package/dist/node_modules/@allyhub/build/dist/takes.js +3 -0
  96. package/dist/node_modules/@allyhub/build/dist/types.d.ts +11 -0
  97. package/dist/node_modules/@allyhub/build/dist/types.js +6 -0
  98. package/dist/node_modules/@allyhub/build/dist/vite.js +3 -0
  99. package/dist/node_modules/@allyhub/build/package.json +13 -0
  100. package/dist/node_modules/@allyhub/chart/dist/chart-file.d.ts +11 -0
  101. package/dist/node_modules/@allyhub/chart/dist/chart-file.js +2 -0
  102. package/dist/node_modules/@allyhub/chart/dist/chart-xml.d.ts +33 -0
  103. package/dist/node_modules/@allyhub/chart/dist/chart-xml.js +3 -0
  104. package/dist/node_modules/@allyhub/chart/dist/chart.d.ts +206 -0
  105. package/dist/node_modules/@allyhub/chart/dist/chart.js +2 -0
  106. package/dist/node_modules/@allyhub/chart/dist/embedded.d.ts +15 -0
  107. package/dist/node_modules/@allyhub/chart/dist/embedded.js +3 -0
  108. package/dist/node_modules/@allyhub/chart/dist/index.d.ts +6 -0
  109. package/dist/node_modules/@allyhub/chart/dist/index.js +2 -0
  110. package/dist/node_modules/@allyhub/chart/dist/svg.d.ts +22 -0
  111. package/dist/node_modules/@allyhub/chart/dist/svg.js +2 -0
  112. package/dist/node_modules/@allyhub/chart/package.json +14 -0
  113. package/dist/node_modules/@allyhub/check/dist/cache.js +2 -0
  114. package/dist/node_modules/@allyhub/check/dist/check.js +4 -0
  115. package/dist/node_modules/@allyhub/check/dist/generated.js +2 -0
  116. package/dist/node_modules/@allyhub/check/dist/plans.js +3 -0
  117. package/dist/node_modules/@allyhub/check/dist/scenery.js +2 -0
  118. package/dist/node_modules/@allyhub/check/package.json +13 -0
  119. package/dist/node_modules/@allyhub/cloud/dist/blobs.js +2 -0
  120. package/dist/node_modules/@allyhub/cloud/dist/call.js +5 -0
  121. package/dist/node_modules/@allyhub/cloud/dist/catalog.js +2 -0
  122. package/dist/node_modules/@allyhub/cloud/dist/client.js +2 -0
  123. package/dist/node_modules/@allyhub/cloud/dist/config.js +2 -0
  124. package/dist/node_modules/@allyhub/cloud/dist/credentials.js +3 -0
  125. package/dist/node_modules/@allyhub/cloud/dist/errors.js +2 -0
  126. package/dist/node_modules/@allyhub/cloud/dist/index.js +2 -0
  127. package/dist/node_modules/@allyhub/cloud/dist/keychain.js +5 -0
  128. package/dist/node_modules/@allyhub/cloud/dist/records.js +4 -0
  129. package/dist/node_modules/@allyhub/cloud/dist/signin.js +4 -0
  130. package/dist/node_modules/@allyhub/cloud/dist/sites.js +2 -0
  131. package/dist/node_modules/@allyhub/cloud/dist/token.js +2 -0
  132. package/dist/node_modules/@allyhub/cloud/dist/uploads.js +3 -0
  133. package/dist/node_modules/@allyhub/cloud/dist/voice.js +2 -0
  134. package/dist/node_modules/@allyhub/cloud/package.json +13 -0
  135. package/dist/node_modules/@allyhub/components/package.json +12 -0
  136. package/dist/node_modules/@allyhub/dev-server/dist/background.js +2 -0
  137. package/dist/node_modules/@allyhub/dev-server/dist/card.js +2 -0
  138. package/dist/node_modules/@allyhub/dev-server/dist/exports.js +2 -0
  139. package/dist/node_modules/@allyhub/dev-server/dist/index.js +2 -0
  140. package/dist/node_modules/@allyhub/dev-server/dist/live.js +2 -0
  141. package/dist/node_modules/@allyhub/dev-server/dist/paths.js +2 -0
  142. package/dist/node_modules/@allyhub/dev-server/dist/project.js +2 -0
  143. package/dist/node_modules/@allyhub/dev-server/dist/reach.js +2 -0
  144. package/dist/node_modules/@allyhub/dev-server/dist/record.js +2 -0
  145. package/dist/node_modules/@allyhub/dev-server/dist/server.js +6 -0
  146. package/dist/node_modules/@allyhub/dev-server/dist/sound.js +2 -0
  147. package/dist/node_modules/@allyhub/dev-server/dist/tools.js +2 -0
  148. package/dist/node_modules/@allyhub/dev-server/dist/tree.js +2 -0
  149. package/dist/node_modules/@allyhub/dev-server/dist/validate.js +3 -0
  150. package/dist/node_modules/@allyhub/dev-server/dist/watcher.js +2 -0
  151. package/dist/node_modules/@allyhub/dev-server/dist/writer.js +3 -0
  152. package/dist/node_modules/@allyhub/dev-server/package.json +13 -0
  153. package/dist/node_modules/@allyhub/doc/dist/chart.d.ts +65 -0
  154. package/dist/node_modules/@allyhub/doc/dist/chart.js +2 -0
  155. package/dist/node_modules/@allyhub/doc/dist/color.d.ts +6 -0
  156. package/dist/node_modules/@allyhub/doc/dist/color.js +2 -0
  157. package/dist/node_modules/@allyhub/doc/dist/columns.d.ts +6 -0
  158. package/dist/node_modules/@allyhub/doc/dist/columns.js +2 -0
  159. package/dist/node_modules/@allyhub/doc/dist/component.d.ts +27 -0
  160. package/dist/node_modules/@allyhub/doc/dist/component.js +2 -0
  161. package/dist/node_modules/@allyhub/doc/dist/docx.d.ts +39 -0
  162. package/dist/node_modules/@allyhub/doc/dist/docx.js +5 -0
  163. package/dist/node_modules/@allyhub/doc/dist/html.d.ts +49 -0
  164. package/dist/node_modules/@allyhub/doc/dist/html.js +91 -0
  165. package/dist/node_modules/@allyhub/doc/dist/index.d.ts +13 -0
  166. package/dist/node_modules/@allyhub/doc/dist/index.js +2 -0
  167. package/dist/node_modules/@allyhub/doc/dist/markdown.d.ts +13 -0
  168. package/dist/node_modules/@allyhub/doc/dist/markdown.js +3 -0
  169. package/dist/node_modules/@allyhub/doc/dist/math.d.ts +11 -0
  170. package/dist/node_modules/@allyhub/doc/dist/math.js +2 -0
  171. package/dist/node_modules/@allyhub/doc/dist/model.d.ts +280 -0
  172. package/dist/node_modules/@allyhub/doc/dist/model.js +2 -0
  173. package/dist/node_modules/@allyhub/doc/dist/paper.d.ts +39 -0
  174. package/dist/node_modules/@allyhub/doc/dist/paper.js +2 -0
  175. package/dist/node_modules/@allyhub/doc/dist/parse.d.ts +24 -0
  176. package/dist/node_modules/@allyhub/doc/dist/parse.js +5 -0
  177. package/dist/node_modules/@allyhub/doc/dist/patch.js +11 -0
  178. package/dist/node_modules/@allyhub/doc/dist/write.d.ts +18 -0
  179. package/dist/node_modules/@allyhub/doc/dist/write.js +65 -0
  180. package/dist/node_modules/@allyhub/doc/package.json +17 -0
  181. package/dist/node_modules/@allyhub/export/dist/batch.js +4 -0
  182. package/dist/node_modules/@allyhub/export/dist/deck-fonts.js +2 -0
  183. package/dist/node_modules/@allyhub/export/dist/deck-pptx.js +2 -0
  184. package/dist/node_modules/@allyhub/export/dist/export.js +7 -0
  185. package/dist/node_modules/@allyhub/export/dist/names.js +2 -0
  186. package/dist/node_modules/@allyhub/export/package.json +13 -0
  187. package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +2520 -0
  188. package/dist/node_modules/@allyhub/formats/dist/data/slides.js +2 -0
  189. package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +2741 -0
  190. package/dist/node_modules/@allyhub/formats/package.json +15 -0
  191. package/dist/node_modules/@allyhub/jobs/dist/index.js +2 -0
  192. package/dist/node_modules/@allyhub/jobs/dist/jobs.js +3 -0
  193. package/dist/node_modules/@allyhub/jobs/dist/show.js +2 -0
  194. package/dist/node_modules/@allyhub/jobs/package.json +14 -0
  195. package/dist/node_modules/@allyhub/measure/dist/compare.js +2 -0
  196. package/dist/node_modules/@allyhub/measure/dist/contrast.js +2 -0
  197. package/dist/node_modules/@allyhub/measure/dist/cut-sheet.js +46 -0
  198. package/dist/node_modules/@allyhub/measure/dist/cuts.js +2 -0
  199. package/dist/node_modules/@allyhub/measure/dist/facts.js +2 -0
  200. package/dist/node_modules/@allyhub/measure/dist/fidelity.js +3 -0
  201. package/dist/node_modules/@allyhub/measure/dist/flat.js +2 -0
  202. package/dist/node_modules/@allyhub/measure/dist/loop.js +2 -0
  203. package/dist/node_modules/@allyhub/measure/dist/overlay.js +2 -0
  204. package/dist/node_modules/@allyhub/measure/dist/recording-report.js +2 -0
  205. package/dist/node_modules/@allyhub/measure/dist/reference/folder.js +4 -0
  206. package/dist/node_modules/@allyhub/measure/dist/reference/piece.js +2 -0
  207. package/dist/node_modules/@allyhub/measure/dist/reference/sections.js +2 -0
  208. package/dist/node_modules/@allyhub/measure/dist/reference/sets.js +2 -0
  209. package/dist/node_modules/@allyhub/measure/dist/reference/text.js +2 -0
  210. package/dist/node_modules/@allyhub/measure/dist/reference/video.js +2 -0
  211. package/dist/node_modules/@allyhub/measure/dist/seams.js +2 -0
  212. package/dist/node_modules/@allyhub/measure/dist/sound-measures.js +2 -0
  213. package/dist/node_modules/@allyhub/measure/dist/sound-report.js +2 -0
  214. package/dist/node_modules/@allyhub/measure/dist/still.js +2 -0
  215. package/dist/node_modules/@allyhub/measure/dist/version-voice.js +2 -0
  216. package/dist/node_modules/@allyhub/measure/package.json +13 -0
  217. package/dist/node_modules/@allyhub/media/dist/asr/parakeet.js +7 -0
  218. package/dist/node_modules/@allyhub/media/dist/asr/transcribe.d.ts +50 -0
  219. package/dist/node_modules/@allyhub/media/dist/asr/words.d.ts +7 -0
  220. package/dist/node_modules/@allyhub/media/dist/cache.js +2 -0
  221. package/dist/node_modules/@allyhub/media/dist/ocr/text.js +4 -0
  222. package/dist/node_modules/@allyhub/media/dist/sheet.d.ts +67 -0
  223. package/dist/node_modules/@allyhub/media/dist/tools.d.ts +35 -0
  224. package/dist/node_modules/@allyhub/media/dist/tools.js +2 -0
  225. package/dist/node_modules/@allyhub/media/dist/vision/index-media.js +3 -0
  226. package/dist/node_modules/@allyhub/media/dist/vision/run.js +4 -0
  227. package/dist/node_modules/@allyhub/media/dist/vision/runtime.js +8 -0
  228. package/dist/node_modules/@allyhub/media/dist/vision/types.d.ts +2 -0
  229. package/dist/node_modules/@allyhub/media/dist/worker-process.d.ts +3 -0
  230. package/dist/node_modules/@allyhub/media/dist/worker-process.js +2 -0
  231. package/dist/node_modules/@allyhub/media/package.json +13 -0
  232. package/dist/node_modules/@allyhub/model/NOTICE +26 -0
  233. package/dist/node_modules/@allyhub/model/dist/build-job.d.ts +34 -0
  234. package/dist/node_modules/@allyhub/model/dist/build-job.js +2 -0
  235. package/dist/node_modules/@allyhub/model/dist/build-worker.js +2 -0
  236. package/dist/node_modules/@allyhub/model/dist/build.js +3 -0
  237. package/dist/node_modules/@allyhub/model/dist/capabilities.d.ts +22 -0
  238. package/dist/node_modules/@allyhub/model/dist/capabilities.js +2 -0
  239. package/dist/node_modules/@allyhub/model/dist/data.js +2 -0
  240. package/dist/node_modules/@allyhub/model/dist/material-eval.js +2 -0
  241. package/dist/node_modules/@allyhub/model/dist/material-nodes.js +2 -0
  242. package/dist/node_modules/@allyhub/model/package.json +25 -0
  243. package/dist/node_modules/@allyhub/ooxml/package.json +26 -0
  244. package/dist/node_modules/@allyhub/project/dist/component-stills.js +2 -0
  245. package/dist/node_modules/@allyhub/project/dist/console.js +2 -0
  246. package/dist/node_modules/@allyhub/project/dist/deck-keys.js +2 -0
  247. package/dist/node_modules/@allyhub/project/dist/deck-pool.js +2 -0
  248. package/dist/node_modules/@allyhub/project/dist/digest.js +2 -0
  249. package/dist/node_modules/@allyhub/project/dist/index.js +2 -0
  250. package/dist/node_modules/@allyhub/project/dist/ledger.js +2 -0
  251. package/dist/node_modules/@allyhub/project/dist/media-index.js +2 -0
  252. package/dist/node_modules/@allyhub/project/dist/page.js +4 -0
  253. package/dist/node_modules/@allyhub/project/dist/says.js +2 -0
  254. package/dist/node_modules/@allyhub/project/dist/scenery.js +2 -0
  255. package/dist/node_modules/@allyhub/project/dist/session.js +2 -0
  256. package/dist/node_modules/@allyhub/project/dist/stills.js +2 -0
  257. package/dist/node_modules/@allyhub/project/dist/version.js +2 -0
  258. package/dist/node_modules/@allyhub/project/package.json +13 -0
  259. package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +339 -0
  260. package/dist/node_modules/@allyhub/protocol/dist/app.js +2 -0
  261. package/dist/node_modules/@allyhub/protocol/dist/auth.d.ts +119 -0
  262. package/dist/node_modules/@allyhub/protocol/dist/auth.js +2 -0
  263. package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +325 -0
  264. package/dist/node_modules/@allyhub/protocol/dist/cloud.js +2 -0
  265. package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +551 -0
  266. package/dist/node_modules/@allyhub/protocol/dist/editor.js +2 -0
  267. package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +290 -0
  268. package/dist/node_modules/@allyhub/protocol/dist/frame.js +2 -0
  269. package/dist/node_modules/@allyhub/protocol/dist/index.d.ts +23 -0
  270. package/dist/node_modules/@allyhub/protocol/dist/index.js +2 -0
  271. package/dist/node_modules/@allyhub/protocol/dist/jobs.d.ts +91 -0
  272. package/dist/node_modules/@allyhub/protocol/dist/jobs.js +2 -0
  273. package/dist/node_modules/@allyhub/protocol/dist/notes.d.ts +187 -0
  274. package/dist/node_modules/@allyhub/protocol/dist/notes.js +2 -0
  275. package/dist/node_modules/@allyhub/protocol/dist/registry.d.ts +191 -0
  276. package/dist/node_modules/@allyhub/protocol/dist/registry.js +2 -0
  277. package/dist/node_modules/@allyhub/protocol/dist/routes.js +2 -0
  278. package/dist/node_modules/@allyhub/protocol/dist/sites.d.ts +297 -0
  279. package/dist/node_modules/@allyhub/protocol/dist/sites.js +2 -0
  280. package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +417 -0
  281. package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +2 -0
  282. package/dist/node_modules/@allyhub/protocol/dist/sources.d.ts +14 -0
  283. package/dist/node_modules/@allyhub/protocol/dist/sources.js +2 -0
  284. package/dist/node_modules/@allyhub/protocol/dist/teams.d.ts +195 -0
  285. package/dist/node_modules/@allyhub/protocol/dist/teams.js +2 -0
  286. package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +477 -0
  287. package/dist/node_modules/@allyhub/protocol/dist/tools.js +2 -0
  288. package/dist/node_modules/@allyhub/protocol/package.json +14 -0
  289. package/dist/node_modules/@allyhub/registry/dist/polyhaven-client.js +3 -0
  290. package/dist/node_modules/@allyhub/registry/dist/registry.js +2 -0
  291. package/dist/node_modules/@allyhub/registry/package.json +13 -0
  292. package/dist/node_modules/@allyhub/render/dist/composite.js +2 -0
  293. package/dist/node_modules/@allyhub/render/dist/doc/drawn.js +27 -0
  294. package/dist/node_modules/@allyhub/render/dist/doc/index.js +2 -0
  295. package/dist/node_modules/@allyhub/render/dist/doc/pages.js +32 -0
  296. package/dist/node_modules/@allyhub/render/dist/doc/print.js +41 -0
  297. package/dist/node_modules/@allyhub/render/dist/encode.js +2 -0
  298. package/dist/node_modules/@allyhub/render/dist/errors.js +2 -0
  299. package/dist/node_modules/@allyhub/render/dist/exports.js +3 -0
  300. package/dist/node_modules/@allyhub/render/dist/ffmpeg.js +4 -0
  301. package/dist/node_modules/@allyhub/render/dist/footage.js +2 -0
  302. package/dist/node_modules/@allyhub/render/dist/junction.js +2 -0
  303. package/dist/node_modules/@allyhub/render/dist/look.js +2 -0
  304. package/dist/node_modules/@allyhub/render/dist/parts.js +2 -0
  305. package/dist/node_modules/@allyhub/render/dist/post-probe.js +5 -0
  306. package/dist/node_modules/@allyhub/render/dist/post.js +2 -0
  307. package/dist/node_modules/@allyhub/render/dist/render.js +3 -0
  308. package/dist/node_modules/@allyhub/render/dist/segments.js +2 -0
  309. package/dist/node_modules/@allyhub/render/dist/sound.js +2 -0
  310. package/dist/node_modules/@allyhub/render/dist/stills.js +2 -0
  311. package/dist/node_modules/@allyhub/render/dist/tools.js +2 -0
  312. package/dist/node_modules/@allyhub/render/package.json +17 -0
  313. package/dist/node_modules/@allyhub/runtime/dist/captions.js +2 -0
  314. package/dist/node_modules/@allyhub/runtime/dist/clock.js +2 -0
  315. package/dist/node_modules/@allyhub/runtime/dist/compose.js +2 -0
  316. package/dist/node_modules/@allyhub/runtime/dist/console.js +2 -0
  317. package/dist/node_modules/@allyhub/runtime/dist/embed.js +2 -0
  318. package/dist/node_modules/@allyhub/runtime/dist/env.js +2 -0
  319. package/dist/node_modules/@allyhub/runtime/dist/errors.js +2 -0
  320. package/dist/node_modules/@allyhub/runtime/dist/facade.js +2 -0
  321. package/dist/node_modules/@allyhub/runtime/dist/footage.js +2 -0
  322. package/dist/node_modules/@allyhub/runtime/dist/frame.js +2 -0
  323. package/dist/node_modules/@allyhub/runtime/dist/inspect.js +3 -0
  324. package/dist/node_modules/@allyhub/runtime/dist/locate.js +2 -0
  325. package/dist/node_modules/@allyhub/runtime/dist/measure.js +3 -0
  326. package/dist/node_modules/@allyhub/runtime/dist/mix-plan.js +2 -0
  327. package/dist/node_modules/@allyhub/runtime/dist/music.js +2 -0
  328. package/dist/node_modules/@allyhub/runtime/dist/output.js +2 -0
  329. package/dist/node_modules/@allyhub/runtime/dist/piece.js +3 -0
  330. package/dist/node_modules/@allyhub/runtime/dist/player/clips.js +2 -0
  331. package/dist/node_modules/@allyhub/runtime/dist/player/cutout.js +2 -0
  332. package/dist/node_modules/@allyhub/runtime/dist/player/player.js +2 -0
  333. package/dist/node_modules/@allyhub/runtime/dist/reads.js +2 -0
  334. package/dist/node_modules/@allyhub/runtime/dist/sound.js +2 -0
  335. package/dist/node_modules/@allyhub/runtime/dist/speech.js +2 -0
  336. package/dist/node_modules/@allyhub/runtime/dist/stage-kit.js +2 -0
  337. package/dist/node_modules/@allyhub/runtime/dist/stage.js +2 -0
  338. package/dist/node_modules/@allyhub/runtime/dist/takes.js +2 -0
  339. package/dist/node_modules/@allyhub/runtime/dist/transitions.js +2 -0
  340. package/dist/node_modules/@allyhub/runtime/package.json +21 -0
  341. package/dist/node_modules/@allyhub/runtimes/dist/bundled.d.ts +10 -0
  342. package/dist/node_modules/@allyhub/runtimes/dist/bundled.js +2 -0
  343. package/dist/node_modules/@allyhub/runtimes/dist/download.d.ts +38 -0
  344. package/dist/node_modules/@allyhub/runtimes/dist/download.js +2 -0
  345. package/dist/node_modules/@allyhub/runtimes/dist/manifest.d.ts +3 -0
  346. package/dist/node_modules/@allyhub/runtimes/dist/manifest.js +2 -0
  347. package/dist/node_modules/@allyhub/runtimes/dist/node-program.d.ts +12 -0
  348. package/dist/node_modules/@allyhub/runtimes/dist/node-program.js +2 -0
  349. package/dist/node_modules/@allyhub/runtimes/dist/packages.d.ts +84 -0
  350. package/dist/node_modules/@allyhub/runtimes/dist/packages.js +4 -0
  351. package/dist/node_modules/@allyhub/runtimes/dist/runtimes.d.ts +72 -0
  352. package/dist/node_modules/@allyhub/runtimes/dist/runtimes.js +4 -0
  353. package/dist/node_modules/@allyhub/runtimes/package.json +18 -0
  354. package/dist/node_modules/@allyhub/runtimes/pins/pdfjs-dist/package-lock.json +275 -0
  355. package/dist/node_modules/@allyhub/runtimes/pins/pdfjs-dist/package.json +11 -0
  356. package/dist/node_modules/@allyhub/scaffold/dist/index.js +16 -0
  357. package/dist/node_modules/@allyhub/scaffold/package.json +13 -0
  358. package/dist/node_modules/@allyhub/scenery/package.json +13 -0
  359. package/dist/node_modules/@allyhub/scenery-host/dist/allyhub.d.ts +21 -0
  360. package/dist/node_modules/@allyhub/scenery-host/dist/allyhub.js +2 -0
  361. package/dist/node_modules/@allyhub/scenery-host/dist/bake/apply.d.ts +59 -0
  362. package/dist/node_modules/@allyhub/scenery-host/dist/bake/digest.d.ts +14 -0
  363. package/dist/node_modules/@allyhub/scenery-host/dist/bake/format.d.ts +63 -0
  364. package/dist/node_modules/@allyhub/scenery-host/dist/bake/run.d.ts +63 -0
  365. package/dist/node_modules/@allyhub/scenery-host/dist/bake/run.js +138 -0
  366. package/dist/node_modules/@allyhub/scenery-host/dist/bundle.d.ts +85 -0
  367. package/dist/node_modules/@allyhub/scenery-host/dist/bundle.js +6 -0
  368. package/dist/node_modules/@allyhub/scenery-host/dist/commands.d.ts +54 -0
  369. package/dist/node_modules/@allyhub/scenery-host/dist/commands.js +2 -0
  370. package/dist/node_modules/@allyhub/scenery-host/dist/draw2d.d.ts +47 -0
  371. package/dist/node_modules/@allyhub/scenery-host/dist/draw2d.js +2 -0
  372. package/dist/node_modules/@allyhub/scenery-host/dist/focus-pass.js +246 -0
  373. package/dist/node_modules/@allyhub/scenery-host/dist/glass.d.ts +39 -0
  374. package/dist/node_modules/@allyhub/scenery-host/dist/glass.js +71 -0
  375. package/dist/node_modules/@allyhub/scenery-host/dist/idbuffer.d.ts +35 -0
  376. package/dist/node_modules/@allyhub/scenery-host/dist/inventory.d.ts +18 -0
  377. package/dist/node_modules/@allyhub/scenery-host/dist/inventory.js +2 -0
  378. package/dist/node_modules/@allyhub/scenery-host/dist/layer/index.d.ts +51 -0
  379. package/dist/node_modules/@allyhub/scenery-host/dist/layer/index.js +2 -0
  380. package/dist/node_modules/@allyhub/scenery-host/dist/layer/moire.d.ts +6 -0
  381. package/dist/node_modules/@allyhub/scenery-host/dist/layer/moire.js +3 -0
  382. package/dist/node_modules/@allyhub/scenery-host/dist/layer/queries.d.ts +106 -0
  383. package/dist/node_modules/@allyhub/scenery-host/dist/layer/queries.js +2 -0
  384. package/dist/node_modules/@allyhub/scenery-host/dist/layer/screens.d.ts +58 -0
  385. package/dist/node_modules/@allyhub/scenery-host/dist/layer/screens.js +2 -0
  386. package/dist/node_modules/@allyhub/scenery-host/dist/layer/state.d.ts +110 -0
  387. package/dist/node_modules/@allyhub/scenery-host/dist/layer/types.d.ts +239 -0
  388. package/dist/node_modules/@allyhub/scenery-host/dist/measure/contacts.d.ts +45 -0
  389. package/dist/node_modules/@allyhub/scenery-host/dist/measure/facts.d.ts +86 -0
  390. package/dist/node_modules/@allyhub/scenery-host/dist/measure/facts.js +2 -0
  391. package/dist/node_modules/@allyhub/scenery-host/dist/measure/health.d.ts +10 -0
  392. package/dist/node_modules/@allyhub/scenery-host/dist/measure/index.d.ts +110 -0
  393. package/dist/node_modules/@allyhub/scenery-host/dist/measure/index.js +2 -0
  394. package/dist/node_modules/@allyhub/scenery-host/dist/measure/relations.d.ts +17 -0
  395. package/dist/node_modules/@allyhub/scenery-host/dist/measure/relations.js +2 -0
  396. package/dist/node_modules/@allyhub/scenery-host/dist/measure/support.d.ts +11 -0
  397. package/dist/node_modules/@allyhub/scenery-host/dist/measure/support.js +2 -0
  398. package/dist/node_modules/@allyhub/scenery-host/dist/model-stage.js +3 -0
  399. package/dist/node_modules/@allyhub/scenery-host/dist/page/bake.d.ts +53 -0
  400. package/dist/node_modules/@allyhub/scenery-host/dist/page/bake.js +2 -0
  401. package/dist/node_modules/@allyhub/scenery-host/dist/page/draw.d.ts +42 -0
  402. package/dist/node_modules/@allyhub/scenery-host/dist/page/draw.js +2 -0
  403. package/dist/node_modules/@allyhub/scenery-host/dist/page/files.d.ts +45 -0
  404. package/dist/node_modules/@allyhub/scenery-host/dist/page/page.d.ts +127 -0
  405. package/dist/node_modules/@allyhub/scenery-host/dist/page/page.js +2 -0
  406. package/dist/node_modules/@allyhub/scenery-host/dist/page/props.d.ts +23 -0
  407. package/dist/node_modules/@allyhub/scenery-host/dist/page/screens.d.ts +147 -0
  408. package/dist/node_modules/@allyhub/scenery-host/dist/page/screens.js +2 -0
  409. package/dist/node_modules/@allyhub/scenery-host/dist/queries/inventory.d.ts +5 -0
  410. package/dist/node_modules/@allyhub/scenery-host/dist/queries/map.d.ts +5 -0
  411. package/dist/node_modules/@allyhub/scenery-host/dist/queries/map.js +2 -0
  412. package/dist/node_modules/@allyhub/scenery-host/dist/queries/view.d.ts +10 -0
  413. package/dist/node_modules/@allyhub/scenery-host/dist/screen-light.d.ts +58 -0
  414. package/dist/node_modules/@allyhub/scenery-host/dist/screen-light.js +156 -0
  415. package/dist/node_modules/@allyhub/scenery-host/dist/viewer.d.ts +128 -0
  416. package/dist/node_modules/@allyhub/scenery-host/dist/viewer.js +2 -0
  417. package/dist/node_modules/@allyhub/scenery-host/package.json +29 -0
  418. package/dist/node_modules/@allyhub/sheet/dist/api/capabilities.js +2 -0
  419. package/dist/node_modules/@allyhub/sheet/dist/api/charts.d.ts +204 -0
  420. package/dist/node_modules/@allyhub/sheet/dist/api/charts.js +2 -0
  421. package/dist/node_modules/@allyhub/sheet/dist/api/page.d.ts +83 -0
  422. package/dist/node_modules/@allyhub/sheet/dist/api/page.js +2 -0
  423. package/dist/node_modules/@allyhub/sheet/dist/api/rules.d.ts +170 -0
  424. package/dist/node_modules/@allyhub/sheet/dist/api/rules.js +2 -0
  425. package/dist/node_modules/@allyhub/sheet/dist/api/styles.d.ts +117 -0
  426. package/dist/node_modules/@allyhub/sheet/dist/api/styles.js +2 -0
  427. package/dist/node_modules/@allyhub/sheet/dist/api/workbook.d.ts +362 -0
  428. package/dist/node_modules/@allyhub/sheet/dist/api/workbook.js +2 -0
  429. package/dist/node_modules/@allyhub/sheet/dist/arrange.d.ts +68 -0
  430. package/dist/node_modules/@allyhub/sheet/dist/calc/server.d.ts +82 -0
  431. package/dist/node_modules/@allyhub/sheet/dist/chart.d.ts +52 -0
  432. package/dist/node_modules/@allyhub/sheet/dist/chart.js +2 -0
  433. package/dist/node_modules/@allyhub/sheet/dist/diff.js +2 -0
  434. package/dist/node_modules/@allyhub/sheet/dist/edit.d.ts +154 -0
  435. package/dist/node_modules/@allyhub/sheet/dist/file.d.ts +19 -0
  436. package/dist/node_modules/@allyhub/sheet/dist/file.js +3 -0
  437. package/dist/node_modules/@allyhub/sheet/dist/files.d.ts +24 -0
  438. package/dist/node_modules/@allyhub/sheet/dist/files.js +2 -0
  439. package/dist/node_modules/@allyhub/sheet/dist/generated.d.ts +46 -0
  440. package/dist/node_modules/@allyhub/sheet/dist/generated.js +2 -0
  441. package/dist/node_modules/@allyhub/sheet/dist/inspect.d.ts +25 -0
  442. package/dist/node_modules/@allyhub/sheet/dist/paginate.d.ts +98 -0
  443. package/dist/node_modules/@allyhub/sheet/dist/structure.d.ts +38 -0
  444. package/dist/node_modules/@allyhub/sheet/dist/table-style.d.ts +32 -0
  445. package/dist/node_modules/@allyhub/sheet/dist/validate.d.ts +26 -0
  446. package/dist/node_modules/@allyhub/sheet/dist/validate.js +2 -0
  447. package/dist/node_modules/@allyhub/sheet/dist/workbook.d.ts +324 -0
  448. package/dist/node_modules/@allyhub/sheet/dist/workbook.js +2 -0
  449. package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.d.ts +53 -0
  450. package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.js +2 -0
  451. package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.d.ts +49 -0
  452. package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.js +2 -0
  453. package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.d.ts +159 -0
  454. package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.js +3 -0
  455. package/dist/node_modules/@allyhub/sheet/dist/xlsx/write.js +2 -0
  456. package/dist/node_modules/@allyhub/sheet/dist/xlsx/zip.d.ts +40 -0
  457. package/dist/node_modules/@allyhub/sheet/dist/xlsx/zip.js +2 -0
  458. package/dist/node_modules/@allyhub/sheet/package.json +21 -0
  459. package/dist/node_modules/@allyhub/slides-core/dist/animation.d.ts +129 -0
  460. package/dist/node_modules/@allyhub/slides-core/dist/api.d.ts +730 -0
  461. package/dist/node_modules/@allyhub/slides-core/dist/api.js +4 -0
  462. package/dist/node_modules/@allyhub/slides-core/dist/chart-api.d.ts +202 -0
  463. package/dist/node_modules/@allyhub/slides-core/dist/chart-api.js +2 -0
  464. package/dist/node_modules/@allyhub/slides-core/dist/code.js +2 -0
  465. package/dist/node_modules/@allyhub/slides-core/dist/file.d.ts +131 -0
  466. package/dist/node_modules/@allyhub/slides-core/dist/file.js +4 -0
  467. package/dist/node_modules/@allyhub/slides-core/dist/index.d.ts +25 -0
  468. package/dist/node_modules/@allyhub/slides-core/dist/index.js +2 -0
  469. package/dist/node_modules/@allyhub/slides-core/dist/measure.d.ts +34 -0
  470. package/dist/node_modules/@allyhub/slides-core/dist/measure.js +2 -0
  471. package/dist/node_modules/@allyhub/slides-core/dist/merge.d.ts +58 -0
  472. package/dist/node_modules/@allyhub/slides-core/dist/merge.js +2 -0
  473. package/dist/node_modules/@allyhub/slides-core/dist/model.d.ts +293 -0
  474. package/dist/node_modules/@allyhub/slides-core/dist/resolve.d.ts +202 -0
  475. package/dist/node_modules/@allyhub/slides-core/dist/resolve.js +2 -0
  476. package/dist/node_modules/@allyhub/slides-core/dist/script.d.ts +45 -0
  477. package/dist/node_modules/@allyhub/slides-core/dist/script.js +3 -0
  478. package/dist/node_modules/@allyhub/slides-core/dist/strict.d.ts +7 -0
  479. package/dist/node_modules/@allyhub/slides-core/dist/strict.js +2 -0
  480. package/dist/node_modules/@allyhub/slides-core/dist/theme.d.ts +72 -0
  481. package/dist/node_modules/@allyhub/slides-core/package.json +14 -0
  482. package/dist/node_modules/@allyhub/slides-pptx/dist/charts.js +2 -0
  483. package/dist/node_modules/@allyhub/slides-pptx/dist/import/code.js +4 -0
  484. package/dist/node_modules/@allyhub/slides-pptx/dist/import/index.js +3 -0
  485. package/dist/node_modules/@allyhub/slides-pptx/dist/import/names.js +2 -0
  486. package/dist/node_modules/@allyhub/slides-pptx/dist/import/script.js +2 -0
  487. package/dist/node_modules/@allyhub/slides-pptx/dist/read/chart.js +2 -0
  488. package/dist/node_modules/@allyhub/slides-pptx/dist/read/common.js +2 -0
  489. package/dist/node_modules/@allyhub/slides-pptx/dist/read/index.js +4 -0
  490. package/dist/node_modules/@allyhub/slides-pptx/dist/read/shapes.js +2 -0
  491. package/dist/node_modules/@allyhub/slides-pptx/dist/read/text.js +2 -0
  492. package/dist/node_modules/@allyhub/slides-pptx/dist/read/timing.js +2 -0
  493. package/dist/node_modules/@allyhub/slides-pptx/dist/shapes.js +2 -0
  494. package/dist/node_modules/@allyhub/slides-pptx/dist/text.js +2 -0
  495. package/dist/node_modules/@allyhub/slides-pptx/dist/theme.js +2 -0
  496. package/dist/node_modules/@allyhub/slides-pptx/dist/timing.js +2 -0
  497. package/dist/node_modules/@allyhub/slides-pptx/dist/write.js +3 -0
  498. package/dist/node_modules/@allyhub/slides-pptx/dist/xml.js +3 -0
  499. package/dist/node_modules/@allyhub/slides-pptx/package.json +14 -0
  500. package/dist/node_modules/@allyhub/slides-runtime/dist/component.js +2 -0
  501. package/dist/node_modules/@allyhub/slides-runtime/dist/draw.js +3 -0
  502. package/dist/node_modules/@allyhub/slides-runtime/dist/index.js +2 -0
  503. package/dist/node_modules/@allyhub/slides-runtime/dist/load.js +6 -0
  504. package/dist/node_modules/@allyhub/slides-runtime/package.json +18 -0
  505. package/dist/node_modules/@allyhub/stage/dist/bakes.js +4 -0
  506. package/dist/node_modules/@allyhub/stage/dist/build-process.js +3 -0
  507. package/dist/node_modules/@allyhub/stage/dist/build-worker.js +2 -0
  508. package/dist/node_modules/@allyhub/stage/dist/identity.js +2 -0
  509. package/dist/node_modules/@allyhub/stage/dist/index.js +2 -0
  510. package/dist/node_modules/@allyhub/stage/dist/page.js +62 -0
  511. package/dist/node_modules/@allyhub/stage/dist/scenery-page.js +12 -0
  512. package/dist/node_modules/@allyhub/stage/dist/scenery-solve.js +2 -0
  513. package/dist/node_modules/@allyhub/stage/dist/scenery.js +2 -0
  514. package/dist/node_modules/@allyhub/stage/dist/server.js +2 -0
  515. package/dist/node_modules/@allyhub/stage/package.json +13 -0
  516. package/dist/node_modules/@allyhub/stage-page/dist/runtime/runtime.js +79 -0
  517. package/dist/node_modules/@allyhub/stage-page/dist/runtime/stage.js +3 -0
  518. package/dist/node_modules/@allyhub/stage-page/package.json +13 -0
  519. package/dist/node_modules/@allyhub/video-core/dist/component.d.ts +70 -0
  520. package/dist/node_modules/@allyhub/video-core/dist/component.js +2 -0
  521. package/dist/node_modules/@allyhub/video-core/dist/edits.js +2 -0
  522. package/dist/node_modules/@allyhub/video-core/dist/export.d.ts +97 -0
  523. package/dist/node_modules/@allyhub/video-core/dist/fact.d.ts +1179 -0
  524. package/dist/node_modules/@allyhub/video-core/dist/gen.d.ts +37 -0
  525. package/dist/node_modules/@allyhub/video-core/dist/gen.js +2 -0
  526. package/dist/node_modules/@allyhub/video-core/dist/index.d.ts +41 -0
  527. package/dist/node_modules/@allyhub/video-core/dist/index.js +2 -0
  528. package/dist/node_modules/@allyhub/video-core/dist/measure.d.ts +563 -0
  529. package/dist/node_modules/@allyhub/video-core/dist/media.d.ts +226 -0
  530. package/dist/node_modules/@allyhub/video-core/dist/media.js +2 -0
  531. package/dist/node_modules/@allyhub/video-core/dist/piece.d.ts +1154 -0
  532. package/dist/node_modules/@allyhub/video-core/dist/piece.js +2 -0
  533. package/dist/node_modules/@allyhub/video-core/dist/problem.d.ts +278 -0
  534. package/dist/node_modules/@allyhub/video-core/dist/problem.js +2 -0
  535. package/dist/node_modules/@allyhub/video-core/dist/schema.d.ts +350 -0
  536. package/dist/node_modules/@allyhub/video-core/dist/speech.js +5 -0
  537. package/dist/node_modules/@allyhub/video-core/dist/timeline.d.ts +631 -0
  538. package/dist/node_modules/@allyhub/video-core/dist/transition.d.ts +300 -0
  539. package/dist/node_modules/@allyhub/video-core/dist/transition.js +2 -0
  540. package/dist/node_modules/@allyhub/video-core/package.json +14 -0
  541. package/dist/node_modules/@allyhub/website/LICENSE +241 -0
  542. package/dist/node_modules/@allyhub/website/dist/index.js +2 -0
  543. package/dist/node_modules/@allyhub/website/dist/publish.js +3 -0
  544. package/dist/node_modules/@allyhub/website/dist/rules.js +2 -0
  545. package/dist/node_modules/@allyhub/website/dist/website.js +4 -0
  546. package/dist/node_modules/@allyhub/website/package.json +13 -0
  547. package/dist/project.js +1 -1
  548. package/dist/resources.js +1 -1
  549. package/dist/sdk-docs.js +1 -1
  550. package/dist/text/batch-text.js +1 -1
  551. package/dist/text/console-text.js +1 -1
  552. package/dist/text/facts-text.js +1 -1
  553. package/dist/text/format.js +1 -1
  554. package/dist/text/timeline-text.js +1 -1
  555. package/dist/version.js +1 -1
  556. package/dist/works.js +1 -1
  557. package/editor-web/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  558. package/editor-web/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  559. package/editor-web/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  560. package/editor-web/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  561. package/editor-web/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  562. package/editor-web/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  563. package/editor-web/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  564. package/editor-web/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  565. package/editor-web/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  566. package/editor-web/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  567. package/editor-web/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  568. package/editor-web/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  569. package/editor-web/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  570. package/editor-web/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  571. package/editor-web/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  572. package/editor-web/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  573. package/editor-web/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  574. package/editor-web/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  575. package/editor-web/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  576. package/editor-web/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  577. package/editor-web/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  578. package/editor-web/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  579. package/editor-web/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  580. package/editor-web/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  581. package/editor-web/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  582. package/editor-web/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  583. package/editor-web/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  584. package/editor-web/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  585. package/editor-web/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  586. package/editor-web/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  587. package/editor-web/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  588. package/editor-web/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  589. package/editor-web/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  590. package/editor-web/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  591. package/editor-web/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  592. package/editor-web/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  593. package/editor-web/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  594. package/editor-web/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  595. package/editor-web/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  596. package/editor-web/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  597. package/editor-web/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  598. package/editor-web/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  599. package/editor-web/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  600. package/editor-web/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  601. package/editor-web/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  602. package/editor-web/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  603. package/editor-web/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  604. package/editor-web/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  605. package/editor-web/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  606. package/editor-web/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  607. package/editor-web/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  608. package/editor-web/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  609. package/editor-web/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  610. package/editor-web/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  611. package/editor-web/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  612. package/editor-web/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  613. package/editor-web/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  614. package/editor-web/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  615. package/editor-web/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  616. package/editor-web/assets/abnfDiagram-WEYOIA3C-B9SmmTJt.js +1 -0
  617. package/editor-web/assets/architecture-WOLXFQ4H-m-T100yu.js +1 -0
  618. package/editor-web/assets/architectureDiagram-ZHVYKT53-B5nwfRgH.js +36 -0
  619. package/editor-web/assets/blockDiagram-RJAE7QA3-ClawtW7w.js +140 -0
  620. package/editor-web/assets/c4Diagram-XDPPPE54-CFHQpxmY.js +38 -0
  621. package/editor-web/assets/calc-worker-BTNuOUVJ.js +158 -0
  622. package/editor-web/assets/channel-hhT2g1yB.js +1 -0
  623. package/editor-web/assets/choice-BJc3Tv5F.js +10 -0
  624. package/editor-web/assets/chunk-2E7WHVMD-CoQrt8De.js +88 -0
  625. package/editor-web/assets/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
  626. package/editor-web/assets/chunk-4EMNKR2T-Iy5ZP2hH.js +1 -0
  627. package/editor-web/assets/chunk-55XCU76K-DsS8sEfz.js +1 -0
  628. package/editor-web/assets/chunk-5VM5RSS4-ZNzvKenW.js +15 -0
  629. package/editor-web/assets/chunk-7S6XSTFO-Co220fFP.js +2 -0
  630. package/editor-web/assets/chunk-AQDTSKZB-JIGZAIpF.js +72 -0
  631. package/editor-web/assets/chunk-DSNLSHJZ-Ror_NzZx.js +129 -0
  632. package/editor-web/assets/chunk-DUW6YSOI-Dgx8z5s3.js +1 -0
  633. package/editor-web/assets/chunk-HAGFOTED-C07qbJaC.js +62 -0
  634. package/editor-web/assets/chunk-HNE4Q36P-CM3bprQy.js +1 -0
  635. package/editor-web/assets/chunk-J5ZVWO5B-oDCd-gWO.js +1 -0
  636. package/editor-web/assets/chunk-JWPE2WC7-DVXcaiue.js +1 -0
  637. package/editor-web/assets/chunk-NGNAAXSQ-Bw6tHVuc.js +136 -0
  638. package/editor-web/assets/chunk-NQOKRVIF-ipM1cuU7.js +213 -0
  639. package/editor-web/assets/chunk-UHW7PFBP-CA8McMqW.js +1 -0
  640. package/editor-web/assets/chunk-VQ5W62QI-DEDvdgPj.js +1 -0
  641. package/editor-web/assets/chunk-WQQL4CDK-h5ZO7LF7.js +10 -0
  642. package/editor-web/assets/chunk-XXDRQBXY-i7MKP1NY.js +1 -0
  643. package/editor-web/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
  644. package/editor-web/assets/chunk-YZO67HFG-yC3xdjnt.js +1 -0
  645. package/editor-web/assets/chunk-ZAUX2LTX-3rRCWRvD.js +1 -0
  646. package/editor-web/assets/chunk-ZCHMQSOR-DK_PLi39.js +2 -0
  647. package/editor-web/assets/classDiagram-v2-4MYWR3UA-B9pB-HTm.js +217 -0
  648. package/editor-web/assets/cose-bilkent-JH36ORCC-BWS9TicX.js +1 -0
  649. package/editor-web/assets/cynefin-EF2NZ3EQ-CSd3PDdQ.js +1 -0
  650. package/editor-web/assets/cynefinDiagram-WF24UDRP-BBCequ3T.js +62 -0
  651. package/editor-web/assets/cytoscape.esm-Bn1wUjr1.js +321 -0
  652. package/editor-web/assets/d3-scale-CElPUUud.js +1 -0
  653. package/editor-web/assets/d3-selection-COWvaQNI.js +1 -0
  654. package/editor-web/assets/dagre-NK4GIZVX-C7ZOWX5t.js +4 -0
  655. package/editor-web/assets/diagram-CBK3MWTC-CQVvlSNo.js +24 -0
  656. package/editor-web/assets/diagram-I5XIIV2D-BCkke5x3.js +24 -0
  657. package/editor-web/assets/diagram-ODIL2UCW-DDWQXIlX.js +30 -0
  658. package/editor-web/assets/diagram-PFBEJUXE-C31QlFzr.js +3 -0
  659. package/editor-web/assets/diagram-RJA3I4VV-DUXAFmI_.js +41 -0
  660. package/editor-web/assets/diagram-TYUNFSNR-BCxuoEs9.js +200 -0
  661. package/editor-web/assets/dist-BRuoygB7.js +2 -0
  662. package/editor-web/assets/dist-CK42vCmN.js +550 -0
  663. package/editor-web/assets/dist-C_buDsM-.js +36 -0
  664. package/editor-web/assets/dist-DNcXHhzn.js +37 -0
  665. package/editor-web/assets/dist-DdXDFcej.js +1 -0
  666. package/editor-web/assets/dist-HxiPpGXi.js +10 -0
  667. package/editor-web/assets/dist-PF3VMsK7.js +1 -0
  668. package/editor-web/assets/ebnfDiagram-V4P3TTPT-Drbe1R2R.js +1 -0
  669. package/editor-web/assets/elk-QONTBCTQ-Bqwuc5U-.js +27 -0
  670. package/editor-web/assets/erDiagram-KYQIGQAA-lUcyPgf3.js +99 -0
  671. package/editor-web/assets/eventmodeling-K75KTNOO-BfxFVok7.js +1 -0
  672. package/editor-web/assets/flowDiagram-IUGLLWBU-FJVml4lT.js +1 -0
  673. package/editor-web/assets/ganttDiagram-R7GPNTJY-AYc1JnE_.js +292 -0
  674. package/editor-web/assets/gitGraph-VSP46ZUC-Z_2ysYZF.js +1 -0
  675. package/editor-web/assets/gitGraphDiagram-PDYL7XHY-CB2O1LZ6.js +106 -0
  676. package/editor-web/assets/graphlib-DS17s2tU.js +1 -0
  677. package/editor-web/assets/hint-BwGc32IE.js +1 -0
  678. package/editor-web/assets/index-BQKSbBSy.js +69 -0
  679. package/editor-web/assets/index-CfD80QPx.css +2 -0
  680. package/editor-web/assets/info-OHQRW6UA-BPePkERU.js +1 -0
  681. package/editor-web/assets/infoDiagram-MVDRKAX5-CNluCREj.js +2 -0
  682. package/editor-web/assets/ishikawaDiagram-HPEHV2GE-DIBDBol9.js +70 -0
  683. package/editor-web/assets/journeyDiagram-BOSHW7O7-C4Hc63C8.js +139 -0
  684. package/editor-web/assets/kanban-definition-FNSA4HC5-BShCYR9Q.js +89 -0
  685. package/editor-web/assets/katex-B_JcIwqj.js +257 -0
  686. package/editor-web/assets/mermaid-parser.core-KGVt2icR.js +7 -0
  687. package/editor-web/assets/mermaid.core-CVH2hRmI.js +44 -0
  688. package/editor-web/assets/mindmap-definition-6OY57UG3-C1mo9OeK.js +98 -0
  689. package/editor-web/assets/packet-JDAUHWVQ-B7YpYnvD.js +1 -0
  690. package/editor-web/assets/pegDiagram-ECIUJNBX-Es99bVEq.js +1 -0
  691. package/editor-web/assets/pie-XZMESJXO-xTUp8UcP.js +1 -0
  692. package/editor-web/assets/pieDiagram-GNMPY74T-CD91pLk4.js +39 -0
  693. package/editor-web/assets/quadrantDiagram-D57K4MC3-CSnvxc94.js +7 -0
  694. package/editor-web/assets/radar-ABXABTNO-Dj-t0L18.js +1 -0
  695. package/editor-web/assets/railroad-I3PHUGI6-BK32uCwU.js +1 -0
  696. package/editor-web/assets/railroad-abnf-LNEFI6M7-D5R8k6d0.js +1 -0
  697. package/editor-web/assets/railroad-ebnf-DWYD2UWJ-Crm1KEAC.js +1 -0
  698. package/editor-web/assets/railroad-peg-JR7BVNR7-BILXac49.js +1 -0
  699. package/editor-web/assets/railroadDiagram-Y72NRBL7-CevyjvbY.js +1 -0
  700. package/editor-web/assets/react-BSSSHUyV.js +101 -0
  701. package/editor-web/assets/requirementDiagram-EQYSW5RA-B5N8Q9VV.js +84 -0
  702. package/editor-web/assets/rolldown-runtime-COiEfhsA.js +1 -0
  703. package/editor-web/assets/rough.esm-Dy-Kn_BL.js +1 -0
  704. package/editor-web/assets/sankeyDiagram-SY24JHO5-bCTsxF1A.js +40 -0
  705. package/editor-web/assets/sequenceDiagram-BLEHNHQU-M37m0sEI.js +169 -0
  706. package/editor-web/assets/sizeCapture-INFHLROL-3uHXrFqA.js +1 -0
  707. package/editor-web/assets/stateDiagram-v2-A6IESKWZ-BDIn7XwV.js +291 -0
  708. package/editor-web/assets/svg-BiObwMnL.js +1 -0
  709. package/editor-web/assets/swatch-CwskGSEY.js +105 -0
  710. package/editor-web/assets/swimlanes-B3ENRKFQ-DIU1TlDI.js +1 -0
  711. package/editor-web/assets/swimlanesDiagram-AYQRV4AK-DPM008dB.js +8 -0
  712. package/editor-web/assets/tabs-uHwPMprC.js +1 -0
  713. package/editor-web/assets/timeline-definition-JXYKGLGB-C0x4clqy.js +120 -0
  714. package/editor-web/assets/treeView-D4JQ5SDB-C9lm0KTt.js +1 -0
  715. package/editor-web/assets/treemap-SAJKECNS-BMH4lQc7.js +1 -0
  716. package/editor-web/assets/usecaseDiagram-WPOLBNNX-BhltpBsJ.js +328 -0
  717. package/editor-web/assets/vennDiagram-Q3Y3IDCW-D3qN9Kpt.js +34 -0
  718. package/editor-web/assets/wardley-7MLQ67FV-C4k02DvU.js +1 -0
  719. package/editor-web/assets/wardleyDiagram-IVAIDKWA-dhpBDNqg.js +78 -0
  720. package/editor-web/assets/xychartDiagram-4URNHDU4-0yEarQ-o.js +7 -0
  721. package/editor-web/index.html +4 -4
  722. package/package.json +9 -2
  723. package/dist/node_modules/@allyhub-next/audio/dist/node/ffmpeg.js +0 -2
  724. package/dist/node_modules/@allyhub-next/audio/package.json +0 -17
  725. package/dist/node_modules/@allyhub-next/browser/dist/browser.js +0 -2
  726. package/dist/node_modules/@allyhub-next/browser/package.json +0 -13
  727. package/dist/node_modules/@allyhub-next/build/dist/code.d.ts +0 -26
  728. package/dist/node_modules/@allyhub-next/build/dist/code.js +0 -4
  729. package/dist/node_modules/@allyhub-next/build/dist/content.d.ts +0 -49
  730. package/dist/node_modules/@allyhub-next/build/dist/content.js +0 -2
  731. package/dist/node_modules/@allyhub-next/build/dist/data.d.ts +0 -13
  732. package/dist/node_modules/@allyhub-next/build/dist/data.js +0 -3
  733. package/dist/node_modules/@allyhub-next/build/dist/files.js +0 -2
  734. package/dist/node_modules/@allyhub-next/build/dist/fonts.d.ts +0 -26
  735. package/dist/node_modules/@allyhub-next/build/dist/fonts.js +0 -4
  736. package/dist/node_modules/@allyhub-next/build/dist/index.d.ts +0 -21
  737. package/dist/node_modules/@allyhub-next/build/dist/index.js +0 -2
  738. package/dist/node_modules/@allyhub-next/build/dist/matrix.d.ts +0 -18
  739. package/dist/node_modules/@allyhub-next/build/dist/matrix.js +0 -2
  740. package/dist/node_modules/@allyhub-next/build/dist/media.d.ts +0 -10
  741. package/dist/node_modules/@allyhub-next/build/dist/media.js +0 -2
  742. package/dist/node_modules/@allyhub-next/build/dist/messages.d.ts +0 -48
  743. package/dist/node_modules/@allyhub-next/build/dist/messages.js +0 -3
  744. package/dist/node_modules/@allyhub-next/build/dist/meta-worker.d.ts +0 -49
  745. package/dist/node_modules/@allyhub-next/build/dist/meta-worker.js +0 -4
  746. package/dist/node_modules/@allyhub-next/build/dist/meta.d.ts +0 -24
  747. package/dist/node_modules/@allyhub-next/build/dist/meta.js +0 -2
  748. package/dist/node_modules/@allyhub-next/build/dist/model-info.d.ts +0 -6
  749. package/dist/node_modules/@allyhub-next/build/dist/model-info.js +0 -4
  750. package/dist/node_modules/@allyhub-next/build/dist/plugin.d.ts +0 -42
  751. package/dist/node_modules/@allyhub-next/build/dist/plugin.js +0 -13
  752. package/dist/node_modules/@allyhub-next/build/dist/prepare.d.ts +0 -97
  753. package/dist/node_modules/@allyhub-next/build/dist/prepare.js +0 -3
  754. package/dist/node_modules/@allyhub-next/build/dist/scan.d.ts +0 -48
  755. package/dist/node_modules/@allyhub-next/build/dist/scan.js +0 -2
  756. package/dist/node_modules/@allyhub-next/build/dist/sheet-code.d.ts +0 -34
  757. package/dist/node_modules/@allyhub-next/build/dist/sheet-code.js +0 -2
  758. package/dist/node_modules/@allyhub-next/build/dist/takes.d.ts +0 -33
  759. package/dist/node_modules/@allyhub-next/build/dist/takes.js +0 -3
  760. package/dist/node_modules/@allyhub-next/build/dist/types.d.ts +0 -11
  761. package/dist/node_modules/@allyhub-next/build/dist/types.js +0 -6
  762. package/dist/node_modules/@allyhub-next/build/dist/vite.js +0 -3
  763. package/dist/node_modules/@allyhub-next/build/package.json +0 -13
  764. package/dist/node_modules/@allyhub-next/chart/dist/chart-xml.d.ts +0 -31
  765. package/dist/node_modules/@allyhub-next/chart/dist/chart-xml.js +0 -3
  766. package/dist/node_modules/@allyhub-next/chart/dist/chart.d.ts +0 -204
  767. package/dist/node_modules/@allyhub-next/chart/dist/chart.js +0 -2
  768. package/dist/node_modules/@allyhub-next/chart/dist/index.d.ts +0 -3
  769. package/dist/node_modules/@allyhub-next/chart/dist/index.js +0 -2
  770. package/dist/node_modules/@allyhub-next/chart/package.json +0 -14
  771. package/dist/node_modules/@allyhub-next/check/dist/cache.js +0 -2
  772. package/dist/node_modules/@allyhub-next/check/dist/check.js +0 -4
  773. package/dist/node_modules/@allyhub-next/check/dist/generated.js +0 -2
  774. package/dist/node_modules/@allyhub-next/check/dist/plans.js +0 -3
  775. package/dist/node_modules/@allyhub-next/check/dist/scenery.js +0 -2
  776. package/dist/node_modules/@allyhub-next/check/package.json +0 -13
  777. package/dist/node_modules/@allyhub-next/cloud/dist/blobs.js +0 -2
  778. package/dist/node_modules/@allyhub-next/cloud/dist/call.js +0 -5
  779. package/dist/node_modules/@allyhub-next/cloud/dist/catalog.js +0 -2
  780. package/dist/node_modules/@allyhub-next/cloud/dist/client.js +0 -2
  781. package/dist/node_modules/@allyhub-next/cloud/dist/config.js +0 -2
  782. package/dist/node_modules/@allyhub-next/cloud/dist/credentials.js +0 -3
  783. package/dist/node_modules/@allyhub-next/cloud/dist/errors.js +0 -2
  784. package/dist/node_modules/@allyhub-next/cloud/dist/index.js +0 -2
  785. package/dist/node_modules/@allyhub-next/cloud/dist/records.js +0 -4
  786. package/dist/node_modules/@allyhub-next/cloud/dist/signin.js +0 -4
  787. package/dist/node_modules/@allyhub-next/cloud/dist/sites.js +0 -2
  788. package/dist/node_modules/@allyhub-next/cloud/dist/token.js +0 -2
  789. package/dist/node_modules/@allyhub-next/cloud/dist/uploads.js +0 -3
  790. package/dist/node_modules/@allyhub-next/cloud/dist/voice.js +0 -2
  791. package/dist/node_modules/@allyhub-next/cloud/package.json +0 -13
  792. package/dist/node_modules/@allyhub-next/components/package.json +0 -12
  793. package/dist/node_modules/@allyhub-next/dev-server/dist/background.js +0 -2
  794. package/dist/node_modules/@allyhub-next/dev-server/dist/card.js +0 -2
  795. package/dist/node_modules/@allyhub-next/dev-server/dist/exports.js +0 -2
  796. package/dist/node_modules/@allyhub-next/dev-server/dist/index.js +0 -2
  797. package/dist/node_modules/@allyhub-next/dev-server/dist/live.js +0 -2
  798. package/dist/node_modules/@allyhub-next/dev-server/dist/paths.js +0 -2
  799. package/dist/node_modules/@allyhub-next/dev-server/dist/project.js +0 -2
  800. package/dist/node_modules/@allyhub-next/dev-server/dist/reach.js +0 -2
  801. package/dist/node_modules/@allyhub-next/dev-server/dist/record.js +0 -2
  802. package/dist/node_modules/@allyhub-next/dev-server/dist/server.js +0 -6
  803. package/dist/node_modules/@allyhub-next/dev-server/dist/sound.js +0 -2
  804. package/dist/node_modules/@allyhub-next/dev-server/dist/tools.js +0 -2
  805. package/dist/node_modules/@allyhub-next/dev-server/dist/tree.js +0 -2
  806. package/dist/node_modules/@allyhub-next/dev-server/dist/validate.js +0 -3
  807. package/dist/node_modules/@allyhub-next/dev-server/dist/watcher.js +0 -2
  808. package/dist/node_modules/@allyhub-next/dev-server/dist/writer.js +0 -3
  809. package/dist/node_modules/@allyhub-next/dev-server/package.json +0 -13
  810. package/dist/node_modules/@allyhub-next/doc/dist/docx.d.ts +0 -28
  811. package/dist/node_modules/@allyhub-next/doc/dist/docx.js +0 -4
  812. package/dist/node_modules/@allyhub-next/doc/dist/html.d.ts +0 -23
  813. package/dist/node_modules/@allyhub-next/doc/dist/html.js +0 -54
  814. package/dist/node_modules/@allyhub-next/doc/dist/index.d.ts +0 -8
  815. package/dist/node_modules/@allyhub-next/doc/dist/index.js +0 -2
  816. package/dist/node_modules/@allyhub-next/doc/dist/markdown.d.ts +0 -6
  817. package/dist/node_modules/@allyhub-next/doc/dist/markdown.js +0 -3
  818. package/dist/node_modules/@allyhub-next/doc/dist/model.d.ts +0 -145
  819. package/dist/node_modules/@allyhub-next/doc/dist/model.js +0 -2
  820. package/dist/node_modules/@allyhub-next/doc/dist/parse.d.ts +0 -10
  821. package/dist/node_modules/@allyhub-next/doc/dist/parse.js +0 -5
  822. package/dist/node_modules/@allyhub-next/doc/dist/patch.js +0 -8
  823. package/dist/node_modules/@allyhub-next/doc/dist/write.d.ts +0 -10
  824. package/dist/node_modules/@allyhub-next/doc/dist/write.js +0 -42
  825. package/dist/node_modules/@allyhub-next/doc/package.json +0 -17
  826. package/dist/node_modules/@allyhub-next/export/dist/batch.js +0 -4
  827. package/dist/node_modules/@allyhub-next/export/dist/deck-fonts.js +0 -2
  828. package/dist/node_modules/@allyhub-next/export/dist/deck-pptx.js +0 -2
  829. package/dist/node_modules/@allyhub-next/export/dist/export.js +0 -7
  830. package/dist/node_modules/@allyhub-next/export/dist/names.js +0 -2
  831. package/dist/node_modules/@allyhub-next/export/package.json +0 -13
  832. package/dist/node_modules/@allyhub-next/formats/dist/data/slides.d.ts +0 -2520
  833. package/dist/node_modules/@allyhub-next/formats/dist/data/slides.js +0 -2
  834. package/dist/node_modules/@allyhub-next/formats/dist/schemas.d.ts +0 -2741
  835. package/dist/node_modules/@allyhub-next/formats/package.json +0 -15
  836. package/dist/node_modules/@allyhub-next/measure/dist/compare.js +0 -2
  837. package/dist/node_modules/@allyhub-next/measure/dist/contrast.js +0 -2
  838. package/dist/node_modules/@allyhub-next/measure/dist/cut-sheet.js +0 -46
  839. package/dist/node_modules/@allyhub-next/measure/dist/cuts.js +0 -2
  840. package/dist/node_modules/@allyhub-next/measure/dist/facts.js +0 -2
  841. package/dist/node_modules/@allyhub-next/measure/dist/fidelity.js +0 -3
  842. package/dist/node_modules/@allyhub-next/measure/dist/flat.js +0 -2
  843. package/dist/node_modules/@allyhub-next/measure/dist/loop.js +0 -2
  844. package/dist/node_modules/@allyhub-next/measure/dist/overlay.js +0 -2
  845. package/dist/node_modules/@allyhub-next/measure/dist/recording-report.js +0 -2
  846. package/dist/node_modules/@allyhub-next/measure/dist/reference/folder.js +0 -4
  847. package/dist/node_modules/@allyhub-next/measure/dist/reference/piece.js +0 -2
  848. package/dist/node_modules/@allyhub-next/measure/dist/reference/sections.js +0 -2
  849. package/dist/node_modules/@allyhub-next/measure/dist/reference/sets.js +0 -2
  850. package/dist/node_modules/@allyhub-next/measure/dist/reference/text.js +0 -2
  851. package/dist/node_modules/@allyhub-next/measure/dist/reference/video.js +0 -2
  852. package/dist/node_modules/@allyhub-next/measure/dist/seams.js +0 -2
  853. package/dist/node_modules/@allyhub-next/measure/dist/sound-measures.js +0 -2
  854. package/dist/node_modules/@allyhub-next/measure/dist/sound-report.js +0 -2
  855. package/dist/node_modules/@allyhub-next/measure/dist/still.js +0 -2
  856. package/dist/node_modules/@allyhub-next/measure/dist/version-voice.js +0 -2
  857. package/dist/node_modules/@allyhub-next/measure/package.json +0 -13
  858. package/dist/node_modules/@allyhub-next/media/dist/asr/parakeet.js +0 -7
  859. package/dist/node_modules/@allyhub-next/media/dist/asr/transcribe.d.ts +0 -50
  860. package/dist/node_modules/@allyhub-next/media/dist/asr/words.d.ts +0 -7
  861. package/dist/node_modules/@allyhub-next/media/dist/cache.js +0 -2
  862. package/dist/node_modules/@allyhub-next/media/dist/ocr/text.js +0 -4
  863. package/dist/node_modules/@allyhub-next/media/dist/sheet.d.ts +0 -67
  864. package/dist/node_modules/@allyhub-next/media/dist/tools.d.ts +0 -35
  865. package/dist/node_modules/@allyhub-next/media/dist/tools.js +0 -2
  866. package/dist/node_modules/@allyhub-next/media/dist/vision/index-media.js +0 -3
  867. package/dist/node_modules/@allyhub-next/media/dist/vision/run.js +0 -4
  868. package/dist/node_modules/@allyhub-next/media/dist/vision/runtime.js +0 -8
  869. package/dist/node_modules/@allyhub-next/media/dist/vision/types.d.ts +0 -2
  870. package/dist/node_modules/@allyhub-next/media/dist/worker-process.d.ts +0 -8
  871. package/dist/node_modules/@allyhub-next/media/dist/worker-process.js +0 -2
  872. package/dist/node_modules/@allyhub-next/media/package.json +0 -13
  873. package/dist/node_modules/@allyhub-next/model/NOTICE +0 -26
  874. package/dist/node_modules/@allyhub-next/model/dist/build-job.d.ts +0 -32
  875. package/dist/node_modules/@allyhub-next/model/dist/build-job.js +0 -2
  876. package/dist/node_modules/@allyhub-next/model/dist/build-worker.js +0 -2
  877. package/dist/node_modules/@allyhub-next/model/dist/build.js +0 -3
  878. package/dist/node_modules/@allyhub-next/model/dist/capabilities.d.ts +0 -22
  879. package/dist/node_modules/@allyhub-next/model/dist/capabilities.js +0 -2
  880. package/dist/node_modules/@allyhub-next/model/dist/data.js +0 -2
  881. package/dist/node_modules/@allyhub-next/model/dist/material-eval.js +0 -2
  882. package/dist/node_modules/@allyhub-next/model/dist/material-nodes.js +0 -2
  883. package/dist/node_modules/@allyhub-next/model/package.json +0 -25
  884. package/dist/node_modules/@allyhub-next/ooxml/package.json +0 -26
  885. package/dist/node_modules/@allyhub-next/project/dist/console.js +0 -2
  886. package/dist/node_modules/@allyhub-next/project/dist/deck-keys.js +0 -2
  887. package/dist/node_modules/@allyhub-next/project/dist/deck-pool.js +0 -2
  888. package/dist/node_modules/@allyhub-next/project/dist/digest.js +0 -2
  889. package/dist/node_modules/@allyhub-next/project/dist/index.js +0 -2
  890. package/dist/node_modules/@allyhub-next/project/dist/ledger.js +0 -2
  891. package/dist/node_modules/@allyhub-next/project/dist/media-index.js +0 -2
  892. package/dist/node_modules/@allyhub-next/project/dist/page.js +0 -4
  893. package/dist/node_modules/@allyhub-next/project/dist/says.js +0 -2
  894. package/dist/node_modules/@allyhub-next/project/dist/scenery.js +0 -2
  895. package/dist/node_modules/@allyhub-next/project/dist/session.js +0 -2
  896. package/dist/node_modules/@allyhub-next/project/dist/stills.js +0 -2
  897. package/dist/node_modules/@allyhub-next/project/dist/version.js +0 -2
  898. package/dist/node_modules/@allyhub-next/project/package.json +0 -13
  899. package/dist/node_modules/@allyhub-next/protocol/dist/account.d.ts +0 -338
  900. package/dist/node_modules/@allyhub-next/protocol/dist/app.js +0 -2
  901. package/dist/node_modules/@allyhub-next/protocol/dist/auth.d.ts +0 -115
  902. package/dist/node_modules/@allyhub-next/protocol/dist/auth.js +0 -2
  903. package/dist/node_modules/@allyhub-next/protocol/dist/cloud.d.ts +0 -324
  904. package/dist/node_modules/@allyhub-next/protocol/dist/cloud.js +0 -2
  905. package/dist/node_modules/@allyhub-next/protocol/dist/editor.d.ts +0 -486
  906. package/dist/node_modules/@allyhub-next/protocol/dist/editor.js +0 -2
  907. package/dist/node_modules/@allyhub-next/protocol/dist/index.d.ts +0 -20
  908. package/dist/node_modules/@allyhub-next/protocol/dist/index.js +0 -2
  909. package/dist/node_modules/@allyhub-next/protocol/dist/notes.d.ts +0 -188
  910. package/dist/node_modules/@allyhub-next/protocol/dist/notes.js +0 -2
  911. package/dist/node_modules/@allyhub-next/protocol/dist/registry.d.ts +0 -185
  912. package/dist/node_modules/@allyhub-next/protocol/dist/registry.js +0 -2
  913. package/dist/node_modules/@allyhub-next/protocol/dist/routes.js +0 -2
  914. package/dist/node_modules/@allyhub-next/protocol/dist/sites.d.ts +0 -293
  915. package/dist/node_modules/@allyhub-next/protocol/dist/sites.js +0 -2
  916. package/dist/node_modules/@allyhub-next/protocol/dist/snapshots.d.ts +0 -396
  917. package/dist/node_modules/@allyhub-next/protocol/dist/snapshots.js +0 -2
  918. package/dist/node_modules/@allyhub-next/protocol/dist/teams.d.ts +0 -79
  919. package/dist/node_modules/@allyhub-next/protocol/dist/teams.js +0 -2
  920. package/dist/node_modules/@allyhub-next/protocol/dist/tools.d.ts +0 -428
  921. package/dist/node_modules/@allyhub-next/protocol/dist/tools.js +0 -2
  922. package/dist/node_modules/@allyhub-next/protocol/package.json +0 -14
  923. package/dist/node_modules/@allyhub-next/registry/dist/polyhaven-client.js +0 -3
  924. package/dist/node_modules/@allyhub-next/registry/dist/registry.js +0 -2
  925. package/dist/node_modules/@allyhub-next/registry/package.json +0 -13
  926. package/dist/node_modules/@allyhub-next/render/dist/composite.js +0 -2
  927. package/dist/node_modules/@allyhub-next/render/dist/doc/index.js +0 -2
  928. package/dist/node_modules/@allyhub-next/render/dist/doc/print.js +0 -18
  929. package/dist/node_modules/@allyhub-next/render/dist/encode.js +0 -2
  930. package/dist/node_modules/@allyhub-next/render/dist/errors.js +0 -2
  931. package/dist/node_modules/@allyhub-next/render/dist/exports.js +0 -3
  932. package/dist/node_modules/@allyhub-next/render/dist/ffmpeg.js +0 -4
  933. package/dist/node_modules/@allyhub-next/render/dist/footage.js +0 -2
  934. package/dist/node_modules/@allyhub-next/render/dist/junction.js +0 -2
  935. package/dist/node_modules/@allyhub-next/render/dist/look.js +0 -2
  936. package/dist/node_modules/@allyhub-next/render/dist/parts.js +0 -2
  937. package/dist/node_modules/@allyhub-next/render/dist/post-probe.js +0 -5
  938. package/dist/node_modules/@allyhub-next/render/dist/post.js +0 -2
  939. package/dist/node_modules/@allyhub-next/render/dist/render.js +0 -3
  940. package/dist/node_modules/@allyhub-next/render/dist/segments.js +0 -2
  941. package/dist/node_modules/@allyhub-next/render/dist/sound.js +0 -2
  942. package/dist/node_modules/@allyhub-next/render/dist/stills.js +0 -2
  943. package/dist/node_modules/@allyhub-next/render/dist/tools.js +0 -2
  944. package/dist/node_modules/@allyhub-next/render/package.json +0 -17
  945. package/dist/node_modules/@allyhub-next/runtime/dist/captions.js +0 -2
  946. package/dist/node_modules/@allyhub-next/runtime/dist/clock.js +0 -2
  947. package/dist/node_modules/@allyhub-next/runtime/dist/compose.js +0 -2
  948. package/dist/node_modules/@allyhub-next/runtime/dist/console.js +0 -2
  949. package/dist/node_modules/@allyhub-next/runtime/dist/embed.js +0 -2
  950. package/dist/node_modules/@allyhub-next/runtime/dist/env.js +0 -2
  951. package/dist/node_modules/@allyhub-next/runtime/dist/errors.js +0 -2
  952. package/dist/node_modules/@allyhub-next/runtime/dist/facade.js +0 -2
  953. package/dist/node_modules/@allyhub-next/runtime/dist/footage.js +0 -2
  954. package/dist/node_modules/@allyhub-next/runtime/dist/frame.js +0 -2
  955. package/dist/node_modules/@allyhub-next/runtime/dist/inspect.js +0 -3
  956. package/dist/node_modules/@allyhub-next/runtime/dist/locate.js +0 -2
  957. package/dist/node_modules/@allyhub-next/runtime/dist/measure.js +0 -3
  958. package/dist/node_modules/@allyhub-next/runtime/dist/mix-plan.js +0 -2
  959. package/dist/node_modules/@allyhub-next/runtime/dist/music.js +0 -2
  960. package/dist/node_modules/@allyhub-next/runtime/dist/output.js +0 -2
  961. package/dist/node_modules/@allyhub-next/runtime/dist/piece.js +0 -3
  962. package/dist/node_modules/@allyhub-next/runtime/dist/player/clips.js +0 -2
  963. package/dist/node_modules/@allyhub-next/runtime/dist/player/cutout.js +0 -2
  964. package/dist/node_modules/@allyhub-next/runtime/dist/player/player.js +0 -2
  965. package/dist/node_modules/@allyhub-next/runtime/dist/reads.js +0 -2
  966. package/dist/node_modules/@allyhub-next/runtime/dist/sound.js +0 -2
  967. package/dist/node_modules/@allyhub-next/runtime/dist/speech.js +0 -2
  968. package/dist/node_modules/@allyhub-next/runtime/dist/stage-kit.js +0 -2
  969. package/dist/node_modules/@allyhub-next/runtime/dist/stage.js +0 -2
  970. package/dist/node_modules/@allyhub-next/runtime/dist/takes.js +0 -2
  971. package/dist/node_modules/@allyhub-next/runtime/dist/transitions.js +0 -2
  972. package/dist/node_modules/@allyhub-next/runtime/package.json +0 -21
  973. package/dist/node_modules/@allyhub-next/runtimes/dist/bundled.d.ts +0 -10
  974. package/dist/node_modules/@allyhub-next/runtimes/dist/bundled.js +0 -2
  975. package/dist/node_modules/@allyhub-next/runtimes/dist/download.d.ts +0 -33
  976. package/dist/node_modules/@allyhub-next/runtimes/dist/download.js +0 -2
  977. package/dist/node_modules/@allyhub-next/runtimes/dist/manifest.d.ts +0 -3
  978. package/dist/node_modules/@allyhub-next/runtimes/dist/manifest.js +0 -2
  979. package/dist/node_modules/@allyhub-next/runtimes/dist/node-program.d.ts +0 -3
  980. package/dist/node_modules/@allyhub-next/runtimes/dist/node-program.js +0 -2
  981. package/dist/node_modules/@allyhub-next/runtimes/dist/packages.d.ts +0 -82
  982. package/dist/node_modules/@allyhub-next/runtimes/dist/packages.js +0 -4
  983. package/dist/node_modules/@allyhub-next/runtimes/dist/runtimes.d.ts +0 -72
  984. package/dist/node_modules/@allyhub-next/runtimes/dist/runtimes.js +0 -4
  985. package/dist/node_modules/@allyhub-next/runtimes/package.json +0 -18
  986. package/dist/node_modules/@allyhub-next/scaffold/dist/index.js +0 -16
  987. package/dist/node_modules/@allyhub-next/scaffold/package.json +0 -13
  988. package/dist/node_modules/@allyhub-next/scenery/package.json +0 -13
  989. package/dist/node_modules/@allyhub-next/scenery-host/dist/allyhub.d.ts +0 -21
  990. package/dist/node_modules/@allyhub-next/scenery-host/dist/allyhub.js +0 -2
  991. package/dist/node_modules/@allyhub-next/scenery-host/dist/bake/apply.d.ts +0 -59
  992. package/dist/node_modules/@allyhub-next/scenery-host/dist/bake/digest.d.ts +0 -14
  993. package/dist/node_modules/@allyhub-next/scenery-host/dist/bake/format.d.ts +0 -63
  994. package/dist/node_modules/@allyhub-next/scenery-host/dist/bake/run.d.ts +0 -63
  995. package/dist/node_modules/@allyhub-next/scenery-host/dist/bake/run.js +0 -138
  996. package/dist/node_modules/@allyhub-next/scenery-host/dist/bundle.d.ts +0 -85
  997. package/dist/node_modules/@allyhub-next/scenery-host/dist/bundle.js +0 -6
  998. package/dist/node_modules/@allyhub-next/scenery-host/dist/commands.d.ts +0 -54
  999. package/dist/node_modules/@allyhub-next/scenery-host/dist/commands.js +0 -2
  1000. package/dist/node_modules/@allyhub-next/scenery-host/dist/draw2d.d.ts +0 -47
  1001. package/dist/node_modules/@allyhub-next/scenery-host/dist/draw2d.js +0 -2
  1002. package/dist/node_modules/@allyhub-next/scenery-host/dist/focus-pass.js +0 -246
  1003. package/dist/node_modules/@allyhub-next/scenery-host/dist/glass.d.ts +0 -39
  1004. package/dist/node_modules/@allyhub-next/scenery-host/dist/glass.js +0 -71
  1005. package/dist/node_modules/@allyhub-next/scenery-host/dist/idbuffer.d.ts +0 -35
  1006. package/dist/node_modules/@allyhub-next/scenery-host/dist/inventory.d.ts +0 -18
  1007. package/dist/node_modules/@allyhub-next/scenery-host/dist/inventory.js +0 -2
  1008. package/dist/node_modules/@allyhub-next/scenery-host/dist/layer/index.d.ts +0 -51
  1009. package/dist/node_modules/@allyhub-next/scenery-host/dist/layer/index.js +0 -2
  1010. package/dist/node_modules/@allyhub-next/scenery-host/dist/layer/moire.d.ts +0 -6
  1011. package/dist/node_modules/@allyhub-next/scenery-host/dist/layer/moire.js +0 -3
  1012. package/dist/node_modules/@allyhub-next/scenery-host/dist/layer/queries.d.ts +0 -106
  1013. package/dist/node_modules/@allyhub-next/scenery-host/dist/layer/queries.js +0 -2
  1014. package/dist/node_modules/@allyhub-next/scenery-host/dist/layer/screens.d.ts +0 -58
  1015. package/dist/node_modules/@allyhub-next/scenery-host/dist/layer/screens.js +0 -2
  1016. package/dist/node_modules/@allyhub-next/scenery-host/dist/layer/state.d.ts +0 -110
  1017. package/dist/node_modules/@allyhub-next/scenery-host/dist/layer/types.d.ts +0 -239
  1018. package/dist/node_modules/@allyhub-next/scenery-host/dist/measure/contacts.d.ts +0 -45
  1019. package/dist/node_modules/@allyhub-next/scenery-host/dist/measure/facts.d.ts +0 -86
  1020. package/dist/node_modules/@allyhub-next/scenery-host/dist/measure/facts.js +0 -2
  1021. package/dist/node_modules/@allyhub-next/scenery-host/dist/measure/health.d.ts +0 -10
  1022. package/dist/node_modules/@allyhub-next/scenery-host/dist/measure/index.d.ts +0 -110
  1023. package/dist/node_modules/@allyhub-next/scenery-host/dist/measure/index.js +0 -2
  1024. package/dist/node_modules/@allyhub-next/scenery-host/dist/measure/relations.d.ts +0 -17
  1025. package/dist/node_modules/@allyhub-next/scenery-host/dist/measure/relations.js +0 -2
  1026. package/dist/node_modules/@allyhub-next/scenery-host/dist/measure/support.d.ts +0 -11
  1027. package/dist/node_modules/@allyhub-next/scenery-host/dist/measure/support.js +0 -2
  1028. package/dist/node_modules/@allyhub-next/scenery-host/dist/model-stage.js +0 -3
  1029. package/dist/node_modules/@allyhub-next/scenery-host/dist/page/bake.d.ts +0 -53
  1030. package/dist/node_modules/@allyhub-next/scenery-host/dist/page/bake.js +0 -2
  1031. package/dist/node_modules/@allyhub-next/scenery-host/dist/page/draw.d.ts +0 -42
  1032. package/dist/node_modules/@allyhub-next/scenery-host/dist/page/draw.js +0 -2
  1033. package/dist/node_modules/@allyhub-next/scenery-host/dist/page/files.d.ts +0 -45
  1034. package/dist/node_modules/@allyhub-next/scenery-host/dist/page/page.d.ts +0 -127
  1035. package/dist/node_modules/@allyhub-next/scenery-host/dist/page/page.js +0 -2
  1036. package/dist/node_modules/@allyhub-next/scenery-host/dist/page/props.d.ts +0 -23
  1037. package/dist/node_modules/@allyhub-next/scenery-host/dist/page/screens.d.ts +0 -147
  1038. package/dist/node_modules/@allyhub-next/scenery-host/dist/page/screens.js +0 -2
  1039. package/dist/node_modules/@allyhub-next/scenery-host/dist/queries/inventory.d.ts +0 -5
  1040. package/dist/node_modules/@allyhub-next/scenery-host/dist/queries/map.d.ts +0 -5
  1041. package/dist/node_modules/@allyhub-next/scenery-host/dist/queries/map.js +0 -2
  1042. package/dist/node_modules/@allyhub-next/scenery-host/dist/queries/view.d.ts +0 -10
  1043. package/dist/node_modules/@allyhub-next/scenery-host/dist/screen-light.d.ts +0 -58
  1044. package/dist/node_modules/@allyhub-next/scenery-host/dist/screen-light.js +0 -156
  1045. package/dist/node_modules/@allyhub-next/scenery-host/dist/viewer.d.ts +0 -114
  1046. package/dist/node_modules/@allyhub-next/scenery-host/dist/viewer.js +0 -2
  1047. package/dist/node_modules/@allyhub-next/scenery-host/package.json +0 -29
  1048. package/dist/node_modules/@allyhub-next/sheet/dist/api/capabilities.js +0 -2
  1049. package/dist/node_modules/@allyhub-next/sheet/dist/api/charts.d.ts +0 -204
  1050. package/dist/node_modules/@allyhub-next/sheet/dist/api/charts.js +0 -2
  1051. package/dist/node_modules/@allyhub-next/sheet/dist/api/page.d.ts +0 -83
  1052. package/dist/node_modules/@allyhub-next/sheet/dist/api/page.js +0 -2
  1053. package/dist/node_modules/@allyhub-next/sheet/dist/api/rules.d.ts +0 -170
  1054. package/dist/node_modules/@allyhub-next/sheet/dist/api/rules.js +0 -2
  1055. package/dist/node_modules/@allyhub-next/sheet/dist/api/styles.d.ts +0 -117
  1056. package/dist/node_modules/@allyhub-next/sheet/dist/api/styles.js +0 -2
  1057. package/dist/node_modules/@allyhub-next/sheet/dist/api/workbook.d.ts +0 -362
  1058. package/dist/node_modules/@allyhub-next/sheet/dist/api/workbook.js +0 -2
  1059. package/dist/node_modules/@allyhub-next/sheet/dist/arrange.d.ts +0 -68
  1060. package/dist/node_modules/@allyhub-next/sheet/dist/calc/server.d.ts +0 -82
  1061. package/dist/node_modules/@allyhub-next/sheet/dist/chart.d.ts +0 -58
  1062. package/dist/node_modules/@allyhub-next/sheet/dist/chart.js +0 -2
  1063. package/dist/node_modules/@allyhub-next/sheet/dist/diff.js +0 -2
  1064. package/dist/node_modules/@allyhub-next/sheet/dist/edit.d.ts +0 -154
  1065. package/dist/node_modules/@allyhub-next/sheet/dist/file.d.ts +0 -19
  1066. package/dist/node_modules/@allyhub-next/sheet/dist/file.js +0 -3
  1067. package/dist/node_modules/@allyhub-next/sheet/dist/files.d.ts +0 -24
  1068. package/dist/node_modules/@allyhub-next/sheet/dist/files.js +0 -2
  1069. package/dist/node_modules/@allyhub-next/sheet/dist/generated.d.ts +0 -46
  1070. package/dist/node_modules/@allyhub-next/sheet/dist/generated.js +0 -2
  1071. package/dist/node_modules/@allyhub-next/sheet/dist/inspect.d.ts +0 -25
  1072. package/dist/node_modules/@allyhub-next/sheet/dist/paginate.d.ts +0 -98
  1073. package/dist/node_modules/@allyhub-next/sheet/dist/structure.d.ts +0 -38
  1074. package/dist/node_modules/@allyhub-next/sheet/dist/table-style.d.ts +0 -32
  1075. package/dist/node_modules/@allyhub-next/sheet/dist/validate.d.ts +0 -26
  1076. package/dist/node_modules/@allyhub-next/sheet/dist/validate.js +0 -2
  1077. package/dist/node_modules/@allyhub-next/sheet/dist/workbook.d.ts +0 -324
  1078. package/dist/node_modules/@allyhub-next/sheet/dist/workbook.js +0 -2
  1079. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/charts.d.ts +0 -53
  1080. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/charts.js +0 -2
  1081. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/import.d.ts +0 -49
  1082. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/import.js +0 -2
  1083. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/read.d.ts +0 -159
  1084. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/read.js +0 -3
  1085. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/write.js +0 -2
  1086. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/zip.d.ts +0 -40
  1087. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/zip.js +0 -2
  1088. package/dist/node_modules/@allyhub-next/sheet/package.json +0 -21
  1089. package/dist/node_modules/@allyhub-next/slides-core/dist/animation.d.ts +0 -129
  1090. package/dist/node_modules/@allyhub-next/slides-core/dist/api.d.ts +0 -726
  1091. package/dist/node_modules/@allyhub-next/slides-core/dist/api.js +0 -4
  1092. package/dist/node_modules/@allyhub-next/slides-core/dist/chart-api.d.ts +0 -202
  1093. package/dist/node_modules/@allyhub-next/slides-core/dist/chart-api.js +0 -2
  1094. package/dist/node_modules/@allyhub-next/slides-core/dist/chart-file.d.ts +0 -11
  1095. package/dist/node_modules/@allyhub-next/slides-core/dist/chart-file.js +0 -2
  1096. package/dist/node_modules/@allyhub-next/slides-core/dist/code.js +0 -2
  1097. package/dist/node_modules/@allyhub-next/slides-core/dist/file.d.ts +0 -131
  1098. package/dist/node_modules/@allyhub-next/slides-core/dist/file.js +0 -4
  1099. package/dist/node_modules/@allyhub-next/slides-core/dist/index.d.ts +0 -26
  1100. package/dist/node_modules/@allyhub-next/slides-core/dist/index.js +0 -2
  1101. package/dist/node_modules/@allyhub-next/slides-core/dist/measure.d.ts +0 -34
  1102. package/dist/node_modules/@allyhub-next/slides-core/dist/measure.js +0 -2
  1103. package/dist/node_modules/@allyhub-next/slides-core/dist/merge.d.ts +0 -58
  1104. package/dist/node_modules/@allyhub-next/slides-core/dist/merge.js +0 -2
  1105. package/dist/node_modules/@allyhub-next/slides-core/dist/model.d.ts +0 -309
  1106. package/dist/node_modules/@allyhub-next/slides-core/dist/resolve.d.ts +0 -202
  1107. package/dist/node_modules/@allyhub-next/slides-core/dist/resolve.js +0 -2
  1108. package/dist/node_modules/@allyhub-next/slides-core/dist/script.d.ts +0 -45
  1109. package/dist/node_modules/@allyhub-next/slides-core/dist/script.js +0 -3
  1110. package/dist/node_modules/@allyhub-next/slides-core/dist/strict.d.ts +0 -7
  1111. package/dist/node_modules/@allyhub-next/slides-core/dist/strict.js +0 -2
  1112. package/dist/node_modules/@allyhub-next/slides-core/dist/theme.d.ts +0 -72
  1113. package/dist/node_modules/@allyhub-next/slides-core/package.json +0 -14
  1114. package/dist/node_modules/@allyhub-next/slides-pptx/dist/charts.js +0 -2
  1115. package/dist/node_modules/@allyhub-next/slides-pptx/dist/import/code.js +0 -4
  1116. package/dist/node_modules/@allyhub-next/slides-pptx/dist/import/index.js +0 -3
  1117. package/dist/node_modules/@allyhub-next/slides-pptx/dist/import/names.js +0 -2
  1118. package/dist/node_modules/@allyhub-next/slides-pptx/dist/import/script.js +0 -2
  1119. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/chart.js +0 -2
  1120. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/common.js +0 -2
  1121. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/index.js +0 -4
  1122. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/shapes.js +0 -2
  1123. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/text.js +0 -2
  1124. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/timing.js +0 -2
  1125. package/dist/node_modules/@allyhub-next/slides-pptx/dist/shapes.js +0 -2
  1126. package/dist/node_modules/@allyhub-next/slides-pptx/dist/text.js +0 -2
  1127. package/dist/node_modules/@allyhub-next/slides-pptx/dist/theme.js +0 -2
  1128. package/dist/node_modules/@allyhub-next/slides-pptx/dist/timing.js +0 -2
  1129. package/dist/node_modules/@allyhub-next/slides-pptx/dist/write.js +0 -3
  1130. package/dist/node_modules/@allyhub-next/slides-pptx/dist/xml.js +0 -3
  1131. package/dist/node_modules/@allyhub-next/slides-pptx/package.json +0 -14
  1132. package/dist/node_modules/@allyhub-next/slides-runtime/dist/component.js +0 -2
  1133. package/dist/node_modules/@allyhub-next/slides-runtime/dist/draw.js +0 -3
  1134. package/dist/node_modules/@allyhub-next/slides-runtime/dist/index.js +0 -2
  1135. package/dist/node_modules/@allyhub-next/slides-runtime/dist/load.js +0 -6
  1136. package/dist/node_modules/@allyhub-next/slides-runtime/package.json +0 -18
  1137. package/dist/node_modules/@allyhub-next/stage/dist/bakes.js +0 -4
  1138. package/dist/node_modules/@allyhub-next/stage/dist/identity.js +0 -2
  1139. package/dist/node_modules/@allyhub-next/stage/dist/index.js +0 -2
  1140. package/dist/node_modules/@allyhub-next/stage/dist/page.js +0 -62
  1141. package/dist/node_modules/@allyhub-next/stage/dist/scenery-page.js +0 -12
  1142. package/dist/node_modules/@allyhub-next/stage/dist/scenery-solve.js +0 -2
  1143. package/dist/node_modules/@allyhub-next/stage/dist/scenery.js +0 -2
  1144. package/dist/node_modules/@allyhub-next/stage/dist/server.js +0 -2
  1145. package/dist/node_modules/@allyhub-next/stage/package.json +0 -13
  1146. package/dist/node_modules/@allyhub-next/stage-page/dist/runtime/runtime.js +0 -79
  1147. package/dist/node_modules/@allyhub-next/stage-page/dist/runtime/stage.js +0 -3
  1148. package/dist/node_modules/@allyhub-next/stage-page/package.json +0 -13
  1149. package/dist/node_modules/@allyhub-next/video-core/dist/edits.js +0 -2
  1150. package/dist/node_modules/@allyhub-next/video-core/dist/export.d.ts +0 -97
  1151. package/dist/node_modules/@allyhub-next/video-core/dist/fact.d.ts +0 -1179
  1152. package/dist/node_modules/@allyhub-next/video-core/dist/gen.d.ts +0 -37
  1153. package/dist/node_modules/@allyhub-next/video-core/dist/gen.js +0 -2
  1154. package/dist/node_modules/@allyhub-next/video-core/dist/index.d.ts +0 -40
  1155. package/dist/node_modules/@allyhub-next/video-core/dist/index.js +0 -2
  1156. package/dist/node_modules/@allyhub-next/video-core/dist/measure.d.ts +0 -558
  1157. package/dist/node_modules/@allyhub-next/video-core/dist/media.d.ts +0 -226
  1158. package/dist/node_modules/@allyhub-next/video-core/dist/media.js +0 -2
  1159. package/dist/node_modules/@allyhub-next/video-core/dist/piece.d.ts +0 -1154
  1160. package/dist/node_modules/@allyhub-next/video-core/dist/piece.js +0 -2
  1161. package/dist/node_modules/@allyhub-next/video-core/dist/problem.d.ts +0 -278
  1162. package/dist/node_modules/@allyhub-next/video-core/dist/problem.js +0 -2
  1163. package/dist/node_modules/@allyhub-next/video-core/dist/schema.d.ts +0 -350
  1164. package/dist/node_modules/@allyhub-next/video-core/dist/speech.js +0 -5
  1165. package/dist/node_modules/@allyhub-next/video-core/dist/timeline.d.ts +0 -626
  1166. package/dist/node_modules/@allyhub-next/video-core/dist/transition.d.ts +0 -289
  1167. package/dist/node_modules/@allyhub-next/video-core/dist/transition.js +0 -2
  1168. package/dist/node_modules/@allyhub-next/video-core/package.json +0 -14
  1169. package/dist/node_modules/@allyhub-next/website/dist/index.js +0 -2
  1170. package/dist/node_modules/@allyhub-next/website/dist/publish.js +0 -3
  1171. package/dist/node_modules/@allyhub-next/website/dist/rules.js +0 -2
  1172. package/dist/node_modules/@allyhub-next/website/dist/website.js +0 -4
  1173. package/dist/node_modules/@allyhub-next/website/package.json +0 -13
  1174. package/editor-web/assets/calc-worker-Bz9r26p1.js +0 -158
  1175. package/editor-web/assets/dist-B-BI8jma.js +0 -37
  1176. package/editor-web/assets/dist-CS-Z5JSF.js +0 -224
  1177. package/editor-web/assets/dist-ClE1xUdI.js +0 -10
  1178. package/editor-web/assets/dist-Cqu9f1N5.js +0 -1
  1179. package/editor-web/assets/dist-CsDICOqP.js +0 -36
  1180. package/editor-web/assets/dist-DegNYCaB.js +0 -10
  1181. package/editor-web/assets/dist-EotuIcA_.js +0 -2
  1182. package/editor-web/assets/index-CwDs3z43.js +0 -69
  1183. package/editor-web/assets/index-ujKjdu_s.css +0 -2
  1184. package/editor-web/assets/minus-DLhpe7h_.js +0 -1
  1185. package/editor-web/assets/react-CT8OUeCe.js +0 -101
  1186. package/editor-web/assets/rolldown-runtime-XKyaHtl9.js +0 -1
  1187. package/editor-web/assets/tabs-BEPTOFm5.js +0 -105
  1188. package/editor-web/assets/text-align-start-CfqIQSWH.js +0 -1
  1189. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/LICENSE +0 -0
  1190. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/at-cut.js +0 -0
  1191. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/decode.js +0 -0
  1192. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/envelope.js +0 -0
  1193. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/index.js +0 -0
  1194. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/levels.js +0 -0
  1195. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/master.js +0 -0
  1196. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/music.js +0 -0
  1197. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/node/decode.js +0 -0
  1198. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/node/ebur128.js +0 -0
  1199. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/node/index.js +0 -0
  1200. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/node/loudness.js +0 -0
  1201. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/node/master.js +0 -0
  1202. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/node/measure.js +0 -0
  1203. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/node/mix.js +0 -0
  1204. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/plan.js +0 -0
  1205. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recorded.js +0 -0
  1206. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/bandwidth.js +0 -0
  1207. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/chain.js +0 -0
  1208. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/dynamics.js +0 -0
  1209. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/fft.js +0 -0
  1210. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/filters.js +0 -0
  1211. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/fit.js +0 -0
  1212. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/index.js +0 -0
  1213. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/loudness.js +0 -0
  1214. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/measure.js +0 -0
  1215. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/mic.js +0 -0
  1216. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/noise.js +0 -0
  1217. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/presets.js +0 -0
  1218. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/room.js +0 -0
  1219. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/setup.js +0 -0
  1220. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/vec.js +0 -0
  1221. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/render.js +0 -0
  1222. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/sfx.js +0 -0
  1223. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/shape.js +0 -0
  1224. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/voice.js +0 -0
  1225. /package/dist/node_modules/{@allyhub-next → @allyhub}/browser/LICENSE +0 -0
  1226. /package/dist/node_modules/{@allyhub-next → @allyhub}/browser/dist/capture.js +0 -0
  1227. /package/dist/node_modules/{@allyhub-next → @allyhub}/browser/dist/cdp.js +0 -0
  1228. /package/dist/node_modules/{@allyhub-next → @allyhub}/browser/dist/flags.js +0 -0
  1229. /package/dist/node_modules/{@allyhub-next → @allyhub}/browser/dist/frames.js +0 -0
  1230. /package/dist/node_modules/{@allyhub-next → @allyhub}/browser/dist/html.js +0 -0
  1231. /package/dist/node_modules/{@allyhub-next → @allyhub}/browser/dist/index.js +0 -0
  1232. /package/dist/node_modules/{@allyhub-next → @allyhub}/browser/dist/launch.js +0 -0
  1233. /package/dist/node_modules/{@allyhub-next → @allyhub}/browser/dist/page.js +0 -0
  1234. /package/dist/node_modules/{@allyhub-next → @allyhub}/browser/dist/server.js +0 -0
  1235. /package/dist/node_modules/{@allyhub-next → @allyhub}/build/LICENSE +0 -0
  1236. /package/dist/node_modules/{@allyhub-next → @allyhub}/build/dist/files.d.ts +0 -0
  1237. /package/dist/node_modules/{@allyhub-next → @allyhub}/build/dist/move-refs.d.ts +0 -0
  1238. /package/dist/node_modules/{@allyhub-next → @allyhub}/build/dist/move-refs.js +0 -0
  1239. /package/dist/node_modules/{@allyhub-next → @allyhub}/build/dist/places.d.ts +0 -0
  1240. /package/dist/node_modules/{@allyhub-next → @allyhub}/build/dist/places.js +0 -0
  1241. /package/dist/node_modules/{@allyhub-next → @allyhub}/build/dist/vite.d.ts +0 -0
  1242. /package/dist/node_modules/{@allyhub-next → @allyhub}/chart/LICENSE +0 -0
  1243. /package/dist/node_modules/{@allyhub-next → @allyhub}/check/LICENSE +0 -0
  1244. /package/dist/node_modules/{@allyhub-next → @allyhub}/check/dist/index.js +0 -0
  1245. /package/dist/node_modules/{@allyhub-next → @allyhub}/check/dist/result.js +0 -0
  1246. /package/dist/node_modules/{@allyhub-next → @allyhub}/cloud/LICENSE +0 -0
  1247. /package/dist/node_modules/{@allyhub-next → @allyhub}/cloud/NOTICE +0 -0
  1248. /package/dist/node_modules/{@allyhub-next → @allyhub}/cloud/dist/hashes.js +0 -0
  1249. /package/dist/node_modules/{@allyhub-next → @allyhub}/cloud/dist/loopback.js +0 -0
  1250. /package/dist/node_modules/{@allyhub-next → @allyhub}/cloud/dist/pkce.js +0 -0
  1251. /package/dist/node_modules/{@allyhub-next → @allyhub}/cloud/dist/signin-worker.js +0 -0
  1252. /package/dist/node_modules/{@allyhub-next → @allyhub}/components/LICENSE +0 -0
  1253. /package/dist/node_modules/{@allyhub-next → @allyhub}/components/r/callout.json +0 -0
  1254. /package/dist/node_modules/{@allyhub-next → @allyhub}/components/r/caption-line.json +0 -0
  1255. /package/dist/node_modules/{@allyhub-next → @allyhub}/components/r/caption-subtitle.json +0 -0
  1256. /package/dist/node_modules/{@allyhub-next → @allyhub}/components/r/caption-word.json +0 -0
  1257. /package/dist/node_modules/{@allyhub-next → @allyhub}/components/r/chart.json +0 -0
  1258. /package/dist/node_modules/{@allyhub-next → @allyhub}/components/r/code-panel.json +0 -0
  1259. /package/dist/node_modules/{@allyhub-next → @allyhub}/components/r/screen-demo.json +0 -0
  1260. /package/dist/node_modules/{@allyhub-next → @allyhub}/components/registry.json +0 -0
  1261. /package/dist/node_modules/{@allyhub-next → @allyhub}/components/src/callout.ts +0 -0
  1262. /package/dist/node_modules/{@allyhub-next → @allyhub}/components/src/caption-line.ts +0 -0
  1263. /package/dist/node_modules/{@allyhub-next → @allyhub}/components/src/caption-subtitle.ts +0 -0
  1264. /package/dist/node_modules/{@allyhub-next → @allyhub}/components/src/caption-word.ts +0 -0
  1265. /package/dist/node_modules/{@allyhub-next → @allyhub}/components/src/chart.ts +0 -0
  1266. /package/dist/node_modules/{@allyhub-next → @allyhub}/components/src/code-panel.ts +0 -0
  1267. /package/dist/node_modules/{@allyhub-next → @allyhub}/components/src/index.ts +0 -0
  1268. /package/dist/node_modules/{@allyhub-next → @allyhub}/components/src/screen-demo.ts +0 -0
  1269. /package/dist/node_modules/{@allyhub-next → @allyhub}/dev-server/LICENSE +0 -0
  1270. /package/dist/node_modules/{@allyhub-next → @allyhub}/dev-server/dist/fonts.js +0 -0
  1271. /package/dist/node_modules/{@allyhub-next → @allyhub}/dev-server/dist/reveal.js +0 -0
  1272. /package/dist/node_modules/{@allyhub-next → @allyhub}/doc/LICENSE +0 -0
  1273. /package/dist/node_modules/{@allyhub-next → @allyhub}/doc/dist/patch.d.ts +0 -0
  1274. /package/dist/node_modules/{@allyhub-next → @allyhub}/doc/dist/title.d.ts +0 -0
  1275. /package/dist/node_modules/{@allyhub-next → @allyhub}/doc/dist/title.js +0 -0
  1276. /package/dist/node_modules/{@allyhub-next → @allyhub}/export/LICENSE +0 -0
  1277. /package/dist/node_modules/{@allyhub-next → @allyhub}/export/dist/index.js +0 -0
  1278. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/LICENSE +0 -0
  1279. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/comments.d.ts +0 -0
  1280. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/comments.js +0 -0
  1281. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/config.d.ts +0 -0
  1282. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/config.js +0 -0
  1283. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/deck-code.d.ts +0 -0
  1284. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/deck-code.js +0 -0
  1285. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/edits.d.ts +0 -0
  1286. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/edits.js +0 -0
  1287. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/elements.d.ts +0 -0
  1288. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/elements.js +0 -0
  1289. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/faces.d.ts +0 -0
  1290. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/faces.js +0 -0
  1291. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/file.d.ts +0 -0
  1292. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/file.js +0 -0
  1293. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/gen.d.ts +0 -0
  1294. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/gen.js +0 -0
  1295. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/messages.d.ts +0 -0
  1296. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/messages.js +0 -0
  1297. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/reference.d.ts +0 -0
  1298. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/reference.js +0 -0
  1299. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/script.d.ts +0 -0
  1300. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/script.js +0 -0
  1301. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/sheet.d.ts +0 -0
  1302. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/sheet.js +0 -0
  1303. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/website.d.ts +0 -0
  1304. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/website.js +0 -0
  1305. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/words.d.ts +0 -0
  1306. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/words.js +0 -0
  1307. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/index.d.ts +0 -0
  1308. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/index.js +0 -0
  1309. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/items.d.ts +0 -0
  1310. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/items.js +0 -0
  1311. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/layout.d.ts +0 -0
  1312. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/layout.js +0 -0
  1313. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/media-type.d.ts +0 -0
  1314. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/media-type.js +0 -0
  1315. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/note-shape.d.ts +0 -0
  1316. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/note-shape.js +0 -0
  1317. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/schemas.js +0 -0
  1318. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/strict.d.ts +0 -0
  1319. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/strict.js +0 -0
  1320. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/zip.d.ts +0 -0
  1321. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/zip.js +0 -0
  1322. /package/dist/node_modules/{@allyhub-next/measure → @allyhub/jobs}/LICENSE +0 -0
  1323. /package/dist/node_modules/{@allyhub-next/media → @allyhub/measure}/LICENSE +0 -0
  1324. /package/dist/node_modules/{@allyhub-next → @allyhub}/measure/dist/index.js +0 -0
  1325. /package/dist/node_modules/{@allyhub-next → @allyhub}/measure/dist/reference/compare.js +0 -0
  1326. /package/dist/node_modules/{@allyhub-next → @allyhub}/measure/dist/reference/interpret.js +0 -0
  1327. /package/dist/node_modules/{@allyhub-next/model → @allyhub/media}/LICENSE +0 -0
  1328. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/NOTICE +0 -0
  1329. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/asr/hear.d.ts +0 -0
  1330. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/asr/hear.js +0 -0
  1331. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/asr/languages.d.ts +0 -0
  1332. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/asr/languages.js +0 -0
  1333. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/asr/parakeet.d.ts +0 -0
  1334. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/asr/protocol.d.ts +0 -0
  1335. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/asr/protocol.js +0 -0
  1336. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/asr/transcribe.js +0 -0
  1337. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/asr/windows.d.ts +0 -0
  1338. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/asr/windows.js +0 -0
  1339. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/asr/words.js +0 -0
  1340. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/asr/worker.d.ts +0 -0
  1341. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/asr/worker.js +0 -0
  1342. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/audio.d.ts +0 -0
  1343. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/audio.js +0 -0
  1344. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/beats.d.ts +0 -0
  1345. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/beats.js +0 -0
  1346. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/cache.d.ts +0 -0
  1347. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/errors.d.ts +0 -0
  1348. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/errors.js +0 -0
  1349. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/fetch.d.ts +0 -0
  1350. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/fetch.js +0 -0
  1351. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/grid.d.ts +0 -0
  1352. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/grid.js +0 -0
  1353. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/index.d.ts +0 -0
  1354. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/index.js +0 -0
  1355. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/local.d.ts +0 -0
  1356. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/local.js +0 -0
  1357. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/ocr/lines.d.ts +0 -0
  1358. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/ocr/lines.js +0 -0
  1359. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/ocr/tesseract.d.ts +0 -0
  1360. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/ocr/tesseract.js +0 -0
  1361. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/ocr/text.d.ts +0 -0
  1362. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/ocr/worker.d.ts +0 -0
  1363. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/ocr/worker.js +0 -0
  1364. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/picture.d.ts +0 -0
  1365. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/picture.js +0 -0
  1366. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/probe.d.ts +0 -0
  1367. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/probe.js +0 -0
  1368. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/progress.d.ts +0 -0
  1369. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/progress.js +0 -0
  1370. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/run.d.ts +0 -0
  1371. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/run.js +0 -0
  1372. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/sheet.js +0 -0
  1373. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/shots.d.ts +0 -0
  1374. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/shots.js +0 -0
  1375. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/sync.d.ts +0 -0
  1376. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/sync.js +0 -0
  1377. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/video.d.ts +0 -0
  1378. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/video.js +0 -0
  1379. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/vision/cache.d.ts +0 -0
  1380. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/vision/cache.js +0 -0
  1381. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/vision/common.d.ts +0 -0
  1382. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/vision/common.js +0 -0
  1383. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/vision/faces.d.ts +0 -0
  1384. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/vision/faces.js +0 -0
  1385. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/vision/index-media.d.ts +0 -0
  1386. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/vision/matte.d.ts +0 -0
  1387. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/vision/matte.js +0 -0
  1388. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/vision/mattes.d.ts +0 -0
  1389. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/vision/mattes.js +0 -0
  1390. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/vision/models.d.ts +0 -0
  1391. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/vision/models.js +0 -0
  1392. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/vision/probe.d.ts +0 -0
  1393. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/vision/probe.js +0 -0
  1394. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/vision/protocol.d.ts +0 -0
  1395. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/vision/protocol.js +0 -0
  1396. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/vision/run.d.ts +0 -0
  1397. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/vision/runtime.d.ts +0 -0
  1398. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/vision/status.d.ts +0 -0
  1399. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/vision/status.js +0 -0
  1400. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/vision/track.d.ts +0 -0
  1401. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/vision/track.js +0 -0
  1402. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/vision/types.js +0 -0
  1403. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/vision/worker.d.ts +0 -0
  1404. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/vision/worker.js +0 -0
  1405. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/vision/yunet.d.ts +0 -0
  1406. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/vision/yunet.js +0 -0
  1407. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/voice-shape.d.ts +0 -0
  1408. /package/dist/node_modules/{@allyhub-next → @allyhub}/media/dist/voice-shape.js +0 -0
  1409. /package/dist/node_modules/{@allyhub-next/ooxml → @allyhub/model}/LICENSE +0 -0
  1410. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/apply.d.ts +0 -0
  1411. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/apply.js +0 -0
  1412. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/authoring.d.ts +0 -0
  1413. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/authoring.js +0 -0
  1414. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-attributes.d.ts +0 -0
  1415. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-attributes.js +0 -0
  1416. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-collapse.d.ts +0 -0
  1417. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-collapse.js +0 -0
  1418. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-corner-plan.d.ts +0 -0
  1419. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-corner-plan.js +0 -0
  1420. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-deform.d.ts +0 -0
  1421. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-deform.js +0 -0
  1422. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-fans.d.ts +0 -0
  1423. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-fans.js +0 -0
  1424. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-junction.d.ts +0 -0
  1425. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-junction.js +0 -0
  1426. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-marks.d.ts +0 -0
  1427. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-marks.js +0 -0
  1428. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-metric.d.ts +0 -0
  1429. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-metric.js +0 -0
  1430. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-mixed.d.ts +0 -0
  1431. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-mixed.js +0 -0
  1432. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-offsets.d.ts +0 -0
  1433. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-offsets.js +0 -0
  1434. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-patch.d.ts +0 -0
  1435. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-patch.js +0 -0
  1436. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-profile.d.ts +0 -0
  1437. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-profile.js +0 -0
  1438. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-projection.d.ts +0 -0
  1439. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-projection.js +0 -0
  1440. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-reflex.d.ts +0 -0
  1441. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-reflex.js +0 -0
  1442. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-square-out.d.ts +0 -0
  1443. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-square-out.js +0 -0
  1444. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-strips.d.ts +0 -0
  1445. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-strips.js +0 -0
  1446. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-topology.d.ts +0 -0
  1447. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel-topology.js +0 -0
  1448. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel.d.ts +0 -0
  1449. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bevel.js +0 -0
  1450. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bmesh-bevel.d.ts +0 -0
  1451. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bmesh-bevel.js +0 -0
  1452. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bmesh-bridge.d.ts +0 -0
  1453. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bmesh-bridge.js +0 -0
  1454. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bmesh-cycles.d.ts +0 -0
  1455. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bmesh-cycles.js +0 -0
  1456. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bmesh-data.d.ts +0 -0
  1457. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bmesh-data.js +0 -0
  1458. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bmesh-dissolve.d.ts +0 -0
  1459. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bmesh-dissolve.js +0 -0
  1460. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bmesh-edit.d.ts +0 -0
  1461. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bmesh-edit.js +0 -0
  1462. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bmesh-inset.d.ts +0 -0
  1463. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bmesh-inset.js +0 -0
  1464. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bmesh-primitives.d.ts +0 -0
  1465. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bmesh-primitives.js +0 -0
  1466. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bmesh-smooth.d.ts +0 -0
  1467. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bmesh-smooth.js +0 -0
  1468. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bmesh-spin.d.ts +0 -0
  1469. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bmesh-spin.js +0 -0
  1470. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bmesh-subdivide.d.ts +0 -0
  1471. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bmesh-subdivide.js +0 -0
  1472. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bmesh.d.ts +0 -0
  1473. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/bmesh.js +0 -0
  1474. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/boolean.d.ts +0 -0
  1475. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/boolean.js +0 -0
  1476. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/build-cache.d.ts +0 -0
  1477. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/build-cache.js +0 -0
  1478. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/build-worker.d.ts +0 -0
  1479. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/build.d.ts +0 -0
  1480. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/cancel.d.ts +0 -0
  1481. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/cancel.js +0 -0
  1482. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/curve-eval.d.ts +0 -0
  1483. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/curve-eval.js +0 -0
  1484. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/curve-math.d.ts +0 -0
  1485. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/curve-math.js +0 -0
  1486. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/curve-mesh.d.ts +0 -0
  1487. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/curve-mesh.js +0 -0
  1488. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/curve.d.ts +0 -0
  1489. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/curve.js +0 -0
  1490. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/data.d.ts +0 -0
  1491. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/evaluate.d.ts +0 -0
  1492. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/evaluate.js +0 -0
  1493. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/evaluation-cache.d.ts +0 -0
  1494. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/evaluation-cache.js +0 -0
  1495. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/evaluation-guard.d.ts +0 -0
  1496. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/evaluation-guard.js +0 -0
  1497. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/evaluation-plan.d.ts +0 -0
  1498. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/evaluation-plan.js +0 -0
  1499. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/export.d.ts +0 -0
  1500. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/export.js +0 -0
  1501. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/field.d.ts +0 -0
  1502. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/field.js +0 -0
  1503. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/generated/COPYRIGHT.musl +0 -0
  1504. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/generated/LICENSE.compiler-rt +0 -0
  1505. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/generated/LICENSE.emscripten +0 -0
  1506. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/generated/LICENSE.libcxx +0 -0
  1507. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/generated/LICENSE.libcxxabi +0 -0
  1508. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/generated/LICENSE.opensubdiv +0 -0
  1509. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/generated/NOTICE.opensubdiv +0 -0
  1510. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/generated/opensubdiv-build.json +0 -0
  1511. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/generated/opensubdiv.d.mts +0 -0
  1512. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/generated/opensubdiv.mjs +0 -0
  1513. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/geometry.d.ts +0 -0
  1514. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/geometry.js +0 -0
  1515. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/image.d.ts +0 -0
  1516. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/image.js +0 -0
  1517. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/index.d.ts +0 -0
  1518. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/index.js +0 -0
  1519. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/instances.d.ts +0 -0
  1520. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/instances.js +0 -0
  1521. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/material-eval.d.ts +0 -0
  1522. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/material-nodes.d.ts +0 -0
  1523. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/mesh-attributes.d.ts +0 -0
  1524. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/mesh-attributes.js +0 -0
  1525. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/mesh-queries.d.ts +0 -0
  1526. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/mesh-queries.js +0 -0
  1527. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/names.d.ts +0 -0
  1528. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/names.js +0 -0
  1529. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/patterns.d.ts +0 -0
  1530. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/patterns.js +0 -0
  1531. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/png.d.ts +0 -0
  1532. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/png.js +0 -0
  1533. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/polygon-triangulation.d.ts +0 -0
  1534. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/polygon-triangulation.js +0 -0
  1535. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/program-location.d.ts +0 -0
  1536. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/program-location.js +0 -0
  1537. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/report.d.ts +0 -0
  1538. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/report.js +0 -0
  1539. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/screw.d.ts +0 -0
  1540. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/screw.js +0 -0
  1541. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/solidify.d.ts +0 -0
  1542. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/solidify.js +0 -0
  1543. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/subdivision.d.ts +0 -0
  1544. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/subdivision.js +0 -0
  1545. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/three.d.ts +0 -0
  1546. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/three.js +0 -0
  1547. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/uv-project.d.ts +0 -0
  1548. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/uv-project.js +0 -0
  1549. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/uv-unwrap.d.ts +0 -0
  1550. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/uv-unwrap.js +0 -0
  1551. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/uv.d.ts +0 -0
  1552. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/uv.js +0 -0
  1553. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/vertex-groups.d.ts +0 -0
  1554. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/vertex-groups.js +0 -0
  1555. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/weighted-normal.d.ts +0 -0
  1556. /package/dist/node_modules/{@allyhub-next → @allyhub}/model/dist/weighted-normal.js +0 -0
  1557. /package/dist/node_modules/{@allyhub-next/project → @allyhub/ooxml}/LICENSE +0 -0
  1558. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/brightness.d.ts +0 -0
  1559. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/brightness.js +0 -0
  1560. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/color.d.ts +0 -0
  1561. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/color.js +0 -0
  1562. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/enums.d.ts +0 -0
  1563. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/enums.js +0 -0
  1564. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/ext.d.ts +0 -0
  1565. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/ext.js +0 -0
  1566. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/generated/enums.d.ts +0 -0
  1567. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/generated/enums.js +0 -0
  1568. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/generated/presets.d.ts +0 -0
  1569. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/generated/presets.js +0 -0
  1570. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/generated/spec.d.ts +0 -0
  1571. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/generated/spec.js +0 -0
  1572. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/geometry/index.d.ts +0 -0
  1573. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/geometry/index.js +0 -0
  1574. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/index.d.ts +0 -0
  1575. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/index.js +0 -0
  1576. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/mce.d.ts +0 -0
  1577. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/mce.js +0 -0
  1578. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/node.d.ts +0 -0
  1579. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/node.js +0 -0
  1580. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/ns.d.ts +0 -0
  1581. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/ns.js +0 -0
  1582. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/opc.d.ts +0 -0
  1583. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/opc.js +0 -0
  1584. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/report.d.ts +0 -0
  1585. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/report.js +0 -0
  1586. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/xml.d.ts +0 -0
  1587. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/xml.js +0 -0
  1588. /package/dist/node_modules/{@allyhub-next/protocol → @allyhub/project}/LICENSE +0 -0
  1589. /package/dist/node_modules/{@allyhub-next → @allyhub}/project/dist/deck-measure.js +0 -0
  1590. /package/dist/node_modules/{@allyhub-next → @allyhub}/project/dist/stretch.js +0 -0
  1591. /package/dist/node_modules/{@allyhub-next/registry → @allyhub/protocol}/LICENSE +0 -0
  1592. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/account.js +0 -0
  1593. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/app.d.ts +0 -0
  1594. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/blobs.d.ts +0 -0
  1595. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/blobs.js +0 -0
  1596. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/cli.d.ts +0 -0
  1597. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/cli.js +0 -0
  1598. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/files.d.ts +0 -0
  1599. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/files.js +0 -0
  1600. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/jsonrpc.d.ts +0 -0
  1601. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/jsonrpc.js +0 -0
  1602. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/open.d.ts +0 -0
  1603. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/open.js +0 -0
  1604. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/routes.d.ts +0 -0
  1605. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/runtimes.d.ts +0 -0
  1606. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/runtimes.js +0 -0
  1607. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/shares.d.ts +0 -0
  1608. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/shares.js +0 -0
  1609. /package/dist/node_modules/{@allyhub-next/render → @allyhub/registry}/LICENSE +0 -0
  1610. /package/dist/node_modules/{@allyhub-next → @allyhub}/registry/dist/index.js +0 -0
  1611. /package/dist/node_modules/{@allyhub-next → @allyhub}/registry/dist/polyhaven.js +0 -0
  1612. /package/dist/node_modules/{@allyhub-next/runtime → @allyhub/render}/LICENSE +0 -0
  1613. /package/dist/node_modules/{@allyhub-next → @allyhub}/render/NOTICE +0 -0
  1614. /package/dist/node_modules/{@allyhub-next → @allyhub}/render/dist/cap.js +0 -0
  1615. /package/dist/node_modules/{@allyhub-next → @allyhub}/render/dist/capture.js +0 -0
  1616. /package/dist/node_modules/{@allyhub-next → @allyhub}/render/dist/clip.js +0 -0
  1617. /package/dist/node_modules/{@allyhub-next → @allyhub}/render/dist/delivery.js +0 -0
  1618. /package/dist/node_modules/{@allyhub-next → @allyhub}/render/dist/doc/fonts.js +0 -0
  1619. /package/dist/node_modules/{@allyhub-next → @allyhub}/render/dist/doc/pdf.js +0 -0
  1620. /package/dist/node_modules/{@allyhub-next → @allyhub}/render/dist/image.js +0 -0
  1621. /package/dist/node_modules/{@allyhub-next → @allyhub}/render/dist/index.js +0 -0
  1622. /package/dist/node_modules/{@allyhub-next → @allyhub}/render/dist/page.js +0 -0
  1623. /package/dist/node_modules/{@allyhub-next → @allyhub}/render/dist/pdf.js +0 -0
  1624. /package/dist/node_modules/{@allyhub-next → @allyhub}/render/dist/png.js +0 -0
  1625. /package/dist/node_modules/{@allyhub-next → @allyhub}/render/dist/pool.js +0 -0
  1626. /package/dist/node_modules/{@allyhub-next → @allyhub}/render/dist/webp.js +0 -0
  1627. /package/dist/node_modules/{@allyhub-next/runtimes → @allyhub/runtime}/LICENSE +0 -0
  1628. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtime/dist/bridge.js +0 -0
  1629. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtime/dist/contrast.js +0 -0
  1630. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtime/dist/fonts.js +0 -0
  1631. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtime/dist/guards.js +0 -0
  1632. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtime/dist/index.js +0 -0
  1633. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtime/dist/pictures.js +0 -0
  1634. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtime/dist/styles.js +0 -0
  1635. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtime/dist/titles.js +0 -0
  1636. /package/dist/node_modules/{@allyhub-next/scaffold → @allyhub/runtimes}/LICENSE +0 -0
  1637. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/dist/errors.d.ts +0 -0
  1638. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/dist/errors.js +0 -0
  1639. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/dist/home.d.ts +0 -0
  1640. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/dist/home.js +0 -0
  1641. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/dist/index.d.ts +0 -0
  1642. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/dist/index.js +0 -0
  1643. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/dist/lock.d.ts +0 -0
  1644. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/dist/lock.js +0 -0
  1645. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/dist/unpack.d.ts +0 -0
  1646. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/dist/unpack.js +0 -0
  1647. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/manifest.json +0 -0
  1648. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/pins/docx/package-lock.json +0 -0
  1649. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/pins/docx/package.json +0 -0
  1650. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/pins/gltf-tools/package-lock.json +0 -0
  1651. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/pins/gltf-tools/package.json +0 -0
  1652. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/pins/manifold-3d/package-lock.json +0 -0
  1653. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/pins/manifold-3d/package.json +0 -0
  1654. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/pins/onnxruntime-node/package-lock.json +0 -0
  1655. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/pins/onnxruntime-node/package.json +0 -0
  1656. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/pins/sherpa-onnx-node/package-lock.json +0 -0
  1657. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/pins/sherpa-onnx-node/package.json +0 -0
  1658. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/pins/tesseract.js/package-lock.json +0 -0
  1659. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/pins/tesseract.js/package.json +0 -0
  1660. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/schemas/runtimes.schema.json +0 -0
  1661. /package/dist/node_modules/{@allyhub-next/scenery-host → @allyhub/scaffold}/LICENSE +0 -0
  1662. /package/dist/node_modules/{@allyhub-next/sheet → @allyhub/scenery}/LICENSE +0 -0
  1663. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/NOTICE +0 -0
  1664. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/aim.d.ts +0 -0
  1665. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/aim.js +0 -0
  1666. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/bake.d.ts +0 -0
  1667. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/bake.js +0 -0
  1668. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/camera.d.ts +0 -0
  1669. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/camera.js +0 -0
  1670. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/curve.d.ts +0 -0
  1671. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/curve.js +0 -0
  1672. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/define.d.ts +0 -0
  1673. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/define.js +0 -0
  1674. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/fit.d.ts +0 -0
  1675. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/fit.js +0 -0
  1676. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/glass.d.ts +0 -0
  1677. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/glass.js +0 -0
  1678. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/handheld.d.ts +0 -0
  1679. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/handheld.js +0 -0
  1680. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/hull.d.ts +0 -0
  1681. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/hull.js +0 -0
  1682. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/index.d.ts +0 -0
  1683. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/index.js +0 -0
  1684. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/lens.d.ts +0 -0
  1685. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/lens.js +0 -0
  1686. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/moire.d.ts +0 -0
  1687. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/moire.js +0 -0
  1688. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/motion.d.ts +0 -0
  1689. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/motion.js +0 -0
  1690. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/move.d.ts +0 -0
  1691. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/move.js +0 -0
  1692. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/noise.d.ts +0 -0
  1693. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/noise.js +0 -0
  1694. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/phone.d.ts +0 -0
  1695. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/phone.js +0 -0
  1696. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/report.d.ts +0 -0
  1697. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/report.js +0 -0
  1698. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/screen-focus.d.ts +0 -0
  1699. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/screen-focus.js +0 -0
  1700. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/screen.d.ts +0 -0
  1701. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/screen.js +0 -0
  1702. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/solve.d.ts +0 -0
  1703. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/solve.js +0 -0
  1704. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/timing.d.ts +0 -0
  1705. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/timing.js +0 -0
  1706. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/vec.d.ts +0 -0
  1707. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/vec.js +0 -0
  1708. /package/dist/node_modules/{@allyhub-next/scenery → @allyhub/scenery-host}/LICENSE +0 -0
  1709. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/NOTICE +0 -0
  1710. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/adapter.d.ts +0 -0
  1711. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/adapter.js +0 -0
  1712. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/bake/apply.js +0 -0
  1713. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/bake/digest.js +0 -0
  1714. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/bake/envmap.d.ts +0 -0
  1715. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/bake/envmap.js +0 -0
  1716. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/bake/format.js +0 -0
  1717. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/budget.d.ts +0 -0
  1718. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/budget.js +0 -0
  1719. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/clock.d.ts +0 -0
  1720. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/clock.js +0 -0
  1721. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/errors.d.ts +0 -0
  1722. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/errors.js +0 -0
  1723. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/fidelity.d.ts +0 -0
  1724. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/fidelity.js +0 -0
  1725. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/focus-pass.d.ts +0 -0
  1726. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/idbuffer.js +0 -0
  1727. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/index.d.ts +0 -0
  1728. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/index.js +0 -0
  1729. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/layer/fidelity.d.ts +0 -0
  1730. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/layer/fidelity.js +0 -0
  1731. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/layer/state.js +0 -0
  1732. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/layer/types.js +0 -0
  1733. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/measure/contacts.js +0 -0
  1734. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/measure/health.js +0 -0
  1735. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/measure/screen-readback.d.ts +0 -0
  1736. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/measure/screen-readback.js +0 -0
  1737. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/measure/solid.d.ts +0 -0
  1738. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/measure/solid.js +0 -0
  1739. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/model-stage.d.ts +0 -0
  1740. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/module.d.ts +0 -0
  1741. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/module.js +0 -0
  1742. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/page/files.js +0 -0
  1743. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/page/props.js +0 -0
  1744. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/page/shaders.d.ts +0 -0
  1745. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/page/shaders.js +0 -0
  1746. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/queries/inventory.js +0 -0
  1747. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/queries/view.js +0 -0
  1748. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/scene.d.ts +0 -0
  1749. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/scene.js +0 -0
  1750. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/screen-dom.d.ts +0 -0
  1751. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/screen-dom.js +0 -0
  1752. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/screen-picture.d.ts +0 -0
  1753. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/screen-picture.js +0 -0
  1754. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/signature.d.ts +0 -0
  1755. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/signature.js +0 -0
  1756. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/steady.d.ts +0 -0
  1757. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/steady.js +0 -0
  1758. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/three-libs/basis/README.md +0 -0
  1759. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/three-libs/basis/basis_transcoder.js +0 -0
  1760. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/three-libs/basis/basis_transcoder.wasm +0 -0
  1761. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/three-libs/draco/README.md +0 -0
  1762. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/three-libs/draco/draco_decoder.js +0 -0
  1763. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/three-libs/draco/draco_decoder.wasm +0 -0
  1764. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/three-libs/draco/draco_wasm_wrapper.js +0 -0
  1765. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/three-libs/draco/gltf/draco_decoder.js +0 -0
  1766. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/three-libs/draco/gltf/draco_decoder.wasm +0 -0
  1767. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/three-libs/draco/gltf/draco_wasm_wrapper.js +0 -0
  1768. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/vec.d.ts +0 -0
  1769. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery-host/dist/vec.js +0 -0
  1770. /package/dist/node_modules/{@allyhub-next/slides-core → @allyhub/sheet}/LICENSE +0 -0
  1771. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/address.d.ts +0 -0
  1772. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/address.js +0 -0
  1773. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/api/capabilities.d.ts +0 -0
  1774. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/api/code.d.ts +0 -0
  1775. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/api/code.js +0 -0
  1776. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/api/hint.d.ts +0 -0
  1777. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/api/hint.js +0 -0
  1778. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/api/index.d.ts +0 -0
  1779. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/api/index.js +0 -0
  1780. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/api/rectangles.d.ts +0 -0
  1781. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/api/rectangles.js +0 -0
  1782. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/arrange.js +0 -0
  1783. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/analyse.d.ts +0 -0
  1784. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/analyse.js +0 -0
  1785. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/coerce.d.ts +0 -0
  1786. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/coerce.js +0 -0
  1787. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/engine.d.ts +0 -0
  1788. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/engine.js +0 -0
  1789. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/aggregate.d.ts +0 -0
  1790. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/aggregate.js +0 -0
  1791. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/convert.d.ts +0 -0
  1792. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/convert.js +0 -0
  1793. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/criteria.d.ts +0 -0
  1794. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/criteria.js +0 -0
  1795. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/database.d.ts +0 -0
  1796. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/database.js +0 -0
  1797. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/date.d.ts +0 -0
  1798. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/date.js +0 -0
  1799. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/define.d.ts +0 -0
  1800. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/define.js +0 -0
  1801. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/delimiters.d.ts +0 -0
  1802. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/delimiters.js +0 -0
  1803. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/distributions.d.ts +0 -0
  1804. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/distributions.js +0 -0
  1805. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/dynamic.d.ts +0 -0
  1806. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/dynamic.js +0 -0
  1807. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/finance.d.ts +0 -0
  1808. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/finance.js +0 -0
  1809. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/index.d.ts +0 -0
  1810. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/index.js +0 -0
  1811. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/info.d.ts +0 -0
  1812. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/info.js +0 -0
  1813. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/kernels.d.ts +0 -0
  1814. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/kernels.js +0 -0
  1815. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/logical.d.ts +0 -0
  1816. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/logical.js +0 -0
  1817. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/lookup.d.ts +0 -0
  1818. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/lookup.js +0 -0
  1819. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/maths.d.ts +0 -0
  1820. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/maths.js +0 -0
  1821. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/modern.d.ts +0 -0
  1822. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/modern.js +0 -0
  1823. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/special.d.ts +0 -0
  1824. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/special.js +0 -0
  1825. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/text.d.ts +0 -0
  1826. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/text.js +0 -0
  1827. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/graph.d.ts +0 -0
  1828. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/graph.js +0 -0
  1829. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/indexes.d.ts +0 -0
  1830. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/indexes.js +0 -0
  1831. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/remote.d.ts +0 -0
  1832. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/remote.js +0 -0
  1833. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/server.js +0 -0
  1834. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/types.d.ts +0 -0
  1835. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/types.js +0 -0
  1836. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/check.d.ts +0 -0
  1837. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/check.js +0 -0
  1838. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/csv.d.ts +0 -0
  1839. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/csv.js +0 -0
  1840. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/diff.d.ts +0 -0
  1841. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/edit.js +0 -0
  1842. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/export.d.ts +0 -0
  1843. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/export.js +0 -0
  1844. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/fill.d.ts +0 -0
  1845. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/fill.js +0 -0
  1846. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/filter.d.ts +0 -0
  1847. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/filter.js +0 -0
  1848. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/format.d.ts +0 -0
  1849. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/format.js +0 -0
  1850. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/formula/ast.d.ts +0 -0
  1851. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/formula/ast.js +0 -0
  1852. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/formula/move.d.ts +0 -0
  1853. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/formula/move.js +0 -0
  1854. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/formula/parse.d.ts +0 -0
  1855. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/formula/parse.js +0 -0
  1856. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/formula/print.d.ts +0 -0
  1857. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/formula/print.js +0 -0
  1858. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/formula/rewrite.d.ts +0 -0
  1859. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/formula/rewrite.js +0 -0
  1860. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/formula/walk.d.ts +0 -0
  1861. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/formula/walk.js +0 -0
  1862. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/html.d.ts +0 -0
  1863. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/html.js +0 -0
  1864. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/import.d.ts +0 -0
  1865. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/import.js +0 -0
  1866. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/index.d.ts +0 -0
  1867. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/index.js +0 -0
  1868. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/inspect.js +0 -0
  1869. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/paginate.js +0 -0
  1870. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/patch.d.ts +0 -0
  1871. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/patch.js +0 -0
  1872. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/profile.d.ts +0 -0
  1873. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/profile.js +0 -0
  1874. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/rules.d.ts +0 -0
  1875. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/rules.js +0 -0
  1876. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/scenario.d.ts +0 -0
  1877. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/scenario.js +0 -0
  1878. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/series.d.ts +0 -0
  1879. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/series.js +0 -0
  1880. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/sort.d.ts +0 -0
  1881. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/sort.js +0 -0
  1882. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/structure.js +0 -0
  1883. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/table-style.js +0 -0
  1884. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/table-styles.d.ts +0 -0
  1885. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/table-styles.js +0 -0
  1886. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/values.d.ts +0 -0
  1887. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/values.js +0 -0
  1888. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/write.d.ts +0 -0
  1889. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/write.js +0 -0
  1890. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/colors.d.ts +0 -0
  1891. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/colors.js +0 -0
  1892. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/formula.d.ts +0 -0
  1893. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/formula.js +0 -0
  1894. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/functions.d.ts +0 -0
  1895. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/functions.js +0 -0
  1896. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/index.d.ts +0 -0
  1897. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/index.js +0 -0
  1898. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/numfmt.d.ts +0 -0
  1899. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/numfmt.js +0 -0
  1900. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/sax.d.ts +0 -0
  1901. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/sax.js +0 -0
  1902. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/styles.d.ts +0 -0
  1903. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/styles.js +0 -0
  1904. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/theme.d.ts +0 -0
  1905. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/theme.js +0 -0
  1906. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/write.d.ts +0 -0
  1907. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/xml.d.ts +0 -0
  1908. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/xml.js +0 -0
  1909. /package/dist/node_modules/{@allyhub-next/slides-pptx → @allyhub/slides-core}/LICENSE +0 -0
  1910. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/animation.js +0 -0
  1911. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/capabilities.d.ts +0 -0
  1912. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/capabilities.js +0 -0
  1913. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/check.d.ts +0 -0
  1914. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/check.js +0 -0
  1915. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/code.d.ts +0 -0
  1916. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/components.d.ts +0 -0
  1917. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/components.js +0 -0
  1918. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/enums.d.ts +0 -0
  1919. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/enums.js +0 -0
  1920. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/identity.d.ts +0 -0
  1921. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/identity.js +0 -0
  1922. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/lang.d.ts +0 -0
  1923. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/lang.js +0 -0
  1924. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/model.js +0 -0
  1925. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/office.d.ts +0 -0
  1926. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/office.js +0 -0
  1927. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/path.d.ts +0 -0
  1928. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/path.js +0 -0
  1929. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/placeholders.d.ts +0 -0
  1930. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/placeholders.js +0 -0
  1931. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/stage.d.ts +0 -0
  1932. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/stage.js +0 -0
  1933. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/theme.js +0 -0
  1934. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/units.d.ts +0 -0
  1935. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/units.js +0 -0
  1936. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/values.d.ts +0 -0
  1937. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/values.js +0 -0
  1938. /package/dist/node_modules/{@allyhub-next/slides-runtime → @allyhub/slides-pptx}/LICENSE +0 -0
  1939. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-pptx/dist/fonts.js +0 -0
  1940. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-pptx/dist/index.js +0 -0
  1941. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-pptx/dist/read/model.js +0 -0
  1942. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-pptx/dist/read/table.js +0 -0
  1943. /package/dist/node_modules/{@allyhub-next/stage → @allyhub/slides-runtime}/LICENSE +0 -0
  1944. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-runtime/dist/ink.js +0 -0
  1945. /package/dist/node_modules/{@allyhub-next/video-core → @allyhub/stage}/LICENSE +0 -0
  1946. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage/dist/graphics.js +0 -0
  1947. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/400-italic.css +0 -0
  1948. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/400.css +0 -0
  1949. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/700-italic.css +0 -0
  1950. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/700.css +0 -0
  1951. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/LICENSE +0 -0
  1952. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/arial.css +0 -0
  1953. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/files/arimo-cyrillic-400-italic.woff2 +0 -0
  1954. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/files/arimo-cyrillic-400-normal.woff2 +0 -0
  1955. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/files/arimo-cyrillic-700-italic.woff2 +0 -0
  1956. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/files/arimo-cyrillic-700-normal.woff2 +0 -0
  1957. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/files/arimo-cyrillic-ext-400-italic.woff2 +0 -0
  1958. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/files/arimo-cyrillic-ext-400-normal.woff2 +0 -0
  1959. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/files/arimo-cyrillic-ext-700-italic.woff2 +0 -0
  1960. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/files/arimo-cyrillic-ext-700-normal.woff2 +0 -0
  1961. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/files/arimo-greek-400-italic.woff2 +0 -0
  1962. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/files/arimo-greek-400-normal.woff2 +0 -0
  1963. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/files/arimo-greek-700-italic.woff2 +0 -0
  1964. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/files/arimo-greek-700-normal.woff2 +0 -0
  1965. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/files/arimo-greek-ext-400-italic.woff2 +0 -0
  1966. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/files/arimo-greek-ext-400-normal.woff2 +0 -0
  1967. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/files/arimo-greek-ext-700-italic.woff2 +0 -0
  1968. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/files/arimo-greek-ext-700-normal.woff2 +0 -0
  1969. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/files/arimo-hebrew-400-italic.woff2 +0 -0
  1970. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/files/arimo-hebrew-400-normal.woff2 +0 -0
  1971. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/files/arimo-hebrew-700-italic.woff2 +0 -0
  1972. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/files/arimo-hebrew-700-normal.woff2 +0 -0
  1973. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/files/arimo-latin-400-italic.woff2 +0 -0
  1974. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/files/arimo-latin-400-normal.woff2 +0 -0
  1975. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/files/arimo-latin-700-italic.woff2 +0 -0
  1976. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/files/arimo-latin-700-normal.woff2 +0 -0
  1977. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/files/arimo-latin-ext-400-italic.woff2 +0 -0
  1978. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/files/arimo-latin-ext-400-normal.woff2 +0 -0
  1979. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/files/arimo-latin-ext-700-italic.woff2 +0 -0
  1980. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/files/arimo-latin-ext-700-normal.woff2 +0 -0
  1981. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/files/arimo-vietnamese-400-italic.woff2 +0 -0
  1982. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/files/arimo-vietnamese-400-normal.woff2 +0 -0
  1983. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/files/arimo-vietnamese-700-italic.woff2 +0 -0
  1984. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/arimo/files/arimo-vietnamese-700-normal.woff2 +0 -0
  1985. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/400-italic.css +0 -0
  1986. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/400.css +0 -0
  1987. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/700-italic.css +0 -0
  1988. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/700.css +0 -0
  1989. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/LICENSE +0 -0
  1990. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/calibri.css +0 -0
  1991. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/files/carlito-cyrillic-400-italic.woff2 +0 -0
  1992. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/files/carlito-cyrillic-400-normal.woff2 +0 -0
  1993. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/files/carlito-cyrillic-700-italic.woff2 +0 -0
  1994. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/files/carlito-cyrillic-700-normal.woff2 +0 -0
  1995. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/files/carlito-cyrillic-ext-400-italic.woff2 +0 -0
  1996. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/files/carlito-cyrillic-ext-400-normal.woff2 +0 -0
  1997. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/files/carlito-cyrillic-ext-700-italic.woff2 +0 -0
  1998. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/files/carlito-cyrillic-ext-700-normal.woff2 +0 -0
  1999. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/files/carlito-greek-400-italic.woff2 +0 -0
  2000. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/files/carlito-greek-400-normal.woff2 +0 -0
  2001. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/files/carlito-greek-700-italic.woff2 +0 -0
  2002. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/files/carlito-greek-700-normal.woff2 +0 -0
  2003. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/files/carlito-greek-ext-400-italic.woff2 +0 -0
  2004. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/files/carlito-greek-ext-400-normal.woff2 +0 -0
  2005. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/files/carlito-greek-ext-700-italic.woff2 +0 -0
  2006. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/files/carlito-greek-ext-700-normal.woff2 +0 -0
  2007. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/files/carlito-latin-400-italic.woff2 +0 -0
  2008. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/files/carlito-latin-400-normal.woff2 +0 -0
  2009. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/files/carlito-latin-700-italic.woff2 +0 -0
  2010. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/files/carlito-latin-700-normal.woff2 +0 -0
  2011. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/files/carlito-latin-ext-400-italic.woff2 +0 -0
  2012. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/files/carlito-latin-ext-400-normal.woff2 +0 -0
  2013. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/files/carlito-latin-ext-700-italic.woff2 +0 -0
  2014. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/files/carlito-latin-ext-700-normal.woff2 +0 -0
  2015. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/files/carlito-vietnamese-400-italic.woff2 +0 -0
  2016. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/files/carlito-vietnamese-400-normal.woff2 +0 -0
  2017. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/files/carlito-vietnamese-700-italic.woff2 +0 -0
  2018. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/carlito/files/carlito-vietnamese-700-normal.woff2 +0 -0
  2019. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-color-emoji/LICENSE +0 -0
  2020. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-color-emoji/emoji.css +0 -0
  2021. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-color-emoji/files/noto-color-emoji-emoji-400-normal.woff2 +0 -0
  2022. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/400.css +0 -0
  2023. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/700.css +0 -0
  2024. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/LICENSE +0 -0
  2025. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-100-400-normal.woff2 +0 -0
  2026. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-100-700-normal.woff2 +0 -0
  2027. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-101-400-normal.woff2 +0 -0
  2028. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-101-700-normal.woff2 +0 -0
  2029. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-102-400-normal.woff2 +0 -0
  2030. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-102-700-normal.woff2 +0 -0
  2031. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-103-400-normal.woff2 +0 -0
  2032. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-103-700-normal.woff2 +0 -0
  2033. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-104-400-normal.woff2 +0 -0
  2034. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-104-700-normal.woff2 +0 -0
  2035. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-105-400-normal.woff2 +0 -0
  2036. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-105-700-normal.woff2 +0 -0
  2037. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-106-400-normal.woff2 +0 -0
  2038. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-106-700-normal.woff2 +0 -0
  2039. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-107-400-normal.woff2 +0 -0
  2040. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-107-700-normal.woff2 +0 -0
  2041. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-108-400-normal.woff2 +0 -0
  2042. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-108-700-normal.woff2 +0 -0
  2043. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-109-400-normal.woff2 +0 -0
  2044. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-109-700-normal.woff2 +0 -0
  2045. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-110-400-normal.woff2 +0 -0
  2046. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-110-700-normal.woff2 +0 -0
  2047. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-111-400-normal.woff2 +0 -0
  2048. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-111-700-normal.woff2 +0 -0
  2049. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-112-400-normal.woff2 +0 -0
  2050. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-112-700-normal.woff2 +0 -0
  2051. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-113-400-normal.woff2 +0 -0
  2052. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-113-700-normal.woff2 +0 -0
  2053. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-114-400-normal.woff2 +0 -0
  2054. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-114-700-normal.woff2 +0 -0
  2055. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-115-400-normal.woff2 +0 -0
  2056. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-115-700-normal.woff2 +0 -0
  2057. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-116-400-normal.woff2 +0 -0
  2058. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-116-700-normal.woff2 +0 -0
  2059. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-117-400-normal.woff2 +0 -0
  2060. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-117-700-normal.woff2 +0 -0
  2061. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-118-400-normal.woff2 +0 -0
  2062. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-118-700-normal.woff2 +0 -0
  2063. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-119-400-normal.woff2 +0 -0
  2064. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-119-700-normal.woff2 +0 -0
  2065. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-21-400-normal.woff2 +0 -0
  2066. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-21-700-normal.woff2 +0 -0
  2067. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-22-400-normal.woff2 +0 -0
  2068. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-22-700-normal.woff2 +0 -0
  2069. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-23-400-normal.woff2 +0 -0
  2070. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-23-700-normal.woff2 +0 -0
  2071. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-24-400-normal.woff2 +0 -0
  2072. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-24-700-normal.woff2 +0 -0
  2073. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-25-400-normal.woff2 +0 -0
  2074. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-25-700-normal.woff2 +0 -0
  2075. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-26-400-normal.woff2 +0 -0
  2076. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-26-700-normal.woff2 +0 -0
  2077. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-27-400-normal.woff2 +0 -0
  2078. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-27-700-normal.woff2 +0 -0
  2079. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-28-400-normal.woff2 +0 -0
  2080. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-28-700-normal.woff2 +0 -0
  2081. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-29-400-normal.woff2 +0 -0
  2082. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-29-700-normal.woff2 +0 -0
  2083. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-30-400-normal.woff2 +0 -0
  2084. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-30-700-normal.woff2 +0 -0
  2085. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-31-400-normal.woff2 +0 -0
  2086. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-31-700-normal.woff2 +0 -0
  2087. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-32-400-normal.woff2 +0 -0
  2088. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-32-700-normal.woff2 +0 -0
  2089. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-33-400-normal.woff2 +0 -0
  2090. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-33-700-normal.woff2 +0 -0
  2091. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-34-400-normal.woff2 +0 -0
  2092. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-34-700-normal.woff2 +0 -0
  2093. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-35-400-normal.woff2 +0 -0
  2094. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-35-700-normal.woff2 +0 -0
  2095. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-36-400-normal.woff2 +0 -0
  2096. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-36-700-normal.woff2 +0 -0
  2097. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-37-400-normal.woff2 +0 -0
  2098. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-37-700-normal.woff2 +0 -0
  2099. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-38-400-normal.woff2 +0 -0
  2100. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-38-700-normal.woff2 +0 -0
  2101. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-39-400-normal.woff2 +0 -0
  2102. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-39-700-normal.woff2 +0 -0
  2103. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-4-400-normal.woff2 +0 -0
  2104. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-4-700-normal.woff2 +0 -0
  2105. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-40-400-normal.woff2 +0 -0
  2106. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-40-700-normal.woff2 +0 -0
  2107. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-41-400-normal.woff2 +0 -0
  2108. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-41-700-normal.woff2 +0 -0
  2109. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-42-400-normal.woff2 +0 -0
  2110. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-42-700-normal.woff2 +0 -0
  2111. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-43-400-normal.woff2 +0 -0
  2112. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-43-700-normal.woff2 +0 -0
  2113. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-44-400-normal.woff2 +0 -0
  2114. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-44-700-normal.woff2 +0 -0
  2115. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-45-400-normal.woff2 +0 -0
  2116. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-45-700-normal.woff2 +0 -0
  2117. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-46-400-normal.woff2 +0 -0
  2118. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-46-700-normal.woff2 +0 -0
  2119. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-47-400-normal.woff2 +0 -0
  2120. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-47-700-normal.woff2 +0 -0
  2121. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-48-400-normal.woff2 +0 -0
  2122. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-48-700-normal.woff2 +0 -0
  2123. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-49-400-normal.woff2 +0 -0
  2124. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-49-700-normal.woff2 +0 -0
  2125. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-5-400-normal.woff2 +0 -0
  2126. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-5-700-normal.woff2 +0 -0
  2127. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-50-400-normal.woff2 +0 -0
  2128. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-50-700-normal.woff2 +0 -0
  2129. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-51-400-normal.woff2 +0 -0
  2130. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-51-700-normal.woff2 +0 -0
  2131. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-52-400-normal.woff2 +0 -0
  2132. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-52-700-normal.woff2 +0 -0
  2133. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-53-400-normal.woff2 +0 -0
  2134. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-53-700-normal.woff2 +0 -0
  2135. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-54-400-normal.woff2 +0 -0
  2136. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-54-700-normal.woff2 +0 -0
  2137. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-55-400-normal.woff2 +0 -0
  2138. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-55-700-normal.woff2 +0 -0
  2139. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-56-400-normal.woff2 +0 -0
  2140. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-56-700-normal.woff2 +0 -0
  2141. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-57-400-normal.woff2 +0 -0
  2142. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-57-700-normal.woff2 +0 -0
  2143. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-58-400-normal.woff2 +0 -0
  2144. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-58-700-normal.woff2 +0 -0
  2145. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-59-400-normal.woff2 +0 -0
  2146. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-59-700-normal.woff2 +0 -0
  2147. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-6-400-normal.woff2 +0 -0
  2148. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-6-700-normal.woff2 +0 -0
  2149. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-60-400-normal.woff2 +0 -0
  2150. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-60-700-normal.woff2 +0 -0
  2151. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-61-400-normal.woff2 +0 -0
  2152. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-61-700-normal.woff2 +0 -0
  2153. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-62-400-normal.woff2 +0 -0
  2154. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-62-700-normal.woff2 +0 -0
  2155. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-63-400-normal.woff2 +0 -0
  2156. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-63-700-normal.woff2 +0 -0
  2157. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-64-400-normal.woff2 +0 -0
  2158. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-64-700-normal.woff2 +0 -0
  2159. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-65-400-normal.woff2 +0 -0
  2160. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-65-700-normal.woff2 +0 -0
  2161. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-66-400-normal.woff2 +0 -0
  2162. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-66-700-normal.woff2 +0 -0
  2163. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-67-400-normal.woff2 +0 -0
  2164. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-67-700-normal.woff2 +0 -0
  2165. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-68-400-normal.woff2 +0 -0
  2166. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-68-700-normal.woff2 +0 -0
  2167. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-69-400-normal.woff2 +0 -0
  2168. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-69-700-normal.woff2 +0 -0
  2169. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-70-400-normal.woff2 +0 -0
  2170. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-70-700-normal.woff2 +0 -0
  2171. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-71-400-normal.woff2 +0 -0
  2172. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-71-700-normal.woff2 +0 -0
  2173. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-72-400-normal.woff2 +0 -0
  2174. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-72-700-normal.woff2 +0 -0
  2175. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-73-400-normal.woff2 +0 -0
  2176. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-73-700-normal.woff2 +0 -0
  2177. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-74-400-normal.woff2 +0 -0
  2178. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-74-700-normal.woff2 +0 -0
  2179. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-75-400-normal.woff2 +0 -0
  2180. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-75-700-normal.woff2 +0 -0
  2181. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-76-400-normal.woff2 +0 -0
  2182. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-76-700-normal.woff2 +0 -0
  2183. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-77-400-normal.woff2 +0 -0
  2184. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-77-700-normal.woff2 +0 -0
  2185. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-78-400-normal.woff2 +0 -0
  2186. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-78-700-normal.woff2 +0 -0
  2187. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-79-400-normal.woff2 +0 -0
  2188. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-79-700-normal.woff2 +0 -0
  2189. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-80-400-normal.woff2 +0 -0
  2190. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-80-700-normal.woff2 +0 -0
  2191. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-81-400-normal.woff2 +0 -0
  2192. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-81-700-normal.woff2 +0 -0
  2193. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-82-400-normal.woff2 +0 -0
  2194. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-82-700-normal.woff2 +0 -0
  2195. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-83-400-normal.woff2 +0 -0
  2196. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-83-700-normal.woff2 +0 -0
  2197. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-84-400-normal.woff2 +0 -0
  2198. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-84-700-normal.woff2 +0 -0
  2199. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-85-400-normal.woff2 +0 -0
  2200. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-85-700-normal.woff2 +0 -0
  2201. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-86-400-normal.woff2 +0 -0
  2202. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-86-700-normal.woff2 +0 -0
  2203. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-87-400-normal.woff2 +0 -0
  2204. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-87-700-normal.woff2 +0 -0
  2205. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-88-400-normal.woff2 +0 -0
  2206. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-88-700-normal.woff2 +0 -0
  2207. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-89-400-normal.woff2 +0 -0
  2208. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-89-700-normal.woff2 +0 -0
  2209. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-90-400-normal.woff2 +0 -0
  2210. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-90-700-normal.woff2 +0 -0
  2211. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-91-400-normal.woff2 +0 -0
  2212. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-91-700-normal.woff2 +0 -0
  2213. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-97-400-normal.woff2 +0 -0
  2214. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-97-700-normal.woff2 +0 -0
  2215. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-98-400-normal.woff2 +0 -0
  2216. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-98-700-normal.woff2 +0 -0
  2217. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-99-400-normal.woff2 +0 -0
  2218. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-99-700-normal.woff2 +0 -0
  2219. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-cyrillic-400-normal.woff2 +0 -0
  2220. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-cyrillic-700-normal.woff2 +0 -0
  2221. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-latin-400-normal.woff2 +0 -0
  2222. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-latin-700-normal.woff2 +0 -0
  2223. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-latin-ext-400-normal.woff2 +0 -0
  2224. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-latin-ext-700-normal.woff2 +0 -0
  2225. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-vietnamese-400-normal.woff2 +0 -0
  2226. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/files/noto-sans-sc-vietnamese-700-normal.woff2 +0 -0
  2227. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/fonts/noto-sans-sc/microsoft-yahei.css +0 -0
  2228. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/host.js +0 -0
  2229. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/runtime/probe.html +0 -0
  2230. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/runtime/probe.js +0 -0
  2231. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/runtime/stage.html +0 -0
  2232. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/runtime/viewer.html +0 -0
  2233. /package/dist/node_modules/{@allyhub-next → @allyhub}/stage-page/dist/runtime/viewer.js +0 -0
  2234. /package/dist/node_modules/{@allyhub-next/website → @allyhub/video-core}/LICENSE +0 -0
  2235. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/anchors.d.ts +0 -0
  2236. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/anchors.js +0 -0
  2237. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/audio-types.d.ts +0 -0
  2238. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/audio-types.js +0 -0
  2239. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/backdrop.d.ts +0 -0
  2240. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/backdrop.js +0 -0
  2241. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/captions.d.ts +0 -0
  2242. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/captions.js +0 -0
  2243. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/console.d.ts +0 -0
  2244. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/console.js +0 -0
  2245. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/contrast.d.ts +0 -0
  2246. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/contrast.js +0 -0
  2247. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/cut-report.d.ts +0 -0
  2248. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/cut-report.js +0 -0
  2249. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/edit.d.ts +0 -0
  2250. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/edit.js +0 -0
  2251. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/edits.d.ts +0 -0
  2252. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/export.js +0 -0
  2253. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/fact.js +0 -0
  2254. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/footage-motion.d.ts +0 -0
  2255. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/footage-motion.js +0 -0
  2256. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/formats.d.ts +0 -0
  2257. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/formats.js +0 -0
  2258. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/look.d.ts +0 -0
  2259. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/look.js +0 -0
  2260. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/marks.d.ts +0 -0
  2261. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/marks.js +0 -0
  2262. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/matrix.d.ts +0 -0
  2263. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/matrix.js +0 -0
  2264. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/measure.js +0 -0
  2265. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/messages.d.ts +0 -0
  2266. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/messages.js +0 -0
  2267. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/motion.d.ts +0 -0
  2268. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/motion.js +0 -0
  2269. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/music.d.ts +0 -0
  2270. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/music.js +0 -0
  2271. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/placement.d.ts +0 -0
  2272. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/placement.js +0 -0
  2273. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/render-types.d.ts +0 -0
  2274. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/render-types.js +0 -0
  2275. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/schema.js +0 -0
  2276. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/script-edit.d.ts +0 -0
  2277. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/script-edit.js +0 -0
  2278. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/script.d.ts +0 -0
  2279. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/script.js +0 -0
  2280. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/seams.d.ts +0 -0
  2281. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/seams.js +0 -0
  2282. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/sound-under.d.ts +0 -0
  2283. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/sound-under.js +0 -0
  2284. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/source.d.ts +0 -0
  2285. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/source.js +0 -0
  2286. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/speech.d.ts +0 -0
  2287. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/timeline.js +0 -0
  2288. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/timing.d.ts +0 -0
  2289. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/timing.js +0 -0
  2290. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/transcript.d.ts +0 -0
  2291. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/transcript.js +0 -0
  2292. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/voice.d.ts +0 -0
  2293. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/voice.js +0 -0
  2294. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/words.d.ts +0 -0
  2295. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/words.js +0 -0
@@ -1,224 +0,0 @@
1
- import{n as e,r as t,t as n}from"./rolldown-runtime-XKyaHtl9.js";import{$ as r,$n as i,B as a,G as o,H as s,J as c,Jt as l,K as u,Q as d,Qn as f,U as p,V as m,W as h,X as g,Y as _,Z as v,_t as y,a as b,an as x,at as S,cn as C,ct as w,dt as T,et as E,fn as D,ft as O,gt as k,ht as A,in as j,it as M,ln as N,lt as P,mt as F,n as I,nn as L,nt as R,o as z,on as B,ot as ee,pt as te,q as ne,qt as re,r as ie,rn as V,rt as ae,st as oe,tt as se,un as ce,ut as le}from"./react-CT8OUeCe.js";import{F as ue,a as de}from"./dist-ClE1xUdI.js";import{a as fe,i as pe,n as me,r as he,t as ge}from"./text-align-start-CfqIQSWH.js";import{$ as _e,A as ve,B as ye,C as be,D as xe,E as Se,F as Ce,G as we,H as Te,I as H,J as Ee,K as De,L as Oe,M as ke,N as Ae,O as je,P as Me,Q as Ne,R as Pe,S as Fe,T as Ie,U as Le,V as Re,W as ze,X as U,Y as Be,Z as Ve,_ as He,a as Ue,at as We,b as Ge,c as Ke,d as qe,et as Je,f as Ye,g as Xe,h as Ze,i as Qe,it as $e,j as et,k as tt,l as nt,m as rt,n as it,nt as at,o as ot,ot as st,p as ct,q as lt,r as ut,rt as dt,s as ft,t as W,tt as pt,v as mt,w as ht,x as gt,y as _t,z as vt}from"./dist-DegNYCaB.js";import{t as yt}from"./minus-DLhpe7h_.js";import{c as bt,f as xt,h as St,m as Ct,p as wt,s as Tt,u as Et}from"./index-CwDs3z43.js";var Dt=L(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),Ot=L(`heading-1`,[[`path`,{d:`M4 12h8`,key:`17cfdx`}],[`path`,{d:`M4 18V6`,key:`1rz3zl`}],[`path`,{d:`M12 18V6`,key:`zqpxq5`}],[`path`,{d:`m17 12 3-2v8`,key:`1hhhft`}]]),kt=L(`heading-2`,[[`path`,{d:`M4 12h8`,key:`17cfdx`}],[`path`,{d:`M4 18V6`,key:`1rz3zl`}],[`path`,{d:`M12 18V6`,key:`zqpxq5`}],[`path`,{d:`M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1`,key:`9jr5yi`}]]),At=L(`heading-3`,[[`path`,{d:`M4 12h8`,key:`17cfdx`}],[`path`,{d:`M4 18V6`,key:`1rz3zl`}],[`path`,{d:`M12 18V6`,key:`zqpxq5`}],[`path`,{d:`M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2`,key:`68ncm8`}],[`path`,{d:`M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2`,key:`1ejuhz`}]]),jt=L(`lightbulb`,[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`,key:`1gvzjb`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]),Mt=L(`link-2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),Nt=L(`list-collapse`,[[`path`,{d:`M10 5h11`,key:`1hkqpe`}],[`path`,{d:`M10 12h11`,key:`6m4ad9`}],[`path`,{d:`M10 19h11`,key:`14g2nv`}],[`path`,{d:`m3 10 3-3-3-3`,key:`i7pm08`}],[`path`,{d:`m3 20 3-3-3-3`,key:`20gx1n`}]]),Pt=L(`list-todo`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]),Ft=L(`notebook-text`,[[`path`,{d:`M2 6h4`,key:`aawbzj`}],[`path`,{d:`M2 10h4`,key:`l0bgd4`}],[`path`,{d:`M2 14h4`,key:`1gsvsf`}],[`path`,{d:`M2 18h4`,key:`1bu2t1`}],[`rect`,{width:`16`,height:`20`,x:`4`,y:`2`,rx:`2`,key:`1nb95v`}],[`path`,{d:`M9.5 8h5`,key:`11mslq`}],[`path`,{d:`M9.5 12H16`,key:`ktog6x`}],[`path`,{d:`M9.5 16H14`,key:`p1seyn`}]]),It=L(`palette`,[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]),Lt=L(`pilcrow`,[[`path`,{d:`M13 4v16`,key:`8vvj80`}],[`path`,{d:`M17 4v16`,key:`7dpous`}],[`path`,{d:`M19 4H9.5a4.5 4.5 0 0 0 0 9H13`,key:`sh4n9v`}]]),Rt=L(`quote`,[[`path`,{d:`M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z`,key:`rib7q0`}],[`path`,{d:`M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z`,key:`1ymkrd`}]]),zt=L(`repeat-2`,[[`path`,{d:`m2 9 3-3 3 3`,key:`1ltn5i`}],[`path`,{d:`M13 18H7a2 2 0 0 1-2-2V6`,key:`1r6tfw`}],[`path`,{d:`m22 15-3 3-3-3`,key:`4rnwn2`}],[`path`,{d:`M11 6h6a2 2 0 0 1 2 2v10`,key:`2f72bc`}]]),Bt=L(`sheet`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`line`,{x1:`3`,x2:`21`,y1:`9`,y2:`9`,key:`1vqk6q`}],[`line`,{x1:`3`,x2:`21`,y1:`15`,y2:`15`,key:`o2sbyz`}],[`line`,{x1:`9`,x2:`9`,y1:`9`,y2:`21`,key:`1ib60c`}],[`line`,{x1:`15`,x2:`15`,y1:`9`,y2:`21`,key:`1n26ft`}]]),Vt=L(`square-code`,[[`path`,{d:`m10 9-3 3 3 3`,key:`1oro0q`}],[`path`,{d:`m14 15 3-3-3-3`,key:`bz13h7`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}]]),Ht={};function Ut(e,t){let n=t||Ht;return Wt(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function Wt(e,t,n){if(Kt(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return Gt(e.children,t,n)}return Array.isArray(e)?Gt(e,t,n):``}function Gt(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Wt(e[i],t,n);return r.join(``)}function Kt(e){return!!(e&&typeof e==`object`)}var qt=document.createElement(`i`);function Jt(e){let t=`&`+e+`;`;qt.innerHTML=t;let n=qt.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function Yt(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Xt(e,t){return e.length>0?(Yt(e,e.length,0,t),e):t}var Zt={}.hasOwnProperty;function Qt(e){let t={},n=-1;for(;++n<e.length;)$t(t,e[n]);return t}function $t(e,t){let n;for(n in t){let r=(Zt.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Zt.call(r,a)||(r[a]=[]);let e=i[a];en(r[a],Array.isArray(e)?e:e?[e]:[])}}}function en(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);Yt(e,0,0,r)}function tn(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function nn(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var rn=gn(/[A-Za-z]/),an=gn(/[\dA-Za-z]/),on=gn(/[#-'*+\--9=?A-Z^-~]/);function sn(e){return e!==null&&(e<32||e===127)}var cn=gn(/\d/),ln=gn(/[\dA-Fa-f]/),un=gn(/[!-/:-@[-`{-~]/);function dn(e){return e!==null&&e<-2}function fn(e){return e!==null&&(e<0||e===32)}function pn(e){return e===-2||e===-1||e===32}var mn=gn(/\p{P}|\p{S}/u),hn=gn(/\s/);function gn(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function _n(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return pn(r)?(e.enter(n),s(r)):t(r)}function s(r){return pn(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function vn(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&pn(t)?(e.enter(r),c(t)):l(t)}function c(t){return pn(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var yn={tokenize:bn};function bn(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),_n(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return dn(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var xn=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){Sn(this,e,t,n,!1)}addBefore(e,t,n){Sn(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Sn(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var Cn={tokenize:Tn},wn={tokenize:En};function Tn(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;let c=new xn;return c.add(a+1,0,t.events.slice(n)),c.add(n,s-n,[]),c.consume(t.events),l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(wn,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(wn,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return dn(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;let l=new xn;l.add(a+1,0,t.events.slice(n)),l.add(n,e-n,[]),l.consume(t.events)}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function En(e,t,n){return _n(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Dn(e){if(e===null||fn(e)||hn(e))return 1;if(mn(e))return 2}function On(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var kn={name:`attention`,resolveAll:An,tokenize:jn};function An(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};Mn(o,-a),Mn(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=Xt(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=Xt(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=Xt(r,On(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=Xt(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=Xt(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),Yt(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function jn(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Dn(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Dn(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Mn(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Nn={name:`autolink`,tokenize:Pn};function Pn(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return rn(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||an(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||an(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||sn(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):on(t)?(e.consume(t),l):n(t)}function u(e){return an(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||an(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Fn={partial:!0,tokenize:In};function In(e,t,n){return r;function r(t){return pn(t)?_n(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||dn(e)?t(e):n(e)}}var Ln={continuation:{tokenize:zn},exit:Bn,name:`blockQuote`,tokenize:Rn};function Rn(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return pn(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function zn(e,t,n){let r=this;return i;function i(t){return pn(t)?_n(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Ln,t,n)(r)}}function Bn(e){e.exit(`blockQuote`)}var Vn={name:`characterEscape`,tokenize:Hn};function Hn(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return un(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Un={name:`characterReference`,tokenize:Wn};function Wn(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=an,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=ln,u):(e.enter(`characterReferenceValue`),a=7,o=cn,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===an&&!Jt(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var Gn={partial:!0,tokenize:Kn};function Kn(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var qn={concrete:!0,name:`codeFenced`,tokenize:Jn};function Jn(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),pn(t)?_n(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||dn(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Gn,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||dn(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):pn(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),_n(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||dn(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||dn(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&pn(t)?_n(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||dn(t)?e.check(Gn,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||dn(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),pn(t)?_n(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),pn(t)?_n(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||dn(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var Yn={name:`codeIndented`,tokenize:Zn},Xn={partial:!0,tokenize:Qn};function Zn(e,t,n){return r;function r(t){return e.enter(`codeIndented`),vn(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):dn(t)?e.attempt(Xn,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||dn(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function Qn(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):dn(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):vn(e,t,a,`linePrefix`,4,4)(o)}function a(e){return dn(e)?i(e):n(e)}}var $n={name:`codeText`,previous:tr,resolve:er,tokenize:nr};function er(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function tr(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function nr(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):dn(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||dn(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var rr=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&ir(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),ir(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),ir(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);ir(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);ir(this.left,t.reverse())}}}};function ir(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function ar(e){let t={},n=-1,r,i,a,o,s,c,l,u=new rr(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,or(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return Yt(e,0,1/0,u.slice(0)),!l}function or(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var sr={resolve:lr,tokenize:ur},cr={partial:!0,tokenize:dr};function lr(e){return ar(e),e}function ur(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):dn(t)?e.check(cr,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function dr(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_n(e,a,`linePrefix`)}function a(i){if(i===null||dn(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function fr(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||sn(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||dn(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||fn(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||sn(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function pr(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):dn(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||dn(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!pn(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function mr(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):dn(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_n(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||dn(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function hr(e,t){let n;return r;function r(i){return dn(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):pn(i)?_n(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var gr={name:`definition`,tokenize:vr},_r={partial:!0,tokenize:yr};function vr(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return pr.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=nn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return fn(t)?hr(e,l)(t):l(t)}function l(t){return fr(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(_r,d,d)(t)}function d(t){return pn(t)?_n(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||dn(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function yr(e,t,n){return r;function r(t){return fn(t)?hr(e,i)(t):n(t)}function i(t){return mr(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return pn(t)?_n(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||dn(e)?t(e):n(e)}}var br={name:`hardBreakEscape`,tokenize:xr};function xr(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return dn(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Sr={name:`headingAtx`,resolve:Cr,tokenize:wr};function Cr(e,t){let n=e.length-2,r=3;if(e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r){let i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`};Yt(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function wr(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||fn(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||dn(n)?(e.exit(`atxHeading`),t(n)):pn(n)?_n(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||fn(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Tr=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Er=[`pre`,`script`,`style`,`textarea`],Dr={concrete:!0,name:`htmlFlow`,resolveTo:kr,tokenize:Ar},Or={partial:!0,tokenize:jr};function kr(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Ar(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:I):rn(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):rn(a)?(e.consume(a),i=4,r.interrupt?t:I):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:I):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return rn(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||fn(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Er.includes(l)?(i=1,r.interrupt?t(s):O(s)):Tr.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||an(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return pn(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||rn(t)?(e.consume(t),b):pn(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||an(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):pn(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):pn(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||dn(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||fn(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||pn(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||dn(t)?O(t):pn(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),L):t===63&&i===3?(e.consume(t),I):t===93&&i===5?(e.consume(t),F):dn(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Or,R,k)(t)):t===null||dn(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(Gn,A,R)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||dn(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),I):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return Er.includes(n)?(e.consume(t),L):O(t)}return rn(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function F(t){return t===93?(e.consume(t),I):O(t)}function I(t){return t===62?(e.consume(t),L):t===45&&i===2?(e.consume(t),I):O(t)}function L(t){return t===null||dn(t)?(e.exit(`htmlFlowData`),R(t)):(e.consume(t),L)}function R(n){return e.exit(`htmlFlow`),t(n)}}function jr(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Fn,t,n)}}var Mr={name:`htmlText`,tokenize:Nr};function Nr(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):rn(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):rn(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):dn(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):dn(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):dn(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):dn(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return rn(t)?(e.consume(t),S):n(t)}function S(t){return t===45||an(t)?(e.consume(t),S):C(t)}function C(t){return dn(t)?(o=C,N(t)):pn(t)?(e.consume(t),C):M(t)}function w(t){return t===45||an(t)?(e.consume(t),w):t===47||t===62||fn(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||rn(t)?(e.consume(t),E):dn(t)?(o=T,N(t)):pn(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||an(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):dn(t)?(o=D,N(t)):pn(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):dn(t)?(o=O,N(t)):pn(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):dn(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||fn(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||fn(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return pn(t)?_n(e,F,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):F(t)}function F(t){return e.enter(`htmlTextData`),o(t)}}var Pr={name:`labelEnd`,resolveAll:Rr,resolveTo:zr,tokenize:Br},Fr={tokenize:Vr},Ir={tokenize:Hr},Lr={tokenize:Ur};function Rr(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&Yt(e,0,e.length,n),e}function zr(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=Xt(o,e.slice(i+1,i+r+3)),o=Xt(o,[[`enter`,l,t]]),o=Xt(o,On(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=Xt(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=Xt(o,e.slice(a+1)),o=Xt(o,[[`exit`,s,t]]),Yt(e,i,e.length,o),e}function Br(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(nn(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Fr,u,o?u:d)(t):t===91?e.attempt(Ir,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Lr,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function Vr(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return fn(t)?hr(e,a)(t):a(t)}function a(t){return t===41?u(t):fr(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return fn(t)?hr(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?mr(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return fn(t)?hr(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Hr(e,t,n){let r=this;return i;function i(t){return pr.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(nn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Ur(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var Wr={name:`labelStartImage`,resolveAll:Pr.resolveAll,tokenize:Gr};function Gr(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var Kr={name:`labelStartLink`,resolveAll:Pr.resolveAll,tokenize:qr};function qr(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var Jr={name:`lineEnding`,tokenize:Yr};function Yr(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),_n(e,t,`linePrefix`)}}var Xr={name:`thematicBreak`,tokenize:Zr};function Zr(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||dn(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),pn(t)?_n(e,s,`whitespace`)(t):s(t))}}var Qr={continuation:{tokenize:ni},exit:ii,name:`list`,tokenize:ti},$r={partial:!0,tokenize:ai},ei={partial:!0,tokenize:ri};function ti(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:cn(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(Xr,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return cn(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Fn,r.interrupt?n:u,e.attempt($r,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return pn(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function ni(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Fn,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,_n(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!pn(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ei,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,_n(e,e.attempt(Qr,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function ri(e,t,n){let r=this;return _n(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function ii(e){e.exit(this.containerState.type)}function ai(e,t,n){let r=this;return _n(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!pn(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var oi={name:`setextUnderline`,resolveTo:si,tokenize:ci};function si(e,t){let n=new xn,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function ci(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),pn(t)?_n(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||dn(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var li={tokenize:ui};function ui(e){let t=this,n=e.attempt(Fn,r,e.attempt(this.parser.constructs.flowInitial,i,_n(e,e.attempt(this.parser.constructs.flow,i,e.attempt(sr,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var di={resolveAll:hi()},fi=mi(`string`),pi=mi(`text`);function mi(e){return{resolveAll:hi(e===`text`?gi:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function hi(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):t[r]&&t[r][1].type===`data`||(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function gi(e,t){let n=new xn,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===`lineEnding`)&&e[r-1][1].type===`data`){let i=e[r-1][1],a=t.sliceStream(i),o=a.length,s=-1,c=0,l;for(;o--;){let e=a[o];if(typeof e==`string`){for(s=e.length;e.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(e===-2)l=!0,c++;else if(e!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){let a={type:r===e.length||l||c<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[[`enter`,a,t],[`exit`,a,t]])}r++}return n.consume(e),e}var _i=e({attentionMarkers:()=>Ti,contentInitial:()=>yi,disable:()=>Ei,document:()=>vi,flow:()=>xi,flowInitial:()=>bi,insideSpan:()=>wi,string:()=>Si,text:()=>Ci}),vi={42:Qr,43:Qr,45:Qr,48:Qr,49:Qr,50:Qr,51:Qr,52:Qr,53:Qr,54:Qr,55:Qr,56:Qr,57:Qr,62:Ln},yi={91:gr},bi={[-2]:Yn,[-1]:Yn,32:Yn},xi={35:Sr,42:Xr,45:[oi,Xr],60:Dr,61:oi,95:Xr,96:qn,126:qn},Si={38:Un,92:Vn},Ci={[-5]:Jr,[-4]:Jr,[-3]:Jr,33:Wr,38:Un,42:kn,60:[Nn,Mr],91:Kr,92:[br,Vn],93:Pr,95:kn,96:$n},wi={null:[kn,di]},Ti={null:[42,95]},Ei={null:[]};function Di(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=Xt(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=On(a,l.events,l),l.events):[]}function f(e,t){return ki(p(e),t)}function p(e){return Oi(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){for(;r._index<o.length;){let e=o[r._index];if(typeof e==`string`){let t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)_(e.charCodeAt(r._bufferIndex))}else _(e)}}function _(e){u=u(e)}function v(e){dn(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&Yt(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Oi(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function ki(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
2
- `;break;case-3:o=`\r
3
- `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Ai(e){let t={constructs:Qt([_i,...(e||{}).extensions||[]]),content:n(yn),defined:[],document:n(Cn),flow:n(li),lazy:{},string:n(fi),text:n(pi)};return t;function n(e){return n;function n(n){return Di(t,e,n)}}}function ji(e){for(;!ar(e););return e}var Mi=/[\0\t\n\r]/g;function Ni(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i));let s=[],c=0;for(t=``,n&&=(i.charCodeAt(0)===65279&&c++,void 0);c<i.length;){Mi.lastIndex=c;let n=Mi.exec(i),a=n&&n.index!==void 0?n.index:i.length,o=i.charCodeAt(a);if(!n){t=i.slice(c);break}if(o===10&&c===a&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),c<a&&(s.push(i.slice(c,a)),e+=a-c),o){case 0:s.push(65533),e++;break;case 9:{let t=Math.ceil(e/4)*4;for(s.push(-2);e++<t;)s.push(-1);break}case 10:s.push(-4),e=1;break;default:r=!0,e=1}c=a+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Pi=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Fi(e){return e.replace(Pi,Ii)}function Ii(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return tn(n.slice(t?2:1),t?16:10)}return Jt(n)||e}function Li(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?zi(e.position):`start`in e||`end`in e?zi(e):`line`in e||`column`in e?Ri(e):``}function Ri(e){return Bi(e&&e.line)+`:`+Bi(e&&e.column)}function zi(e){return Ri(e&&e.start)+`-`+Ri(e&&e.end)}function Bi(e){return e&&typeof e==`number`?e:1}var Vi={}.hasOwnProperty;function Hi(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Ui(n)(ji(Ai(n).document().write(Ni()(e,t,!0))))}function Ui(e){let t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(me),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(ue),blockQuote:o(ae),characterEscape:E,characterReference:E,codeFenced:o(oe),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(oe,s),codeText:o(se,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(ce),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(le),hardBreakEscape:o(de),hardBreakTrailing:o(de),htmlFlow:o(fe,s),htmlFlowData:E,htmlText:o(fe,s),htmlTextData:E,image:o(pe),label:s,link:o(me),listItem:o(ge),listItemValue:p,listOrdered:o(he,f),listUnordered:o(he),paragraph:o(_e),reference:B,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(ue),strong:o(ve),thematicBreak:o(be)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:V,autolinkProtocol:ie,blockQuote:l(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:te,characterReferenceMarkerNumeric:te,characterReferenceValue:ne,characterReference:re,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:D,codeIndented:l(v),codeText:l(M),codeTextData:D,data:D,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(k),hardBreakTrailing:l(k),htmlFlow:l(A),htmlFlowData:D,htmlText:l(j),htmlTextData:D,image:l(P),label:I,labelText:F,lineEnding:O,link:l(N),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ee,resourceDestinationString:L,resourceTitleString:R,resource:z,setextHeading:l(T),setextHeadingLineSequence:w,setextHeadingText:C,strong:l(),thematicBreak:l()}};Gi(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[],position:void 0},o={stack:[r],tokenStack:[],config:t,enter:c,exit:u,buffer:s,resume:d,data:n},l=[],f=[],p=-1;for(;++p<e.length;)f.push(e[p]),(e[p][1].type===`listOrdered`||e[p][1].type===`listUnordered`)&&(e[p][0]===`enter`?l.push(f.length-1):a(f,l.pop()));for(e=f,p=-1;++p<e.length;){let n=t[e[p][0]];e[p][0]===`enter`&&t.beforeEnter.length>0&&i(t.beforeEnter,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),Vi.call(n,e[p][1].type)&&n[e[p][1].type].call({...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),e[p][0]===`exit`&&t.afterExit.length>0&&i(t.afterExit,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||qi).call(o,void 0,e[0])}for(r.position={start:Wi(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Wi(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},p=-1;++p<t.transforms.length;)r=t.transforms[p](r)||r;return r}function i(e,t,n){let r=-1;for(;++r<e.length;)e[r].call(t,n)}function a(e,t){let n=e.length-1,r=t-1,i=-1,a=!1,o,s,c,l,u=[];for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let n=r;for(s=void 0;n--;){let t=e[n];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=n}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),u.push({at:s||r,event:[`exit`,o,t[2]]})}if(t[1].type===`listItemPrefix`){let e={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=e,u.push({at:r,event:[`enter`,e,t[2]]}),c=void 0,l=!0}}}let d=e.splice(t),f=0;for(r=-1;++r<d.length;){for(;f<u.length&&u[f].at===t+r;)e.push(u[f++].event);e.push(d[r])}e[t][1]._spread=a}function o(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:`fragment`,children:[]})}function c(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Wi(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw Error("Cannot close `"+e.type+"` ("+Li({start:e.start,end:e.end})+`): it’s not open`);r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||qi).call(this,e,r[0])),n.position.end=Wi(e.end)}function d(){return Ut(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function h(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function v(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function y(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=nn(this.sliceSerialize(e)).toLowerCase()}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function x(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function S(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function C(){this.data.setextHeadingSlurpLineEnding=!0}function w(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&n.type===`text`||(n=ye(),n.position={start:Wi(e.start),end:void 0},t.push(n)),this.stack.push(n)}function D(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Wi(e.end)}function O(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Wi(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.call(this,e),D.call(this,e))}function k(){this.data.atHardBreak=!0}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function F(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Fi(t),n.identifier=nn(t).toLowerCase()}function I(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function L(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function R(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function z(){this.data.inReference=void 0}function B(){this.data.referenceType=`collapsed`}function ee(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=nn(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function te(e){this.data.characterReferenceType=e.type}function ne(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=tn(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Jt(t);let i=this.stack[this.stack.length-1];i.value+=r}function re(e){let t=this.stack.pop();t.position.end=Wi(e.end)}function ie(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function V(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ae(){return{type:`blockquote`,children:[],position:void 0}}function oe(){return{type:`code`,lang:null,meta:null,value:``,position:void 0}}function se(){return{type:`inlineCode`,value:``,position:void 0}}function ce(){return{type:`definition`,identifier:``,label:null,title:null,url:``,position:void 0}}function le(){return{type:`emphasis`,children:[],position:void 0}}function ue(){return{type:`heading`,depth:0,children:[],position:void 0}}function de(){return{type:`break`,position:void 0}}function fe(){return{type:`html`,value:``,position:void 0}}function pe(){return{type:`image`,title:null,url:``,alt:null,position:void 0}}function me(){return{type:`link`,title:null,url:``,children:[],position:void 0}}function he(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[],position:void 0}}function ge(e){return{type:`listItem`,spread:e._spread,checked:null,children:[],position:void 0}}function _e(){return{type:`paragraph`,children:[],position:void 0}}function ve(){return{type:`strong`,children:[],position:void 0}}function ye(){return{type:`text`,value:``,position:void 0}}function be(){return{type:`thematicBreak`,position:void 0}}}function Wi(e){return{line:e.line,column:e.column,offset:e.offset}}function Gi(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Gi(e,r):Ki(e,r)}}function Ki(e,t){let n;for(n in t)if(Vi.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`afterExit`:case`beforeEnter`:{let r=t[n];r&&e[n].push(r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function qi(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+Li({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Li({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Li({start:t.start,end:t.end})+`) is still open`)}Zi.attention=Qi,Zi.peek=$i;function Ji(){return{canContainEols:[`delete`],enter:{strikethrough:Yi},exit:{strikethrough:Xi}}}function Yi(e){this.enter({type:`delete`,children:[],position:void 0},e)}function Xi(e){this.exit(e)}function Zi(e,t,n,r){let i=n.createTracker(r),a=n.stack.includes(`strikethrough`)?`~`:`~~`,o=n.enter(`strikethrough`),s=i.move(a);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:`~`}),s+=i.move(a),o(),s}function Qi(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function $i(){return`~`}function ea(){return{enter:{table:ta,tableData:aa,tableHeader:aa,tableRow:ra},exit:{codeText:oa,table:na,tableData:ia,tableHeader:ia,tableRow:ia}}}function ta(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function na(e){this.exit(e),this.data.inTable=void 0}function ra(e){this.enter({type:`tableRow`,children:[]},e)}function ia(e){this.exit(e)}function aa(e){this.enter({type:`tableCell`,children:[]},e)}function oa(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,sa));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function sa(e,t){return t===`|`?t:e}function ca(){return{exit:{taskListCheckValueChecked:la,taskListCheckValueUnchecked:la,paragraph:ua}}}function la(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function ua(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function da(){return{enter:{mdxFlowExpression:fa,mdxTextExpression:pa},exit:{mdxFlowExpression:ma,mdxFlowExpressionChunk:ha,mdxTextExpression:ma,mdxTextExpressionChunk:ha}}}function fa(e){this.enter({type:`mdxFlowExpression`,value:``},e),this.buffer()}function pa(e){this.enter({type:`mdxTextExpression`,value:``},e),this.buffer()}function ma(e){let t=this.resume(),n=e.estree,r=this.stack[this.stack.length-1];r.type===`mdxFlowExpression`||r.type,this.exit(e),r.value=t,n&&(r.data={estree:n})}function ha(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}var ga=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),_a={0:`�`,128:`€`,130:`‚`,131:`ƒ`,132:`„`,133:`…`,134:`†`,135:`‡`,136:`ˆ`,137:`‰`,138:`Š`,139:`‹`,140:`Œ`,142:`Ž`,145:`‘`,146:`’`,147:`“`,148:`”`,149:`•`,150:`–`,151:`—`,152:`˜`,153:`™`,154:`š`,155:`›`,156:`œ`,158:`ž`,159:`Ÿ`};function va(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=48&&t<=57}function ya(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function ba(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function xa(e){return ba(e)||va(e)}var Sa=[``,`Named character references must be terminated by a semicolon`,`Numeric character references must be terminated by a semicolon`,`Named character references cannot be empty`,`Numeric character references cannot be empty`,`Named character references must be known`,`Numeric character references cannot be disallowed`,`Numeric character references cannot be outside the permissible Unicode range`];function Ca(e,t){let n=t||{},r=typeof n.additional==`string`?n.additional.charCodeAt(0):n.additional,i=[],a=0,o=-1,s=``,c,l;n.position&&(`start`in n.position||`indent`in n.position?(l=n.position.indent,c=n.position.start):c=n.position);let u=(c?c.line:0)||1,d=(c?c.column:0)||1,f=m(),p;for(a--;++a<=e.length;)if(p===10&&(d=(l?l[o]:0)||1),p=e.charCodeAt(a),p===38){let t=e.charCodeAt(a+1);if(t===9||t===10||t===12||t===32||t===38||t===60||Number.isNaN(t)||r&&t===r){s+=String.fromCharCode(p),d++;continue}let o=a+1,c=o,l=o,u;if(t===35){l=++c;let t=e.charCodeAt(l);t===88||t===120?(u=`hexadecimal`,l=++c):u=`decimal`}else u=`named`;let _=``,v=``,y=``,b=u===`named`?xa:u===`decimal`?va:ya;for(l--;++l<=e.length;){let t=e.charCodeAt(l);if(!b(t))break;y+=String.fromCharCode(t),u===`named`&&ga.includes(y)&&(_=y,v=Jt(y))}let x=e.charCodeAt(l)===59;if(x){l++;let e=u===`named`&&Jt(y);e&&(_=y,v=e)}let S=1+l-o,C=``;if(x||n.nonTerminated!==!1){if(!y)u!==`named`&&h(4,S);else if(u===`named`){if(x&&!v)h(5,1);else if(_!==y&&(l=c+_.length,S=1+l-c,x=!1),!x){let t=_?1:3;if(n.attribute){let n=e.charCodeAt(l);n===61?(h(t,S),v=``):xa(n)?v=``:h(t,S)}else h(t,S)}C=v}else{x||h(2,S);let e=Number.parseInt(y,u===`hexadecimal`?16:10);if(wa(e))h(7,S),C=`�`;else if(e in _a)h(6,S),C=_a[e];else{let t=``;Ta(e)&&h(6,S),e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10|55296),e=56320|e&1023),C=t+String.fromCharCode(e)}}}if(C){g(),f=m(),a=l-1,d+=l-o+1,i.push(C);let t=m();t.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,C,{start:f,end:t},e.slice(o-1,l)),f=t}else y=e.slice(o-1,l),s+=y,d+=y.length,a=l-1}else p===10&&(u++,o++,d=0),Number.isNaN(p)?g():(s+=String.fromCharCode(p),d++);return i.join(``);function m(){return{line:u,column:d,offset:a+((c?c.offset:0)||0)}}function h(e,t){let r;n.warning&&(r=m(),r.column+=t,r.offset+=t,n.warning.call(n.warningContext||void 0,Sa[e],r,e))}function g(){s&&=(i.push(s),n.text&&n.text.call(n.textContext||void 0,s,{start:f,end:m()}),``)}}function wa(e){return e>=55296&&e<=57343||e>1114111}function Ta(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)==65535||(e&65535)==65534}var Ea=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=Li(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Ea.prototype.file=``,Ea.prototype.name=``,Ea.prototype.reason=``,Ea.prototype.message=``,Ea.prototype.stack=``,Ea.prototype.column=void 0,Ea.prototype.line=void 0,Ea.prototype.ancestors=void 0,Ea.prototype.cause=void 0,Ea.prototype.fatal=void 0,Ea.prototype.place=void 0,Ea.prototype.ruleId=void 0,Ea.prototype.source=void 0;function Da(){return{canContainEols:[`mdxJsxTextElement`],enter:{mdxJsxFlowTag:r,mdxJsxFlowTagClosingMarker:i,mdxJsxFlowTagAttribute:d,mdxJsxFlowTagExpressionAttribute:f,mdxJsxFlowTagAttributeValueLiteral:e,mdxJsxFlowTagAttributeValueExpression:e,mdxJsxFlowTagSelfClosingMarker:o,mdxJsxTextTag:r,mdxJsxTextTagClosingMarker:i,mdxJsxTextTagAttribute:d,mdxJsxTextTagExpressionAttribute:f,mdxJsxTextTagAttributeValueLiteral:e,mdxJsxTextTagAttributeValueExpression:e,mdxJsxTextTagSelfClosingMarker:o},exit:{mdxJsxFlowTagClosingMarker:s,mdxJsxFlowTagNamePrimary:c,mdxJsxFlowTagNameMember:l,mdxJsxFlowTagNameLocal:u,mdxJsxFlowTagExpressionAttribute:p,mdxJsxFlowTagExpressionAttributeValue:n,mdxJsxFlowTagAttributeNamePrimary:m,mdxJsxFlowTagAttributeNameLocal:h,mdxJsxFlowTagAttributeValueLiteral:g,mdxJsxFlowTagAttributeValueLiteralValue:n,mdxJsxFlowTagAttributeValueExpression:_,mdxJsxFlowTagAttributeValueExpressionValue:n,mdxJsxFlowTagSelfClosingMarker:v,mdxJsxFlowTag:y,mdxJsxTextTagClosingMarker:s,mdxJsxTextTagNamePrimary:c,mdxJsxTextTagNameMember:l,mdxJsxTextTagNameLocal:u,mdxJsxTextTagExpressionAttribute:p,mdxJsxTextTagExpressionAttributeValue:n,mdxJsxTextTagAttributeNamePrimary:m,mdxJsxTextTagAttributeNameLocal:h,mdxJsxTextTagAttributeValueLiteral:g,mdxJsxTextTagAttributeValueLiteralValue:n,mdxJsxTextTagAttributeValueExpression:_,mdxJsxTextTagAttributeValueExpressionValue:n,mdxJsxTextTagSelfClosingMarker:v,mdxJsxTextTag:y}};function e(){this.buffer()}function t(e){return{line:e.line,column:e.column,offset:e.offset}}function n(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function r(e){let t={name:void 0,attributes:[],close:!1,selfClosing:!1,start:e.start,end:e.end};this.data.mdxJsxTagStack||(this.data.mdxJsxTagStack=[]),this.data.mdxJsxTag=t,this.buffer()}function i(e){if(this.data.mdxJsxTagStack.length===0)throw new Ea("Unexpected closing slash `/` in tag, expected an open tag first",{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-closing-slash`)}function a(e){if(this.data.mdxJsxTag.close)throw new Ea(`Unexpected attribute in closing tag, expected the end of the tag`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-attribute`)}function o(e){if(this.data.mdxJsxTag.close)throw new Ea("Unexpected self-closing slash `/` in closing tag, expected the end of the tag",{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-self-closing-slash`)}function s(){let e=this.data.mdxJsxTag;e.close=!0}function c(e){let t=this.data.mdxJsxTag;t.name=this.sliceSerialize(e)}function l(e){let t=this.data.mdxJsxTag;t.name+=`.`+this.sliceSerialize(e)}function u(e){let t=this.data.mdxJsxTag;t.name+=`:`+this.sliceSerialize(e)}function d(e){let n=this.data.mdxJsxTag;a.call(this,e),n.attributes.push({type:`mdxJsxAttribute`,name:``,value:null,position:{start:t(e.start),end:void 0}})}function f(e){let n=this.data.mdxJsxTag;a.call(this,e),n.attributes.push({type:`mdxJsxExpressionAttribute`,value:``,position:{start:t(e.start),end:void 0}}),this.buffer()}function p(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type;let i=e.estree;r.value=this.resume(),r.position,r.position.end=t(e.end),i&&(r.data={estree:i})}function m(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type,r.name=this.sliceSerialize(e),r.position,r.position.end=t(e.end)}function h(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type,r.name+=`:`+this.sliceSerialize(e),r.position,r.position.end=t(e.end)}function g(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.value=Ca(this.resume(),{nonTerminated:!1}),r.position,r.position.end=t(e.end)}function _(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type;let i={type:`mdxJsxAttributeValueExpression`,value:this.resume()},a=e.estree;a&&(i.data={estree:a}),r.value=i,r.position,r.position.end=t(e.end)}function v(){let e=this.data.mdxJsxTag;e.selfClosing=!0}function y(e){let t=this.data.mdxJsxTag,n=this.data.mdxJsxTagStack,r=n[n.length-1];if(t.close&&r.name!==t.name)throw new Ea("Unexpected closing tag `"+S(t)+"`, expected corresponding closing tag for `"+S(r)+"` ("+Li(r)+`)`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:end-tag-mismatch`);this.resume(),t.close?n.pop():this.enter({type:e.type===`mdxJsxTextTag`?`mdxJsxTextElement`:`mdxJsxFlowElement`,name:t.name||null,attributes:t.attributes,children:[]},e,b),t.selfClosing||t.close?this.exit(e,x):n.push(t)}function b(e,t){let n=this.data.mdxJsxTagStack,r=n[n.length-1],i=e?" before the end of `"+e.type+"`":``,a=e?{start:e.start,end:e.end}:void 0;throw new Ea("Expected a closing tag for `"+S(r)+"` ("+Li({start:t.start,end:t.end})+`)`+i,a,`mdast-util-mdx-jsx:end-tag-mismatch`)}function x(e,t){let n=this.data.mdxJsxTag;throw new Ea("Expected the closing tag `"+S(n)+"` either after the end of `"+t.type+"` ("+Li(t.end)+") or another opening tag after the start of `"+t.type+"` ("+Li(t.start)+`)`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:end-tag-mismatch`)}function S(e){return`<`+(e.close?`/`:``)+(e.name||``)+`>`}}function Oa(){return{enter:{mdxjsEsm:ka},exit:{mdxjsEsm:Aa,mdxjsEsmData:ja}}}function ka(e){this.enter({type:`mdxjsEsm`,value:``},e),this.buffer()}function Aa(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,this.exit(e);let r=e.estree;n.value=t,r&&(n.data={estree:r})}function ja(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function Ma(){return[da(),Da(),Oa()]}function Na(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&Yt(o,o.length,0,On(s,e.slice(r+1,n),t)),Yt(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),Yt(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Dn(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Dn(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Pa=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){Fa(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Fa(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function Ia(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function La(){return{flow:{null:{name:`table`,tokenize:Ra,resolveAll:za}}}}function Ra(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):dn(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):pn(t)?_n(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||fn(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,pn(t)?_n(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return pn(t)?_n(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||dn(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return pn(t)?_n(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||dn(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||dn(n)?(e.exit(`tableRow`),t(n)):pn(n)?_n(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||fn(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function za(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Pa;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Va(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Ba(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Ba(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Ba(f,t,o,i,n,d)):(o[0]=o[1],d=Ba(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Va(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Ia(t.events,n))}return e}function Ba(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},Ha(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=Ha(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=Ha(t.events,n[2]),a=Ha(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Ha(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Va(e,t,n,r,i){let a=[],o=Ha(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Ha(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Ua={name:`tasklistCheck`,tokenize:Ga};function Wa(){return{text:{91:Ua}}}function Ga(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return fn(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return dn(r)?t(r):pn(r)?e.check({tokenize:Ka},t,n)(r):n(r)}}function Ka(e,t,n){return _n(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}var qa=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,31,4,33,15,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,7,0,259,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,481,1,61,4,4,5,9,7,3,6,31,3,149,2,12,2,9,1,3,0,33,1,1357,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],Ja=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,13,65,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,18,21,18,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,18,0,182,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,22,0,239,18,16,0,2,12,2,33,125,0,80,921,103,111,6,206,13,310,2314,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7386,37,33,96,114,14,913,15,50,7710,3,2,6,2,1,2,296,10,0,30,2,3,0,15,4,8,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,340,2,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,129,15,6,55,50,49,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4382,2,5773,3,7472,16,621,2467,541,1507,4938,6,8489,39815,11327],Ya=`‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄ-׉ؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୓-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫰ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・`,Xa=`ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆ՘ՙՠ-ֈ֋֌א-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿ₏-₟ℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-꟝꟢꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩ꭬꭭ꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ`,Za={3:`abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile`,5:`class enum extends super const export import`,6:`enum`,strict:`implements interface let package private protected public static yield`,strictBind:`eval arguments`},Qa=`break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this`,$a={5:Qa,"5module":Qa+` export import`,6:Qa+` const class extends export import super`},eo=/^in(stanceof)?$/,to=RegExp(`[`+Xa+`]`),no=RegExp(`[`+Xa+Ya+`]`);function ro(e,t){for(var n=65536,r=0;r<t.length;r+=2){if(n+=t[r],n>e)return!1;if(n+=t[r+1],n>=e)return!0}return!1}function io(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&to.test(String.fromCharCode(e)):t!==!1&&ro(e,Ja)}function ao(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&no.test(String.fromCharCode(e)):t===!1?!1:ro(e,Ja)||ro(e,qa)}var oo=function(e,t){t===void 0&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function so(e,t){return new oo(e,{beforeExpr:!0,binop:t})}var co={beforeExpr:!0},lo={startsExpr:!0},uo={};function fo(e,t){return t===void 0&&(t={}),t.keyword=e,uo[e]=new oo(e,t)}var G={num:new oo(`num`,lo),regexp:new oo(`regexp`,lo),string:new oo(`string`,lo),name:new oo(`name`,lo),privateId:new oo(`privateId`,lo),eof:new oo(`eof`),bracketL:new oo(`[`,{beforeExpr:!0,startsExpr:!0}),bracketR:new oo(`]`),braceL:new oo(`{`,{beforeExpr:!0,startsExpr:!0}),braceR:new oo(`}`),parenL:new oo(`(`,{beforeExpr:!0,startsExpr:!0}),parenR:new oo(`)`),comma:new oo(`,`,co),semi:new oo(`;`,co),colon:new oo(`:`,co),dot:new oo(`.`),question:new oo(`?`,co),questionDot:new oo(`?.`),arrow:new oo(`=>`,co),template:new oo(`template`),invalidTemplate:new oo(`invalidTemplate`),ellipsis:new oo(`...`,co),backQuote:new oo("`",lo),dollarBraceL:new oo("${",{beforeExpr:!0,startsExpr:!0}),eq:new oo(`=`,{beforeExpr:!0,isAssign:!0}),assign:new oo(`_=`,{beforeExpr:!0,isAssign:!0}),incDec:new oo(`++/--`,{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new oo(`!/~`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:so(`||`,1),logicalAND:so(`&&`,2),bitwiseOR:so(`|`,3),bitwiseXOR:so(`^`,4),bitwiseAND:so(`&`,5),equality:so(`==/!=/===/!==`,6),relational:so(`</>/<=/>=`,7),bitShift:so(`<</>>/>>>`,8),plusMin:new oo(`+/-`,{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:so(`%`,10),star:so(`*`,10),slash:so(`/`,10),starstar:new oo(`**`,{beforeExpr:!0}),coalesce:so(`??`,1),_break:fo(`break`),_case:fo(`case`,co),_catch:fo(`catch`),_continue:fo(`continue`),_debugger:fo(`debugger`),_default:fo(`default`,co),_do:fo(`do`,{isLoop:!0,beforeExpr:!0}),_else:fo(`else`,co),_finally:fo(`finally`),_for:fo(`for`,{isLoop:!0}),_function:fo(`function`,lo),_if:fo(`if`),_return:fo(`return`,co),_switch:fo(`switch`),_throw:fo(`throw`,co),_try:fo(`try`),_var:fo(`var`),_const:fo(`const`),_while:fo(`while`,{isLoop:!0}),_with:fo(`with`),_new:fo(`new`,{beforeExpr:!0,startsExpr:!0}),_this:fo(`this`,lo),_super:fo(`super`,lo),_class:fo(`class`,lo),_extends:fo(`extends`,co),_export:fo(`export`),_import:fo(`import`,lo),_null:fo(`null`,lo),_true:fo(`true`,lo),_false:fo(`false`,lo),_in:fo(`in`,{beforeExpr:!0,binop:7}),_instanceof:fo(`instanceof`,{beforeExpr:!0,binop:7}),_typeof:fo(`typeof`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:fo(`void`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:fo(`delete`,{beforeExpr:!0,prefix:!0,startsExpr:!0})},po=/\r\n?|\n|\u2028|\u2029/,mo=new RegExp(po.source,`g`);function ho(e){return e===10||e===13||e===8232||e===8233}function go(e,t,n){n===void 0&&(n=e.length);for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(ho(i))return r<n-1&&i===13&&e.charCodeAt(r+1)===10?r+2:r+1}return-1}var _o=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,vo=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,yo=Object.prototype,bo=yo.hasOwnProperty,xo=yo.toString,So=Object.hasOwn||(function(e,t){return bo.call(e,t)}),Co=Array.isArray||(function(e){return xo.call(e)===`[object Array]`}),wo=Object.create(null);function To(e){return wo[e]||(wo[e]=RegExp(`^(?:`+e.replace(/ /g,`|`)+`)$`))}function Eo(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var Do=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Oo=function(e,t){this.line=e,this.column=t};Oo.prototype.offset=function(e){return new Oo(this.line,this.column+e)};var ko=function(e,t,n){this.start=t,this.end=n,e.sourceFile!==null&&(this.source=e.sourceFile)};function Ao(e,t){for(var n=1,r=0;;){var i=go(e,r,t);if(i<0)return new Oo(n,t-r);++n,r=i}}var jo={ecmaVersion:null,sourceType:`script`,strict:!1,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,startLocation:null,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},Mo=!1;function No(e){var t={};for(var n in jo)t[n]=e&&So(e,n)?e[n]:jo[n];if(t.ecmaVersion===`latest`?t.ecmaVersion=1e8:t.ecmaVersion==null?(!Mo&&typeof console==`object`&&console.warn&&(Mo=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
4
- Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved??=t.ecmaVersion<5,e&&e.allowHashBang!=null||(t.allowHashBang=t.ecmaVersion>=14),Co(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}if(Co(t.onComment)&&(t.onComment=Po(t,t.onComment)),t.sourceType===`commonjs`&&t.allowAwaitOutsideFunction)throw Error(`Cannot use allowAwaitOutsideFunction with sourceType: commonjs`);return t}function Po(e,t){return function(n,r,i,a,o,s){var c={type:n?`Block`:`Line`,value:r,start:i,end:a};e.locations&&(c.loc=new ko(this,o,s)),e.ranges&&(c.range=[i,a]),t.push(c)}}var Fo=1,Io=2,Lo=4,Ro=8,zo=16,Bo=32,Vo=64,Ho=128,Uo=256,Wo=512,Go=1024,Ko=Fo|Io|Uo;function qo(e,t){return Io|(e?Lo:0)|(t?Ro:0)}var Jo=0,Yo=1,Xo=2,Zo=3,Qo=4,$o=5,es=function(e,t,n){this.options=e=No(e),this.sourceFile=e.sourceFile,this.keywords=To($a[e.ecmaVersion>=6?6:e.sourceType===`module`?`5module`:5]);var r=``;e.allowReserved!==!0&&(r=Za[e.ecmaVersion>=6?6:e.ecmaVersion===5?5:3],e.sourceType===`module`&&(r+=` await`)),this.reservedWords=To(r);var i=(r?r+` `:``)+Za.strict;this.reservedWordsStrict=To(i),this.reservedWordsStrictBind=To(i+` `+Za.strictBind),this.input=String(t),this.containsEsc=!1,this.pos=n||0,this.curLine=1,e.startLocation?(this.lineStart=this.pos-e.startLocation.column,this.curLine=e.startLocation.line):n?(this.lineStart=this.input.lastIndexOf(`
5
- `,n-1)+1,this.options.locations&&(this.curLine=this.input.slice(0,this.lineStart).split(po).length)):this.lineStart=0,this.type=G.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=e.sourceType===`module`,this.strict=this.inModule||e.strict===!0||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&e.allowHashBang&&this.input.slice(0,2)===`#!`&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType===`commonjs`?Io:Fo),this.regexpState=null,this.privateNameStack=[]},ts={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};es.prototype.parse=function(){var e=this,t=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return e.parseTopLevel(t)})},ts.inFunction.get=function(){return(this.currentVarScope().flags&Io)>0},ts.inGenerator.get=function(){return(this.currentVarScope().flags&Ro)>0},ts.inAsync.get=function(){return(this.currentVarScope().flags&Lo)>0},ts.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(t&(Uo|Wo))return!1;if(t&Io)return(t&Lo)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},ts.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&Fo)},ts.allowSuper.get=function(){return(this.currentThisScope().flags&Vo)>0||this.options.allowSuperOutsideMethod},ts.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Ho)>0},ts.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},ts.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(t&(Uo|Wo)||t&Io&&!(t&zo))return!0}return!1},ts.allowUsing.get=function(){var e=this.currentScope().flags;return!(e&Go||!this.inModule&&e&Fo)},ts.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Uo)>0},es.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,r=0;r<e.length;r++)n=e[r](n);return n},es.parse=function(e,t){return new this(t,e).parse()},es.parseExpressionAt=function(e,t,n){var r=new this(n,e,t);return r.nextToken(),r.parseExpression()},es.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(es.prototype,ts);var ns=es.prototype,rs=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;ns.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){vo.lastIndex=e,e+=vo.exec(this.input)[0].length;var t=rs.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])===`use strict`){vo.lastIndex=e+t[0].length;var n=vo.exec(this.input),r=n.index+n[0].length,i=this.input.charAt(r);return i===`;`||i===`}`||po.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||i===`!`&&this.input.charAt(r+1)===`=`||i===`i`&&is(this,r))}e+=t[0].length,vo.lastIndex=e,e+=vo.exec(this.input)[0].length,this.input[e]===`;`&&e++}};function is(e,t){for(var n=t+1,r=Math.min(e.input.length,t+11);n<r;){var i=e.fullCharCodeAt(n);if(!ao(i,!0))break;n+=i<=65535?1:2}return n===t+2&&e.input.slice(t,n)===`in`||n===t+10&&e.input.slice(t,n)===`instanceof`}ns.eat=function(e){return this.type===e&&(this.next(),!0)},ns.isContextual=function(e){return this.type===G.name&&this.value===e&&!this.containsEsc},ns.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1},ns.catchStackOverflow=function(e){try{return e()}catch(e){if(e instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(e.message)||/\btoo much recursion\b/i.test(e.message)))this.raise(this.start,`Not enough stack space to parse input`);else throw e}},ns.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},ns.canInsertSemicolon=function(){return this.type===G.eof||this.type===G.braceR||po.test(this.input.slice(this.lastTokEnd,this.start))},ns.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},ns.semicolon=function(){!this.eat(G.semi)&&!this.insertSemicolon()&&this.unexpected()},ns.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},ns.expect=function(e){this.eat(e)||this.unexpected()},ns.unexpected=function(e){this.raise(e??this.start,`Unexpected token`)};var as=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};ns.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,`Comma is not permitted after the rest element`);var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,t?`Assigning to rvalue`:`Parenthesized pattern`)}},ns.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,r=e.doubleProto;if(!t)return n>=0||r>=0;n>=0&&this.raise(n,`Shorthand property assignments are valid only in destructuring patterns`),r>=0&&this.raiseRecoverable(r,`Redefinition of __proto__ property`)},ns.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,`Yield expression cannot be a default value`),this.awaitPos&&this.raise(this.awaitPos,`Await expression cannot be a default value`)},ns.isSimpleAssignTarget=function(e){return e.type===`ParenthesizedExpression`?this.isSimpleAssignTarget(e.expression):e.type===`Identifier`||e.type===`MemberExpression`};var K=es.prototype;K.parseTopLevel=function(e){var t=Object.create(null);for(e.body||=[];this.type!==G.eof;){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var r=0,i=Object.keys(this.undefinedExports);r<i.length;r+=1){var a=i[r];this.raiseRecoverable(this.undefinedExports[a].start,`Export '`+a+`' is not defined`)}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType===`commonjs`?`script`:this.options.sourceType,this.finishNode(e,`Program`)};var os={kind:`loop`},ss={kind:`switch`};K.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual(`let`))return!1;vo.lastIndex=this.pos;var t=vo.exec(this.input),n=this.pos+t[0].length,r=this.fullCharCodeAt(n);if(r===91||r===92)return!0;if(e)return!1;if(r===123)return!0;if(io(r)){var i=n;do n+=r<=65535?1:2;while(ao(r=this.fullCharCodeAt(n)));if(r===92)return!0;var a=this.input.slice(i,n);if(!eo.test(a))return!0}return!1},K.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual(`async`))return!1;vo.lastIndex=this.pos;var e=vo.exec(this.input),t=this.pos+e[0].length,n;return!po.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)===`function`&&(t+8===this.input.length||!(ao(n=this.fullCharCodeAt(t+8))||n===92))},K.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?`await`:`using`))return!1;vo.lastIndex=this.pos;var n=vo.exec(this.input),r=this.pos+n[0].length;if(po.test(this.input.slice(this.pos,r)))return!1;if(e){var i=r+5,a;if(this.input.slice(r,i)!==`using`||i===this.input.length||ao(a=this.fullCharCodeAt(i))||a===92)return!1;vo.lastIndex=i;var o=vo.exec(this.input);if(r=i+o[0].length,o&&po.test(this.input.slice(i,r)))return!1}var s=this.fullCharCodeAt(r);if(!io(s)&&s!==92)return!1;var c=r;do r+=s<=65535?1:2;while(ao(s=this.fullCharCodeAt(r)));if(s===92)return!0;var l=this.input.slice(c,r);if(eo.test(l))return!1;if(t&&!e&&l===`of`){vo.lastIndex=r;var u=vo.exec(this.input);if(r+=u[0].length,this.input.charCodeAt(r)!==61||(s=this.input.charCodeAt(r+1))===61||s===62)return!1}return!0},K.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)},K.isUsing=function(e){return this.isUsingKeyword(!1,e)},K.parseStatement=function(e,t,n){var r=this.type,i=this.startNode(),a;switch(this.isLet(e)&&(r=G._var,a=`let`),r){case G._break:case G._continue:return this.parseBreakContinueStatement(i,r.keyword);case G._debugger:return this.parseDebuggerStatement(i);case G._do:return this.parseDoStatement(i);case G._for:return this.parseForStatement(i);case G._function:return e&&(this.strict||e!==`if`&&e!==`label`)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(i,!1,!e);case G._class:return e&&this.unexpected(),this.parseClass(i,!0);case G._if:return this.parseIfStatement(i);case G._return:return this.parseReturnStatement(i);case G._switch:return this.parseSwitchStatement(i);case G._throw:return this.parseThrowStatement(i);case G._try:return this.parseTryStatement(i);case G._const:case G._var:return a||=this.value,e&&a!==`var`&&this.unexpected(),this.parseVarStatement(i,a);case G._while:return this.parseWhileStatement(i);case G._with:return this.parseWithStatement(i);case G.braceL:return this.parseBlock(!0,i);case G.semi:return this.parseEmptyStatement(i);case G._export:case G._import:if(this.options.ecmaVersion>10&&r===G._import){vo.lastIndex=this.pos;var o=vo.exec(this.input),s=this.pos+o[0].length,c=this.input.charCodeAt(s);if(c===40||c===46)return this.parseExpressionStatement(i,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,`'import' and 'export' may only appear at the top level`),this.inModule||this.raise(this.start,`'import' and 'export' may appear only with 'sourceType: module'`)),r===G._import?this.parseImport(i):this.parseExport(i,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(i,!0,!e);var l=this.isAwaitUsing(!1)?`await using`:this.isUsing(!1)?`using`:null;if(l)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),e&&this.raise(this.start,`Using declaration is not allowed in single-statement positions`),l===`await using`&&(this.canAwait||this.raise(this.start,`Await using cannot appear outside of async function`),this.next()),this.next(),this.parseVar(i,!1,l),this.semicolon(),this.finishNode(i,`VariableDeclaration`);var u=this.value,d=this.parseExpression();return r===G.name&&d.type===`Identifier`&&this.eat(G.colon)?this.parseLabeledStatement(i,u,d,e):this.parseExpressionStatement(i,d)}},K.parseBreakContinueStatement=function(e,t){var n=t===`break`;this.next(),this.eat(G.semi)||this.insertSemicolon()?e.label=null:this.type===G.name?(e.label=this.parseIdent(),this.semicolon()):this.unexpected();for(var r=0;r<this.labels.length;++r){var i=this.labels[r];if((e.label==null||i.name===e.label.name)&&(i.kind!=null&&(n||i.kind===`loop`)||e.label&&n))break}return r===this.labels.length&&this.raise(e.start,`Unsyntactic `+t),this.finishNode(e,n?`BreakStatement`:`ContinueStatement`)},K.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,`DebuggerStatement`)},K.parseDoStatement=function(e){return this.next(),this.labels.push(os),e.body=this.parseStatement(`do`),this.labels.pop(),this.expect(G._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(G.semi):this.semicolon(),this.finishNode(e,`DoWhileStatement`)},K.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual(`await`)?this.lastTokStart:-1;if(this.labels.push(os),this.enterScope(0),this.expect(G.parenL),this.type===G.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===G._var||this.type===G._const||n){var r=this.startNode(),i=n?`let`:this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,`VariableDeclaration`),this.parseForAfterInit(e,r,t)}var a=this.isContextual(`let`),o=!1,s=this.isUsing(!0)?`using`:this.isAwaitUsing(!0)?`await using`:null;if(s){var c=this.startNode();return this.next(),s===`await using`&&(this.canAwait||this.raise(this.start,`Await using cannot appear outside of async function`),this.next()),this.parseVar(c,!0,s),this.finishNode(c,`VariableDeclaration`),this.parseForAfterInit(e,c,t)}var l=this.containsEsc,u=new as,d=this.start,f=t>-1?this.parseExprSubscripts(u,`await`):this.parseExpression(!0,u);return this.type===G._in||(o=this.options.ecmaVersion>=6&&this.isContextual(`of`))?(t>-1?(this.type===G._in&&this.unexpected(t),e.await=!0):o&&this.options.ecmaVersion>=8&&(f.start===d&&!l&&f.type===`Identifier`&&f.name===`async`?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),a&&o&&this.raise(f.start,`The left-hand side of a for-of loop may not start with 'let'.`),this.toAssignable(f,!1,u),this.checkLValPattern(f),this.parseForIn(e,f)):(this.checkExpressionErrors(u,!0),t>-1&&this.unexpected(t),this.parseFor(e,f))},K.parseForAfterInit=function(e,t,n){return(this.type===G._in||this.options.ecmaVersion>=6&&this.isContextual(`of`))&&t.declarations.length===1?(this.type===G._in?(t.kind!==`using`&&t.kind!==`await using`||t.declarations[0].init||this.raise(this.start,`Using declaration is not allowed in for-in loops`),this.options.ecmaVersion>=9&&n>-1&&this.unexpected(n)):this.options.ecmaVersion>=9&&(e.await=n>-1),this.parseForIn(e,t)):(n>-1&&this.unexpected(n),this.parseFor(e,t))},K.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,ls|(n?0:us),!1,t)},K.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(`if`),e.alternate=this.eat(G._else)?this.parseStatement(`if`):null,this.finishNode(e,`IfStatement`)},K.parseReturnStatement=function(e){return this.allowReturn||this.raise(this.start,`'return' outside of function`),this.next(),this.eat(G.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,`ReturnStatement`)},K.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(G.braceL),this.labels.push(ss),this.enterScope(Go);for(var t,n=!1;this.type!==G.braceR;)if(this.type===G._case||this.type===G._default){var r=this.type===G._case;t&&this.finishNode(t,`SwitchCase`),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,`Multiple default clauses`),n=!0,t.test=null),this.expect(G.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,`SwitchCase`),this.next(),this.labels.pop(),this.finishNode(e,`SwitchStatement`)},K.parseThrowStatement=function(e){return this.next(),po.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,`Illegal newline after throw`),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,`ThrowStatement`)};var cs=[];K.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type===`Identifier`;return this.enterScope(t?Bo:0),this.checkLValPattern(e,t?Qo:Xo),this.expect(G.parenR),e},K.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===G._catch){var t=this.startNode();this.next(),this.eat(G.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,`CatchClause`)}return e.finalizer=this.eat(G._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,`Missing catch or finally clause`),this.finishNode(e,`TryStatement`)},K.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,`VariableDeclaration`)},K.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(os),e.body=this.parseStatement(`while`),this.labels.pop(),this.finishNode(e,`WhileStatement`)},K.parseWithStatement=function(e){return this.strict&&this.raise(this.start,`'with' in strict mode`),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(`with`),this.finishNode(e,`WithStatement`)},K.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,`EmptyStatement`)},K.parseLabeledStatement=function(e,t,n,r){for(var i=0,a=this.labels;i<a.length;i+=1)a[i].name===t&&this.raise(n.start,`Label '`+t+`' is already declared`);for(var o=this.type.isLoop?`loop`:this.type===G._switch?`switch`:null,s=this.labels.length-1;s>=0;s--){var c=this.labels[s];if(c.statementStart===e.start)c.statementStart=this.start,c.kind=o;else break}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(r?r.indexOf(`label`)===-1?r+`label`:r:`label`),this.labels.pop(),e.label=n,this.finishNode(e,`LabeledStatement`)},K.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,`ExpressionStatement`)},K.parseBlock=function(e,t,n){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(G.braceL),e&&this.enterScope(0);this.type!==G.braceR;){var r=this.parseStatement(null);t.body.push(r)}return n&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,`BlockStatement`)},K.parseFor=function(e,t){return e.init=t,this.expect(G.semi),e.test=this.type===G.semi?null:this.parseExpression(),this.expect(G.semi),e.update=this.type===G.parenR?null:this.parseExpression(),this.expect(G.parenR),e.body=this.parseStatement(`for`),this.exitScope(),this.labels.pop(),this.finishNode(e,`ForStatement`)},K.parseForIn=function(e,t){var n=this.type===G._in;return this.next(),t.type===`VariableDeclaration`&&t.declarations[0].init!=null&&(!n||this.options.ecmaVersion<8||this.strict||t.kind!==`var`||t.declarations[0].id.type!==`Identifier`)&&this.raise(t.start,(n?`for-in`:`for-of`)+` loop variable declaration may not have an initializer`),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(G.parenR),e.body=this.parseStatement(`for`),this.exitScope(),this.labels.pop(),this.finishNode(e,n?`ForInStatement`:`ForOfStatement`)},K.parseVar=function(e,t,n,r){for(e.declarations=[],e.kind=n;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(G.eq)?i.init=this.parseMaybeAssign(t):!r&&n===`const`&&!(this.type===G._in||this.options.ecmaVersion>=6&&this.isContextual(`of`))?this.unexpected():!r&&(n===`using`||n===`await using`)&&this.options.ecmaVersion>=17&&this.type!==G._in&&!this.isContextual(`of`)?this.raise(this.lastTokEnd,`Missing initializer in `+n+` declaration`):!r&&i.id.type!==`Identifier`&&(!t||this.type!==G._in&&!this.isContextual(`of`))?this.raise(this.lastTokEnd,`Complex binding patterns require an initialization value`):i.init=null,e.declarations.push(this.finishNode(i,`VariableDeclarator`)),!this.eat(G.comma))break}return e},K.parseVarId=function(e,t){e.id=t===`using`||t===`await using`?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t===`var`?Yo:Xo,!1)};var ls=1,us=2,ds=4;K.parseFunction=function(e,t,n,r,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===G.star&&t&us&&this.unexpected(),e.generator=this.eat(G.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&ls&&(e.id=t&ds&&this.type!==G.name?null:this.parseIdent(),e.id&&!(t&us)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Yo:Xo:Zo));var a=this.yieldPos,o=this.awaitPos,s=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(qo(e.async,e.generator)),t&ls||(e.id=this.type===G.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,i),this.yieldPos=a,this.awaitPos=o,this.awaitIdentPos=s,this.finishNode(e,t&ls?`FunctionDeclaration`:`FunctionExpression`)},K.parseFunctionParams=function(e){this.expect(G.parenL),e.params=this.parseBindingList(G.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},K.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),i=this.startNode(),a=!1;for(i.body=[],this.expect(G.braceL);this.type!==G.braceR;){var o=this.parseClassElement(e.superClass!==null);o&&(i.body.push(o),o.type===`MethodDefinition`&&o.kind===`constructor`?(a&&this.raiseRecoverable(o.start,`Duplicate constructor in the same class`),a=!0):o.key&&o.key.type===`PrivateIdentifier`&&fs(r,o)&&this.raiseRecoverable(o.key.start,`Identifier '#`+o.key.name+`' has already been declared`))}return this.strict=n,this.next(),e.body=this.finishNode(i,`ClassBody`),this.exitClassBody(),this.finishNode(e,t?`ClassDeclaration`:`ClassExpression`)},K.parseClassElement=function(e){if(this.eat(G.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),r=``,i=!1,a=!1,o=`method`,s=!1;if(this.eatContextual(`static`)){if(t>=13&&this.eat(G.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===G.star?s=!0:r=`static`}if(n.static=s,!r&&t>=8&&this.eatContextual(`async`)&&((this.isClassElementNameStart()||this.type===G.star)&&!this.canInsertSemicolon()?a=!0:r=`async`),!r&&(t>=9||!a)&&this.eat(G.star)&&(i=!0),!r&&!a&&!i){var c=this.value;(this.eatContextual(`get`)||this.eatContextual(`set`))&&(this.isClassElementNameStart()?o=c:r=c)}if(r?(n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=r,this.finishNode(n.key,`Identifier`)):this.parseClassElementName(n),t<13||this.type===G.parenL||o!==`method`||i||a){var l=!n.static&&ps(n,`constructor`),u=l&&e;l&&o!==`method`&&this.raise(n.key.start,`Constructor can't have get/set modifier`),n.kind=l?`constructor`:o,this.parseClassMethod(n,i,a,u)}else this.parseClassField(n);return n},K.isClassElementNameStart=function(){return this.type===G.name||this.type===G.privateId||this.type===G.num||this.type===G.string||this.type===G.bracketL||this.type.keyword},K.parseClassElementName=function(e){this.type===G.privateId?(this.value===`constructor`&&this.raise(this.start,`Classes can't have an element named '#constructor'`),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},K.parseClassMethod=function(e,t,n,r){var i=e.key;e.kind===`constructor`?(t&&this.raise(i.start,`Constructor can't be a generator`),n&&this.raise(i.start,`Constructor can't be an async method`)):e.static&&ps(e,`prototype`)&&this.raise(i.start,`Classes may not have a static property named prototype`);var a=e.value=this.parseMethod(t,n,r);return e.kind===`get`&&a.params.length!==0&&this.raiseRecoverable(a.start,`getter should have no params`),e.kind===`set`&&a.params.length!==1&&this.raiseRecoverable(a.start,`setter should have exactly one param`),e.kind===`set`&&a.params[0].type===`RestElement`&&this.raiseRecoverable(a.params[0].start,`Setter cannot use rest params`),this.finishNode(e,`MethodDefinition`)},K.parseClassField=function(e){return ps(e,`constructor`)?this.raise(e.key.start,`Classes can't have a field named 'constructor'`):e.static&&ps(e,`prototype`)&&this.raise(e.key.start,`Classes can't have a static field named 'prototype'`),this.eat(G.eq)?(this.enterScope(Wo|Vo),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,`PropertyDefinition`)},K.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(Uo|Vo);this.type!==G.braceR;){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,`StaticBlock`)},K.parseClassId=function(e,t){this.type===G.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,Xo,!1)):(t===!0&&this.unexpected(),e.id=null)},K.parseClassSuper=function(e){e.superClass=this.eat(G._extends)?this.parseExprSubscripts(null,!1):null},K.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},K.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,n=e.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,i=r===0?null:this.privateNameStack[r-1],a=0;a<n.length;++a){var o=n[a];So(t,o.name)||(i?i.used.push(o):this.raiseRecoverable(o.start,`Private field '#`+o.name+`' must be declared in an enclosing class`))}};function fs(e,t){var n=t.key.name,r=e[n],i=`true`;return t.type===`MethodDefinition`&&(t.kind===`get`||t.kind===`set`)&&(i=(t.static?`s`:`i`)+t.kind),r===`iget`&&i===`iset`||r===`iset`&&i===`iget`||r===`sget`&&i===`sset`||r===`sset`&&i===`sget`?(e[n]=`true`,!1):r?!0:(e[n]=i,!1)}function ps(e,t){var n=e.computed,r=e.key;return!n&&(r.type===`Identifier`&&r.name===t||r.type===`Literal`&&r.value===t)}K.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual(`as`)?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual(`from`),this.type!==G.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,`ExportAllDeclaration`)},K.parseExport=function(e,t){if(this.next(),this.eat(G.star))return this.parseExportAllDeclaration(e,t);if(this.eat(G._default))return this.checkExport(t,`default`,this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,`ExportDefaultDeclaration`);if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type===`VariableDeclaration`?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual(`from`))this.type!==G.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var n=0,r=e.specifiers;n<r.length;n+=1){var i=r[n];this.checkUnreserved(i.local),this.checkLocalExport(i.local),i.local.type===`Literal`&&this.raise(i.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,`ExportNamedDeclaration`)},K.parseExportDeclaration=function(e){return this.parseStatement(null)},K.parseExportDefaultDeclaration=function(){var e;if(this.type===G._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,ls|ds,!1,e)}if(this.type===G._class){var n=this.startNode();return this.parseClass(n,`nullableID`)}var r=this.parseMaybeAssign();return this.semicolon(),r},K.checkExport=function(e,t,n){e&&(typeof t!=`string`&&(t=t.type===`Identifier`?t.name:t.value),So(e,t)&&this.raiseRecoverable(n,`Duplicate export '`+t+`'`),e[t]=!0)},K.checkPatternExport=function(e,t){var n=t.type;if(n===`Identifier`)this.checkExport(e,t,t.start);else if(n===`ObjectPattern`)for(var r=0,i=t.properties;r<i.length;r+=1){var a=i[r];this.checkPatternExport(e,a)}else if(n===`ArrayPattern`)for(var o=0,s=t.elements;o<s.length;o+=1){var c=s[o];c&&this.checkPatternExport(e,c)}else n===`Property`?this.checkPatternExport(e,t.value):n===`AssignmentPattern`?this.checkPatternExport(e,t.left):n===`RestElement`&&this.checkPatternExport(e,t.argument)},K.checkVariableExport=function(e,t){if(e)for(var n=0,r=t;n<r.length;n+=1){var i=r[n];this.checkPatternExport(e,i.id)}},K.shouldParseExportStatement=function(){return this.type.keyword===`var`||this.type.keyword===`const`||this.type.keyword===`class`||this.type.keyword===`function`||this.isLet()||this.isAsyncFunction()},K.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual(`as`)?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,`ExportSpecifier`)},K.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(G.braceL);!this.eat(G.braceR);){if(n)n=!1;else if(this.expect(G.comma),this.afterTrailingComma(G.braceR))break;t.push(this.parseExportSpecifier(e))}return t},K.parseImport=function(e){return this.next(),this.type===G.string?(e.specifiers=cs,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual(`from`),e.source=this.type===G.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,`ImportDeclaration`)},K.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual(`as`)?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,Xo),this.finishNode(e,`ImportSpecifier`)},K.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,Xo),this.finishNode(e,`ImportDefaultSpecifier`)},K.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual(`as`),e.local=this.parseIdent(),this.checkLValSimple(e.local,Xo),this.finishNode(e,`ImportNamespaceSpecifier`)},K.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===G.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(G.comma)))return e;if(this.type===G.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(G.braceL);!this.eat(G.braceR);){if(t)t=!1;else if(this.expect(G.comma),this.afterTrailingComma(G.braceR))break;e.push(this.parseImportSpecifier())}return e},K.parseWithClause=function(){var e=[];if(!this.eat(G._with))return e;this.expect(G.braceL);for(var t={},n=!0;!this.eat(G.braceR);){if(n)n=!1;else if(this.expect(G.comma),this.afterTrailingComma(G.braceR))break;var r=this.parseImportAttribute(),i=r.key.type===`Identifier`?r.key.name:r.key.value;So(t,i)&&this.raiseRecoverable(r.key.start,`Duplicate attribute key '`+i+`'`),t[i]=!0,e.push(r)}return e},K.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===G.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!==`never`),this.expect(G.colon),this.type!==G.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,`ImportAttribute`)},K.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===G.string){var e=this.parseLiteral(this.value);return Do.test(e.value)&&this.raise(e.start,`An export name cannot include a lone surrogate.`),e}return this.parseIdent(!0)},K.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},K.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type===`ExpressionStatement`&&e.expression.type===`Literal`&&typeof e.expression.value==`string`&&(this.input[e.start]===`"`||this.input[e.start]===`'`)};var ms=es.prototype;ms.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case`Identifier`:this.inAsync&&e.name===`await`&&this.raise(e.start,`Cannot use 'await' as identifier inside an async function`);break;case`ObjectPattern`:case`ArrayPattern`:case`AssignmentPattern`:case`RestElement`:break;case`ObjectExpression`:e.type=`ObjectPattern`,n&&this.checkPatternErrors(n,!0);for(var r=0,i=e.properties;r<i.length;r+=1){var a=i[r];this.toAssignable(a,t),a.type===`RestElement`&&(a.argument.type===`ArrayPattern`||a.argument.type===`ObjectPattern`)&&this.raise(a.argument.start,`Unexpected token`)}break;case`Property`:e.kind!==`init`&&this.raise(e.key.start,`Object pattern can't contain getter or setter`),this.toAssignable(e.value,t);break;case`ArrayExpression`:e.type=`ArrayPattern`,n&&this.checkPatternErrors(n,!0),this.toAssignableList(e.elements,t);break;case`SpreadElement`:e.type=`RestElement`,this.toAssignable(e.argument,t),e.argument.type===`AssignmentPattern`&&this.raise(e.argument.start,`Rest elements cannot have a default value`);break;case`AssignmentExpression`:e.operator!==`=`&&this.raise(e.left.end,`Only '=' operator can be used for specifying default value.`),e.type=`AssignmentPattern`,delete e.operator,this.toAssignable(e.left,t);break;case`ParenthesizedExpression`:this.toAssignable(e.expression,t,n);break;case`ChainExpression`:this.raiseRecoverable(e.start,`Optional chaining cannot appear in left-hand side`);break;case`MemberExpression`:if(!t)break;default:this.raise(e.start,`Assigning to rvalue`)}else n&&this.checkPatternErrors(n,!0);return e},ms.toAssignableList=function(e,t){for(var n=e.length,r=0;r<n;r++){var i=e[r];i&&this.toAssignable(i,t)}if(n){var a=e[n-1];this.options.ecmaVersion===6&&t&&a&&a.type===`RestElement`&&a.argument.type!==`Identifier`&&this.unexpected(a.argument.start)}return e},ms.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,`SpreadElement`)},ms.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==G.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,`RestElement`)},ms.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case G.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(G.bracketR,!0,!0),this.finishNode(e,`ArrayPattern`);case G.braceL:return this.parseObj(!0)}return this.parseIdent()},ms.parseBindingList=function(e,t,n,r){for(var i=[],a=!0;!this.eat(e);)if(a?a=!1:this.expect(G.comma),t&&this.type===G.comma)i.push(null);else if(n&&this.afterTrailingComma(e))break;else if(this.type===G.ellipsis){var o=this.parseRestBinding();this.parseBindingListItem(o),i.push(o),this.type===G.comma&&this.raiseRecoverable(this.start,`Comma is not permitted after the rest element`),this.expect(e);break}else i.push(this.parseAssignableListItem(r));return i},ms.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},ms.parseBindingListItem=function(e){return e},ms.parseMaybeDefault=function(e,t,n){if(n||=this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(G.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,`AssignmentPattern`)},ms.checkLValSimple=function(e,t,n){t===void 0&&(t=Jo);var r=t!==Jo;switch(e.type){case`Identifier`:this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(r?`Binding `:`Assigning to `)+e.name+` in strict mode`),r&&(t===Xo&&e.name===`let`&&this.raiseRecoverable(e.start,`let is disallowed as a lexically bound name`),n&&(So(n,e.name)&&this.raiseRecoverable(e.start,`Argument name clash`),n[e.name]=!0),t!==$o&&this.declareName(e.name,t,e.start));break;case`ChainExpression`:this.raiseRecoverable(e.start,`Optional chaining cannot appear in left-hand side`);break;case`MemberExpression`:r&&this.raiseRecoverable(e.start,`Binding member expression`);break;case`ParenthesizedExpression`:return r&&this.raiseRecoverable(e.start,`Binding parenthesized expression`),this.checkLValSimple(e.expression,t,n);default:this.raise(e.start,(r?`Binding`:`Assigning to`)+` rvalue`)}},ms.checkLValPattern=function(e,t,n){switch(t===void 0&&(t=Jo),e.type){case`ObjectPattern`:for(var r=0,i=e.properties;r<i.length;r+=1){var a=i[r];this.checkLValInnerPattern(a,t,n)}break;case`ArrayPattern`:for(var o=0,s=e.elements;o<s.length;o+=1){var c=s[o];c&&this.checkLValInnerPattern(c,t,n)}break;default:this.checkLValSimple(e,t,n)}},ms.checkLValInnerPattern=function(e,t,n){switch(t===void 0&&(t=Jo),e.type){case`Property`:this.checkLValInnerPattern(e.value,t,n);break;case`AssignmentPattern`:this.checkLValPattern(e.left,t,n);break;case`RestElement`:this.checkLValPattern(e.argument,t,n);break;default:this.checkLValPattern(e,t,n)}};var hs=function(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},gs={b_stat:new hs(`{`,!1),b_expr:new hs(`{`,!0),b_tmpl:new hs("${",!1),p_stat:new hs(`(`,!1),p_expr:new hs(`(`,!0),q_tmpl:new hs("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new hs(`function`,!1),f_expr:new hs(`function`,!0),f_expr_gen:new hs(`function`,!0,!1,null,!0),f_gen:new hs(`function`,!1,!1,null,!0)},_s=es.prototype;_s.initialContext=function(){return[gs.b_stat]},_s.curContext=function(){return this.context[this.context.length-1]},_s.braceIsBlock=function(e){var t=this.curContext();return t===gs.f_expr||t===gs.f_stat?!0:e===G.colon&&(t===gs.b_stat||t===gs.b_expr)?!t.isExpr:e===G._return||e===G.name&&this.exprAllowed?po.test(this.input.slice(this.lastTokEnd,this.start)):e===G._else||e===G.semi||e===G.eof||e===G.parenR||e===G.arrow?!0:e===G.braceL?t===gs.b_stat:e===G._var||e===G._const||e===G.name?!1:!this.exprAllowed},_s.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token===`function`)return t.generator}return!1},_s.updateContext=function(e){var t,n=this.type;n.keyword&&e===G.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},_s.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},G.parenR.updateContext=G.braceR.updateContext=function(){if(this.context.length===1)this.exprAllowed=!0;else{var e=this.context.pop();e===gs.b_stat&&this.curContext().token===`function`&&(e=this.context.pop()),this.exprAllowed=!e.isExpr}},G.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?gs.b_stat:gs.b_expr),this.exprAllowed=!0},G.dollarBraceL.updateContext=function(){this.context.push(gs.b_tmpl),this.exprAllowed=!0},G.parenL.updateContext=function(e){var t=e===G._if||e===G._for||e===G._with||e===G._while;this.context.push(t?gs.p_stat:gs.p_expr),this.exprAllowed=!0},G.incDec.updateContext=function(){},G._function.updateContext=G._class.updateContext=function(e){e.beforeExpr&&e!==G._else&&(e!==G.semi||this.curContext()===gs.p_stat)&&!(e===G._return&&po.test(this.input.slice(this.lastTokEnd,this.start)))&&(e!==G.colon&&e!==G.braceL||this.curContext()!==gs.b_stat)?this.context.push(gs.f_expr):this.context.push(gs.f_stat),this.exprAllowed=!1},G.colon.updateContext=function(){this.curContext().token===`function`&&this.context.pop(),this.exprAllowed=!0},G.backQuote.updateContext=function(){this.curContext()===gs.q_tmpl?this.context.pop():this.context.push(gs.q_tmpl),this.exprAllowed=!1},G.star.updateContext=function(e){if(e===G._function){var t=this.context.length-1;this.context[t]===gs.f_expr?this.context[t]=gs.f_expr_gen:this.context[t]=gs.f_gen}this.exprAllowed=!0},G.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==G.dot&&(this.value===`of`&&!this.exprAllowed||this.value===`yield`&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var vs=es.prototype;vs.checkPropClash=function(e,t,n){if(!(this.options.ecmaVersion>=9&&e.type===`SpreadElement`)&&!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var r=e.key,i;switch(r.type){case`Identifier`:i=r.name;break;case`Literal`:i=String(r.value);break;default:return}var a=e.kind;if(this.options.ecmaVersion>=6)i===`__proto__`&&a===`init`&&(t.proto&&(n?n.doubleProto<0&&(n.doubleProto=r.start):this.raiseRecoverable(r.start,`Redefinition of __proto__ property`)),t.proto=!0);else{i=`$`+i;var o=t[i];o?(a===`init`?this.strict&&o.init||o.get||o.set:o.init||o[a])&&this.raiseRecoverable(r.start,`Redefinition of property`):o=t[i]={init:!1,get:!1,set:!1},o[a]=!0}}},vs.parseExpression=function(e,t){var n=this;return this.catchStackOverflow(function(){var r=n.start,i=n.startLoc,a=n.parseMaybeAssign(e,t);if(n.type===G.comma){var o=n.startNodeAt(r,i);for(o.expressions=[a];n.eat(G.comma);)o.expressions.push(n.parseMaybeAssign(e,t));return n.finishNode(o,`SequenceExpression`)}return a})},vs.parseMaybeAssign=function(e,t,n){if(this.isContextual(`yield`)){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var r=!1,i=-1,a=-1,o=-1;t?(i=t.parenthesizedAssign,a=t.trailingComma,o=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new as,r=!0);var s=this.start,c=this.startLoc;(this.type===G.parenL||this.type===G.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e===`await`);var l=this.parseMaybeConditional(e,t);if(n&&(l=n.call(this,l,s,c)),this.type.isAssign){var u=this.startNodeAt(s,c);return u.operator=this.value,this.type===G.eq&&(l=this.toAssignable(l,!1,t)),r||(t.parenthesizedAssign=t.trailingComma=-1,t.shorthandAssign>=l.start&&(t.shorthandAssign=-1),t.doubleProto>=l.start&&(t.doubleProto=-1)),this.type===G.eq?this.checkLValPattern(l):this.checkLValSimple(l),u.left=l,this.next(),u.right=this.parseMaybeAssign(e),o>-1&&(t.doubleProto=o),this.finishNode(u,`AssignmentExpression`)}return r&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),a>-1&&(t.trailingComma=a),l},vs.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if((i.type!==`ArrowFunctionExpression`||i.start!==n)&&this.eat(G.question)){var a=this.startNodeAt(n,r);return a.test=i,a.consequent=this.parseMaybeAssign(),this.expect(G.colon),a.alternate=this.parseMaybeAssign(e),this.finishNode(a,`ConditionalExpression`)}return i},vs.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||i.start===n&&i.type===`ArrowFunctionExpression`?i:this.parseExprOp(i,n,r,-1,e)},vs.parseExprOp=function(e,t,n,r,i){var a=this.type.binop;if(a!=null&&(!i||this.type!==G._in)&&a>r){var o=this.type===G.logicalOR||this.type===G.logicalAND,s=this.type===G.coalesce;s&&(a=G.logicalAND.binop);var c=this.value;this.next();var l=this.start,u=this.startLoc,d=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),l,u,a,i),f=this.buildBinary(t,n,e,d,c,o||s);return(o&&this.type===G.coalesce||s&&(this.type===G.logicalOR||this.type===G.logicalAND))&&this.raiseRecoverable(this.start,`Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses`),this.parseExprOp(f,t,n,r,i)}return e},vs.buildBinary=function(e,t,n,r,i,a){r.type===`PrivateIdentifier`&&this.raise(r.start,`Private identifier can only be left side of binary expression`);var o=this.startNodeAt(e,t);return o.left=n,o.operator=i,o.right=r,this.finishNode(o,a?`LogicalExpression`:`BinaryExpression`)},vs.parseMaybeUnary=function(e,t,n,r){var i=this.start,a=this.startLoc,o;if(this.isContextual(`await`)&&this.canAwait)o=this.parseAwait(r),t=!0;else if(this.type.prefix){var s=this.startNode(),c=this.type===G.incDec;s.operator=this.value,s.prefix=!0,this.next(),s.argument=this.parseMaybeUnary(null,!0,c,r),this.checkExpressionErrors(e,!0),c?this.checkLValSimple(s.argument):this.strict&&s.operator===`delete`&&ys(s.argument)?this.raiseRecoverable(s.start,`Deleting local variable in strict mode`):s.operator===`delete`&&bs(s.argument)?this.raiseRecoverable(s.start,`Private fields can not be deleted`):t=!0,o=this.finishNode(s,c?`UpdateExpression`:`UnaryExpression`)}else if(!t&&this.type===G.privateId)(r||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),o=this.parsePrivateIdent(),this.type!==G._in&&this.unexpected();else{if(o=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return o;for(;this.type.postfix&&!this.canInsertSemicolon();){var l=this.startNodeAt(i,a);l.operator=this.value,l.prefix=!1,l.argument=o,this.checkLValSimple(o),this.next(),o=this.finishNode(l,`UpdateExpression`)}}if(!n&&(o.type!==`ArrowFunctionExpression`||o.start!==i)&&this.eat(G.starstar)){if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(i,a,o,this.parseMaybeUnary(null,!1,!1,r),`**`,!1)}else return o};function ys(e){return e.type===`Identifier`||e.type===`ParenthesizedExpression`&&ys(e.expression)}function bs(e){return e.type===`MemberExpression`&&e.property.type===`PrivateIdentifier`||e.type===`ChainExpression`&&bs(e.expression)||e.type===`ParenthesizedExpression`&&bs(e.expression)}vs.parseExprSubscripts=function(e,t){var n=this.start,r=this.startLoc,i=-1,a=-1;e&&(i=e.doubleProto,a=e.shorthandAssign,e.doubleProto=e.shorthandAssign=-1);var o=this.parseExprAtom(e,t);if(o.type===`ArrowFunctionExpression`&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==`)`)return o;var s=this.parseSubscripts(o,n,r,!1,t);return e&&(s.end>o.end&&(this.checkExpressionErrors(e,!0),e.parenthesizedAssign>=s.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=s.start&&(e.parenthesizedBind=-1),e.trailingComma>=s.start&&(e.trailingComma=-1)),i>-1&&(e.doubleProto=i),a>-1&&(e.shorthandAssign=a)),s},vs.parseSubscripts=function(e,t,n,r,i){for(var a=this.options.ecmaVersion>=8&&e.type===`Identifier`&&e.name===`async`&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,o=!1;;){var s=this.parseSubscript(e,t,n,r,a,o,i);if(s.optional&&(o=!0),s.end===e.end||s.type===`ArrowFunctionExpression`){if(o){var c=this.startNodeAt(t,n);c.expression=s,s=this.finishNode(c,`ChainExpression`)}return s}e=s,a=!1}},vs.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(G.arrow)},vs.parseSubscriptAsyncArrow=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,r)},vs.parseSubscript=function(e,t,n,r,i,a,o){var s=this.options.ecmaVersion>=11,c=s&&this.eat(G.questionDot);r&&c&&this.raise(this.lastTokStart,`Optional chaining cannot appear in the callee of new expressions`);var l=this.eat(G.bracketL);if(l||c&&this.type!==G.parenL&&this.type!==G.backQuote||this.eat(G.dot)){var u=this.startNodeAt(t,n);u.object=e,l?(u.property=this.parseExpression(),this.expect(G.bracketR)):u.property=this.type===G.privateId&&e.type!==`Super`?this.parsePrivateIdent():this.parseIdent(this.options.allowReserved!==`never`),u.computed=!!l,s&&(u.optional=c),e=this.finishNode(u,`MemberExpression`)}else if(!r&&this.eat(G.parenL)){var d=new as,f=this.yieldPos,p=this.awaitPos,m=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var h=this.parseExprList(G.parenR,this.options.ecmaVersion>=8,!1,d);if(i&&!c&&this.shouldParseAsyncArrow())return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,`Cannot use 'await' as identifier inside an async function`),this.yieldPos=f,this.awaitPos=p,this.awaitIdentPos=m,this.parseSubscriptAsyncArrow(t,n,h,o);this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=p||this.awaitPos,this.awaitIdentPos=m||this.awaitIdentPos;var g=this.startNodeAt(t,n);g.callee=e,g.arguments=h,s&&(g.optional=c),e=this.finishNode(g,`CallExpression`)}else if(this.type===G.backQuote){(c||a)&&this.raise(this.start,`Optional chaining cannot appear in the tag of tagged template expressions`);var _=this.startNodeAt(t,n);_.tag=e,_.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(_,`TaggedTemplateExpression`)}return e},vs.parseExprAtom=function(e,t,n){this.type===G.slash&&this.readRegexp();var r,i=this.potentialArrowAt===this.start;switch(this.type){case G._super:return this.allowSuper||this.raise(this.start,`'super' keyword outside a method`),r=this.startNode(),this.next(),this.type===G.parenL&&!this.allowDirectSuper&&this.raise(r.start,`super() call outside constructor of a subclass`),this.type!==G.dot&&this.type!==G.bracketL&&this.type!==G.parenL&&this.unexpected(),this.finishNode(r,`Super`);case G._this:return r=this.startNode(),this.next(),this.finishNode(r,`ThisExpression`);case G.name:var a=this.start,o=this.startLoc,s=this.containsEsc,c=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!s&&c.name===`async`&&!this.canInsertSemicolon()&&this.eat(G._function))return this.overrideContext(gs.f_expr),this.parseFunction(this.startNodeAt(a,o),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(G.arrow))return this.parseArrowExpression(this.startNodeAt(a,o),[c],!1,t);if(this.options.ecmaVersion>=8&&c.name===`async`&&this.type===G.name&&!s&&(!this.potentialArrowInForAwait||this.value!==`of`||this.containsEsc))return c=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(G.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(a,o),[c],!0,t)}return c;case G.regexp:var l=this.value;return r=this.parseLiteral(l.value),r.regex={pattern:l.pattern,flags:l.flags},r;case G.num:case G.string:return this.parseLiteral(this.value);case G._null:case G._true:case G._false:return r=this.startNode(),r.value=this.type===G._null?null:this.type===G._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,`Literal`);case G.parenL:var u=this.start,d=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(d)&&(e.parenthesizedAssign=u),e.parenthesizedBind<0&&(e.parenthesizedBind=u)),d;case G.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(G.bracketR,!0,!0,e),this.finishNode(r,`ArrayExpression`);case G.braceL:return this.overrideContext(gs.b_expr),this.parseObj(!1,e);case G._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case G._class:return this.parseClass(this.startNode(),!1);case G._new:return this.parseNew();case G.backQuote:return this.parseTemplate();case G._import:return this.options.ecmaVersion>=11?this.parseExprImport(n):this.unexpected();default:return this.parseExprAtomDefault()}},vs.parseExprAtomDefault=function(){this.unexpected()},vs.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,`Escape sequence in keyword import`),this.next(),this.type===G.parenL&&!e)return this.parseDynamicImport(t);if(this.type===G.dot){var n=this.startNodeAt(t.start,t.loc&&t.loc.start);return n.name=`import`,t.meta=this.finishNode(n,`Identifier`),this.parseImportMeta(t)}this.unexpected()},vs.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(G.parenR)?e.options=null:(this.expect(G.comma),this.afterTrailingComma(G.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(G.parenR)||(this.expect(G.comma),this.afterTrailingComma(G.parenR)||this.unexpected())));else if(!this.eat(G.parenR)){var t=this.start;this.eat(G.comma)&&this.eat(G.parenR)?this.raiseRecoverable(t,`Trailing comma is not allowed in import()`):this.unexpected(t)}return this.finishNode(e,`ImportExpression`)},vs.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!==`meta`&&this.raiseRecoverable(e.property.start,`The only valid meta property for import is 'import.meta'`),t&&this.raiseRecoverable(e.start,`'import.meta' must not contain escaped characters`),this.options.sourceType!==`module`&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,`Cannot use 'import.meta' outside a module`),this.finishNode(e,`MetaProperty`)},vs.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.value==null?t.raw.slice(0,-1).replace(/_/g,``):t.value.toString()),this.next(),this.finishNode(t,`Literal`)},vs.parseParenExpression=function(){this.expect(G.parenL);var e=this.parseExpression();return this.expect(G.parenR),e},vs.shouldParseArrow=function(e){return!this.canInsertSemicolon()},vs.parseParenAndDistinguishExpression=function(e,t){var n=this.start,r=this.startLoc,i,a=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o=this.start,s=this.startLoc,c=[],l=!0,u=!1,d=new as,f=this.yieldPos,p=this.awaitPos,m;for(this.yieldPos=0,this.awaitPos=0;this.type!==G.parenR;){if(l?l=!1:this.expect(G.comma),a&&this.afterTrailingComma(G.parenR,!0)){u=!0;break}if(this.type===G.ellipsis){m=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===G.comma&&this.raiseRecoverable(this.start,`Comma is not permitted after the rest element`);break}c.push(this.parseMaybeAssign(!1,d,this.parseParenItem))}var h=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(G.parenR),e&&this.shouldParseArrow(c)&&this.eat(G.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=f,this.awaitPos=p,this.parseParenArrowList(n,r,c,t);(!c.length||u)&&this.unexpected(this.lastTokStart),m&&this.unexpected(m),this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=p||this.awaitPos,c.length>1?(i=this.startNodeAt(o,s),i.expressions=c,this.finishNodeAt(i,`SequenceExpression`,h,g)):i=c[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var _=this.startNodeAt(n,r);return _.expression=i,this.finishNode(_,`ParenthesizedExpression`)}return i},vs.parseParenItem=function(e){return e},vs.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var xs=[];vs.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,`Escape sequence in keyword new`);var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===G.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name=`new`,e.meta=this.finishNode(t,`Identifier`),this.next();var n=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!==`target`&&this.raiseRecoverable(e.property.start,`The only valid meta property for new is 'new.target'`),n&&this.raiseRecoverable(e.start,`'new.target' must not contain escaped characters`),this.allowNewDotTarget||this.raiseRecoverable(e.start,`'new.target' can only be used in functions and class static block`),this.finishNode(e,`MetaProperty`)}var r=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,i,!0,!1),e.callee.type===`Super`&&this.raiseRecoverable(r,`Invalid use of 'super'`),e.arguments=this.eat(G.parenL)?this.parseExprList(G.parenR,this.options.ecmaVersion>=8,!1):xs,this.finishNode(e,`NewExpression`)},vs.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===G.invalidTemplate?(t||this.raiseRecoverable(this.start,`Bad escape sequence in untagged template literal`),n.value={raw:this.value.replace(/\r\n?/g,`
6
- `),cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
7
- `),cooked:this.value},this.next(),n.tail=this.type===G.backQuote,this.finishNode(n,`TemplateElement`)},vs.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(n.quasis=[r];!r.tail;)this.type===G.eof&&this.raise(this.pos,`Unterminated template literal`),this.expect(G.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(G.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,`TemplateLiteral`)},vs.isAsyncProp=function(e){return!e.computed&&e.key.type===`Identifier`&&e.key.name===`async`&&(this.type===G.name||this.type===G.num||this.type===G.string||this.type===G.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===G.star)&&!po.test(this.input.slice(this.lastTokEnd,this.start))},vs.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(G.braceR);){if(r)r=!1;else if(this.expect(G.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(G.braceR))break;var a=this.parseProperty(e,t);e||this.checkPropClash(a,i,t),n.properties.push(a)}return this.finishNode(n,e?`ObjectPattern`:`ObjectExpression`)},vs.parseProperty=function(e,t){var n=this.startNode(),r,i,a,o;if(this.options.ecmaVersion>=9&&this.eat(G.ellipsis))return e?(n.argument=this.parseIdent(!1),this.type===G.comma&&this.raiseRecoverable(this.start,`Comma is not permitted after the rest element`),this.finishNode(n,`RestElement`)):(n.argument=this.parseMaybeAssign(!1,t),this.type===G.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(n,`SpreadElement`));this.options.ecmaVersion>=6&&(n.method=!1,n.shorthand=!1,(e||t)&&(a=this.start,o=this.startLoc),e||(r=this.eat(G.star)));var s=this.containsEsc;return this.parsePropertyName(n),!e&&!s&&this.options.ecmaVersion>=8&&!r&&this.isAsyncProp(n)?(i=!0,r=this.options.ecmaVersion>=9&&this.eat(G.star),this.parsePropertyName(n)):i=!1,this.parsePropertyValue(n,e,r,i,a,o,t,s),this.finishNode(n,`Property`)},vs.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var n=e.kind===`get`?0:1;if(e.value.params.length!==n){var r=e.value.start;e.kind===`get`?this.raiseRecoverable(r,`getter should have no params`):this.raiseRecoverable(r,`setter should have exactly one param`)}else e.kind===`set`&&e.value.params[0].type===`RestElement`&&this.raiseRecoverable(e.value.params[0].start,`Setter cannot use rest params`)},vs.parsePropertyValue=function(e,t,n,r,i,a,o,s){(n||r)&&this.type===G.colon&&this.unexpected(),this.eat(G.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind=`init`):this.options.ecmaVersion>=6&&this.type===G.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(n,r),e.kind=`init`):!t&&!s&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type===`Identifier`&&(e.key.name===`get`||e.key.name===`set`)&&this.type!==G.comma&&this.type!==G.braceR&&this.type!==G.eq?((n||r)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type===`Identifier`?((n||r)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name===`await`&&!this.awaitIdentPos&&(this.awaitIdentPos=i),t?e.value=this.parseMaybeDefault(i,a,this.copyNode(e.key)):this.type===G.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,a,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind=`init`,e.shorthand=!0):this.unexpected()},vs.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(G.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(G.bracketR),e.key;e.computed=!1}return e.key=this.type===G.num||this.type===G.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!==`never`)},vs.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},vs.parseMethod=function(e,t,n){var r=this.startNode(),i=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(qo(t,r.generator)|Vo|(n?Ho:0)),this.expect(G.parenL),r.params=this.parseBindingList(G.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(r,`FunctionExpression`)},vs.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(qo(n,!1)|zo),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(e,`ArrowFunctionExpression`)},vs.parseFunctionBody=function(e,t,n,r){var i=t&&this.type!==G.braceL,a=this.strict,o=!1;if(i)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var s=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!a||s)&&(o=this.strictDirective(this.end),o&&s&&this.raiseRecoverable(e.start,`Illegal 'use strict' directive in function with non-simple parameter list`));var c=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(e,!a&&!o&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,$o),e.body=this.parseBlock(!1,void 0,o&&!a),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=c}this.exitScope()},vs.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1)if(n[t].type!==`Identifier`)return!1;return!0},vs.checkParams=function(e,t){for(var n=Object.create(null),r=0,i=e.params;r<i.length;r+=1){var a=i[r];this.checkLValInnerPattern(a,Yo,t?null:n)}},vs.parseExprList=function(e,t,n,r){for(var i=[],a=!0;!this.eat(e);){if(a)a=!1;else if(this.expect(G.comma),t&&this.afterTrailingComma(e))break;var o=void 0;n&&this.type===G.comma?o=null:this.type===G.ellipsis?(o=this.parseSpread(r),r&&this.type===G.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):o=this.parseMaybeAssign(!1,r),i.push(o)}return i},vs.checkUnreserved=function(e){var t=e.start,n=e.end,r=e.name;this.inGenerator&&r===`yield`&&this.raiseRecoverable(t,`Cannot use 'yield' as identifier inside a generator`),this.inAsync&&r===`await`&&this.raiseRecoverable(t,`Cannot use 'await' as identifier inside an async function`),!(this.currentThisScope().flags&Ko)&&r===`arguments`&&this.raiseRecoverable(t,`Cannot use 'arguments' in class field initializer`),this.inClassStaticBlock&&(r===`arguments`||r===`await`)&&this.raise(t,`Cannot use `+r+` in class static initialization block`),this.keywords.test(r)&&this.raise(t,`Unexpected keyword '`+r+`'`),!(this.options.ecmaVersion<6&&this.input.slice(t,n).indexOf(`\\`)!==-1)&&(this.strict?this.reservedWordsStrict:this.reservedWords).test(r)&&(!this.inAsync&&r===`await`&&this.raiseRecoverable(t,`Cannot use keyword 'await' outside an async function`),this.raiseRecoverable(t,`The keyword '`+r+`' is reserved`))},vs.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,`Identifier`),e||(this.checkUnreserved(t),t.name===`await`&&!this.awaitIdentPos&&(this.awaitIdentPos=t.start)),t},vs.parseIdentNode=function(){var e=this.startNode();return this.type===G.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,e.name!==`class`&&e.name!==`function`||this.lastTokEnd===this.lastTokStart+1&&this.input.charCodeAt(this.lastTokStart)===46||this.context.pop(),this.type=G.name):this.unexpected(),e},vs.parsePrivateIdent=function(){var e=this.startNode();return this.type===G.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,`PrivateIdentifier`),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(e.start,`Private field '#`+e.name+`' must be declared in an enclosing class`):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e},vs.parseYield=function(e){this.yieldPos||=this.start;var t=this.startNode();return this.next(),this.type===G.semi||this.canInsertSemicolon()||this.type!==G.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(G.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,`YieldExpression`)},vs.parseAwait=function(e){this.awaitPos||=this.start;var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,`AwaitExpression`)};var Ss=es.prototype;Ss.raise=function(e,t){var n=Ao(this.input,e);t+=` (`+n.line+`:`+n.column+`)`,this.sourceFile&&(t+=` in `+this.sourceFile);var r=SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r},Ss.raiseRecoverable=Ss.raise,Ss.curPosition=function(){if(this.options.locations)return new Oo(this.curLine,this.pos-this.lineStart)};var Cs=es.prototype,ws=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};Cs.enterScope=function(e){this.scopeStack.push(new ws(e))},Cs.exitScope=function(){this.scopeStack.pop()},Cs.treatFunctionsAsVarInScope=function(e){return e.flags&Io||!this.inModule&&e.flags&Fo},Cs.declareName=function(e,t,n){var r=!1;if(t===Xo){var i=this.currentScope();r=i.lexical.indexOf(e)>-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&i.flags&Fo&&delete this.undefinedExports[e]}else if(t===Qo)this.currentScope().lexical.push(e);else if(t===Zo){var a=this.currentScope();r=this.treatFunctionsAsVar?a.lexical.indexOf(e)>-1:a.lexical.indexOf(e)>-1||a.var.indexOf(e)>-1,a.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var s=this.scopeStack[o];if(s.lexical.indexOf(e)>-1&&!(s.flags&Bo&&s.lexical[0]===e)||!this.treatFunctionsAsVarInScope(s)&&s.functions.indexOf(e)>-1){r=!0;break}if(s.var.push(e),this.inModule&&s.flags&Fo&&delete this.undefinedExports[e],s.flags&Ko)break}r&&this.raiseRecoverable(n,`Identifier '`+e+`' has already been declared`)},Cs.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)},Cs.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Cs.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Ko|Wo|Uo))return t}},Cs.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Ko|Wo|Uo)&&!(t.flags&zo))return t}};var Ts=function(e,t,n){this.type=``,this.start=t,this.end=0,e.options.locations&&(this.loc=new ko(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},Es=es.prototype;Es.startNode=function(){return new Ts(this,this.start,this.startLoc)},Es.startNodeAt=function(e,t){return new Ts(this,e,t)};function Ds(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}Es.finishNode=function(e,t){return Ds.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},Es.finishNodeAt=function(e,t,n,r){return Ds.call(this,e,t,n,r)},Es.copyNode=function(e){var t=new Ts(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var Os=`Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz`,ks=`ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS`,As=ks+` Extended_Pictographic`,js=As,Ms=js+` EBase EComp EMod EPres ExtPict`,Ns=Ms,Ps={9:ks,10:As,11:js,12:Ms,13:Ns,14:Ns},Fs={9:``,10:``,11:``,12:``,13:``,14:`Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji`},Is=`Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu`,Ls=`Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb`,Rs=Ls+` Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd`,zs=Rs+` Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho`,Bs=zs+` Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi`,Vs=Bs+` Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith`,Hs={9:Ls,10:Rs,11:zs,12:Bs,13:Vs,14:Vs+` `+Os},Us={};function Ws(e){var t=Us[e]={binary:To(Ps[e]+` `+Is),binaryOfStrings:To(Fs[e]),nonBinary:{General_Category:To(Is),Script:To(Hs[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var Gs=0,Ks=[9,10,11,12,13,14];Gs<Ks.length;Gs+=1){var qs=Ks[Gs];Ws(qs)}var q=es.prototype,Js=function(e,t){this.parent=e,this.base=t||this};Js.prototype.separatedFrom=function(e){for(var t=this;t;t=t.parent)for(var n=e;n;n=n.parent)if(t.base===n.base&&t!==n)return!0;return!1},Js.prototype.sibling=function(){return new Js(this.parent,this.base)};var Ys=function(e){this.parser=e,this.validFlags=`gim`+(e.options.ecmaVersion>=6?`uy`:``)+(e.options.ecmaVersion>=9?`s`:``)+(e.options.ecmaVersion>=13?`d`:``)+(e.options.ecmaVersion>=15?`v`:``),this.unicodeProperties=Us[e.options.ecmaVersion>=14?14:e.options.ecmaVersion],this.source=``,this.flags=``,this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue=``,this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};Ys.prototype.reset=function(e,t,n){var r=n.indexOf(`v`)!==-1,i=n.indexOf(`u`)!==-1;this.start=e|0,this.source=t+``,this.flags=n,r&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=i&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=i&&this.parser.options.ecmaVersion>=9)},Ys.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,`Invalid regular expression: /`+this.source+`/: `+e)},Ys.prototype.at=function(e,t){t===void 0&&(t=!1);var n=this.source,r=n.length;if(e>=r)return-1;var i=n.charCodeAt(e);if(!(t||this.switchU)||i<=55295||i>=57344||e+1>=r)return i;var a=n.charCodeAt(e+1);return a>=56320&&a<=57343?(i<<10)+a-56613888:i},Ys.prototype.nextIndex=function(e,t){t===void 0&&(t=!1);var n=this.source,r=n.length;if(e>=r)return r;var i=n.charCodeAt(e),a;return!(t||this.switchU)||i<=55295||i>=57344||e+1>=r||(a=n.charCodeAt(e+1))<56320||a>57343?e+1:e+2},Ys.prototype.current=function(e){return e===void 0&&(e=!1),this.at(this.pos,e)},Ys.prototype.lookahead=function(e){return e===void 0&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},Ys.prototype.advance=function(e){e===void 0&&(e=!1),this.pos=this.nextIndex(this.pos,e)},Ys.prototype.eat=function(e,t){return t===void 0&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},Ys.prototype.eatChars=function(e,t){t===void 0&&(t=!1);for(var n=this.pos,r=0,i=e;r<i.length;r+=1){var a=i[r],o=this.at(n,t);if(o===-1||o!==a)return!1;n=this.nextIndex(n,t)}return this.pos=n,!0},q.validateRegExpFlags=function(e){for(var t=e.validFlags,n=e.flags,r=!1,i=!1,a=0;a<n.length;a++){var o=n.charAt(a);t.indexOf(o)===-1&&this.raise(e.start,`Invalid regular expression flag`),n.indexOf(o,a+1)>-1&&this.raise(e.start,`Duplicate regular expression flag`),o===`u`&&(r=!0),o===`v`&&(i=!0)}this.options.ecmaVersion>=15&&r&&i&&this.raise(e.start,`Invalid regular expression flag`)};function Xs(e){for(var t in e)return!0;return!1}q.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&Xs(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))},q.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue=``,e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise(`Unmatched ')'`),(e.eat(93)||e.eat(125))&&e.raise(`Lone quantifier brackets`)),e.maxBackReference>e.numCapturingParens&&e.raise(`Invalid escape`);for(var t=0,n=e.backReferenceNames;t<n.length;t+=1){var r=n[t];e.groupNames[r]||e.raise(`Invalid named capture referenced`)}},q.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new Js(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise(`Nothing to repeat`),e.eat(123)&&e.raise(`Lone quantifier brackets`)},q.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},q.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise(`Invalid quantifier`),!0):(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))?(this.regexp_eatQuantifier(e),!0):!1},q.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var n=!1;if(this.options.ecmaVersion>=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise(`Unterminated group`),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1},q.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1},q.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},q.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var r=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return i!==-1&&i<r&&!t&&e.raise(`numbers out of order in {} quantifier`),!0;e.switchU&&!t&&e.raise(`Incomplete quantifier`),e.pos=n}return!1},q.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)},q.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},q.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var n=this.regexp_eatModifiers(e),r=e.eat(45);if(n||r){for(var i=0;i<n.length;i++){var a=n.charAt(i);n.indexOf(a,i+1)>-1&&e.raise(`Duplicate regular expression modifiers`)}if(r){var o=this.regexp_eatModifiers(e);!n&&!o&&e.current()===58&&e.raise(`Invalid regular expression modifiers`);for(var s=0;s<o.length;s++){var c=o.charAt(s);(o.indexOf(c,s+1)>-1||n.indexOf(c)>-1)&&e.raise(`Duplicate regular expression modifiers`)}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise(`Unterminated group`)}}e.pos=t}return!1},q.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise(`Invalid group`),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise(`Unterminated group`)}return!1},q.regexp_eatModifiers=function(e){for(var t=``,n=0;(n=e.current())!==-1&&Zs(n);)t+=Eo(n),e.advance();return t};function Zs(e){return e===105||e===109||e===115}q.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},q.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise(`Nothing to repeat`),!1},q.regexp_eatSyntaxCharacter=function(e){var t=e.current();return Qs(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Qs(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}q.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;(n=e.current())!==-1&&!Qs(n);)e.advance();return e.pos!==t},q.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124&&(e.advance(),!0)},q.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise(`Invalid group`);var t=this.options.ecmaVersion>=16,n=e.groupNames[e.lastStringValue];if(n){if(t)for(var r=0,i=n;r<i.length;r+=1)i[r].separatedFrom(e.branchID)||e.raise(`Duplicate capture group name`);else e.raise(`Duplicate capture group name`)}t?(n||(e.groupNames[e.lastStringValue]=[])).push(e.branchID):e.groupNames[e.lastStringValue]=!0}},q.regexp_eatGroupName=function(e){if(e.lastStringValue=``,e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise(`Invalid capture group name`)}return!1},q.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue=``,this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=Eo(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=Eo(e.lastIntValue);return!0}return!1},q.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),$s(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function $s(e){return io(e,!0)||e===36||e===95}q.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),ec(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function ec(e){return ao(e,!0)||e===36||e===95||e===8204||e===8205}q.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise(`Invalid unicode escape`),e.raise(`Invalid escape`)),!1)},q.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1},q.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise(`Invalid named reference`)}return!1},q.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},q.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},q.regexp_eatZero=function(e){return e.current()===48&&!fc(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},q.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114&&(e.lastIntValue=13,e.advance(),!0)},q.regexp_eatControlLetter=function(e){var t=e.current();return tc(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function tc(e){return e>=65&&e<=90||e>=97&&e<=122}q.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var n=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i=e.lastIntValue;if(r&&i>=55296&&i<=56319){var a=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343)return e.lastIntValue=(i-55296)*1024+(o-56320)+65536,!0}e.pos=a,e.lastIntValue=i}return!0}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&nc(e.lastIntValue))return!0;r&&e.raise(`Invalid unicode escape`),e.pos=n}return!1};function nc(e){return e>=0&&e<=1114111}q.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)&&(e.lastIntValue=t,e.advance(),!0)},q.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var rc=0,ic=1,ac=2;q.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(oc(t))return e.lastIntValue=-1,e.advance(),ic;var n=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((n=t===80)||t===112)){e.lastIntValue=-1,e.advance();var r;if(e.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return n&&r===ac&&e.raise(`Invalid property name`),r;e.raise(`Invalid property name`)}return rc};function oc(e){return e===100||e===68||e===115||e===83||e===119||e===87}q.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,r),ic}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return rc},q.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){So(e.unicodeProperties.nonBinary,t)||e.raise(`Invalid property name`),e.unicodeProperties.nonBinary[t].test(n)||e.raise(`Invalid property value`)},q.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return ic;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return ac;e.raise(`Invalid property name`)},q.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue=``;sc(t=e.current());)e.lastStringValue+=Eo(t),e.advance();return e.lastStringValue!==``};function sc(e){return tc(e)||e===95}q.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue=``;cc(t=e.current());)e.lastStringValue+=Eo(t),e.advance();return e.lastStringValue!==``};function cc(e){return sc(e)||fc(e)}q.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},q.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),n=this.regexp_classContents(e);return e.eat(93)||e.raise(`Unterminated character class`),t&&n===ac&&e.raise(`Negated character class may contain strings`),!0}return!1},q.regexp_classContents=function(e){return e.current()===93?ic:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),ic)},q.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;e.switchU&&(t===-1||n===-1)&&e.raise(`Invalid character class`),t!==-1&&n!==-1&&t>n&&e.raise(`Range out of order in character class`)}}},q.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(n===99||hc(n))&&e.raise(`Invalid class escape`),e.raise(`Invalid escape`)}e.pos=t}var r=e.current();return r!==93&&(e.lastIntValue=r,e.advance(),!0)},q.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},q.regexp_classSetExpression=function(e){var t=ic,n;if(!this.regexp_eatClassSetRange(e)){if(n=this.regexp_eatClassSetOperand(e)){n===ac&&(t=ac);for(var r=e.pos;e.eatChars([38,38]);)e.current()!==38&&(n=this.regexp_eatClassSetOperand(e))?n!==ac&&(t=ic):e.raise(`Invalid character in character class`);if(r!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise(`Invalid character in character class`);if(r!==e.pos)return t}else e.raise(`Invalid character in character class`)}for(;;)if(!this.regexp_eatClassSetRange(e)){if(n=this.regexp_eatClassSetOperand(e),!n)return t;n===ac&&(t=ac)}},q.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;return n!==-1&&r!==-1&&n>r&&e.raise(`Range out of order in character class`),!0}e.pos=t}return!1},q.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?ic:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},q.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var n=e.eat(94),r=this.regexp_classContents(e);if(e.eat(93))return n&&r===ac&&e.raise(`Negated character class may contain strings`),r;e.pos=t}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=t}return null},q.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var n=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return n}else e.raise(`Invalid escape`);e.pos=t}return null},q.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===ac&&(t=ac);return t},q.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?ic:ac},q.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var n=e.current();return n<0||n===e.lookahead()&&lc(n)||uc(n)?!1:(e.advance(),e.lastIntValue=n,!0)};function lc(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function uc(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}q.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return dc(t)?(e.lastIntValue=t,e.advance(),!0):!1};function dc(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}q.regexp_eatClassControlLetter=function(e){var t=e.current();return fc(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1},q.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise(`Invalid escape`),e.pos=t}return!1},q.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;fc(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t};function fc(e){return e>=48&&e<=57}q.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;pc(n=e.current());)e.lastIntValue=16*e.lastIntValue+mc(n),e.advance();return e.pos!==t};function pc(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function mc(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}q.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;e.lastIntValue=t<=3&&this.regexp_eatOctalDigit(e)?t*64+n*8+e.lastIntValue:t*8+n}else e.lastIntValue=t;return!0}return!1},q.regexp_eatOctalDigit=function(e){var t=e.current();return hc(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function hc(e){return e>=48&&e<=55}q.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var i=e.current();if(!pc(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+mc(i),e.advance()}return!0};var gc=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new ko(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},_c=es.prototype;_c.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,`Escape sequence in keyword `+this.type.keyword),this.options.onToken&&this.options.onToken(new gc(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},_c.getToken=function(){return this.next(),new gc(this)},typeof Symbol<`u`&&(_c[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===G.eof,value:t}}}}),_c.nextToken=function(){var e=this.curContext();if(e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(G.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())},_c.readToken=function(e){return io(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)},_c.fullCharCodeAt=function(e){var t=this.input.charCodeAt(e);if(t<=55295||t>=56320)return t;var n=this.input.charCodeAt(e+1);return n<=56319||n>=57344?t:(t<<10)+n-56613888},_c.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},_c.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf(`*/`,this.pos+=2);if(n===-1&&this.raise(this.pos-2,`Unterminated comment`),this.pos=n+2,this.options.locations)for(var r=void 0,i=t;(r=go(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())},_c.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!ho(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())},_c.skipSpace=function(){loop:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break loop}break;default:if(e>8&&e<14||e>=5760&&_o.test(String.fromCharCode(e)))++this.pos;else break loop}}},_c.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},_c.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(G.ellipsis)):(++this.pos,this.finishToken(G.dot))},_c.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(G.assign,2):this.finishOp(G.slash,1)},_c.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=e===42?G.star:G.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++n,r=G.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(G.assign,n+1):this.finishOp(r,n)},_c.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.options.ecmaVersion>=12&&this.input.charCodeAt(this.pos+2)===61?this.finishOp(G.assign,3):this.finishOp(e===124?G.logicalOR:G.logicalAND,2):t===61?this.finishOp(G.assign,2):this.finishOp(e===124?G.bitwiseOR:G.bitwiseAND,1)},_c.readToken_caret=function(){return this.input.charCodeAt(this.pos+1)===61?this.finishOp(G.assign,2):this.finishOp(G.bitwiseXOR,1)},_c.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||po.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(G.incDec,2):t===61?this.finishOp(G.assign,2):this.finishOp(G.plusMin,1)},_c.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+n)===61?this.finishOp(G.assign,n+1):this.finishOp(G.bitShift,n)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(n=2),this.finishOp(G.relational,n))},_c.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(G.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(G.arrow)):this.finishOp(e===61?G.eq:G.prefix,1)},_c.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(G.questionDot,2)}if(t===63)return e>=12&&this.input.charCodeAt(this.pos+2)===61?this.finishOp(G.assign,3):this.finishOp(G.coalesce,2)}return this.finishOp(G.question,1)},_c.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),io(t,!0)||t===92))return this.finishToken(G.privateId,this.readWord1());this.raise(this.pos,`Unexpected character '`+Eo(t)+`'`)},_c.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(G.parenL);case 41:return++this.pos,this.finishToken(G.parenR);case 59:return++this.pos,this.finishToken(G.semi);case 44:return++this.pos,this.finishToken(G.comma);case 91:return++this.pos,this.finishToken(G.bracketL);case 93:return++this.pos,this.finishToken(G.bracketR);case 123:return++this.pos,this.finishToken(G.braceL);case 125:return++this.pos,this.finishToken(G.braceR);case 58:return++this.pos,this.finishToken(G.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(G.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(G.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,`Unexpected character '`+Eo(e)+`'`)},_c.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},_c.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,`Unterminated regular expression`);var r=this.input.charAt(this.pos);if(po.test(r)&&this.raise(n,`Unterminated regular expression`),e)e=!1;else{if(r===`[`)t=!0;else if(r===`]`&&t)t=!1;else if(r===`/`&&!t)break;e=r===`\\`}++this.pos}var i=this.input.slice(n,this.pos);++this.pos;var a=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(a);var s=this.regexpState||=new Ys(this);s.reset(n,i,o),this.validateRegExpFlags(s),this.validateRegExpPattern(s);var c=null;try{c=new RegExp(i,o)}catch{}return this.finishToken(G.regexp,{pattern:i,flags:o,value:c})},_c.readInt=function(e,t,n){for(var r=this.options.ecmaVersion>=12&&t===void 0,i=n&&this.input.charCodeAt(this.pos)===48,a=this.pos,o=0,s=0,c=0,l=t??1/0;c<l;++c,++this.pos){var u=this.input.charCodeAt(this.pos),d=void 0;if(r&&u===95)i&&this.raiseRecoverable(this.pos,`Numeric separator is not allowed in legacy octal numeric literals`),s===95&&this.raiseRecoverable(this.pos,`Numeric separator must be exactly one underscore`),c===0&&this.raiseRecoverable(this.pos,`Numeric separator is not allowed at the first of digits`),s=u;else{if(d=u>=97?u-97+10:u>=65?u-65+10:u>=48&&u<=57?u-48:1/0,d>=e)break;s=u,o=o*e+d}}return r&&s===95&&this.raiseRecoverable(this.pos-1,`Numeric separator is not allowed at the last of digits`),this.pos===a||t!=null&&this.pos-a!==t?null:o};function vc(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,``))}function yc(e){return typeof BigInt==`function`?BigInt(e.replace(/_/g,``)):null}_c.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);return n??this.raise(this.start+2,`Expected number in radix `+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(n=yc(this.input.slice(t,this.pos)),++this.pos):io(this.fullCharCodeAtPos())&&this.raise(this.pos,`Identifier directly after number`),this.finishToken(G.num,n)},_c.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,`Invalid number`);var n=this.pos-t>=2&&this.input.charCodeAt(t)===48;n&&this.strict&&this.raise(t,`Invalid number`);var r=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&r===110){var i=yc(this.input.slice(t,this.pos));return++this.pos,io(this.fullCharCodeAtPos())&&this.raise(this.pos,`Identifier directly after number`),this.finishToken(G.num,i)}n&&/[89]/.test(this.input.slice(t,this.pos))&&(n=!1),r===46&&!n&&(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),r!==69&&r!==101||n||(r=this.input.charCodeAt(++this.pos),(r===43||r===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,`Invalid number`)),io(this.fullCharCodeAtPos())&&this.raise(this.pos,`Identifier directly after number`);var a=vc(this.input.slice(t,this.pos),n);return this.finishToken(G.num,a)},_c.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var n=++this.pos;t=this.readHexChar(this.input.indexOf(`}`,this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(n,`Code point out of bounds`)}else t=this.readHexChar(4);return t},_c.readString=function(e){for(var t=``,n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,`Unterminated string constant`);var r=this.input.charCodeAt(this.pos);if(r===e)break;r===92?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):r===8232||r===8233?(this.options.ecmaVersion<10&&this.raise(this.start,`Unterminated string constant`),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(ho(r)&&this.raise(this.start,`Unterminated string constant`),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(G.string,t)};var bc={};_c.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===bc)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1},_c.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw bc;this.raise(e,t)},_c.readTmplToken=function(){for(var e=``,t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,`Unterminated template`);var n=this.input.charCodeAt(this.pos);if(n===96||n===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===G.template||this.type===G.invalidTemplate)?n===36?(this.pos+=2,this.finishToken(G.dollarBraceL)):(++this.pos,this.finishToken(G.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(G.template,e));if(n===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(ho(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=`
8
- `;break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},_c.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case`\\`:++this.pos;break;case`$`:if(this.input[this.pos+1]!==`{`)break;case"`":return this.finishToken(G.invalidTemplate,this.input.slice(this.start,this.pos));case`\r`:this.input[this.pos+1]===`
9
- `&&++this.pos;case`
10
- `:case`\u2028`:case`\u2029`:++this.curLine,this.lineStart=this.pos+1}this.raise(this.start,`Unterminated template`)},_c.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
11
- `;case 114:return`\r`;case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Eo(this.readCodePoint());case 116:return` `;case 98:return`\b`;case 118:return`\v`;case 102:return`\f`;case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),``;case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,`Invalid escape sequence`),e){var n=this.pos-1;this.invalidStringToken(n,`Invalid escape sequence in template string`)}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);return i>255&&(r=r.slice(0,-1),i=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),(r!==`0`||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-r.length,e?`Octal literal in template string`:`Octal literal in strict mode`),String.fromCharCode(i)}return ho(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),``):String.fromCharCode(t)}},_c.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return n===null&&this.invalidStringToken(t,`Bad character escape sequence`),n},_c.readWord1=function(){this.containsEsc=!1;for(var e=``,t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(ao(i,r))this.pos+=i<=65535?1:2;else if(i===92){this.containsEsc=!0,e+=this.input.slice(n,this.pos);var a=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,`Expecting Unicode escape sequence \\uXXXX`),++this.pos;var o=this.readCodePoint();(t?io:ao)(o,r)||this.invalidStringToken(a,`Invalid Unicode escape`),e+=Eo(o),n=this.pos}else break;t=!1}return e+this.input.slice(n,this.pos)},_c.readWord=function(){var e=this.readWord1(),t=G.name;return this.keywords.test(e)&&(t=uo[e]),this.finishToken(t,e)},es.acorn={Parser:es,version:`8.19.0`,defaultOptions:jo,Position:Oo,SourceLocation:ko,getLineInfo:Ao,Node:Ts,TokenType:oo,tokTypes:G,keywordTypes:uo,TokContext:hs,tokContexts:gs,isIdentifierChar:ao,isIdentifierStart:io,Token:gc,isNewLine:ho,lineBreak:po,lineBreakG:mo,nonASCIIwhitespace:_o};var xc=n(((e,t)=>{t.exports={quot:`"`,amp:`&`,apos:`'`,lt:`<`,gt:`>`,nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:`­`,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,fnof:`ƒ`,circ:`ˆ`,tilde:`˜`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,ensp:` `,emsp:` `,thinsp:` `,zwnj:`‌`,zwj:`‍`,lrm:`‎`,rlm:`‏`,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,bull:`•`,hellip:`…`,permil:`‰`,prime:`′`,Prime:`″`,lsaquo:`‹`,rsaquo:`›`,oline:`‾`,frasl:`⁄`,euro:`€`,image:`ℑ`,weierp:`℘`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`}})),Sc=n(((e,t,n)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n.acorn={}))})(n,(function(e){var t=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,31,4,33,15,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,7,0,259,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,481,1,61,4,4,5,9,7,3,6,31,3,149,2,12,2,9,1,3,0,33,1,1357,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],n=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,13,65,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,18,21,18,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,18,0,182,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,22,0,239,18,16,0,2,12,2,33,125,0,80,921,103,111,6,206,13,310,2314,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7386,37,33,96,114,14,913,15,50,7710,3,2,6,2,1,2,296,10,0,30,2,3,0,15,4,8,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,340,2,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,129,15,6,55,50,49,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4382,2,5773,3,7472,16,621,2467,541,1507,4938,6,8489,39815,11327],r=`‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄ-׉ؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୓-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫰ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・`,i=`ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆ՘ՙՠ-ֈ֋֌א-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿ₏-₟ℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-꟝꟢꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩ꭬꭭ꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ`,a={3:`abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile`,5:`class enum extends super const export import`,6:`enum`,strict:`implements interface let package private protected public static yield`,strictBind:`eval arguments`},o=`break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this`,s={5:o,"5module":o+` export import`,6:o+` const class extends export import super`},c=/^in(stanceof)?$/,l=RegExp(`[`+i+`]`),u=RegExp(`[`+i+r+`]`);function d(e,t){for(var n=65536,r=0;r<t.length;r+=2){if(n+=t[r],n>e)return!1;if(n+=t[r+1],n>=e)return!0}return!1}function f(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&l.test(String.fromCharCode(e)):t!==!1&&d(e,n)}function p(e,r){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&u.test(String.fromCharCode(e)):r===!1?!1:d(e,n)||d(e,t)}var m=function(e,t){t===void 0&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function h(e,t){return new m(e,{beforeExpr:!0,binop:t})}var g={beforeExpr:!0},_={startsExpr:!0},v={};function y(e,t){return t===void 0&&(t={}),t.keyword=e,v[e]=new m(e,t)}var b={num:new m(`num`,_),regexp:new m(`regexp`,_),string:new m(`string`,_),name:new m(`name`,_),privateId:new m(`privateId`,_),eof:new m(`eof`),bracketL:new m(`[`,{beforeExpr:!0,startsExpr:!0}),bracketR:new m(`]`),braceL:new m(`{`,{beforeExpr:!0,startsExpr:!0}),braceR:new m(`}`),parenL:new m(`(`,{beforeExpr:!0,startsExpr:!0}),parenR:new m(`)`),comma:new m(`,`,g),semi:new m(`;`,g),colon:new m(`:`,g),dot:new m(`.`),question:new m(`?`,g),questionDot:new m(`?.`),arrow:new m(`=>`,g),template:new m(`template`),invalidTemplate:new m(`invalidTemplate`),ellipsis:new m(`...`,g),backQuote:new m("`",_),dollarBraceL:new m("${",{beforeExpr:!0,startsExpr:!0}),eq:new m(`=`,{beforeExpr:!0,isAssign:!0}),assign:new m(`_=`,{beforeExpr:!0,isAssign:!0}),incDec:new m(`++/--`,{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new m(`!/~`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:h(`||`,1),logicalAND:h(`&&`,2),bitwiseOR:h(`|`,3),bitwiseXOR:h(`^`,4),bitwiseAND:h(`&`,5),equality:h(`==/!=/===/!==`,6),relational:h(`</>/<=/>=`,7),bitShift:h(`<</>>/>>>`,8),plusMin:new m(`+/-`,{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:h(`%`,10),star:h(`*`,10),slash:h(`/`,10),starstar:new m(`**`,{beforeExpr:!0}),coalesce:h(`??`,1),_break:y(`break`),_case:y(`case`,g),_catch:y(`catch`),_continue:y(`continue`),_debugger:y(`debugger`),_default:y(`default`,g),_do:y(`do`,{isLoop:!0,beforeExpr:!0}),_else:y(`else`,g),_finally:y(`finally`),_for:y(`for`,{isLoop:!0}),_function:y(`function`,_),_if:y(`if`),_return:y(`return`,g),_switch:y(`switch`),_throw:y(`throw`,g),_try:y(`try`),_var:y(`var`),_const:y(`const`),_while:y(`while`,{isLoop:!0}),_with:y(`with`),_new:y(`new`,{beforeExpr:!0,startsExpr:!0}),_this:y(`this`,_),_super:y(`super`,_),_class:y(`class`,_),_extends:y(`extends`,g),_export:y(`export`),_import:y(`import`,_),_null:y(`null`,_),_true:y(`true`,_),_false:y(`false`,_),_in:y(`in`,{beforeExpr:!0,binop:7}),_instanceof:y(`instanceof`,{beforeExpr:!0,binop:7}),_typeof:y(`typeof`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:y(`void`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:y(`delete`,{beforeExpr:!0,prefix:!0,startsExpr:!0})},x=/\r\n?|\n|\u2028|\u2029/,S=new RegExp(x.source,`g`);function C(e){return e===10||e===13||e===8232||e===8233}function w(e,t,n){n===void 0&&(n=e.length);for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(C(i))return r<n-1&&i===13&&e.charCodeAt(r+1)===10?r+2:r+1}return-1}var T=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,E=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,D=Object.prototype,O=D.hasOwnProperty,k=D.toString,A=Object.hasOwn||(function(e,t){return O.call(e,t)}),j=Array.isArray||(function(e){return k.call(e)===`[object Array]`}),M=Object.create(null);function N(e){return M[e]||(M[e]=RegExp(`^(?:`+e.replace(/ /g,`|`)+`)$`))}function P(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var F=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,I=function(e,t){this.line=e,this.column=t};I.prototype.offset=function(e){return new I(this.line,this.column+e)};var L=function(e,t,n){this.start=t,this.end=n,e.sourceFile!==null&&(this.source=e.sourceFile)};function R(e,t){for(var n=1,r=0;;){var i=w(e,r,t);if(i<0)return new I(n,t-r);++n,r=i}}var z={ecmaVersion:null,sourceType:`script`,strict:!1,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,startLocation:null,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},B=!1;function ee(e){var t={};for(var n in z)t[n]=e&&A(e,n)?e[n]:z[n];if(t.ecmaVersion===`latest`?t.ecmaVersion=1e8:t.ecmaVersion==null?(!B&&typeof console==`object`&&console.warn&&(B=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
12
- Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved??=t.ecmaVersion<5,e&&e.allowHashBang!=null||(t.allowHashBang=t.ecmaVersion>=14),j(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}if(j(t.onComment)&&(t.onComment=te(t,t.onComment)),t.sourceType===`commonjs`&&t.allowAwaitOutsideFunction)throw Error(`Cannot use allowAwaitOutsideFunction with sourceType: commonjs`);return t}function te(e,t){return function(n,r,i,a,o,s){var c={type:n?`Block`:`Line`,value:r,start:i,end:a};e.locations&&(c.loc=new L(this,o,s)),e.ranges&&(c.range=[i,a]),t.push(c)}}var ne=1,re=2,ie=4,V=8,ae=16,oe=32,se=64,ce=128,le=256,ue=512,de=1024,fe=ne|re|le;function pe(e,t){return re|(e?ie:0)|(t?V:0)}var me=0,he=1,ge=2,_e=3,ve=4,ye=5,be=function(e,t,n){this.options=e=ee(e),this.sourceFile=e.sourceFile,this.keywords=N(s[e.ecmaVersion>=6?6:e.sourceType===`module`?`5module`:5]);var r=``;e.allowReserved!==!0&&(r=a[e.ecmaVersion>=6?6:e.ecmaVersion===5?5:3],e.sourceType===`module`&&(r+=` await`)),this.reservedWords=N(r);var i=(r?r+` `:``)+a.strict;this.reservedWordsStrict=N(i),this.reservedWordsStrictBind=N(i+` `+a.strictBind),this.input=String(t),this.containsEsc=!1,this.pos=n||0,this.curLine=1,e.startLocation?(this.lineStart=this.pos-e.startLocation.column,this.curLine=e.startLocation.line):n?(this.lineStart=this.input.lastIndexOf(`
13
- `,n-1)+1,this.options.locations&&(this.curLine=this.input.slice(0,this.lineStart).split(x).length)):this.lineStart=0,this.type=b.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=e.sourceType===`module`,this.strict=this.inModule||e.strict===!0||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&e.allowHashBang&&this.input.slice(0,2)===`#!`&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType===`commonjs`?re:ne),this.regexpState=null,this.privateNameStack=[]},xe={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};be.prototype.parse=function(){var e=this,t=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return e.parseTopLevel(t)})},xe.inFunction.get=function(){return(this.currentVarScope().flags&re)>0},xe.inGenerator.get=function(){return(this.currentVarScope().flags&V)>0},xe.inAsync.get=function(){return(this.currentVarScope().flags&ie)>0},xe.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(t&(le|ue))return!1;if(t&re)return(t&ie)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},xe.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&ne)},xe.allowSuper.get=function(){return(this.currentThisScope().flags&se)>0||this.options.allowSuperOutsideMethod},xe.allowDirectSuper.get=function(){return(this.currentThisScope().flags&ce)>0},xe.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},xe.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(t&(le|ue)||t&re&&!(t&ae))return!0}return!1},xe.allowUsing.get=function(){var e=this.currentScope().flags;return!(e&de||!this.inModule&&e&ne)},xe.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&le)>0},be.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,r=0;r<e.length;r++)n=e[r](n);return n},be.parse=function(e,t){return new this(t,e).parse()},be.parseExpressionAt=function(e,t,n){var r=new this(n,e,t);return r.nextToken(),r.parseExpression()},be.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(be.prototype,xe);var Se=be.prototype,Ce=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;Se.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){E.lastIndex=e,e+=E.exec(this.input)[0].length;var t=Ce.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])===`use strict`){E.lastIndex=e+t[0].length;var n=E.exec(this.input),r=n.index+n[0].length,i=this.input.charAt(r);return i===`;`||i===`}`||x.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||i===`!`&&this.input.charAt(r+1)===`=`||i===`i`&&we(this,r))}e+=t[0].length,E.lastIndex=e,e+=E.exec(this.input)[0].length,this.input[e]===`;`&&e++}};function we(e,t){for(var n=t+1,r=Math.min(e.input.length,t+11);n<r;){var i=e.fullCharCodeAt(n);if(!p(i,!0))break;n+=i<=65535?1:2}return n===t+2&&e.input.slice(t,n)===`in`||n===t+10&&e.input.slice(t,n)===`instanceof`}Se.eat=function(e){return this.type===e&&(this.next(),!0)},Se.isContextual=function(e){return this.type===b.name&&this.value===e&&!this.containsEsc},Se.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1},Se.catchStackOverflow=function(e){try{return e()}catch(e){if(e instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(e.message)||/\btoo much recursion\b/i.test(e.message)))this.raise(this.start,`Not enough stack space to parse input`);else throw e}},Se.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},Se.canInsertSemicolon=function(){return this.type===b.eof||this.type===b.braceR||x.test(this.input.slice(this.lastTokEnd,this.start))},Se.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Se.semicolon=function(){!this.eat(b.semi)&&!this.insertSemicolon()&&this.unexpected()},Se.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},Se.expect=function(e){this.eat(e)||this.unexpected()},Se.unexpected=function(e){this.raise(e??this.start,`Unexpected token`)};var Te=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Se.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,`Comma is not permitted after the rest element`);var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,t?`Assigning to rvalue`:`Parenthesized pattern`)}},Se.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,r=e.doubleProto;if(!t)return n>=0||r>=0;n>=0&&this.raise(n,`Shorthand property assignments are valid only in destructuring patterns`),r>=0&&this.raiseRecoverable(r,`Redefinition of __proto__ property`)},Se.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,`Yield expression cannot be a default value`),this.awaitPos&&this.raise(this.awaitPos,`Await expression cannot be a default value`)},Se.isSimpleAssignTarget=function(e){return e.type===`ParenthesizedExpression`?this.isSimpleAssignTarget(e.expression):e.type===`Identifier`||e.type===`MemberExpression`};var H=be.prototype;H.parseTopLevel=function(e){var t=Object.create(null);for(e.body||=[];this.type!==b.eof;){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var r=0,i=Object.keys(this.undefinedExports);r<i.length;r+=1){var a=i[r];this.raiseRecoverable(this.undefinedExports[a].start,`Export '`+a+`' is not defined`)}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType===`commonjs`?`script`:this.options.sourceType,this.finishNode(e,`Program`)};var Ee={kind:`loop`},De={kind:`switch`};H.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual(`let`))return!1;E.lastIndex=this.pos;var t=E.exec(this.input),n=this.pos+t[0].length,r=this.fullCharCodeAt(n);if(r===91||r===92)return!0;if(e)return!1;if(r===123)return!0;if(f(r)){var i=n;do n+=r<=65535?1:2;while(p(r=this.fullCharCodeAt(n)));if(r===92)return!0;var a=this.input.slice(i,n);if(!c.test(a))return!0}return!1},H.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual(`async`))return!1;E.lastIndex=this.pos;var e=E.exec(this.input),t=this.pos+e[0].length,n;return!x.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)===`function`&&(t+8===this.input.length||!(p(n=this.fullCharCodeAt(t+8))||n===92))},H.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?`await`:`using`))return!1;E.lastIndex=this.pos;var n=E.exec(this.input),r=this.pos+n[0].length;if(x.test(this.input.slice(this.pos,r)))return!1;if(e){var i=r+5,a;if(this.input.slice(r,i)!==`using`||i===this.input.length||p(a=this.fullCharCodeAt(i))||a===92)return!1;E.lastIndex=i;var o=E.exec(this.input);if(r=i+o[0].length,o&&x.test(this.input.slice(i,r)))return!1}var s=this.fullCharCodeAt(r);if(!f(s)&&s!==92)return!1;var l=r;do r+=s<=65535?1:2;while(p(s=this.fullCharCodeAt(r)));if(s===92)return!0;var u=this.input.slice(l,r);if(c.test(u))return!1;if(t&&!e&&u===`of`){E.lastIndex=r;var d=E.exec(this.input);if(r+=d[0].length,this.input.charCodeAt(r)!==61||(s=this.input.charCodeAt(r+1))===61||s===62)return!1}return!0},H.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)},H.isUsing=function(e){return this.isUsingKeyword(!1,e)},H.parseStatement=function(e,t,n){var r=this.type,i=this.startNode(),a;switch(this.isLet(e)&&(r=b._var,a=`let`),r){case b._break:case b._continue:return this.parseBreakContinueStatement(i,r.keyword);case b._debugger:return this.parseDebuggerStatement(i);case b._do:return this.parseDoStatement(i);case b._for:return this.parseForStatement(i);case b._function:return e&&(this.strict||e!==`if`&&e!==`label`)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(i,!1,!e);case b._class:return e&&this.unexpected(),this.parseClass(i,!0);case b._if:return this.parseIfStatement(i);case b._return:return this.parseReturnStatement(i);case b._switch:return this.parseSwitchStatement(i);case b._throw:return this.parseThrowStatement(i);case b._try:return this.parseTryStatement(i);case b._const:case b._var:return a||=this.value,e&&a!==`var`&&this.unexpected(),this.parseVarStatement(i,a);case b._while:return this.parseWhileStatement(i);case b._with:return this.parseWithStatement(i);case b.braceL:return this.parseBlock(!0,i);case b.semi:return this.parseEmptyStatement(i);case b._export:case b._import:if(this.options.ecmaVersion>10&&r===b._import){E.lastIndex=this.pos;var o=E.exec(this.input),s=this.pos+o[0].length,c=this.input.charCodeAt(s);if(c===40||c===46)return this.parseExpressionStatement(i,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,`'import' and 'export' may only appear at the top level`),this.inModule||this.raise(this.start,`'import' and 'export' may appear only with 'sourceType: module'`)),r===b._import?this.parseImport(i):this.parseExport(i,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(i,!0,!e);var l=this.isAwaitUsing(!1)?`await using`:this.isUsing(!1)?`using`:null;if(l)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),e&&this.raise(this.start,`Using declaration is not allowed in single-statement positions`),l===`await using`&&(this.canAwait||this.raise(this.start,`Await using cannot appear outside of async function`),this.next()),this.next(),this.parseVar(i,!1,l),this.semicolon(),this.finishNode(i,`VariableDeclaration`);var u=this.value,d=this.parseExpression();return r===b.name&&d.type===`Identifier`&&this.eat(b.colon)?this.parseLabeledStatement(i,u,d,e):this.parseExpressionStatement(i,d)}},H.parseBreakContinueStatement=function(e,t){var n=t===`break`;this.next(),this.eat(b.semi)||this.insertSemicolon()?e.label=null:this.type===b.name?(e.label=this.parseIdent(),this.semicolon()):this.unexpected();for(var r=0;r<this.labels.length;++r){var i=this.labels[r];if((e.label==null||i.name===e.label.name)&&(i.kind!=null&&(n||i.kind===`loop`)||e.label&&n))break}return r===this.labels.length&&this.raise(e.start,`Unsyntactic `+t),this.finishNode(e,n?`BreakStatement`:`ContinueStatement`)},H.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,`DebuggerStatement`)},H.parseDoStatement=function(e){return this.next(),this.labels.push(Ee),e.body=this.parseStatement(`do`),this.labels.pop(),this.expect(b._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(b.semi):this.semicolon(),this.finishNode(e,`DoWhileStatement`)},H.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual(`await`)?this.lastTokStart:-1;if(this.labels.push(Ee),this.enterScope(0),this.expect(b.parenL),this.type===b.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===b._var||this.type===b._const||n){var r=this.startNode(),i=n?`let`:this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,`VariableDeclaration`),this.parseForAfterInit(e,r,t)}var a=this.isContextual(`let`),o=!1,s=this.isUsing(!0)?`using`:this.isAwaitUsing(!0)?`await using`:null;if(s){var c=this.startNode();return this.next(),s===`await using`&&(this.canAwait||this.raise(this.start,`Await using cannot appear outside of async function`),this.next()),this.parseVar(c,!0,s),this.finishNode(c,`VariableDeclaration`),this.parseForAfterInit(e,c,t)}var l=this.containsEsc,u=new Te,d=this.start,f=t>-1?this.parseExprSubscripts(u,`await`):this.parseExpression(!0,u);return this.type===b._in||(o=this.options.ecmaVersion>=6&&this.isContextual(`of`))?(t>-1?(this.type===b._in&&this.unexpected(t),e.await=!0):o&&this.options.ecmaVersion>=8&&(f.start===d&&!l&&f.type===`Identifier`&&f.name===`async`?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),a&&o&&this.raise(f.start,`The left-hand side of a for-of loop may not start with 'let'.`),this.toAssignable(f,!1,u),this.checkLValPattern(f),this.parseForIn(e,f)):(this.checkExpressionErrors(u,!0),t>-1&&this.unexpected(t),this.parseFor(e,f))},H.parseForAfterInit=function(e,t,n){return(this.type===b._in||this.options.ecmaVersion>=6&&this.isContextual(`of`))&&t.declarations.length===1?(this.type===b._in?(t.kind!==`using`&&t.kind!==`await using`||t.declarations[0].init||this.raise(this.start,`Using declaration is not allowed in for-in loops`),this.options.ecmaVersion>=9&&n>-1&&this.unexpected(n)):this.options.ecmaVersion>=9&&(e.await=n>-1),this.parseForIn(e,t)):(n>-1&&this.unexpected(n),this.parseFor(e,t))},H.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,ke|(n?0:Ae),!1,t)},H.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(`if`),e.alternate=this.eat(b._else)?this.parseStatement(`if`):null,this.finishNode(e,`IfStatement`)},H.parseReturnStatement=function(e){return this.allowReturn||this.raise(this.start,`'return' outside of function`),this.next(),this.eat(b.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,`ReturnStatement`)},H.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(b.braceL),this.labels.push(De),this.enterScope(de);for(var t,n=!1;this.type!==b.braceR;)if(this.type===b._case||this.type===b._default){var r=this.type===b._case;t&&this.finishNode(t,`SwitchCase`),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,`Multiple default clauses`),n=!0,t.test=null),this.expect(b.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,`SwitchCase`),this.next(),this.labels.pop(),this.finishNode(e,`SwitchStatement`)},H.parseThrowStatement=function(e){return this.next(),x.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,`Illegal newline after throw`),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,`ThrowStatement`)};var Oe=[];H.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type===`Identifier`;return this.enterScope(t?oe:0),this.checkLValPattern(e,t?ve:ge),this.expect(b.parenR),e},H.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===b._catch){var t=this.startNode();this.next(),this.eat(b.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,`CatchClause`)}return e.finalizer=this.eat(b._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,`Missing catch or finally clause`),this.finishNode(e,`TryStatement`)},H.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,`VariableDeclaration`)},H.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Ee),e.body=this.parseStatement(`while`),this.labels.pop(),this.finishNode(e,`WhileStatement`)},H.parseWithStatement=function(e){return this.strict&&this.raise(this.start,`'with' in strict mode`),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(`with`),this.finishNode(e,`WithStatement`)},H.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,`EmptyStatement`)},H.parseLabeledStatement=function(e,t,n,r){for(var i=0,a=this.labels;i<a.length;i+=1)a[i].name===t&&this.raise(n.start,`Label '`+t+`' is already declared`);for(var o=this.type.isLoop?`loop`:this.type===b._switch?`switch`:null,s=this.labels.length-1;s>=0;s--){var c=this.labels[s];if(c.statementStart===e.start)c.statementStart=this.start,c.kind=o;else break}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(r?r.indexOf(`label`)===-1?r+`label`:r:`label`),this.labels.pop(),e.label=n,this.finishNode(e,`LabeledStatement`)},H.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,`ExpressionStatement`)},H.parseBlock=function(e,t,n){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(b.braceL),e&&this.enterScope(0);this.type!==b.braceR;){var r=this.parseStatement(null);t.body.push(r)}return n&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,`BlockStatement`)},H.parseFor=function(e,t){return e.init=t,this.expect(b.semi),e.test=this.type===b.semi?null:this.parseExpression(),this.expect(b.semi),e.update=this.type===b.parenR?null:this.parseExpression(),this.expect(b.parenR),e.body=this.parseStatement(`for`),this.exitScope(),this.labels.pop(),this.finishNode(e,`ForStatement`)},H.parseForIn=function(e,t){var n=this.type===b._in;return this.next(),t.type===`VariableDeclaration`&&t.declarations[0].init!=null&&(!n||this.options.ecmaVersion<8||this.strict||t.kind!==`var`||t.declarations[0].id.type!==`Identifier`)&&this.raise(t.start,(n?`for-in`:`for-of`)+` loop variable declaration may not have an initializer`),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(b.parenR),e.body=this.parseStatement(`for`),this.exitScope(),this.labels.pop(),this.finishNode(e,n?`ForInStatement`:`ForOfStatement`)},H.parseVar=function(e,t,n,r){for(e.declarations=[],e.kind=n;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(b.eq)?i.init=this.parseMaybeAssign(t):!r&&n===`const`&&!(this.type===b._in||this.options.ecmaVersion>=6&&this.isContextual(`of`))?this.unexpected():!r&&(n===`using`||n===`await using`)&&this.options.ecmaVersion>=17&&this.type!==b._in&&!this.isContextual(`of`)?this.raise(this.lastTokEnd,`Missing initializer in `+n+` declaration`):!r&&i.id.type!==`Identifier`&&(!t||this.type!==b._in&&!this.isContextual(`of`))?this.raise(this.lastTokEnd,`Complex binding patterns require an initialization value`):i.init=null,e.declarations.push(this.finishNode(i,`VariableDeclarator`)),!this.eat(b.comma))break}return e},H.parseVarId=function(e,t){e.id=t===`using`||t===`await using`?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t===`var`?he:ge,!1)};var ke=1,Ae=2,je=4;H.parseFunction=function(e,t,n,r,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===b.star&&t&Ae&&this.unexpected(),e.generator=this.eat(b.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&ke&&(e.id=t&je&&this.type!==b.name?null:this.parseIdent(),e.id&&!(t&Ae)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?he:ge:_e));var a=this.yieldPos,o=this.awaitPos,s=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(pe(e.async,e.generator)),t&ke||(e.id=this.type===b.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,i),this.yieldPos=a,this.awaitPos=o,this.awaitIdentPos=s,this.finishNode(e,t&ke?`FunctionDeclaration`:`FunctionExpression`)},H.parseFunctionParams=function(e){this.expect(b.parenL),e.params=this.parseBindingList(b.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},H.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),i=this.startNode(),a=!1;for(i.body=[],this.expect(b.braceL);this.type!==b.braceR;){var o=this.parseClassElement(e.superClass!==null);o&&(i.body.push(o),o.type===`MethodDefinition`&&o.kind===`constructor`?(a&&this.raiseRecoverable(o.start,`Duplicate constructor in the same class`),a=!0):o.key&&o.key.type===`PrivateIdentifier`&&Me(r,o)&&this.raiseRecoverable(o.key.start,`Identifier '#`+o.key.name+`' has already been declared`))}return this.strict=n,this.next(),e.body=this.finishNode(i,`ClassBody`),this.exitClassBody(),this.finishNode(e,t?`ClassDeclaration`:`ClassExpression`)},H.parseClassElement=function(e){if(this.eat(b.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),r=``,i=!1,a=!1,o=`method`,s=!1;if(this.eatContextual(`static`)){if(t>=13&&this.eat(b.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===b.star?s=!0:r=`static`}if(n.static=s,!r&&t>=8&&this.eatContextual(`async`)&&((this.isClassElementNameStart()||this.type===b.star)&&!this.canInsertSemicolon()?a=!0:r=`async`),!r&&(t>=9||!a)&&this.eat(b.star)&&(i=!0),!r&&!a&&!i){var c=this.value;(this.eatContextual(`get`)||this.eatContextual(`set`))&&(this.isClassElementNameStart()?o=c:r=c)}if(r?(n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=r,this.finishNode(n.key,`Identifier`)):this.parseClassElementName(n),t<13||this.type===b.parenL||o!==`method`||i||a){var l=!n.static&&Ne(n,`constructor`),u=l&&e;l&&o!==`method`&&this.raise(n.key.start,`Constructor can't have get/set modifier`),n.kind=l?`constructor`:o,this.parseClassMethod(n,i,a,u)}else this.parseClassField(n);return n},H.isClassElementNameStart=function(){return this.type===b.name||this.type===b.privateId||this.type===b.num||this.type===b.string||this.type===b.bracketL||this.type.keyword},H.parseClassElementName=function(e){this.type===b.privateId?(this.value===`constructor`&&this.raise(this.start,`Classes can't have an element named '#constructor'`),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},H.parseClassMethod=function(e,t,n,r){var i=e.key;e.kind===`constructor`?(t&&this.raise(i.start,`Constructor can't be a generator`),n&&this.raise(i.start,`Constructor can't be an async method`)):e.static&&Ne(e,`prototype`)&&this.raise(i.start,`Classes may not have a static property named prototype`);var a=e.value=this.parseMethod(t,n,r);return e.kind===`get`&&a.params.length!==0&&this.raiseRecoverable(a.start,`getter should have no params`),e.kind===`set`&&a.params.length!==1&&this.raiseRecoverable(a.start,`setter should have exactly one param`),e.kind===`set`&&a.params[0].type===`RestElement`&&this.raiseRecoverable(a.params[0].start,`Setter cannot use rest params`),this.finishNode(e,`MethodDefinition`)},H.parseClassField=function(e){return Ne(e,`constructor`)?this.raise(e.key.start,`Classes can't have a field named 'constructor'`):e.static&&Ne(e,`prototype`)&&this.raise(e.key.start,`Classes can't have a static field named 'prototype'`),this.eat(b.eq)?(this.enterScope(ue|se),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,`PropertyDefinition`)},H.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(le|se);this.type!==b.braceR;){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,`StaticBlock`)},H.parseClassId=function(e,t){this.type===b.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,ge,!1)):(t===!0&&this.unexpected(),e.id=null)},H.parseClassSuper=function(e){e.superClass=this.eat(b._extends)?this.parseExprSubscripts(null,!1):null},H.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},H.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,n=e.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,i=r===0?null:this.privateNameStack[r-1],a=0;a<n.length;++a){var o=n[a];A(t,o.name)||(i?i.used.push(o):this.raiseRecoverable(o.start,`Private field '#`+o.name+`' must be declared in an enclosing class`))}};function Me(e,t){var n=t.key.name,r=e[n],i=`true`;return t.type===`MethodDefinition`&&(t.kind===`get`||t.kind===`set`)&&(i=(t.static?`s`:`i`)+t.kind),r===`iget`&&i===`iset`||r===`iset`&&i===`iget`||r===`sget`&&i===`sset`||r===`sset`&&i===`sget`?(e[n]=`true`,!1):r?!0:(e[n]=i,!1)}function Ne(e,t){var n=e.computed,r=e.key;return!n&&(r.type===`Identifier`&&r.name===t||r.type===`Literal`&&r.value===t)}H.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual(`as`)?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual(`from`),this.type!==b.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,`ExportAllDeclaration`)},H.parseExport=function(e,t){if(this.next(),this.eat(b.star))return this.parseExportAllDeclaration(e,t);if(this.eat(b._default))return this.checkExport(t,`default`,this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,`ExportDefaultDeclaration`);if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type===`VariableDeclaration`?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual(`from`))this.type!==b.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var n=0,r=e.specifiers;n<r.length;n+=1){var i=r[n];this.checkUnreserved(i.local),this.checkLocalExport(i.local),i.local.type===`Literal`&&this.raise(i.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,`ExportNamedDeclaration`)},H.parseExportDeclaration=function(e){return this.parseStatement(null)},H.parseExportDefaultDeclaration=function(){var e;if(this.type===b._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,ke|je,!1,e)}if(this.type===b._class){var n=this.startNode();return this.parseClass(n,`nullableID`)}var r=this.parseMaybeAssign();return this.semicolon(),r},H.checkExport=function(e,t,n){e&&(typeof t!=`string`&&(t=t.type===`Identifier`?t.name:t.value),A(e,t)&&this.raiseRecoverable(n,`Duplicate export '`+t+`'`),e[t]=!0)},H.checkPatternExport=function(e,t){var n=t.type;if(n===`Identifier`)this.checkExport(e,t,t.start);else if(n===`ObjectPattern`)for(var r=0,i=t.properties;r<i.length;r+=1){var a=i[r];this.checkPatternExport(e,a)}else if(n===`ArrayPattern`)for(var o=0,s=t.elements;o<s.length;o+=1){var c=s[o];c&&this.checkPatternExport(e,c)}else n===`Property`?this.checkPatternExport(e,t.value):n===`AssignmentPattern`?this.checkPatternExport(e,t.left):n===`RestElement`&&this.checkPatternExport(e,t.argument)},H.checkVariableExport=function(e,t){if(e)for(var n=0,r=t;n<r.length;n+=1){var i=r[n];this.checkPatternExport(e,i.id)}},H.shouldParseExportStatement=function(){return this.type.keyword===`var`||this.type.keyword===`const`||this.type.keyword===`class`||this.type.keyword===`function`||this.isLet()||this.isAsyncFunction()},H.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual(`as`)?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,`ExportSpecifier`)},H.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(b.braceL);!this.eat(b.braceR);){if(n)n=!1;else if(this.expect(b.comma),this.afterTrailingComma(b.braceR))break;t.push(this.parseExportSpecifier(e))}return t},H.parseImport=function(e){return this.next(),this.type===b.string?(e.specifiers=Oe,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual(`from`),e.source=this.type===b.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,`ImportDeclaration`)},H.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual(`as`)?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,ge),this.finishNode(e,`ImportSpecifier`)},H.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,ge),this.finishNode(e,`ImportDefaultSpecifier`)},H.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual(`as`),e.local=this.parseIdent(),this.checkLValSimple(e.local,ge),this.finishNode(e,`ImportNamespaceSpecifier`)},H.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===b.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(b.comma)))return e;if(this.type===b.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(b.braceL);!this.eat(b.braceR);){if(t)t=!1;else if(this.expect(b.comma),this.afterTrailingComma(b.braceR))break;e.push(this.parseImportSpecifier())}return e},H.parseWithClause=function(){var e=[];if(!this.eat(b._with))return e;this.expect(b.braceL);for(var t={},n=!0;!this.eat(b.braceR);){if(n)n=!1;else if(this.expect(b.comma),this.afterTrailingComma(b.braceR))break;var r=this.parseImportAttribute(),i=r.key.type===`Identifier`?r.key.name:r.key.value;A(t,i)&&this.raiseRecoverable(r.key.start,`Duplicate attribute key '`+i+`'`),t[i]=!0,e.push(r)}return e},H.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===b.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!==`never`),this.expect(b.colon),this.type!==b.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,`ImportAttribute`)},H.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===b.string){var e=this.parseLiteral(this.value);return F.test(e.value)&&this.raise(e.start,`An export name cannot include a lone surrogate.`),e}return this.parseIdent(!0)},H.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},H.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type===`ExpressionStatement`&&e.expression.type===`Literal`&&typeof e.expression.value==`string`&&(this.input[e.start]===`"`||this.input[e.start]===`'`)};var Pe=be.prototype;Pe.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case`Identifier`:this.inAsync&&e.name===`await`&&this.raise(e.start,`Cannot use 'await' as identifier inside an async function`);break;case`ObjectPattern`:case`ArrayPattern`:case`AssignmentPattern`:case`RestElement`:break;case`ObjectExpression`:e.type=`ObjectPattern`,n&&this.checkPatternErrors(n,!0);for(var r=0,i=e.properties;r<i.length;r+=1){var a=i[r];this.toAssignable(a,t),a.type===`RestElement`&&(a.argument.type===`ArrayPattern`||a.argument.type===`ObjectPattern`)&&this.raise(a.argument.start,`Unexpected token`)}break;case`Property`:e.kind!==`init`&&this.raise(e.key.start,`Object pattern can't contain getter or setter`),this.toAssignable(e.value,t);break;case`ArrayExpression`:e.type=`ArrayPattern`,n&&this.checkPatternErrors(n,!0),this.toAssignableList(e.elements,t);break;case`SpreadElement`:e.type=`RestElement`,this.toAssignable(e.argument,t),e.argument.type===`AssignmentPattern`&&this.raise(e.argument.start,`Rest elements cannot have a default value`);break;case`AssignmentExpression`:e.operator!==`=`&&this.raise(e.left.end,`Only '=' operator can be used for specifying default value.`),e.type=`AssignmentPattern`,delete e.operator,this.toAssignable(e.left,t);break;case`ParenthesizedExpression`:this.toAssignable(e.expression,t,n);break;case`ChainExpression`:this.raiseRecoverable(e.start,`Optional chaining cannot appear in left-hand side`);break;case`MemberExpression`:if(!t)break;default:this.raise(e.start,`Assigning to rvalue`)}else n&&this.checkPatternErrors(n,!0);return e},Pe.toAssignableList=function(e,t){for(var n=e.length,r=0;r<n;r++){var i=e[r];i&&this.toAssignable(i,t)}if(n){var a=e[n-1];this.options.ecmaVersion===6&&t&&a&&a.type===`RestElement`&&a.argument.type!==`Identifier`&&this.unexpected(a.argument.start)}return e},Pe.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,`SpreadElement`)},Pe.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==b.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,`RestElement`)},Pe.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case b.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(b.bracketR,!0,!0),this.finishNode(e,`ArrayPattern`);case b.braceL:return this.parseObj(!0)}return this.parseIdent()},Pe.parseBindingList=function(e,t,n,r){for(var i=[],a=!0;!this.eat(e);)if(a?a=!1:this.expect(b.comma),t&&this.type===b.comma)i.push(null);else if(n&&this.afterTrailingComma(e))break;else if(this.type===b.ellipsis){var o=this.parseRestBinding();this.parseBindingListItem(o),i.push(o),this.type===b.comma&&this.raiseRecoverable(this.start,`Comma is not permitted after the rest element`),this.expect(e);break}else i.push(this.parseAssignableListItem(r));return i},Pe.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},Pe.parseBindingListItem=function(e){return e},Pe.parseMaybeDefault=function(e,t,n){if(n||=this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(b.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,`AssignmentPattern`)},Pe.checkLValSimple=function(e,t,n){t===void 0&&(t=me);var r=t!==me;switch(e.type){case`Identifier`:this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(r?`Binding `:`Assigning to `)+e.name+` in strict mode`),r&&(t===ge&&e.name===`let`&&this.raiseRecoverable(e.start,`let is disallowed as a lexically bound name`),n&&(A(n,e.name)&&this.raiseRecoverable(e.start,`Argument name clash`),n[e.name]=!0),t!==ye&&this.declareName(e.name,t,e.start));break;case`ChainExpression`:this.raiseRecoverable(e.start,`Optional chaining cannot appear in left-hand side`);break;case`MemberExpression`:r&&this.raiseRecoverable(e.start,`Binding member expression`);break;case`ParenthesizedExpression`:return r&&this.raiseRecoverable(e.start,`Binding parenthesized expression`),this.checkLValSimple(e.expression,t,n);default:this.raise(e.start,(r?`Binding`:`Assigning to`)+` rvalue`)}},Pe.checkLValPattern=function(e,t,n){switch(t===void 0&&(t=me),e.type){case`ObjectPattern`:for(var r=0,i=e.properties;r<i.length;r+=1){var a=i[r];this.checkLValInnerPattern(a,t,n)}break;case`ArrayPattern`:for(var o=0,s=e.elements;o<s.length;o+=1){var c=s[o];c&&this.checkLValInnerPattern(c,t,n)}break;default:this.checkLValSimple(e,t,n)}},Pe.checkLValInnerPattern=function(e,t,n){switch(t===void 0&&(t=me),e.type){case`Property`:this.checkLValInnerPattern(e.value,t,n);break;case`AssignmentPattern`:this.checkLValPattern(e.left,t,n);break;case`RestElement`:this.checkLValPattern(e.argument,t,n);break;default:this.checkLValPattern(e,t,n)}};var Fe=function(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},Ie={b_stat:new Fe(`{`,!1),b_expr:new Fe(`{`,!0),b_tmpl:new Fe("${",!1),p_stat:new Fe(`(`,!1),p_expr:new Fe(`(`,!0),q_tmpl:new Fe("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new Fe(`function`,!1),f_expr:new Fe(`function`,!0),f_expr_gen:new Fe(`function`,!0,!1,null,!0),f_gen:new Fe(`function`,!1,!1,null,!0)},Le=be.prototype;Le.initialContext=function(){return[Ie.b_stat]},Le.curContext=function(){return this.context[this.context.length-1]},Le.braceIsBlock=function(e){var t=this.curContext();return t===Ie.f_expr||t===Ie.f_stat?!0:e===b.colon&&(t===Ie.b_stat||t===Ie.b_expr)?!t.isExpr:e===b._return||e===b.name&&this.exprAllowed?x.test(this.input.slice(this.lastTokEnd,this.start)):e===b._else||e===b.semi||e===b.eof||e===b.parenR||e===b.arrow?!0:e===b.braceL?t===Ie.b_stat:e===b._var||e===b._const||e===b.name?!1:!this.exprAllowed},Le.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token===`function`)return t.generator}return!1},Le.updateContext=function(e){var t,n=this.type;n.keyword&&e===b.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},Le.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},b.parenR.updateContext=b.braceR.updateContext=function(){if(this.context.length===1)this.exprAllowed=!0;else{var e=this.context.pop();e===Ie.b_stat&&this.curContext().token===`function`&&(e=this.context.pop()),this.exprAllowed=!e.isExpr}},b.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?Ie.b_stat:Ie.b_expr),this.exprAllowed=!0},b.dollarBraceL.updateContext=function(){this.context.push(Ie.b_tmpl),this.exprAllowed=!0},b.parenL.updateContext=function(e){var t=e===b._if||e===b._for||e===b._with||e===b._while;this.context.push(t?Ie.p_stat:Ie.p_expr),this.exprAllowed=!0},b.incDec.updateContext=function(){},b._function.updateContext=b._class.updateContext=function(e){e.beforeExpr&&e!==b._else&&(e!==b.semi||this.curContext()===Ie.p_stat)&&!(e===b._return&&x.test(this.input.slice(this.lastTokEnd,this.start)))&&(e!==b.colon&&e!==b.braceL||this.curContext()!==Ie.b_stat)?this.context.push(Ie.f_expr):this.context.push(Ie.f_stat),this.exprAllowed=!1},b.colon.updateContext=function(){this.curContext().token===`function`&&this.context.pop(),this.exprAllowed=!0},b.backQuote.updateContext=function(){this.curContext()===Ie.q_tmpl?this.context.pop():this.context.push(Ie.q_tmpl),this.exprAllowed=!1},b.star.updateContext=function(e){if(e===b._function){var t=this.context.length-1;this.context[t]===Ie.f_expr?this.context[t]=Ie.f_expr_gen:this.context[t]=Ie.f_gen}this.exprAllowed=!0},b.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==b.dot&&(this.value===`of`&&!this.exprAllowed||this.value===`yield`&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var Re=be.prototype;Re.checkPropClash=function(e,t,n){if(!(this.options.ecmaVersion>=9&&e.type===`SpreadElement`)&&!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var r=e.key,i;switch(r.type){case`Identifier`:i=r.name;break;case`Literal`:i=String(r.value);break;default:return}var a=e.kind;if(this.options.ecmaVersion>=6)i===`__proto__`&&a===`init`&&(t.proto&&(n?n.doubleProto<0&&(n.doubleProto=r.start):this.raiseRecoverable(r.start,`Redefinition of __proto__ property`)),t.proto=!0);else{i=`$`+i;var o=t[i];o?(a===`init`?this.strict&&o.init||o.get||o.set:o.init||o[a])&&this.raiseRecoverable(r.start,`Redefinition of property`):o=t[i]={init:!1,get:!1,set:!1},o[a]=!0}}},Re.parseExpression=function(e,t){var n=this;return this.catchStackOverflow(function(){var r=n.start,i=n.startLoc,a=n.parseMaybeAssign(e,t);if(n.type===b.comma){var o=n.startNodeAt(r,i);for(o.expressions=[a];n.eat(b.comma);)o.expressions.push(n.parseMaybeAssign(e,t));return n.finishNode(o,`SequenceExpression`)}return a})},Re.parseMaybeAssign=function(e,t,n){if(this.isContextual(`yield`)){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var r=!1,i=-1,a=-1,o=-1;t?(i=t.parenthesizedAssign,a=t.trailingComma,o=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new Te,r=!0);var s=this.start,c=this.startLoc;(this.type===b.parenL||this.type===b.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e===`await`);var l=this.parseMaybeConditional(e,t);if(n&&(l=n.call(this,l,s,c)),this.type.isAssign){var u=this.startNodeAt(s,c);return u.operator=this.value,this.type===b.eq&&(l=this.toAssignable(l,!1,t)),r||(t.parenthesizedAssign=t.trailingComma=-1,t.shorthandAssign>=l.start&&(t.shorthandAssign=-1),t.doubleProto>=l.start&&(t.doubleProto=-1)),this.type===b.eq?this.checkLValPattern(l):this.checkLValSimple(l),u.left=l,this.next(),u.right=this.parseMaybeAssign(e),o>-1&&(t.doubleProto=o),this.finishNode(u,`AssignmentExpression`)}return r&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),a>-1&&(t.trailingComma=a),l},Re.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if((i.type!==`ArrowFunctionExpression`||i.start!==n)&&this.eat(b.question)){var a=this.startNodeAt(n,r);return a.test=i,a.consequent=this.parseMaybeAssign(),this.expect(b.colon),a.alternate=this.parseMaybeAssign(e),this.finishNode(a,`ConditionalExpression`)}return i},Re.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||i.start===n&&i.type===`ArrowFunctionExpression`?i:this.parseExprOp(i,n,r,-1,e)},Re.parseExprOp=function(e,t,n,r,i){var a=this.type.binop;if(a!=null&&(!i||this.type!==b._in)&&a>r){var o=this.type===b.logicalOR||this.type===b.logicalAND,s=this.type===b.coalesce;s&&(a=b.logicalAND.binop);var c=this.value;this.next();var l=this.start,u=this.startLoc,d=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),l,u,a,i),f=this.buildBinary(t,n,e,d,c,o||s);return(o&&this.type===b.coalesce||s&&(this.type===b.logicalOR||this.type===b.logicalAND))&&this.raiseRecoverable(this.start,`Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses`),this.parseExprOp(f,t,n,r,i)}return e},Re.buildBinary=function(e,t,n,r,i,a){r.type===`PrivateIdentifier`&&this.raise(r.start,`Private identifier can only be left side of binary expression`);var o=this.startNodeAt(e,t);return o.left=n,o.operator=i,o.right=r,this.finishNode(o,a?`LogicalExpression`:`BinaryExpression`)},Re.parseMaybeUnary=function(e,t,n,r){var i=this.start,a=this.startLoc,o;if(this.isContextual(`await`)&&this.canAwait)o=this.parseAwait(r),t=!0;else if(this.type.prefix){var s=this.startNode(),c=this.type===b.incDec;s.operator=this.value,s.prefix=!0,this.next(),s.argument=this.parseMaybeUnary(null,!0,c,r),this.checkExpressionErrors(e,!0),c?this.checkLValSimple(s.argument):this.strict&&s.operator===`delete`&&ze(s.argument)?this.raiseRecoverable(s.start,`Deleting local variable in strict mode`):s.operator===`delete`&&U(s.argument)?this.raiseRecoverable(s.start,`Private fields can not be deleted`):t=!0,o=this.finishNode(s,c?`UpdateExpression`:`UnaryExpression`)}else if(!t&&this.type===b.privateId)(r||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),o=this.parsePrivateIdent(),this.type!==b._in&&this.unexpected();else{if(o=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return o;for(;this.type.postfix&&!this.canInsertSemicolon();){var l=this.startNodeAt(i,a);l.operator=this.value,l.prefix=!1,l.argument=o,this.checkLValSimple(o),this.next(),o=this.finishNode(l,`UpdateExpression`)}}if(!n&&(o.type!==`ArrowFunctionExpression`||o.start!==i)&&this.eat(b.starstar)){if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(i,a,o,this.parseMaybeUnary(null,!1,!1,r),`**`,!1)}else return o};function ze(e){return e.type===`Identifier`||e.type===`ParenthesizedExpression`&&ze(e.expression)}function U(e){return e.type===`MemberExpression`&&e.property.type===`PrivateIdentifier`||e.type===`ChainExpression`&&U(e.expression)||e.type===`ParenthesizedExpression`&&U(e.expression)}Re.parseExprSubscripts=function(e,t){var n=this.start,r=this.startLoc,i=-1,a=-1;e&&(i=e.doubleProto,a=e.shorthandAssign,e.doubleProto=e.shorthandAssign=-1);var o=this.parseExprAtom(e,t);if(o.type===`ArrowFunctionExpression`&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==`)`)return o;var s=this.parseSubscripts(o,n,r,!1,t);return e&&(s.end>o.end&&(this.checkExpressionErrors(e,!0),e.parenthesizedAssign>=s.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=s.start&&(e.parenthesizedBind=-1),e.trailingComma>=s.start&&(e.trailingComma=-1)),i>-1&&(e.doubleProto=i),a>-1&&(e.shorthandAssign=a)),s},Re.parseSubscripts=function(e,t,n,r,i){for(var a=this.options.ecmaVersion>=8&&e.type===`Identifier`&&e.name===`async`&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,o=!1;;){var s=this.parseSubscript(e,t,n,r,a,o,i);if(s.optional&&(o=!0),s.end===e.end||s.type===`ArrowFunctionExpression`){if(o){var c=this.startNodeAt(t,n);c.expression=s,s=this.finishNode(c,`ChainExpression`)}return s}e=s,a=!1}},Re.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(b.arrow)},Re.parseSubscriptAsyncArrow=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,r)},Re.parseSubscript=function(e,t,n,r,i,a,o){var s=this.options.ecmaVersion>=11,c=s&&this.eat(b.questionDot);r&&c&&this.raise(this.lastTokStart,`Optional chaining cannot appear in the callee of new expressions`);var l=this.eat(b.bracketL);if(l||c&&this.type!==b.parenL&&this.type!==b.backQuote||this.eat(b.dot)){var u=this.startNodeAt(t,n);u.object=e,l?(u.property=this.parseExpression(),this.expect(b.bracketR)):u.property=this.type===b.privateId&&e.type!==`Super`?this.parsePrivateIdent():this.parseIdent(this.options.allowReserved!==`never`),u.computed=!!l,s&&(u.optional=c),e=this.finishNode(u,`MemberExpression`)}else if(!r&&this.eat(b.parenL)){var d=new Te,f=this.yieldPos,p=this.awaitPos,m=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var h=this.parseExprList(b.parenR,this.options.ecmaVersion>=8,!1,d);if(i&&!c&&this.shouldParseAsyncArrow())return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,`Cannot use 'await' as identifier inside an async function`),this.yieldPos=f,this.awaitPos=p,this.awaitIdentPos=m,this.parseSubscriptAsyncArrow(t,n,h,o);this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=p||this.awaitPos,this.awaitIdentPos=m||this.awaitIdentPos;var g=this.startNodeAt(t,n);g.callee=e,g.arguments=h,s&&(g.optional=c),e=this.finishNode(g,`CallExpression`)}else if(this.type===b.backQuote){(c||a)&&this.raise(this.start,`Optional chaining cannot appear in the tag of tagged template expressions`);var _=this.startNodeAt(t,n);_.tag=e,_.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(_,`TaggedTemplateExpression`)}return e},Re.parseExprAtom=function(e,t,n){this.type===b.slash&&this.readRegexp();var r,i=this.potentialArrowAt===this.start;switch(this.type){case b._super:return this.allowSuper||this.raise(this.start,`'super' keyword outside a method`),r=this.startNode(),this.next(),this.type===b.parenL&&!this.allowDirectSuper&&this.raise(r.start,`super() call outside constructor of a subclass`),this.type!==b.dot&&this.type!==b.bracketL&&this.type!==b.parenL&&this.unexpected(),this.finishNode(r,`Super`);case b._this:return r=this.startNode(),this.next(),this.finishNode(r,`ThisExpression`);case b.name:var a=this.start,o=this.startLoc,s=this.containsEsc,c=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!s&&c.name===`async`&&!this.canInsertSemicolon()&&this.eat(b._function))return this.overrideContext(Ie.f_expr),this.parseFunction(this.startNodeAt(a,o),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(b.arrow))return this.parseArrowExpression(this.startNodeAt(a,o),[c],!1,t);if(this.options.ecmaVersion>=8&&c.name===`async`&&this.type===b.name&&!s&&(!this.potentialArrowInForAwait||this.value!==`of`||this.containsEsc))return c=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(b.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(a,o),[c],!0,t)}return c;case b.regexp:var l=this.value;return r=this.parseLiteral(l.value),r.regex={pattern:l.pattern,flags:l.flags},r;case b.num:case b.string:return this.parseLiteral(this.value);case b._null:case b._true:case b._false:return r=this.startNode(),r.value=this.type===b._null?null:this.type===b._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,`Literal`);case b.parenL:var u=this.start,d=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(d)&&(e.parenthesizedAssign=u),e.parenthesizedBind<0&&(e.parenthesizedBind=u)),d;case b.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(b.bracketR,!0,!0,e),this.finishNode(r,`ArrayExpression`);case b.braceL:return this.overrideContext(Ie.b_expr),this.parseObj(!1,e);case b._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case b._class:return this.parseClass(this.startNode(),!1);case b._new:return this.parseNew();case b.backQuote:return this.parseTemplate();case b._import:return this.options.ecmaVersion>=11?this.parseExprImport(n):this.unexpected();default:return this.parseExprAtomDefault()}},Re.parseExprAtomDefault=function(){this.unexpected()},Re.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,`Escape sequence in keyword import`),this.next(),this.type===b.parenL&&!e)return this.parseDynamicImport(t);if(this.type===b.dot){var n=this.startNodeAt(t.start,t.loc&&t.loc.start);return n.name=`import`,t.meta=this.finishNode(n,`Identifier`),this.parseImportMeta(t)}this.unexpected()},Re.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(b.parenR)?e.options=null:(this.expect(b.comma),this.afterTrailingComma(b.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(b.parenR)||(this.expect(b.comma),this.afterTrailingComma(b.parenR)||this.unexpected())));else if(!this.eat(b.parenR)){var t=this.start;this.eat(b.comma)&&this.eat(b.parenR)?this.raiseRecoverable(t,`Trailing comma is not allowed in import()`):this.unexpected(t)}return this.finishNode(e,`ImportExpression`)},Re.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!==`meta`&&this.raiseRecoverable(e.property.start,`The only valid meta property for import is 'import.meta'`),t&&this.raiseRecoverable(e.start,`'import.meta' must not contain escaped characters`),this.options.sourceType!==`module`&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,`Cannot use 'import.meta' outside a module`),this.finishNode(e,`MetaProperty`)},Re.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.value==null?t.raw.slice(0,-1).replace(/_/g,``):t.value.toString()),this.next(),this.finishNode(t,`Literal`)},Re.parseParenExpression=function(){this.expect(b.parenL);var e=this.parseExpression();return this.expect(b.parenR),e},Re.shouldParseArrow=function(e){return!this.canInsertSemicolon()},Re.parseParenAndDistinguishExpression=function(e,t){var n=this.start,r=this.startLoc,i,a=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o=this.start,s=this.startLoc,c=[],l=!0,u=!1,d=new Te,f=this.yieldPos,p=this.awaitPos,m;for(this.yieldPos=0,this.awaitPos=0;this.type!==b.parenR;){if(l?l=!1:this.expect(b.comma),a&&this.afterTrailingComma(b.parenR,!0)){u=!0;break}if(this.type===b.ellipsis){m=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===b.comma&&this.raiseRecoverable(this.start,`Comma is not permitted after the rest element`);break}c.push(this.parseMaybeAssign(!1,d,this.parseParenItem))}var h=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(b.parenR),e&&this.shouldParseArrow(c)&&this.eat(b.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=f,this.awaitPos=p,this.parseParenArrowList(n,r,c,t);(!c.length||u)&&this.unexpected(this.lastTokStart),m&&this.unexpected(m),this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=p||this.awaitPos,c.length>1?(i=this.startNodeAt(o,s),i.expressions=c,this.finishNodeAt(i,`SequenceExpression`,h,g)):i=c[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var _=this.startNodeAt(n,r);return _.expression=i,this.finishNode(_,`ParenthesizedExpression`)}return i},Re.parseParenItem=function(e){return e},Re.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var Be=[];Re.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,`Escape sequence in keyword new`);var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===b.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name=`new`,e.meta=this.finishNode(t,`Identifier`),this.next();var n=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!==`target`&&this.raiseRecoverable(e.property.start,`The only valid meta property for new is 'new.target'`),n&&this.raiseRecoverable(e.start,`'new.target' must not contain escaped characters`),this.allowNewDotTarget||this.raiseRecoverable(e.start,`'new.target' can only be used in functions and class static block`),this.finishNode(e,`MetaProperty`)}var r=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,i,!0,!1),e.callee.type===`Super`&&this.raiseRecoverable(r,`Invalid use of 'super'`),e.arguments=this.eat(b.parenL)?this.parseExprList(b.parenR,this.options.ecmaVersion>=8,!1):Be,this.finishNode(e,`NewExpression`)},Re.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===b.invalidTemplate?(t||this.raiseRecoverable(this.start,`Bad escape sequence in untagged template literal`),n.value={raw:this.value.replace(/\r\n?/g,`
14
- `),cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
15
- `),cooked:this.value},this.next(),n.tail=this.type===b.backQuote,this.finishNode(n,`TemplateElement`)},Re.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(n.quasis=[r];!r.tail;)this.type===b.eof&&this.raise(this.pos,`Unterminated template literal`),this.expect(b.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(b.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,`TemplateLiteral`)},Re.isAsyncProp=function(e){return!e.computed&&e.key.type===`Identifier`&&e.key.name===`async`&&(this.type===b.name||this.type===b.num||this.type===b.string||this.type===b.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===b.star)&&!x.test(this.input.slice(this.lastTokEnd,this.start))},Re.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(b.braceR);){if(r)r=!1;else if(this.expect(b.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(b.braceR))break;var a=this.parseProperty(e,t);e||this.checkPropClash(a,i,t),n.properties.push(a)}return this.finishNode(n,e?`ObjectPattern`:`ObjectExpression`)},Re.parseProperty=function(e,t){var n=this.startNode(),r,i,a,o;if(this.options.ecmaVersion>=9&&this.eat(b.ellipsis))return e?(n.argument=this.parseIdent(!1),this.type===b.comma&&this.raiseRecoverable(this.start,`Comma is not permitted after the rest element`),this.finishNode(n,`RestElement`)):(n.argument=this.parseMaybeAssign(!1,t),this.type===b.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(n,`SpreadElement`));this.options.ecmaVersion>=6&&(n.method=!1,n.shorthand=!1,(e||t)&&(a=this.start,o=this.startLoc),e||(r=this.eat(b.star)));var s=this.containsEsc;return this.parsePropertyName(n),!e&&!s&&this.options.ecmaVersion>=8&&!r&&this.isAsyncProp(n)?(i=!0,r=this.options.ecmaVersion>=9&&this.eat(b.star),this.parsePropertyName(n)):i=!1,this.parsePropertyValue(n,e,r,i,a,o,t,s),this.finishNode(n,`Property`)},Re.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var n=e.kind===`get`?0:1;if(e.value.params.length!==n){var r=e.value.start;e.kind===`get`?this.raiseRecoverable(r,`getter should have no params`):this.raiseRecoverable(r,`setter should have exactly one param`)}else e.kind===`set`&&e.value.params[0].type===`RestElement`&&this.raiseRecoverable(e.value.params[0].start,`Setter cannot use rest params`)},Re.parsePropertyValue=function(e,t,n,r,i,a,o,s){(n||r)&&this.type===b.colon&&this.unexpected(),this.eat(b.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind=`init`):this.options.ecmaVersion>=6&&this.type===b.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(n,r),e.kind=`init`):!t&&!s&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type===`Identifier`&&(e.key.name===`get`||e.key.name===`set`)&&this.type!==b.comma&&this.type!==b.braceR&&this.type!==b.eq?((n||r)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type===`Identifier`?((n||r)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name===`await`&&!this.awaitIdentPos&&(this.awaitIdentPos=i),t?e.value=this.parseMaybeDefault(i,a,this.copyNode(e.key)):this.type===b.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,a,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind=`init`,e.shorthand=!0):this.unexpected()},Re.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(b.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(b.bracketR),e.key;e.computed=!1}return e.key=this.type===b.num||this.type===b.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!==`never`)},Re.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},Re.parseMethod=function(e,t,n){var r=this.startNode(),i=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(pe(t,r.generator)|se|(n?ce:0)),this.expect(b.parenL),r.params=this.parseBindingList(b.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(r,`FunctionExpression`)},Re.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(pe(n,!1)|ae),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(e,`ArrowFunctionExpression`)},Re.parseFunctionBody=function(e,t,n,r){var i=t&&this.type!==b.braceL,a=this.strict,o=!1;if(i)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var s=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!a||s)&&(o=this.strictDirective(this.end),o&&s&&this.raiseRecoverable(e.start,`Illegal 'use strict' directive in function with non-simple parameter list`));var c=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(e,!a&&!o&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,ye),e.body=this.parseBlock(!1,void 0,o&&!a),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=c}this.exitScope()},Re.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1)if(n[t].type!==`Identifier`)return!1;return!0},Re.checkParams=function(e,t){for(var n=Object.create(null),r=0,i=e.params;r<i.length;r+=1){var a=i[r];this.checkLValInnerPattern(a,he,t?null:n)}},Re.parseExprList=function(e,t,n,r){for(var i=[],a=!0;!this.eat(e);){if(a)a=!1;else if(this.expect(b.comma),t&&this.afterTrailingComma(e))break;var o=void 0;n&&this.type===b.comma?o=null:this.type===b.ellipsis?(o=this.parseSpread(r),r&&this.type===b.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):o=this.parseMaybeAssign(!1,r),i.push(o)}return i},Re.checkUnreserved=function(e){var t=e.start,n=e.end,r=e.name;this.inGenerator&&r===`yield`&&this.raiseRecoverable(t,`Cannot use 'yield' as identifier inside a generator`),this.inAsync&&r===`await`&&this.raiseRecoverable(t,`Cannot use 'await' as identifier inside an async function`),!(this.currentThisScope().flags&fe)&&r===`arguments`&&this.raiseRecoverable(t,`Cannot use 'arguments' in class field initializer`),this.inClassStaticBlock&&(r===`arguments`||r===`await`)&&this.raise(t,`Cannot use `+r+` in class static initialization block`),this.keywords.test(r)&&this.raise(t,`Unexpected keyword '`+r+`'`),!(this.options.ecmaVersion<6&&this.input.slice(t,n).indexOf(`\\`)!==-1)&&(this.strict?this.reservedWordsStrict:this.reservedWords).test(r)&&(!this.inAsync&&r===`await`&&this.raiseRecoverable(t,`Cannot use keyword 'await' outside an async function`),this.raiseRecoverable(t,`The keyword '`+r+`' is reserved`))},Re.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,`Identifier`),e||(this.checkUnreserved(t),t.name===`await`&&!this.awaitIdentPos&&(this.awaitIdentPos=t.start)),t},Re.parseIdentNode=function(){var e=this.startNode();return this.type===b.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,e.name!==`class`&&e.name!==`function`||this.lastTokEnd===this.lastTokStart+1&&this.input.charCodeAt(this.lastTokStart)===46||this.context.pop(),this.type=b.name):this.unexpected(),e},Re.parsePrivateIdent=function(){var e=this.startNode();return this.type===b.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,`PrivateIdentifier`),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(e.start,`Private field '#`+e.name+`' must be declared in an enclosing class`):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e},Re.parseYield=function(e){this.yieldPos||=this.start;var t=this.startNode();return this.next(),this.type===b.semi||this.canInsertSemicolon()||this.type!==b.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(b.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,`YieldExpression`)},Re.parseAwait=function(e){this.awaitPos||=this.start;var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,`AwaitExpression`)};var Ve=be.prototype;Ve.raise=function(e,t){var n=R(this.input,e);t+=` (`+n.line+`:`+n.column+`)`,this.sourceFile&&(t+=` in `+this.sourceFile);var r=SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r},Ve.raiseRecoverable=Ve.raise,Ve.curPosition=function(){if(this.options.locations)return new I(this.curLine,this.pos-this.lineStart)};var He=be.prototype,Ue=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};He.enterScope=function(e){this.scopeStack.push(new Ue(e))},He.exitScope=function(){this.scopeStack.pop()},He.treatFunctionsAsVarInScope=function(e){return e.flags&re||!this.inModule&&e.flags&ne},He.declareName=function(e,t,n){var r=!1;if(t===ge){var i=this.currentScope();r=i.lexical.indexOf(e)>-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&i.flags&ne&&delete this.undefinedExports[e]}else if(t===ve)this.currentScope().lexical.push(e);else if(t===_e){var a=this.currentScope();r=this.treatFunctionsAsVar?a.lexical.indexOf(e)>-1:a.lexical.indexOf(e)>-1||a.var.indexOf(e)>-1,a.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var s=this.scopeStack[o];if(s.lexical.indexOf(e)>-1&&!(s.flags&oe&&s.lexical[0]===e)||!this.treatFunctionsAsVarInScope(s)&&s.functions.indexOf(e)>-1){r=!0;break}if(s.var.push(e),this.inModule&&s.flags&ne&&delete this.undefinedExports[e],s.flags&fe)break}r&&this.raiseRecoverable(n,`Identifier '`+e+`' has already been declared`)},He.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)},He.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},He.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(fe|ue|le))return t}},He.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(fe|ue|le)&&!(t.flags&ae))return t}};var We=function(e,t,n){this.type=``,this.start=t,this.end=0,e.options.locations&&(this.loc=new L(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},Ge=be.prototype;Ge.startNode=function(){return new We(this,this.start,this.startLoc)},Ge.startNodeAt=function(e,t){return new We(this,e,t)};function Ke(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}Ge.finishNode=function(e,t){return Ke.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},Ge.finishNodeAt=function(e,t,n,r){return Ke.call(this,e,t,n,r)},Ge.copyNode=function(e){var t=new We(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var qe=`Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz`,Je=`ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS`,Ye=Je+` Extended_Pictographic`,Xe=Ye,Ze=Xe+` EBase EComp EMod EPres ExtPict`,Qe=Ze,$e={9:Je,10:Ye,11:Xe,12:Ze,13:Qe,14:Qe},et={9:``,10:``,11:``,12:``,13:``,14:`Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji`},tt=`Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu`,nt=`Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb`,rt=nt+` Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd`,it=rt+` Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho`,at=it+` Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi`,ot=at+` Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith`,st={9:nt,10:rt,11:it,12:at,13:ot,14:ot+` `+qe},ct={};function lt(e){var t=ct[e]={binary:N($e[e]+` `+tt),binaryOfStrings:N(et[e]),nonBinary:{General_Category:N(tt),Script:N(st[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var ut=0,dt=[9,10,11,12,13,14];ut<dt.length;ut+=1){var ft=dt[ut];lt(ft)}var W=be.prototype,pt=function(e,t){this.parent=e,this.base=t||this};pt.prototype.separatedFrom=function(e){for(var t=this;t;t=t.parent)for(var n=e;n;n=n.parent)if(t.base===n.base&&t!==n)return!0;return!1},pt.prototype.sibling=function(){return new pt(this.parent,this.base)};var mt=function(e){this.parser=e,this.validFlags=`gim`+(e.options.ecmaVersion>=6?`uy`:``)+(e.options.ecmaVersion>=9?`s`:``)+(e.options.ecmaVersion>=13?`d`:``)+(e.options.ecmaVersion>=15?`v`:``),this.unicodeProperties=ct[e.options.ecmaVersion>=14?14:e.options.ecmaVersion],this.source=``,this.flags=``,this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue=``,this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};mt.prototype.reset=function(e,t,n){var r=n.indexOf(`v`)!==-1,i=n.indexOf(`u`)!==-1;this.start=e|0,this.source=t+``,this.flags=n,r&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=i&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=i&&this.parser.options.ecmaVersion>=9)},mt.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,`Invalid regular expression: /`+this.source+`/: `+e)},mt.prototype.at=function(e,t){t===void 0&&(t=!1);var n=this.source,r=n.length;if(e>=r)return-1;var i=n.charCodeAt(e);if(!(t||this.switchU)||i<=55295||i>=57344||e+1>=r)return i;var a=n.charCodeAt(e+1);return a>=56320&&a<=57343?(i<<10)+a-56613888:i},mt.prototype.nextIndex=function(e,t){t===void 0&&(t=!1);var n=this.source,r=n.length;if(e>=r)return r;var i=n.charCodeAt(e),a;return!(t||this.switchU)||i<=55295||i>=57344||e+1>=r||(a=n.charCodeAt(e+1))<56320||a>57343?e+1:e+2},mt.prototype.current=function(e){return e===void 0&&(e=!1),this.at(this.pos,e)},mt.prototype.lookahead=function(e){return e===void 0&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},mt.prototype.advance=function(e){e===void 0&&(e=!1),this.pos=this.nextIndex(this.pos,e)},mt.prototype.eat=function(e,t){return t===void 0&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},mt.prototype.eatChars=function(e,t){t===void 0&&(t=!1);for(var n=this.pos,r=0,i=e;r<i.length;r+=1){var a=i[r],o=this.at(n,t);if(o===-1||o!==a)return!1;n=this.nextIndex(n,t)}return this.pos=n,!0},W.validateRegExpFlags=function(e){for(var t=e.validFlags,n=e.flags,r=!1,i=!1,a=0;a<n.length;a++){var o=n.charAt(a);t.indexOf(o)===-1&&this.raise(e.start,`Invalid regular expression flag`),n.indexOf(o,a+1)>-1&&this.raise(e.start,`Duplicate regular expression flag`),o===`u`&&(r=!0),o===`v`&&(i=!0)}this.options.ecmaVersion>=15&&r&&i&&this.raise(e.start,`Invalid regular expression flag`)};function ht(e){for(var t in e)return!0;return!1}W.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&ht(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))},W.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue=``,e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise(`Unmatched ')'`),(e.eat(93)||e.eat(125))&&e.raise(`Lone quantifier brackets`)),e.maxBackReference>e.numCapturingParens&&e.raise(`Invalid escape`);for(var t=0,n=e.backReferenceNames;t<n.length;t+=1){var r=n[t];e.groupNames[r]||e.raise(`Invalid named capture referenced`)}},W.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new pt(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise(`Nothing to repeat`),e.eat(123)&&e.raise(`Lone quantifier brackets`)},W.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},W.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise(`Invalid quantifier`),!0):(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))?(this.regexp_eatQuantifier(e),!0):!1},W.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var n=!1;if(this.options.ecmaVersion>=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise(`Unterminated group`),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1},W.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1},W.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},W.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var r=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return i!==-1&&i<r&&!t&&e.raise(`numbers out of order in {} quantifier`),!0;e.switchU&&!t&&e.raise(`Incomplete quantifier`),e.pos=n}return!1},W.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)},W.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},W.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var n=this.regexp_eatModifiers(e),r=e.eat(45);if(n||r){for(var i=0;i<n.length;i++){var a=n.charAt(i);n.indexOf(a,i+1)>-1&&e.raise(`Duplicate regular expression modifiers`)}if(r){var o=this.regexp_eatModifiers(e);!n&&!o&&e.current()===58&&e.raise(`Invalid regular expression modifiers`);for(var s=0;s<o.length;s++){var c=o.charAt(s);(o.indexOf(c,s+1)>-1||n.indexOf(c)>-1)&&e.raise(`Duplicate regular expression modifiers`)}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise(`Unterminated group`)}}e.pos=t}return!1},W.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise(`Invalid group`),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise(`Unterminated group`)}return!1},W.regexp_eatModifiers=function(e){for(var t=``,n=0;(n=e.current())!==-1&&gt(n);)t+=P(n),e.advance();return t};function gt(e){return e===105||e===109||e===115}W.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},W.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise(`Nothing to repeat`),!1},W.regexp_eatSyntaxCharacter=function(e){var t=e.current();return _t(t)?(e.lastIntValue=t,e.advance(),!0):!1};function _t(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}W.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;(n=e.current())!==-1&&!_t(n);)e.advance();return e.pos!==t},W.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124&&(e.advance(),!0)},W.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise(`Invalid group`);var t=this.options.ecmaVersion>=16,n=e.groupNames[e.lastStringValue];if(n){if(t)for(var r=0,i=n;r<i.length;r+=1)i[r].separatedFrom(e.branchID)||e.raise(`Duplicate capture group name`);else e.raise(`Duplicate capture group name`)}t?(n||(e.groupNames[e.lastStringValue]=[])).push(e.branchID):e.groupNames[e.lastStringValue]=!0}},W.regexp_eatGroupName=function(e){if(e.lastStringValue=``,e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise(`Invalid capture group name`)}return!1},W.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue=``,this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=P(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=P(e.lastIntValue);return!0}return!1},W.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),vt(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function vt(e){return f(e,!0)||e===36||e===95}W.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),yt(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function yt(e){return p(e,!0)||e===36||e===95||e===8204||e===8205}W.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise(`Invalid unicode escape`),e.raise(`Invalid escape`)),!1)},W.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1},W.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise(`Invalid named reference`)}return!1},W.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},W.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},W.regexp_eatZero=function(e){return e.current()===48&&!jt(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},W.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114&&(e.lastIntValue=13,e.advance(),!0)},W.regexp_eatControlLetter=function(e){var t=e.current();return bt(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function bt(e){return e>=65&&e<=90||e>=97&&e<=122}W.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var n=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i=e.lastIntValue;if(r&&i>=55296&&i<=56319){var a=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343)return e.lastIntValue=(i-55296)*1024+(o-56320)+65536,!0}e.pos=a,e.lastIntValue=i}return!0}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&xt(e.lastIntValue))return!0;r&&e.raise(`Invalid unicode escape`),e.pos=n}return!1};function xt(e){return e>=0&&e<=1114111}W.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)&&(e.lastIntValue=t,e.advance(),!0)},W.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var St=0,Ct=1,wt=2;W.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(Tt(t))return e.lastIntValue=-1,e.advance(),Ct;var n=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((n=t===80)||t===112)){e.lastIntValue=-1,e.advance();var r;if(e.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return n&&r===wt&&e.raise(`Invalid property name`),r;e.raise(`Invalid property name`)}return St};function Tt(e){return e===100||e===68||e===115||e===83||e===119||e===87}W.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,r),Ct}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return St},W.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){A(e.unicodeProperties.nonBinary,t)||e.raise(`Invalid property name`),e.unicodeProperties.nonBinary[t].test(n)||e.raise(`Invalid property value`)},W.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return Ct;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return wt;e.raise(`Invalid property name`)},W.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue=``;Et(t=e.current());)e.lastStringValue+=P(t),e.advance();return e.lastStringValue!==``};function Et(e){return bt(e)||e===95}W.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue=``;Dt(t=e.current());)e.lastStringValue+=P(t),e.advance();return e.lastStringValue!==``};function Dt(e){return Et(e)||jt(e)}W.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},W.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),n=this.regexp_classContents(e);return e.eat(93)||e.raise(`Unterminated character class`),t&&n===wt&&e.raise(`Negated character class may contain strings`),!0}return!1},W.regexp_classContents=function(e){return e.current()===93?Ct:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),Ct)},W.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;e.switchU&&(t===-1||n===-1)&&e.raise(`Invalid character class`),t!==-1&&n!==-1&&t>n&&e.raise(`Range out of order in character class`)}}},W.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(n===99||Pt(n))&&e.raise(`Invalid class escape`),e.raise(`Invalid escape`)}e.pos=t}var r=e.current();return r!==93&&(e.lastIntValue=r,e.advance(),!0)},W.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},W.regexp_classSetExpression=function(e){var t=Ct,n;if(!this.regexp_eatClassSetRange(e)){if(n=this.regexp_eatClassSetOperand(e)){n===wt&&(t=wt);for(var r=e.pos;e.eatChars([38,38]);)e.current()!==38&&(n=this.regexp_eatClassSetOperand(e))?n!==wt&&(t=Ct):e.raise(`Invalid character in character class`);if(r!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise(`Invalid character in character class`);if(r!==e.pos)return t}else e.raise(`Invalid character in character class`)}for(;;)if(!this.regexp_eatClassSetRange(e)){if(n=this.regexp_eatClassSetOperand(e),!n)return t;n===wt&&(t=wt)}},W.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;return n!==-1&&r!==-1&&n>r&&e.raise(`Range out of order in character class`),!0}e.pos=t}return!1},W.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?Ct:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},W.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var n=e.eat(94),r=this.regexp_classContents(e);if(e.eat(93))return n&&r===wt&&e.raise(`Negated character class may contain strings`),r;e.pos=t}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=t}return null},W.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var n=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return n}else e.raise(`Invalid escape`);e.pos=t}return null},W.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===wt&&(t=wt);return t},W.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?Ct:wt},W.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var n=e.current();return n<0||n===e.lookahead()&&Ot(n)||kt(n)?!1:(e.advance(),e.lastIntValue=n,!0)};function Ot(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function kt(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}W.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return At(t)?(e.lastIntValue=t,e.advance(),!0):!1};function At(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}W.regexp_eatClassControlLetter=function(e){var t=e.current();return jt(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1},W.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise(`Invalid escape`),e.pos=t}return!1},W.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;jt(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t};function jt(e){return e>=48&&e<=57}W.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;Mt(n=e.current());)e.lastIntValue=16*e.lastIntValue+Nt(n),e.advance();return e.pos!==t};function Mt(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Nt(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}W.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;e.lastIntValue=t<=3&&this.regexp_eatOctalDigit(e)?t*64+n*8+e.lastIntValue:t*8+n}else e.lastIntValue=t;return!0}return!1},W.regexp_eatOctalDigit=function(e){var t=e.current();return Pt(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function Pt(e){return e>=48&&e<=55}W.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var i=e.current();if(!Mt(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+Nt(i),e.advance()}return!0};var Ft=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new L(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},It=be.prototype;It.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,`Escape sequence in keyword `+this.type.keyword),this.options.onToken&&this.options.onToken(new Ft(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},It.getToken=function(){return this.next(),new Ft(this)},typeof Symbol<`u`&&(It[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===b.eof,value:t}}}}),It.nextToken=function(){var e=this.curContext();if(e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(b.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())},It.readToken=function(e){return f(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)},It.fullCharCodeAt=function(e){var t=this.input.charCodeAt(e);if(t<=55295||t>=56320)return t;var n=this.input.charCodeAt(e+1);return n<=56319||n>=57344?t:(t<<10)+n-56613888},It.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},It.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf(`*/`,this.pos+=2);if(n===-1&&this.raise(this.pos-2,`Unterminated comment`),this.pos=n+2,this.options.locations)for(var r=void 0,i=t;(r=w(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())},It.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!C(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())},It.skipSpace=function(){loop:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break loop}break;default:if(e>8&&e<14||e>=5760&&T.test(String.fromCharCode(e)))++this.pos;else break loop}}},It.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},It.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(b.ellipsis)):(++this.pos,this.finishToken(b.dot))},It.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(b.assign,2):this.finishOp(b.slash,1)},It.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=e===42?b.star:b.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++n,r=b.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(b.assign,n+1):this.finishOp(r,n)},It.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.options.ecmaVersion>=12&&this.input.charCodeAt(this.pos+2)===61?this.finishOp(b.assign,3):this.finishOp(e===124?b.logicalOR:b.logicalAND,2):t===61?this.finishOp(b.assign,2):this.finishOp(e===124?b.bitwiseOR:b.bitwiseAND,1)},It.readToken_caret=function(){return this.input.charCodeAt(this.pos+1)===61?this.finishOp(b.assign,2):this.finishOp(b.bitwiseXOR,1)},It.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||x.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(b.incDec,2):t===61?this.finishOp(b.assign,2):this.finishOp(b.plusMin,1)},It.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+n)===61?this.finishOp(b.assign,n+1):this.finishOp(b.bitShift,n)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(n=2),this.finishOp(b.relational,n))},It.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(b.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(b.arrow)):this.finishOp(e===61?b.eq:b.prefix,1)},It.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(b.questionDot,2)}if(t===63)return e>=12&&this.input.charCodeAt(this.pos+2)===61?this.finishOp(b.assign,3):this.finishOp(b.coalesce,2)}return this.finishOp(b.question,1)},It.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),f(t,!0)||t===92))return this.finishToken(b.privateId,this.readWord1());this.raise(this.pos,`Unexpected character '`+P(t)+`'`)},It.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(b.parenL);case 41:return++this.pos,this.finishToken(b.parenR);case 59:return++this.pos,this.finishToken(b.semi);case 44:return++this.pos,this.finishToken(b.comma);case 91:return++this.pos,this.finishToken(b.bracketL);case 93:return++this.pos,this.finishToken(b.bracketR);case 123:return++this.pos,this.finishToken(b.braceL);case 125:return++this.pos,this.finishToken(b.braceR);case 58:return++this.pos,this.finishToken(b.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(b.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(b.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,`Unexpected character '`+P(e)+`'`)},It.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},It.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,`Unterminated regular expression`);var r=this.input.charAt(this.pos);if(x.test(r)&&this.raise(n,`Unterminated regular expression`),e)e=!1;else{if(r===`[`)t=!0;else if(r===`]`&&t)t=!1;else if(r===`/`&&!t)break;e=r===`\\`}++this.pos}var i=this.input.slice(n,this.pos);++this.pos;var a=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(a);var s=this.regexpState||=new mt(this);s.reset(n,i,o),this.validateRegExpFlags(s),this.validateRegExpPattern(s);var c=null;try{c=new RegExp(i,o)}catch{}return this.finishToken(b.regexp,{pattern:i,flags:o,value:c})},It.readInt=function(e,t,n){for(var r=this.options.ecmaVersion>=12&&t===void 0,i=n&&this.input.charCodeAt(this.pos)===48,a=this.pos,o=0,s=0,c=0,l=t??1/0;c<l;++c,++this.pos){var u=this.input.charCodeAt(this.pos),d=void 0;if(r&&u===95)i&&this.raiseRecoverable(this.pos,`Numeric separator is not allowed in legacy octal numeric literals`),s===95&&this.raiseRecoverable(this.pos,`Numeric separator must be exactly one underscore`),c===0&&this.raiseRecoverable(this.pos,`Numeric separator is not allowed at the first of digits`),s=u;else{if(d=u>=97?u-97+10:u>=65?u-65+10:u>=48&&u<=57?u-48:1/0,d>=e)break;s=u,o=o*e+d}}return r&&s===95&&this.raiseRecoverable(this.pos-1,`Numeric separator is not allowed at the last of digits`),this.pos===a||t!=null&&this.pos-a!==t?null:o};function Lt(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,``))}function Rt(e){return typeof BigInt==`function`?BigInt(e.replace(/_/g,``)):null}It.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);return n??this.raise(this.start+2,`Expected number in radix `+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(n=Rt(this.input.slice(t,this.pos)),++this.pos):f(this.fullCharCodeAtPos())&&this.raise(this.pos,`Identifier directly after number`),this.finishToken(b.num,n)},It.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,`Invalid number`);var n=this.pos-t>=2&&this.input.charCodeAt(t)===48;n&&this.strict&&this.raise(t,`Invalid number`);var r=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&r===110){var i=Rt(this.input.slice(t,this.pos));return++this.pos,f(this.fullCharCodeAtPos())&&this.raise(this.pos,`Identifier directly after number`),this.finishToken(b.num,i)}n&&/[89]/.test(this.input.slice(t,this.pos))&&(n=!1),r===46&&!n&&(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),r!==69&&r!==101||n||(r=this.input.charCodeAt(++this.pos),(r===43||r===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,`Invalid number`)),f(this.fullCharCodeAtPos())&&this.raise(this.pos,`Identifier directly after number`);var a=Lt(this.input.slice(t,this.pos),n);return this.finishToken(b.num,a)},It.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var n=++this.pos;t=this.readHexChar(this.input.indexOf(`}`,this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(n,`Code point out of bounds`)}else t=this.readHexChar(4);return t},It.readString=function(e){for(var t=``,n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,`Unterminated string constant`);var r=this.input.charCodeAt(this.pos);if(r===e)break;r===92?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):r===8232||r===8233?(this.options.ecmaVersion<10&&this.raise(this.start,`Unterminated string constant`),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(C(r)&&this.raise(this.start,`Unterminated string constant`),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(b.string,t)};var zt={};It.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===zt)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1},It.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw zt;this.raise(e,t)},It.readTmplToken=function(){for(var e=``,t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,`Unterminated template`);var n=this.input.charCodeAt(this.pos);if(n===96||n===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===b.template||this.type===b.invalidTemplate)?n===36?(this.pos+=2,this.finishToken(b.dollarBraceL)):(++this.pos,this.finishToken(b.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(b.template,e));if(n===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(C(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=`
16
- `;break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},It.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case`\\`:++this.pos;break;case`$`:if(this.input[this.pos+1]!==`{`)break;case"`":return this.finishToken(b.invalidTemplate,this.input.slice(this.start,this.pos));case`\r`:this.input[this.pos+1]===`
17
- `&&++this.pos;case`
18
- `:case`\u2028`:case`\u2029`:++this.curLine,this.lineStart=this.pos+1}this.raise(this.start,`Unterminated template`)},It.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
19
- `;case 114:return`\r`;case 120:return String.fromCharCode(this.readHexChar(2));case 117:return P(this.readCodePoint());case 116:return` `;case 98:return`\b`;case 118:return`\v`;case 102:return`\f`;case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),``;case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,`Invalid escape sequence`),e){var n=this.pos-1;this.invalidStringToken(n,`Invalid escape sequence in template string`)}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);return i>255&&(r=r.slice(0,-1),i=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),(r!==`0`||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-r.length,e?`Octal literal in template string`:`Octal literal in strict mode`),String.fromCharCode(i)}return C(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),``):String.fromCharCode(t)}},It.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return n===null&&this.invalidStringToken(t,`Bad character escape sequence`),n},It.readWord1=function(){this.containsEsc=!1;for(var e=``,t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(p(i,r))this.pos+=i<=65535?1:2;else if(i===92){this.containsEsc=!0,e+=this.input.slice(n,this.pos);var a=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,`Expecting Unicode escape sequence \\uXXXX`),++this.pos;var o=this.readCodePoint();(t?f:p)(o,r)||this.invalidStringToken(a,`Invalid Unicode escape`),e+=P(o),n=this.pos}else break;t=!1}return e+this.input.slice(n,this.pos)},It.readWord=function(){var e=this.readWord1(),t=b.name;return this.keywords.test(e)&&(t=v[e]),this.finishToken(t,e)};var Bt=`8.19.0`;be.acorn={Parser:be,version:Bt,defaultOptions:z,Position:I,SourceLocation:L,getLineInfo:R,Node:We,TokenType:m,tokTypes:b,keywordTypes:v,TokContext:Fe,tokContexts:Ie,isIdentifierChar:p,isIdentifierStart:f,Token:Ft,isNewLine:C,lineBreak:x,lineBreakG:S,nonASCIIwhitespace:T};function Vt(e,t){return be.parse(e,t)}function Ht(e,t,n){return be.parseExpressionAt(e,t,n)}function Ut(e,t){return be.tokenizer(e,t)}e.Node=We,e.Parser=be,e.Position=I,e.SourceLocation=L,e.TokContext=Fe,e.Token=Ft,e.TokenType=m,e.defaultOptions=z,e.getLineInfo=R,e.isIdentifierChar=p,e.isIdentifierStart=f,e.isNewLine=C,e.keywordTypes=v,e.lineBreak=x,e.lineBreakG=S,e.nonASCIIwhitespace=T,e.parse=Vt,e.parseExpressionAt=Ht,e.tokContexts=Ie,e.tokTypes=b,e.tokenizer=Ut,e.version=Bt}))})),Cc=n(((e,t)=>{var n=xc(),r=/^[\da-fA-F]+$/,i=/^\d+$/,a=new WeakMap;function o(e){e=e.Parser.acorn||e;let t=a.get(e);if(!t){let n=e.tokTypes,r=e.TokContext,i=e.TokenType,o=new r(`<tag`,!1),s=new r(`</tag`,!1),c=new r(`<tag>...</tag>`,!0,!0),l={tc_oTag:o,tc_cTag:s,tc_expr:c},u={jsxName:new i(`jsxName`),jsxText:new i(`jsxText`,{beforeExpr:!0}),jsxTagStart:new i(`jsxTagStart`,{startsExpr:!0}),jsxTagEnd:new i(`jsxTagEnd`)};u.jsxTagStart.updateContext=function(){this.context.push(c),this.context.push(o),this.exprAllowed=!1},u.jsxTagEnd.updateContext=function(e){let t=this.context.pop();t===o&&e===n.slash||t===s?(this.context.pop(),this.exprAllowed=this.curContext()===c):this.exprAllowed=!0},t={tokContexts:l,tokTypes:u},a.set(e,t)}return t}function s(e){if(!e)return e;if(e.type===`JSXIdentifier`)return e.name;if(e.type===`JSXNamespacedName`)return e.namespace.name+`:`+e.name.name;if(e.type===`JSXMemberExpression`)return s(e.object)+`.`+s(e.property)}t.exports=function(e){return e||={},function(t){return c({allowNamespaces:e.allowNamespaces!==!1,allowNamespacedObjects:!!e.allowNamespacedObjects},t)}},Object.defineProperty(t.exports,"tokTypes",{get:function(){return o(Sc()).tokTypes},configurable:!0,enumerable:!0});function c(e,t){let a=t.acorn||Sc(),c=o(a),l=a.tokTypes,u=c.tokTypes,d=a.tokContexts,f=c.tokContexts.tc_oTag,p=c.tokContexts.tc_cTag,m=c.tokContexts.tc_expr,h=a.isNewLine,g=a.isIdentifierStart,_=a.isIdentifierChar;return class extends t{static get acornJsx(){return c}jsx_readToken(){let e=``,t=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,`Unterminated JSX contents`);let n=this.input.charCodeAt(this.pos);switch(n){case 60:case 123:return this.pos===this.start?n===60&&this.exprAllowed?(++this.pos,this.finishToken(u.jsxTagStart)):this.getTokenFromCode(n):(e+=this.input.slice(t,this.pos),this.finishToken(u.jsxText,e));case 38:e+=this.input.slice(t,this.pos),e+=this.jsx_readEntity(),t=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(n===62?`&gt;`:`&rbrace;`)+'` or `{"'+this.input[this.pos]+'"}`?');default:h(n)?(e+=this.input.slice(t,this.pos),e+=this.jsx_readNewLine(!0),t=this.pos):++this.pos}}}jsx_readNewLine(e){let t=this.input.charCodeAt(this.pos),n;return++this.pos,t===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,n=e?`
20
- `:`\r
21
- `):n=String.fromCharCode(t),this.options.locations&&(++this.curLine,this.lineStart=this.pos),n}jsx_readString(e){let t=``,n=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,`Unterminated string constant`);let r=this.input.charCodeAt(this.pos);if(r===e)break;r===38?(t+=this.input.slice(n,this.pos),t+=this.jsx_readEntity(),n=this.pos):h(r)?(t+=this.input.slice(n,this.pos),t+=this.jsx_readNewLine(!1),n=this.pos):++this.pos}return t+=this.input.slice(n,this.pos++),this.finishToken(l.string,t)}jsx_readEntity(){let e=``,t=0,a,o=this.input[this.pos];o!==`&`&&this.raise(this.pos,`Entity must start with an ampersand`);let s=++this.pos;for(;this.pos<this.input.length&&t++<10;){if(o=this.input[this.pos++],o===`;`){e[0]===`#`?e[1]===`x`?(e=e.substr(2),r.test(e)&&(a=String.fromCharCode(parseInt(e,16)))):(e=e.substr(1),i.test(e)&&(a=String.fromCharCode(parseInt(e,10)))):a=n[e];break}e+=o}return a||(this.pos=s,`&`)}jsx_readWord(){let e,t=this.pos;do e=this.input.charCodeAt(++this.pos);while(_(e)||e===45);return this.finishToken(u.jsxName,this.input.slice(t,this.pos))}jsx_parseIdentifier(){let e=this.startNode();return this.type===u.jsxName?e.name=this.value:this.type.keyword?e.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(e,`JSXIdentifier`)}jsx_parseNamespacedName(){let t=this.start,n=this.startLoc,r=this.jsx_parseIdentifier();if(!e.allowNamespaces||!this.eat(l.colon))return r;var i=this.startNodeAt(t,n);return i.namespace=r,i.name=this.jsx_parseIdentifier(),this.finishNode(i,`JSXNamespacedName`)}jsx_parseElementName(){if(this.type===u.jsxTagEnd)return``;let t=this.start,n=this.startLoc,r=this.jsx_parseNamespacedName();for(this.type===l.dot&&r.type===`JSXNamespacedName`&&!e.allowNamespacedObjects&&this.unexpected();this.eat(l.dot);){let e=this.startNodeAt(t,n);e.object=r,e.property=this.jsx_parseIdentifier(),r=this.finishNode(e,`JSXMemberExpression`)}return r}jsx_parseAttributeValue(){switch(this.type){case l.braceL:let e=this.jsx_parseExpressionContainer();return e.expression.type===`JSXEmptyExpression`&&this.raise(e.start,`JSX attributes must only be assigned a non-empty expression`),e;case u.jsxTagStart:case l.string:return this.parseExprAtom();default:this.raise(this.start,`JSX value should be either an expression or a quoted JSX text`)}}jsx_parseEmptyExpression(){let e=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(e,`JSXEmptyExpression`,this.start,this.startLoc)}jsx_parseExpressionContainer(){let e=this.startNode();return this.next(),e.expression=this.type===l.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(l.braceR),this.finishNode(e,`JSXExpressionContainer`)}jsx_parseAttribute(){let e=this.startNode();return this.eat(l.braceL)?(this.expect(l.ellipsis),e.argument=this.parseMaybeAssign(),this.expect(l.braceR),this.finishNode(e,`JSXSpreadAttribute`)):(e.name=this.jsx_parseNamespacedName(),e.value=this.eat(l.eq)?this.jsx_parseAttributeValue():null,this.finishNode(e,`JSXAttribute`))}jsx_parseOpeningElementAt(e,t){let n=this.startNodeAt(e,t);n.attributes=[];let r=this.jsx_parseElementName();for(r&&(n.name=r);this.type!==l.slash&&this.type!==u.jsxTagEnd;)n.attributes.push(this.jsx_parseAttribute());return n.selfClosing=this.eat(l.slash),this.expect(u.jsxTagEnd),this.finishNode(n,r?`JSXOpeningElement`:`JSXOpeningFragment`)}jsx_parseClosingElementAt(e,t){let n=this.startNodeAt(e,t),r=this.jsx_parseElementName();return r&&(n.name=r),this.expect(u.jsxTagEnd),this.finishNode(n,r?`JSXClosingElement`:`JSXClosingFragment`)}jsx_parseElementAt(e,t){let n=this.startNodeAt(e,t),r=[],i=this.jsx_parseOpeningElementAt(e,t),a=null;if(!i.selfClosing){contents:for(;;)switch(this.type){case u.jsxTagStart:if(e=this.start,t=this.startLoc,this.next(),this.eat(l.slash)){a=this.jsx_parseClosingElementAt(e,t);break contents}r.push(this.jsx_parseElementAt(e,t));break;case u.jsxText:r.push(this.parseExprAtom());break;case l.braceL:r.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}s(a.name)!==s(i.name)&&this.raise(a.start,`Expected corresponding JSX closing tag for <`+s(i.name)+`>`)}let o=i.name?`Element`:`Fragment`;return n[`opening`+o]=i,n[`closing`+o]=a,n.children=r,this.type===l.relational&&this.value===`<`&&this.raise(this.start,`Adjacent JSX elements must be wrapped in an enclosing tag`),this.finishNode(n,`JSX`+o)}jsx_parseText(){let e=this.parseLiteral(this.value);return e.type=`JSXText`,e}jsx_parseElement(){let e=this.start,t=this.startLoc;return this.next(),this.jsx_parseElementAt(e,t)}parseExprAtom(e){return this.type===u.jsxText?this.jsx_parseText():this.type===u.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(e)}readToken(e){let t=this.curContext();if(t===m)return this.jsx_readToken();if(t===f||t===p){if(g(e))return this.jsx_readWord();if(e==62)return++this.pos,this.finishToken(u.jsxTagEnd);if((e===34||e===39)&&t==f)return this.jsx_readString(e)}return e===60&&this.exprAllowed&&this.input.charCodeAt(this.pos+1)!==33?(++this.pos,this.finishToken(u.jsxTagStart)):super.readToken(e)}updateContext(e){if(this.type==l.braceL){var t=this.curContext();t==f?this.context.push(d.b_expr):t==m?this.context.push(d.b_tmpl):super.updateContext(e),this.exprAllowed=!0}else if(this.type===l.slash&&e===u.jsxTagStart)this.context.length-=2,this.context.push(p),this.exprAllowed=!1;else return super.updateContext(e)}}}}));function wc(e){return e}var Tc={}.hasOwnProperty,Ec=Symbol(`continue`),Dc=Symbol(`exit`),Oc=Symbol(`skip`);function kc(e,t){let n,r;typeof t==`function`?n=t:t&&typeof t==`object`&&(t.enter&&(n=t.enter),t.leave&&(r=t.leave)),i(e,void 0,void 0,[])();function i(e,t,a,o){return jc(e)&&(s.displayName=`node (`+wc(e.type)+`)`),s;function s(){let s=n?Ac(n(e,t,a,o)):[];if(s[0]===Dc)return s;if(s[0]!==Oc){let t;for(t in e)if(Tc.call(e,t)&&e[t]&&typeof e[t]==`object`&&t!==`data`&&t!==`position`){let n=o.concat(e),r=e[t];if(Array.isArray(r)){let e=r,a=0;for(;a>-1&&a<e.length;){let r=e[a];if(jc(r)){let e=i(r,t,a,n)();if(e[0]===Dc)return e;a=typeof e[1]==`number`?e[1]:a+1}else a++}}else if(jc(r)){let e=i(r,t,void 0,n)();if(e[0]===Dc)return e}}}return r?Ac(r(e,t,a,o)):s}}}function Ac(e){return Array.isArray(e)?e:typeof e==`number`?[Ec,e]:[e]}function jc(e){return!!(e&&typeof e==`object`&&`type`in e&&typeof e.type==`string`&&e.type.length>0)}function Mc(e,t){let n=t.prefix||``,r=t.suffix||``,i=Object.assign({},t.acornOptions),a=[],o=[],s=i.onComment,c=i.onToken,l=!1,u,d,f=Object.assign({},i,{onComment:a,preserveParens:!0});c&&(f.onToken=o);let p=Pc(e,t.tokenTypes),m=p.value,h=n+m+r,g=t.expression&&Nc(m);if(g&&!t.allowEmpty)throw new Ea(`Unexpected empty expression`,{place:v(0),ruleId:`unexpected-empty-expression`,source:`micromark-extension-mdx-expression`});try{u=t.expression&&!g?t.acorn.parseExpressionAt(h,0,f):t.acorn.parse(h,f)}catch(e){let t=e,r=v(t.pos);t.message=String(t.message).replace(/ \(\d+:\d+\)$/,``),t.pos=r.offset,t.loc={line:r.line,column:r.column-1},d=t,l=t.raisedAt>=n.length+m.length||t.message===`Unterminated comment`}if(u&&t.expression&&!g){if(Nc(h.slice(u.end,h.length-r.length)))u={type:`Program`,start:0,end:n.length+m.length,body:[{type:`ExpressionStatement`,expression:u,start:0,end:n.length+m.length}],sourceType:`module`,comments:[]};else{let e=v(u.end),t=Error(`Unexpected content after expression`);t.pos=e.offset,t.loc={line:e.line,column:e.column-1},d=t,u=void 0}}if(u){if(u.comments=a,kc(u,function(e,t,n,r){let i=r[r.length-1],a=t;e.type===`ParenthesizedExpression`&&i&&a&&(typeof n==`number`&&(i=i[a],a=n),i[a]=e.expression),_(e)}),Array.isArray(s))s.push(...a);else if(typeof s==`function`)for(let e of a)s(e.type===`Block`,e.value,e.start,e.end,e.loc.start,e.loc.end);for(let e of o)e.end<=n.length||e.start-n.length>=m.length||(_(e),Array.isArray(c)?c.push(e):c(e))}return{estree:u,error:d,swallow:l};function _(e){let t=v(e.start),n=v(e.end);e.start=t.offset,e.end=n.offset,e.loc={start:{line:t.line,column:t.column-1,offset:t.offset},end:{line:n.line,column:n.column-1,offset:n.offset}},e.range=[e.start,e.end]}function v(e){let r=e-n.length;r<0?r=0:r>m.length&&(r=m.length);let i=Fc(p.stops,r);return i||={line:t.start.line,column:t.start.column,offset:t.start.offset},i}}function Nc(e){return/^\s*$/.test(e.replace(/\/\*[\s\S]*?\*\//g,``).replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g,``))}function Pc(e,t){let n={value:``,stops:[]},r=-1;for(;++r<e.length;){let i=e[r];if(i[0]===`enter`){let e=i[1].type;if(e===`lineEnding`||t.includes(e)){let e=i[2].sliceStream(i[1]);for(;e.length>0&&e[0]===-1;)e.shift();let t=Ic(e);n.stops.push([n.value.length,i[1].start]),n.value+=t,n.stops.push([n.value.length,i[1].end])}}}return n}function Fc(e,t){let n=0;for(;n<e.length&&e[n][0]<=t;)n+=1;if(n===0)return;let[r,i]=e[n-1],a=t-r;return{line:i.line,column:i.column+a,offset:i.offset+a}}function Ic(e){let t=-1,n=[],r;for(;++t<e.length;){let i=e[t],a;if(typeof i==`string`)a=i;else switch(i){case-5:a=`\r`;break;case-4:a=`
22
- `;break;case-3:a=`\r
23
- `;break;case-2:a=` `;break;case-1:if(r)continue;a=` `;break;default:a=String.fromCharCode(i)}r=i===-2,n.push(a)}return n.join(``)}function Lc(e){let t=e||{},n=t.loc||{},r=t.range||[void 0,void 0],i=Rc(n.start,r[0]||t.start),a=Rc(n.end,r[1]||t.end);if(i&&a)return{start:i,end:a}}function Rc(e,t){if(e&&typeof e==`object`){let n=`line`in e?zc(e.line):void 0,r=`column`in e?zc(e.column):void 0;if(n&&r!==void 0)return{line:n,column:r+1,offset:zc(t)}}}function zc(e){return typeof e==`number`&&e>-1?e:void 0}var Bc=`https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression`,Vc=`#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-`,Hc=`#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed`,Uc=`#unexpected-type-in-code-expected-an-object-spread-spread`,Wc=`#unexpected-extra-content-in-spread-only-a-single-spread-is-supported`,Gc=`#could-not-parse-expression-with-acorn`;function Kc(e,t,n,r,i,a,o,s,c,l,u){let d=this,f=this.events.length+3,p=0,m,h;return g;function g(t){return e.enter(n),e.enter(r),e.consume(t),e.exit(r),m=d.now(),_}function _(u){if(u===null){if(h)throw h;let e=new Ea("Unexpected end of file in expression, expected a corresponding closing brace for `{`",{place:d.now(),ruleId:`unexpected-eof`,source:`micromark-extension-mdx-expression`});throw e.url=Bc+Vc,e}if(dn(u))return e.enter(`lineEnding`),e.consume(u),e.exit(`lineEnding`),y;if(u===125&&p===0){let p=a?qc.call(d,a,o,i,f,m,l||!1,c||!1):{type:`ok`,estree:void 0};if(p.type===`ok`){e.enter(r),e.consume(u),e.exit(r);let i=e.exit(n);return s&&p.estree&&Object.assign(i,{estree:p.estree}),t}return h=p.message,e.enter(i),e.consume(u),v}return e.enter(i),v(u)}function v(t){return t===125&&p===0||t===null||dn(t)?(e.exit(i),_(t)):(t===123&&!a?p+=1:t===125&&--p,e.consume(t),v)}function y(t){let n=d.now();if(n.line!==m.line&&!u&&d.parser.lazy[n.line]){let e=new Ea("Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",{place:d.now(),ruleId:`unexpected-lazy`,source:`micromark-extension-mdx-expression`});throw e.url=Bc+Hc,e}return pn(t)?_n(e,_,`linePrefix`,3)(t):_(t)}}function qc(e,t,n,r,i,a,o){let s=Mc(this.events.slice(r),{acorn:e,tokenTypes:[n],acornOptions:t,start:i,expression:!0,allowEmpty:a,prefix:o?`({`:``,suffix:o?`})`:``}),c=s.estree;if(o&&c){let e=c.body[0];if(e.type!==`ExpressionStatement`||e.expression.type!==`ObjectExpression`){let t=Lc(e),n=new Ea("Unexpected `"+e.type+"` in code: expected an object spread (`{...spread}`)",{place:t.start,ruleId:`non-spread`,source:`micromark-extension-mdx-expression`});throw n.url=Bc+Uc,n}if(e.expression.properties[1]){let t=new Ea(`Unexpected extra content in spread: only a single spread is supported`,{place:Lc(e.expression.properties[1]).start,ruleId:`spread-extra`,source:`micromark-extension-mdx-expression`});throw t.url=Bc+Wc,t}if(e.expression.properties[0]&&e.expression.properties[0].type!==`SpreadElement`){let t=Lc(e.expression.properties[0]),n=new Ea("Unexpected `"+e.expression.properties[0].type+"` in code: only spread elements are supported",{place:t.start,ruleId:`non-spread`,source:`micromark-extension-mdx-expression`});throw n.url=Bc+Uc,n}}if(s.error){let e=new Ea(`Could not parse expression with acorn`,{cause:s.error,place:{line:s.error.loc.line,column:s.error.loc.column+1,offset:s.error.pos},ruleId:`acorn`,source:`micromark-extension-mdx-expression`});return e.url=Bc+Gc,{type:`nok`,message:e}}return{type:`ok`,estree:c}}function Jc(e){let t=e||{},n=t.addResult,r=t.acorn,i=t.spread,a=t.allowEmpty,o;if(a??=!0,r){if(!r.parseExpressionAt)throw Error("Expected a proper `acorn` instance passed in as `options.acorn`");o=Object.assign({ecmaVersion:2024,sourceType:`module`},t.acornOptions)}else if(t.acornOptions||t.addResult)throw Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{123:{name:`mdxFlowExpression`,tokenize:s,concrete:!0}},text:{123:{name:`mdxTextExpression`,tokenize:c}}};function s(e,t,s){let c=this;return l;function l(e){return u(e)}function u(t){return Kc.call(c,e,d,`mdxFlowExpression`,`mdxFlowExpressionMarker`,`mdxFlowExpressionChunk`,r,o,n,i,a)(t)}function d(t){return pn(t)?_n(e,f,`whitespace`)(t):f(t)}function f(n){let r=c.parser.constructs.flow[60],i=(Array.isArray(r)?r:r?[r]:[]).find(function(e){return e.name===`mdxJsxFlowTag`});return n===60&&i?e.attempt(i,f,s)(n):n===null||dn(n)?t(n):s(n)}}function c(e,t){let s=this;return c;function c(c){return Kc.call(s,e,t,`mdxTextExpression`,`mdxTextExpressionMarker`,`mdxTextExpressionChunk`,r,o,n,i,a,!0)(c)}}}var Yc=/[$_\p{ID_Start}]/u,Xc=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,Zc=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,Qc={};function $c(e){return e?Yc.test(String.fromCodePoint(e)):!1}function el(e,t){let n=(t||Qc).jsx?Zc:Xc;return e?n.test(String.fromCodePoint(e)):!1}var tl=`https://github.com/micromark/micromark-extension-mdx-jsx`;function nl(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j){let M=this,N,P;return F;function F(t){return e.enter(s),e.enter(c),e.consume(t),e.exit(c),I}function I(e){return fn(e)?n(e):(N=L,ve(e))}function L(t){if(t===47)return e.enter(l),e.consume(t),e.exit(l),N=R,ve;if(t===62)return _e(t);if(t!==null&&t>=0&&$c(t))return e.enter(d),e.enter(f),e.consume(t),z;xe(t,`before name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===33?" (note: to create a comment in MDX, use `{/* text */}`)":``))}function R(t){if(t===62)return _e(t);if(t!==null&&t>=0&&$c(t))return e.enter(d),e.enter(f),e.consume(t),z;xe(t,`before name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===42||t===47?` (note: JS comments in JSX tags are not supported in MDX)`:``))}function z(t){if(t!==null&&t>=0&&el(t,{jsx:!0}))return e.consume(t),z;if(t===46||t===47||t===58||t===62||t===123||fn(t)||hn(t))return e.exit(f),N=B,ve(t);xe(t,`in name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(t===64?" (note: to create a link in MDX, use `[text](url)`)":``))}function B(t){if(t===46)return e.enter(p),e.consume(t),e.exit(p),N=ee,ve;if(t===58)return e.enter(h),e.consume(t),e.exit(h),N=re,ve;if(t===47||t===62||t===123||t!==null&&t>=0&&$c(t))return e.exit(d),ae(t);xe(t,`after name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ee(t){if(t!==null&&t>=0&&$c(t))return e.enter(m),e.consume(t),te;xe(t,`before member name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function te(t){if(t!==null&&t>=0&&el(t,{jsx:!0}))return e.consume(t),te;if(t===46||t===47||t===62||t===123||fn(t)||hn(t))return e.exit(m),N=ne,ve(t);xe(t,`in member name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(t===64?" (note: to create a link in MDX, use `[text](url)`)":``))}function ne(t){if(t===46)return e.enter(p),e.consume(t),e.exit(p),N=ee,ve;if(t===47||t===62||t===123||t!==null&&t>=0&&$c(t))return e.exit(d),ae(t);xe(t,`after member name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function re(t){if(t!==null&&t>=0&&$c(t))return e.enter(g),e.consume(t),ie;xe(t,`before local name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===43||t!==null&&t>46&&t<58?" (note: to create a link in MDX, use `[text](url)`)":``))}function ie(t){if(t!==null&&t>=0&&el(t,{jsx:!0}))return e.consume(t),ie;if(t===47||t===62||t===123||fn(t)||hn(t))return e.exit(g),N=V,ve(t);xe(t,`in local name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag")}function V(t){if(t===47||t===62||t===123||t!==null&&t>=0&&$c(t))return e.exit(d),ae(t);xe(t,`after local name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ae(t){if(t===47)return e.enter(u),e.consume(t),e.exit(u),N=ge,ve;if(t===62)return _e(t);if(t===123)return Kc.call(M,e,oe,_,v,y,r,i,a,!0,!1,o)(t);if(t!==null&&t>=0&&$c(t))return e.enter(b),e.enter(x),e.enter(S),e.consume(t),se;xe(t,`before attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function oe(e){return N=ae,ve(e)}function se(t){if(t!==null&&t>=0&&el(t,{jsx:!0}))return e.consume(t),se;if(t===47||t===58||t===61||t===62||t===123||fn(t)||hn(t))return e.exit(S),N=ce,ve(t);xe(t,`in attribute name`,"an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function ce(t){if(t===58)return e.enter(C),e.consume(t),e.exit(C),N=le,ve;if(t===61)return e.exit(x),e.enter(T),e.consume(t),e.exit(T),N=fe,ve;if(t===47||t===62||t===123||fn(t)||hn(t)||t!==null&&t>=0&&$c(t))return e.exit(x),e.exit(b),N=ae,ve(t);xe(t,`after attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function le(t){if(t!==null&&t>=0&&$c(t))return e.enter(w),e.consume(t),ue;xe(t,`before local attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function ue(t){if(t!==null&&t>=0&&el(t,{jsx:!0}))return e.consume(t),ue;if(t===47||t===61||t===62||t===123||fn(t)||hn(t))return e.exit(w),e.exit(x),N=de,ve(t);xe(t,`in local attribute name`,"an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function de(t){if(t===61)return e.enter(T),e.consume(t),e.exit(T),N=fe,ve;if(t===47||t===62||t===123||t!==null&&t>=0&&$c(t))return e.exit(b),ae(t);xe(t,`after local attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function fe(t){if(t===34||t===39)return e.enter(E),e.enter(D),e.consume(t),e.exit(D),P=t,me;if(t===123)return Kc.call(M,e,pe,k,A,j,r,i,a,!1,!1,o)(t);xe(t,`before attribute value`,"a character that can start an attribute value, such as `\"`, `'`, or `{`"+(t===60?" (note: to use an element or fragment as a prop value in MDX, use `{<element />}`)":``))}function pe(t){return e.exit(b),N=ae,ve(t)}function me(t){return t===null&&xe(t,`in attribute value`,"a corresponding closing quote `"+String.fromCodePoint(P)+"`"),t===P?(e.enter(D),e.consume(t),e.exit(D),e.exit(E),e.exit(b),P=void 0,N=ae,ve):dn(t)?(N=me,ve(t)):(e.enter(O),he(t))}function he(t){return t===null||t===P||dn(t)?(e.exit(O),me(t)):(e.consume(t),he)}function ge(e){if(e===62)return _e(e);xe(e,`after self-closing slash`,"`>` to end the tag"+(e===42||e===47?` (note: JS comments in JSX tags are not supported in MDX)`:``))}function _e(n){return e.enter(c),e.consume(n),e.exit(c),e.exit(s),t}function ve(t){return dn(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),be):pn(t)||hn(t)?(e.enter(`esWhitespace`),ye(t)):N(t)}function ye(t){return dn(t)?(e.exit(`esWhitespace`),ve(t)):pn(t)||hn(t)?(e.consume(t),ye):(e.exit(`esWhitespace`),N(t))}function be(e){if(!o&&M.parser.lazy[M.now().line]){let e=new Ea("Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",M.now(),`micromark-extension-mdx-jsx:unexpected-lazy`);throw e.url=tl+`#unexpected-lazy-line-in-container-expected-line-to-be`,e}return ve(e)}function xe(e,t,n){let r=new Ea(`Unexpected `+(e===null?`end of file`:"character `"+(e===96?"` ` `":String.fromCodePoint(e))+"` ("+rl(e)+`)`)+` `+t+`, expected `+n,M.now(),`micromark-extension-mdx-jsx:unexpected-`+(e===null?`eof`:`character`));throw r.url=tl+(e===null?`#unexpected-end-of-file-at-expected-expect`:`#unexpected-character-at-expected-expect`),r}}function rl(e){return`U+`+e.toString(16).toUpperCase().padStart(4,`0`)}function il(e,t){return{name:`mdxJsxTextTag`,tokenize:n};function n(n,r,i){return nl.call(this,n,r,i,e,t.acornOptions,t.addResult,!0,`mdxJsxTextTag`,`mdxJsxTextTagMarker`,`mdxJsxTextTagClosingMarker`,`mdxJsxTextTagSelfClosingMarker`,`mdxJsxTextTagName`,`mdxJsxTextTagNamePrimary`,`mdxJsxTextTagNameMemberMarker`,`mdxJsxTextTagNameMember`,`mdxJsxTextTagNamePrefixMarker`,`mdxJsxTextTagNameLocal`,`mdxJsxTextTagExpressionAttribute`,`mdxJsxTextTagExpressionAttributeMarker`,`mdxJsxTextTagExpressionAttributeValue`,`mdxJsxTextTagAttribute`,`mdxJsxTextTagAttributeName`,`mdxJsxTextTagAttributeNamePrimary`,`mdxJsxTextTagAttributeNamePrefixMarker`,`mdxJsxTextTagAttributeNameLocal`,`mdxJsxTextTagAttributeInitializerMarker`,`mdxJsxTextTagAttributeValueLiteral`,`mdxJsxTextTagAttributeValueLiteralMarker`,`mdxJsxTextTagAttributeValueLiteralValue`,`mdxJsxTextTagAttributeValueExpression`,`mdxJsxTextTagAttributeValueExpressionMarker`,`mdxJsxTextTagAttributeValueExpressionValue`)}}function al(e,t){return{concrete:!0,name:`mdxJsxFlowTag`,tokenize:n};function n(n,r,i){let a=this;return o;function o(e){return s(e)}function s(r){return nl.call(a,n,c,i,e,t.acornOptions,t.addResult,!1,`mdxJsxFlowTag`,`mdxJsxFlowTagMarker`,`mdxJsxFlowTagClosingMarker`,`mdxJsxFlowTagSelfClosingMarker`,`mdxJsxFlowTagName`,`mdxJsxFlowTagNamePrimary`,`mdxJsxFlowTagNameMemberMarker`,`mdxJsxFlowTagNameMember`,`mdxJsxFlowTagNamePrefixMarker`,`mdxJsxFlowTagNameLocal`,`mdxJsxFlowTagExpressionAttribute`,`mdxJsxFlowTagExpressionAttributeMarker`,`mdxJsxFlowTagExpressionAttributeValue`,`mdxJsxFlowTagAttribute`,`mdxJsxFlowTagAttributeName`,`mdxJsxFlowTagAttributeNamePrimary`,`mdxJsxFlowTagAttributeNamePrefixMarker`,`mdxJsxFlowTagAttributeNameLocal`,`mdxJsxFlowTagAttributeInitializerMarker`,`mdxJsxFlowTagAttributeValueLiteral`,`mdxJsxFlowTagAttributeValueLiteralMarker`,`mdxJsxFlowTagAttributeValueLiteralValue`,`mdxJsxFlowTagAttributeValueExpression`,`mdxJsxFlowTagAttributeValueExpressionMarker`,`mdxJsxFlowTagAttributeValueExpressionValue`)(r)}function c(e){return pn(e)?_n(n,l,`whitespace`)(e):l(e)}function l(e){let t=a.parser.constructs.flow[123],s=Array.isArray(t)?t:t?[t]:[],c;for(let e of s)if(e.name===`mdxFlowExpression`){c=e;break}return e===60?o(e):e===123&&c?n.attempt(c,l,i)(e):e===null||dn(e)?r(e):i(e)}}}function ol(e){let t=e||{},n=t.acorn,r;if(n){if(!n.parse||!n.parseExpressionAt)throw Error("Expected a proper `acorn` instance passed in as `options.acorn`");r=Object.assign({ecmaVersion:2024,sourceType:`module`},t.acornOptions,{locations:!0})}else if(t.acornOptions||t.addResult)throw Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{60:al(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})},text:{60:il(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})}}}function sl(){return{disable:{null:[`autolink`,`codeIndented`,`htmlFlow`,`htmlText`]}}}var cl={tokenize:fl,partial:!0},ll=`https://github.com/micromark/micromark-extension-mdxjs-esm`,ul=new Set([`ExportAllDeclaration`,`ExportDefaultDeclaration`,`ExportNamedDeclaration`,`ImportDeclaration`]);function dl(e){let t={tokenize:i,concrete:!0};if(!e||!e.acorn||!e.acorn.parse)throw Error("Expected an `acorn` instance passed in as `options.acorn`");let n=e.acorn,r=Object.assign({ecmaVersion:2024,sourceType:`module`},e.acornOptions,{locations:!0});return{flow:{101:t,105:t}};function i(t,i,a){let o=this,s=o.parser.definedModuleSpecifiers||(o.parser.definedModuleSpecifiers=[]),c=this.events.length+1,l=``;return o.interrupt?a:u;function u(e){return o.now().column>1?a(e):(t.enter(`mdxjsEsm`),t.enter(`mdxjsEsmData`),t.consume(e),l+=String.fromCharCode(e),d)}function d(e){return rn(e)?(t.consume(e),l+=String.fromCharCode(e),d):(l===`import`||l===`export`)&&e===32?(t.consume(e),f):a(e)}function f(e){return e===null||dn(e)?(t.exit(`mdxjsEsmData`),p(e)):(t.consume(e),f)}function p(e){return e===null?h(e):dn(e)?t.check(cl,h,m)(e):(t.enter(`mdxjsEsmData`),f(e))}function m(e){return t.enter(`lineEnding`),t.consume(e),t.exit(`lineEnding`),p}function h(a){let l=Mc(o.events.slice(c),{acorn:n,acornOptions:r,tokenTypes:[`mdxjsEsmData`],prefix:s.length>0?`var `+s.join(`,`)+`
24
- `:``});if(l.error){if(a!==null&&l.swallow)return m(a);let e=new Ea(`Could not parse import/exports with acorn`,{cause:l.error,place:{line:l.error.loc.line,column:l.error.loc.column+1,offset:l.error.pos},ruleId:`acorn`,source:`micromark-extension-mdxjs-esm`});throw e.url=ll+`#could-not-parse-importexports-with-acorn`,e}s.length>0&&l.estree.body.shift();let u=-1;for(;++u<l.estree.body.length;){let e=l.estree.body[u];if(!ul.has(e.type)){let t=new Ea("Unexpected `"+e.type+"` in code: only import/exports are supported",{place:Lc(e),ruleId:`non-esm`,source:`micromark-extension-mdxjs-esm`});throw t.url=ll+`#unexpected-type-in-code-only-importexports-are-supported`,t}if(e.type===`ImportDeclaration`&&!o.interrupt){let t=-1;for(;++t<e.specifiers.length;){let n=e.specifiers[t];s.push(n.local.name)}}}return Object.assign(t.exit(`mdxjsEsm`),e.addResult?{estree:l.estree}:void 0),i(a)}}}function fl(e,t,n){return r;function r(r){return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),e.attempt(Fn,t,n)}}var pl=t(Cc(),1);function ml(e){let t=Object.assign({acorn:es.extend((0,pl.default)()),acornOptions:{ecmaVersion:2024,sourceType:`module`},addResult:!0},e);return Qt([dl(t),Jc(t),ol(t),sl()])}var hl=`Block`,gl=`Callout`,_l=`Table`,vl=new Set([`center`,`right`,`justify`]),yl=(e,t)=>{let n=t.position?.start.offset,r=t.position?.end.offset;return n===void 0||r===void 0?``:e.source.slice(n,r)};function bl(e,t,n){let r=t.position?.start;e.problems.push({message:n,...r?{line:r.line,column:r.column}:{}})}var xl=(e,t)=>e.bold===t.bold&&e.italic===t.italic&&e.underline===t.underline&&e.strike===t.strike&&e.code===t.code&&e.color===t.color&&e.background===t.background;function Sl(e,t,n,r){if(t===``)return;let i=e.at(-1);i&&i.href===r&&xl(i.styles,n)?i.text+=t:e.push({text:t,styles:{...n},...r===void 0?{}:{href:r}})}function Cl(e,t,n){let r=new Map;for(let i of t.attributes)i.type!==`mdxJsxAttribute`||!n.includes(i.name)?bl(e,t,`<${t.name??``}> takes ${n.join(`, `)}: ${i.type===`mdxJsxAttribute`?i.name:`{…}`} is not one of them`):i.value===null||i.value===void 0?r.set(i.name,``):typeof i.value==`string`?r.set(i.name,i.value):bl(e,t,`${i.name} of <${t.name??``}> is a plain string`);return r}function wl(e,t,n){switch(t.name){case`u`:return{...n,underline:!0};case`strong`:case`b`:return{...n,bold:!0};case`em`:case`i`:return{...n,italic:!0};case`del`:case`s`:return{...n,strike:!0};case`code`:return{...n,code:!0};case`span`:{let r=Cl(e,t,[`color`,`bg`]),i=r.get(`color`),a=r.get(`bg`);return{...n,...i?{color:i}:{},...a?{background:a}:{}}}default:return}}function Tl(e,t,n,r,i){for(let a of t)switch(a.type){case`text`:Sl(i,a.value.replace(/\r?\n/g,` `),n,r);break;case`strong`:Tl(e,a.children,{...n,bold:!0},r,i);break;case`emphasis`:Tl(e,a.children,{...n,italic:!0},r,i);break;case`delete`:Tl(e,a.children,{...n,strike:!0},r,i);break;case`inlineCode`:Sl(i,a.value,{...n,code:!0},r);break;case`break`:Sl(i,`
25
- `,n,r);break;case`link`:Tl(e,a.children,n,a.url,i);break;case`mdxJsxTextElement`:{if(a.name===`br`){Sl(i,`
26
- `,n,r);break}let t=wl(e,a,n);if(t){Tl(e,a.children,t,r,i);break}bl(e,a,`<${a.name??``}> inside a line is not drawn: a tag the doc's code draws goes on lines of its own`),Sl(i,yl(e,a),n,r);break}case`mdxTextExpression`:bl(e,a,`{…} in a line is not drawn: write \\{ for a brace`),Sl(i,yl(e,a),n,r);break;default:bl(e,a,`${a.type} is not drawn in a doc`),Sl(i,yl(e,a),n,r)}}function El(e,t){let n=[];return Tl(e,t,{},void 0,n),n}var Dl=e=>e?.type===`mdxJsxFlowElement`&&e.name===`br`&&e.children.length===0;function Ol(e,t){let[n,...r]=t;if(n?.type===`paragraph`){let t=El(e,n.children);return{content:t.length===1&&t[0]?.text===`
27
- `&&Object.keys(t[0].styles).length===0?[]:t,under:zl(e,r)}}return Dl(n)?{content:[],under:zl(e,r)}:{content:[],under:zl(e,t)}}var kl=(e,t)=>t.length>0?{...e,children:t}:e;function Al(e,t,n,r){let{content:i,under:a}=Ol(e,t.children);return typeof t.checked==`boolean`?kl({type:`check`,checked:t.checked,content:i},a):kl(n?{type:`numbered`,...r===void 0||r===1?{}:{start:r},content:i}:{type:`bullet`,content:i},a)}function jl(e,t){return t.children.map(t=>El(e,t.children))}function Ml(e,t){return t?{[e]:t}:{}}function Nl(e,t){let n=Cl(e,t,[`align`,`color`,`bg`,`toggle`]),r=zl(e,t.children),[i,...a]=r;if(i===void 0)return bl(e,t,`<${hl}> holds a block: this one is empty`),[];if(i.type===`embed`||i.type===`source`)return bl(e,t,`<${hl}> holds a block of the doc's own, not a tag or an import`),r;let o=n.get(`align`);o!==void 0&&!vl.has(o)&&bl(e,t,`align is center, right or justify, not "${o}"`);let s={...o!==void 0&&vl.has(o)?{align:o}:{},...Ml(`color`,n.get(`color`)),...Ml(`background`,n.get(`bg`))},c=i;if(n.has(`toggle`)&&(c.type===`heading`?c={...c,toggle:!0}:c.type===`paragraph`?c={type:`toggle`,content:c.content}:bl(e,t,`toggle is for a heading or a line of text`)),Object.keys(s).length>0&&(`content`in c?c={...c,look:s}:bl(e,t,`a ${c.type} has no look to set`)),a.length>0){if(`content`in c)c={...c,children:[...c.children??[],...a]};else return bl(e,t,`a ${c.type} holds no blocks under it`),[c,...a]}return[c]}function Pl(e,t){let n=Cl(e,t,[`icon`,`color`,`bg`]),{content:r,under:i}=Ol(e,t.children),a={...Ml(`color`,n.get(`color`)),...Ml(`background`,n.get(`bg`))};return[kl({type:`callout`,...Ml(`icon`,n.get(`icon`)),...Object.keys(a).length>0?{look:a}:{},content:r},i)]}function Fl(e,t){let n=Cl(e,t,[`src`,`alt`,`title`,`width`,`align`]),r=n.get(`src`);if(!r)return bl(e,t,`<img> names its picture: src is missing`),[];let i=Number(n.get(`width`)),a=n.get(`align`);return a!==void 0&&a!==`center`&&a!==`right`&&bl(e,t,`a picture's align is center or right, not "${a}"`),[{type:`image`,src:r,...Ml(`alt`,n.get(`alt`)),...Ml(`caption`,n.get(`title`)),...Number.isFinite(i)&&i>0?{width:Math.round(i)}:{},...a===`center`||a===`right`?{align:a}:{}}]}function Il(e,t){let n=Cl(e,t,[`widths`,`head`]),r=zl(e,t.children),[i,...a]=r;if(i?.type!==`table`||a.length>0)return bl(e,t,`<${_l}> holds one table`),r;let o=n.get(`head`);o!==void 0&&![`none`,`column`,`both`,`row`].includes(o)&&bl(e,t,`a table's head is none, row, column or both, not "${o}"`);let s=n.get(`widths`)?.split(`,`).map(e=>{let t=Number(e.trim());return e.trim()!==``&&Number.isFinite(t)&&t>0?Math.round(t):null});return[{...i,...o===`none`||o===`column`||o===`both`?{head:o}:{},...s?.some(e=>e!==null)?{widths:s}:{}}]}function Ll(e,t){switch(t.type){case`paragraph`:{let n=t.children.length===1?t.children[0]:void 0;return n?.type===`image`?[{type:`image`,src:n.url,...n.alt?{alt:n.alt}:{},...n.title?{caption:n.title}:{}}]:[{type:`paragraph`,content:El(e,t.children)}]}case`heading`:return[{type:`heading`,level:t.depth,content:El(e,t.children)}];case`list`:{let n=t.ordered===!0;return t.children.map((r,i)=>Al(e,r,n,i===0&&n?t.start??void 0:void 0))}case`blockquote`:{let{content:n,under:r}=Ol(e,t.children);return[kl({type:`quote`,content:n},r)]}case`code`:return[{type:`code`,...t.lang?{language:t.lang}:{},code:t.value}];case`table`:return[{type:`table`,rows:t.children.map(t=>jl(e,t))}];case`thematicBreak`:return[{type:`divider`}];case`mdxJsxFlowElement`:return t.name===`Block`?Nl(e,t):t.name===`Table`?Il(e,t):t.name===`Callout`?Pl(e,t):t.name===`img`&&t.children.length===0?Fl(e,t):Dl(t)?[{type:`paragraph`,content:[]}]:[{type:`embed`,source:yl(e,t)}];case`mdxjsEsm`:case`definition`:return[{type:`source`,source:yl(e,t)}];case`mdxFlowExpression`:return bl(e,t,`{…} on its own is not drawn in a doc`),[{type:`source`,source:yl(e,t)}];default:return bl(e,t,`${t.type} is not drawn in a doc`),[{type:`source`,source:yl(e,t)}]}}function Rl(e,t){return t.map((n,r)=>{let i=Ll(e,n),a=t[r-1],o=i[0];return n.type===`list`&&n.ordered===!0&&a?.type===`list`&&a.ordered===!0&&o?.type===`numbered`&&o.start===void 0&&(i[0]={...o,start:n.start??1}),i})}function zl(e,t){return Rl(e,t).flat()}function Bl(e){let t={source:e,problems:[]},n;try{n=Hi(e,{extensions:[ml(),La(),Na(),Wa()],mdastExtensions:[Ma(),ea(),Ji(),ca()]})}catch(t){let n=t;return{source:e,blocks:[],segments:[],problems:[{message:n.reason??n.message??`The file is not MDX`,...typeof n.line==`number`?{line:n.line}:{},...typeof n.column==`number`?{column:n.column}:{}}]}}let r=[],i=Rl(t,n.children);return n.children.forEach((e,t)=>{let n=e.position?.start.offset,a=e.position?.end.offset;n!==void 0&&a!==void 0&&r.push({start:n,end:a,blocks:i[t]??[]})}),{source:e,blocks:r.flatMap(e=>e.blocks),segments:r,problems:t.problems}}var Vl=[`link`,`span`,`underline`,`bold`,`italic`,`strike`,`code`];function Hl(e,t){switch(t){case`link`:return e.href;case`span`:return e.styles.color!==void 0||e.styles.background!==void 0?`${e.styles.color??``}\n${e.styles.background??``}`:void 0;default:return e.styles[t]?`on`:void 0}}var Ul=(e,t)=>t===void 0?``:` ${e}="${t.replace(/&/g,`&amp;`).replace(/"/g,`&quot;`)}"`,Wl=e=>e!==void 0&&/[\p{L}\p{N}]/u.test(e);function Gl(e,t,n=t){let r=``,i=Array.from(e);return i.forEach((e,a)=>{let o=i[a-1],s=i[a+1];switch(e){case`\\`:case`*`:case"`":case`[`:case`]`:case`<`:case`>`:case`{`:case`}`:case`~`:r+=`\\${e}`;break;case`_`:r+=Wl(o)&&Wl(s)?e:`\\${e}`;break;case`&`:r+=/^&(#\d+|#x[0-9a-f]+|[a-z][a-z0-9]*);/i.test(i.slice(a,a+34).join(``))?`&amp;`:e;break;case`|`:r+=t?`\\|`:e;break;case`!`:r+=s===void 0?`\\!`:e;break;case`
28
- `:r+=n?`<br />`:`\\
29
- `;break;default:r+=e}}),r}function Kl(e){let t=Math.max(0,...(e.match(/`+/g)??[]).map(e=>e.length)),n="`".repeat(t+1),r=e.startsWith("`")||e.endsWith("`")||e.startsWith(` `)&&e.endsWith(` `)&&e.trim()!==``?` `:``;return`${n}${r}${e}${r}${n}`}var ql={bold:`**`,italic:`*`,strike:`~~`},Jl={underline:`u`,bold:`strong`,italic:`em`,strike:`del`,code:`code`};function Yl(e,t){let n=``,r=0,i=!0;for(;r<e.length;){let a=e[r];if(a===void 0)break;let o=Vl.find(e=>!t.used.has(e)&&Hl(a,e)!==void 0);if(o===void 0){n+=Gl(a.text,t.inTable,t.oneLine),i=!0,r++;continue}let s=Hl(a,o),c=r+1;for(;c<e.length;){let n=e[c];if(n===void 0||Hl(n,o)!==s||o===`code`&&Vl.some(e=>e!==`code`&&!t.used.has(e)&&Hl(n,e)!==void 0))break;c++}let l=e.slice(r,c),u=new Set([...t.used,o]),d=l.map(e=>e.text).join(``),f=e[c],p=f===void 0||Vl.every(e=>t.used.has(e)||Hl(f,e)===void 0);if(o===`code`)n+=d.includes(`
30
- `)||t.inTable&&d.includes(`|`)?`<code>${Gl(d,t.inTable,t.oneLine)}</code>`:Kl(d);else if(o===`link`){let e=Yl(l,{...t,used:u}),r=(s??``).replace(/[\s()<>\\]/g,e=>encodeURIComponent(e));n+=`[${e}](${r})`}else if(o===`span`){let e=Yl(l,{...t,used:u}),r=l[0];n+=`<span${Ul(`color`,r?.styles.color)}${Ul(`bg`,r?.styles.background)}>${e}</span>`}else{let a=Yl(l,{...t,used:u}),s=ql[o],f=Array.from(d),m=r===0&&c===e.length,h=t.used.has(`bold`)||t.used.has(`italic`)||t.used.has(`strike`),g=e=>e!==void 0&&Vl.every(t=>u.has(t)||Hl(e,t)===void 0),_=o===`bold`&&l.every(e=>e.styles.italic===!0&&Vl.every(t=>t===`italic`||u.has(t)||Hl(e,t)===void 0)),v=s!==void 0&&Wl(f[0])&&Wl(f.at(-1))&&!d.includes(`
31
- `)&&i&&p&&(!h||m&&o===`italic`&&t.used.has(`bold`))&&(g(l[0])&&g(l.at(-1))||_);n+=v?`${s}${a}${s}`:`<${Jl[o]}>${a}</${Jl[o]}>`}i=!1,r=c}return n}function Xl(e){if(/^(import|export)(\s|$)/.test(e))return`&#x${e.charCodeAt(0).toString(16)};${e.slice(1)}`;if(/^(#{1,6}(\s|$)|[-+](\s|$)|[=-]+\s*$|[|:\-\s]*-[|:\-\s]*$)/.test(e))return`\\${e}`;let t=/^(\d{1,9})([.)])(\s|$)/.exec(e);return t?.[1]===void 0?e:`${t[1]}\\${e.slice(t[1].length)}`}function Zl(e,t=!1,n=t){let r=Yl(e.filter(e=>e.text!==``),{inTable:t,oneLine:n,used:new Set}),i=e=>e.replace(/ +$/,``).replace(/^ +/,e=>`&#x20;`.repeat(e.length));return n?i(r):r.split(`
32
- `).map(e=>Xl(i(e))).join(`
33
- `)}var Ql=(e,t)=>e.split(`
34
- `).map((e,n)=>n===0||e===``?e:`${t}${e}`).join(`
35
- `),$l=e=>e.type===`bullet`||e.type===`numbered`||e.type===`check`,eu=e=>`${Ul(`align`,e?.align)}${Ul(`color`,e?.color)}${Ul(`bg`,e?.background)}`,tu=e=>e!==void 0&&Object.keys(e).length>0;function nu(e){return!(`content`in e)||e.type===`callout`?!1:tu(e.look)||e.type===`toggle`||e.type===`heading`&&e.toggle?!0:(e.type===`paragraph`||e.type===`heading`)&&(e.children?.length??0)>0}function ru(e){let t=Math.max(2,...(e.match(/^\s*`{3,}/gm)??[]).map(e=>e.trim().length));return"`".repeat(t+1)}function iu(e,t,n){let r=e.type===`numbered`?`${String(t)}${n} `:e.type===`check`?`- [${e.checked?`x`:` `}] `:`- `,i=` `.repeat(e.type===`numbered`?r.length:2),a=e.children??[],o=Zl(e.content)||(e.type===`check`&&(e.children??[]).length===0?`<br />`:``);if(a.length===0)return`${r}${Ql(o,i)}`.trimEnd();let s=o===``?`<br />`:o,[c]=a,l=c!==void 0&&$l(c)&&Zl(c.content)!==``&&(c.type!==`numbered`||(c.start??1)===1),u=a.every($l)&&o!==``&&l;return`${r}${Ql(s,i)}${u?`
36
- `:`
37
-
38
- `}${i}${Ql(cu(a),i)}`}function au(e){switch(e.type){case`paragraph`:{let t=Zl(e.content);return t===``?`<br />`:t}case`heading`:return`${`#`.repeat(e.level)} ${Zl(e.content,!1,!0).replace(/(^| )(#+)$/,`$1\\$2`)}`.trimEnd();case`toggle`:return Zl(e.content)||`<br />`;case`quote`:{let t=Zl(e.content);return(e.children?.length?[t===``?`<br />`:t,cu(e.children)]:[t]).join(`
39
-
40
- `).split(`
41
- `).map(e=>e===``?`>`:`> ${e}`).join(`
42
- `)}case`callout`:{let t=Zl(e.content),n=[t===``?`<br />`:t,...e.children?.length?[cu(e.children)]:[]].join(`
43
-
44
- `);return`<${gl}${Ul(`icon`,e.icon)}${Ul(`color`,e.look?.color)}${Ul(`bg`,e.look?.background)}>\n\n${n}\n\n</${gl}>`}case`code`:{let t=ru(e.code);return`${t}${e.language??``}\n${e.code}\n${t}`}case`image`:{let t=e.src.replace(/[\s()<>\\]/g,e=>encodeURIComponent(e));if(e.width!==void 0||e.align!==void 0)return`<img${Ul(`src`,e.src)}${Ul(`alt`,e.alt)}${Ul(`title`,e.caption)}${Ul(`width`,e.width===void 0?void 0:String(e.width))}${Ul(`align`,e.align)} />`;let n=e.caption===void 0?``:` "${e.caption.replace(/["\\]/g,`\\$&`)}"`;return`![${Gl(e.alt??``,!1)}](${t}${n})`}case`table`:{let t=Math.max(1,...e.rows.map(e=>e.length)),n=e=>`| ${Array.from({length:t},(t,n)=>Zl(e[n]??[],!0)).join(` | `)} |`,[r,...i]=e.rows,a=[n(r??[]),`| ${Array.from({length:t},()=>`---`).join(` | `)} |`,...i.map(n)].join(`
45
- `),o=e.widths?.some(e=>e!==null)?e.widths.map(e=>e===null?``:String(e)).join(`,`):void 0;return o===void 0&&e.head===void 0?a:`<${_l}${Ul(`widths`,o)}${Ul(`head`,e.head)}>\n\n${a}\n\n</${_l}>`}case`divider`:return`---`;case`embed`:case`source`:return e.source}}function ou(e){let t=e.type===`toggle`||e.type===`heading`&&e.toggle,{children:n}=e,r={...e};delete r.look,delete r.children;let i=r.type===`toggle`?{type:`paragraph`,content:r.content}:r.type===`heading`?{type:`heading`,level:r.level,content:r.content}:r,a=$l(i)||i.type===`quote`?cu([{...i,...n?{children:n}:{}}]):cu([i,...n??[]]);return`<${hl}${eu(e.look)}${t?` toggle`:``}>\n\n${a}\n\n</${hl}>`}function su(e,t){return $l(e)&&$l(t)&&!nu(e)&&!nu(t)&&e.type===`numbered`==(t.type===`numbered`)&&(t.type!==`numbered`||t.start===void 0)}function cu(e){let t=[],n=0,r;for(;n<e.length;){let i=e[n];if(i===void 0)break;if(nu(i)){t.push(ou(i)),r=void 0,n++;continue}if(!$l(i)){t.push(au(i)),r=void 0,n++;continue}let a=i.type===`numbered`,o=i.type===`numbered`?i.start??1:1,s=a&&r===`.`?`)`:`.`,c=[],l=n;for(;l<e.length;){let t=e[l];if(t===void 0||!$l(t)||nu(t)||t.type===`numbered`!==a||l>n&&!su(i,t))break;c.push(iu(t,o+(l-n),s)),l++}let u=c.some(e=>e.includes(`
46
-
47
- `));t.push(c.join(u?`
48
-
49
- `:`
50
- `)),r=a?s:void 0,n=l}return t.join(`
51
-
52
- `)}var lu=[`bold`,`italic`,`underline`,`strike`],uu=(e,t)=>e.href===t.href&&JSON.stringify(pu(e.styles))===JSON.stringify(pu(t.styles));function du(e){let t=[],n=(e,n,r)=>{if(e===``)return;let i={text:e,styles:n,...r===void 0?{}:{href:r}},a=t.at(-1);a&&uu(a,i)?a.text+=e:t.push(i)};for(let t of e){let{styles:e,href:r}=t,i=!e.code&&r===void 0&&lu.some(t=>e[t])?/^(\s*)([\s\S]*?)(\s*)$/u.exec(t.text):null;if(!i){n(t.text,e,r);continue}let[,a=``,o=``,s=``]=i,c={...e};delete c.bold,delete c.italic,delete c.underline,delete c.strike,n(a,c,r),n(o,o===``?c:e,r),n(s,c,r)}return t}var fu=e=>e.length>0&&e.every(e=>typeof e==`object`&&!!e&&typeof e.text==`string`&&typeof e.styles==`object`);function pu(e){if(Array.isArray(e))return(fu(e)?du(e):e).map(pu);if(typeof e==`object`&&e){let t={};for(let n of Object.keys(e).sort()){let r=e[n];r!==void 0&&(t[n]=pu(r))}return t}return e}var mu=e=>JSON.stringify(pu(e)),hu=(e,t)=>e.length===t.length&&e.every((e,n)=>{let r=t[n];return r!==void 0&&mu(e)===mu(r)}),gu=e=>e.filter(e=>e.type!==`source`);function _u(e,t){let n=t.map(mu),r=e.segments.map(e=>({...e,keys:e.blocks.map(mu)})),i=r.length,a=n.length,o=(e,t)=>{let i=r[e]?.keys??[];return i.length>0&&t+i.length<=a&&i.every((e,r)=>n[t+r]===e)},s=Array.from({length:i+1},()=>Array(a+1).fill(0)),c=(e,t)=>s[e]?.[t]??0;for(let e=i-1;e>=0;e--)for(let t=a;t>=0;t--){let n=r[e]?.keys.length??0,i=Math.max(c(e+1,t),t<a?c(e,t+1):0);o(e,t)&&(i=Math.max(i,n+c(e+1,t+n)));let l=s[e];l&&(l[t]=i)}let l=[],u=0,d=0,f=[],p=()=>{f.length>0&&l.push({blocks:f}),f=[]};for(;u<i||d<a;){let e=r[u]?.keys.length??0;if(u<i&&o(u,d)&&c(u,d)===e+c(u+1,d+e))p(),l.push({kept:u}),d+=e,u++;else if(u<i&&c(u,d)===c(u+1,d))u++;else{let e=t[d];e&&f.push(e),d++}}p();let m=e.source,h=e=>{let t=r[e];return t!==void 0&&!m.slice(t.start,t.end).includes(`
53
-
54
- `)};for(let e=0;e<l.length;e++){let t=l[e];if(!t||!(`kept`in t))continue;let n=r[t.kept]?.blocks??[],i=n[0],a=n.at(-1),o=l[e-1],s=l[e+1],c=o&&`blocks`in o?o.blocks.at(-1):void 0,u=s&&`blocks`in s?s.blocks[0]:void 0,d=c!==void 0&&i!==void 0&&su(c,i),f=u!==void 0&&a!==void 0&&su(a,u);(d||f)&&h(t.kept)&&(l[e]={blocks:[...n]})}for(let e=l.length-1;e>0;e--){let t=l[e],n=l[e-1];t&&n&&`blocks`in t&&`blocks`in n&&(n.blocks.push(...t.blocks),l.splice(e,1))}let g=r[0],_=r.at(-1),v=g?m.slice(0,g.start):``,y=_?m.slice(_.end):m===``?``:`
55
- `,b=v,x;return l.forEach((e,t)=>{if(t>0){let n=l[t-1],i=`kept`in e&&n&&`kept`in n&&x!==void 0&&e.kept===x+1?m.slice(r[x]?.end??0,r[e.kept]?.start??0):`
56
-
57
- `;b+=i}if(`kept`in e){let t=r[e.kept];t&&(b+=m.slice(t.start,t.end)),x=e.kept}else b+=cu(e.blocks),x=void 0}),b+(y===``&&b!==``?`
58
- `:y)}function vu(e){return e?.type===`heading`&&e.level===1&&e.toggle!==!0&&(e.children?.length??0)===0}function yu(e){let t=e[0];return vu(t)?{title:t,body:e.slice(1)}:{title:void 0,body:[...e]}}function bu(e){return vu(e)?e.content.map(e=>e.text).join(``):``}function xu(e,t){let n=t.replace(/\s+/g,` `).trim();if(n===``)return;if(vu(e)&&bu(e)===n)return e;let r=[{text:n,styles:{}}];return{type:`heading`,level:1,...vu(e)&&e.look?{look:e.look}:{},content:r}}function Su(e,t){return e?[e,...t]:[...t]}var J=t(i(),1),Y=V(),Cu={slash_menu:{heading:{title:`Heading 1`,subtext:`Top-level heading`,aliases:[`h`,`heading1`,`h1`],group:`Headings`},heading_2:{title:`Heading 2`,subtext:`Key section heading`,aliases:[`h2`,`heading2`,`subheading`],group:`Headings`},heading_3:{title:`Heading 3`,subtext:`Subsection and group heading`,aliases:[`h3`,`heading3`,`subheading`],group:`Headings`},heading_4:{title:`Heading 4`,subtext:`Minor subsection heading`,aliases:[`h4`,`heading4`,`subheading4`],group:`Subheadings`},heading_5:{title:`Heading 5`,subtext:`Small subsection heading`,aliases:[`h5`,`heading5`,`subheading5`],group:`Subheadings`},heading_6:{title:`Heading 6`,subtext:`Lowest-level heading`,aliases:[`h6`,`heading6`,`subheading6`],group:`Subheadings`},toggle_heading:{title:`Toggle Heading 1`,subtext:`Toggleable top-level heading`,aliases:[`h`,`heading1`,`h1`,`collapsable`],group:`Subheadings`},toggle_heading_2:{title:`Toggle Heading 2`,subtext:`Toggleable key section heading`,aliases:[`h2`,`heading2`,`subheading`,`collapsable`],group:`Subheadings`},toggle_heading_3:{title:`Toggle Heading 3`,subtext:`Toggleable subsection and group heading`,aliases:[`h3`,`heading3`,`subheading`,`collapsable`],group:`Subheadings`},quote:{title:`Quote`,subtext:`Quote or excerpt`,aliases:[`quotation`,`blockquote`,`bq`],group:`Basic blocks`},toggle_list:{title:`Toggle List`,subtext:`List with hideable sub-items`,aliases:[`li`,`list`,`toggleList`,`toggle list`,`collapsable list`],group:`Basic blocks`},numbered_list:{title:`Numbered List`,subtext:`List with ordered items`,aliases:[`ol`,`li`,`list`,`numberedlist`,`numbered list`],group:`Basic blocks`},bullet_list:{title:`Bullet List`,subtext:`List with unordered items`,aliases:[`ul`,`li`,`list`,`bulletlist`,`bullet list`],group:`Basic blocks`},check_list:{title:`Check List`,subtext:`List with checkboxes`,aliases:[`ul`,`li`,`list`,`checklist`,`check list`,`checked list`,`checkbox`],group:`Basic blocks`},paragraph:{title:`Paragraph`,subtext:`The body of your document`,aliases:[`p`,`paragraph`],group:`Basic blocks`},code_block:{title:`Code Block`,subtext:`Code block with syntax highlighting`,aliases:[`code`,`pre`],group:`Basic blocks`},page_break:{title:`Page Break`,subtext:`Page separator`,aliases:[`page`,`break`,`separator`],group:`Basic blocks`},table:{title:`Table`,subtext:`Table with editable cells`,aliases:[`table`],group:`Advanced`},image:{title:`Image`,subtext:`Resizable image with caption`,aliases:[`image`,`imageUpload`,`upload`,`img`,`picture`,`media`,`url`],group:`Media`},video:{title:`Video`,subtext:`Resizable video with caption`,aliases:[`video`,`videoUpload`,`upload`,`mp4`,`film`,`media`,`url`],group:`Media`},audio:{title:`Audio`,subtext:`Embedded audio with caption`,aliases:[`audio`,`audioUpload`,`upload`,`mp3`,`sound`,`media`,`url`],group:`Media`},file:{title:`File`,subtext:`Embedded file`,aliases:[`file`,`upload`,`embed`,`media`,`url`],group:`Media`},emoji:{title:`Emoji`,subtext:`Search for and insert an emoji`,aliases:[`emoji`,`emote`,`emotion`,`face`],group:`Others`},divider:{title:`Divider`,subtext:`Visually divide blocks`,aliases:[`divider`,`hr`,`line`,`horizontal rule`],group:`Basic blocks`}},placeholders:{default:`Enter text or type '/' for commands`,heading:`Heading`,toggleListItem:`Toggle`,bulletListItem:`List`,numberedListItem:`List`,checkListItem:`List`,emptyDocument:void 0,new_comment:`Write a comment...`,edit_comment:`Edit comment...`,comment_reply:`Add comment...`},file_blocks:{add_button_text:{image:`Add image`,video:`Add video`,audio:`Add audio`,file:`Add file`}},toggle_blocks:{add_block_button:`Empty toggle. Click to add a block.`},code_block:{add_source_button_text:`Add source code`,ok_button_text:`OK`},side_menu:{add_block_label:`Add block`,drag_handle_label:`Open block menu`},drag_handle:{delete_menuitem:`Delete`,colors_menuitem:`Colors`,header_row_menuitem:`Header row`,header_column_menuitem:`Header column`},table_handle:{delete_column_menuitem:`Delete column`,delete_row_menuitem:`Delete row`,add_left_menuitem:`Add column left`,add_right_menuitem:`Add column right`,add_above_menuitem:`Add row above`,add_below_menuitem:`Add row below`,split_cell_menuitem:`Split cell`,merge_cells_menuitem:`Merge cells`,background_color_menuitem:`Background color`},suggestion_menu:{no_items_title:`No items found`},color_picker:{text_title:`Text`,background_title:`Background`,colors:{default:`Auto`,gray:`Gray`,brown:`Brown`,red:`Red`,orange:`Orange`,yellow:`Yellow`,green:`Green`,blue:`Blue`,purple:`Purple`,pink:`Pink`}},formatting_toolbar:{bold:{tooltip:`Bold`,secondary_tooltip:`Mod+B`},italic:{tooltip:`Italic`,secondary_tooltip:`Mod+I`},underline:{tooltip:`Underline`,secondary_tooltip:`Mod+U`},strike:{tooltip:`Strike`,secondary_tooltip:`Mod+Shift+S`},code:{tooltip:`Code`,secondary_tooltip:``},colors:{tooltip:`Colors`},link:{tooltip:`Create link`,secondary_tooltip:`Mod+K`},file_caption:{tooltip:`Edit caption`,input_placeholder:`Edit caption`},file_replace:{tooltip:{image:`Replace image`,video:`Replace video`,audio:`Replace audio`,file:`Replace file`}},file_rename:{tooltip:{image:`Rename image`,video:`Rename video`,audio:`Rename audio`,file:`Rename file`},input_placeholder:{image:`Rename image`,video:`Rename video`,audio:`Rename audio`,file:`Rename file`}},file_download:{tooltip:{image:`Download image`,video:`Download video`,audio:`Download audio`,file:`Download file`}},file_delete:{tooltip:{image:`Delete image`,video:`Delete video`,audio:`Delete audio`,file:`Delete file`}},file_preview_toggle:{tooltip:`Toggle preview`},nest:{tooltip:`Nest block`,secondary_tooltip:`Tab`},unnest:{tooltip:`Unnest block`,secondary_tooltip:`Shift+Tab`},align_left:{tooltip:`Align text left`},align_center:{tooltip:`Align text center`},align_right:{tooltip:`Align text right`},align_justify:{tooltip:`Justify text`},table_cell_merge:{tooltip:`Merge cells`},comment:{tooltip:`Add comment`}},file_panel:{upload:{title:`Upload`,file_placeholder:{image:`Upload image`,video:`Upload video`,audio:`Upload audio`,file:`Upload file`},upload_error:`Error: Upload failed`},embed:{title:`Embed`,embed_button:{image:`Embed image`,video:`Embed video`,audio:`Embed audio`,file:`Embed file`},url_placeholder:`Enter URL`}},link_toolbar:{delete:{tooltip:`Remove link`},edit:{text:`Edit link`,tooltip:`Edit`},open:{tooltip:`Open in new tab`},form:{title_placeholder:`Edit title`,url_placeholder:`Edit URL`}},comments:{edited:`edited`,save_button_text:`Save`,cancel_button_text:`Cancel`,deleted_reference_text:`Original content deleted`,discard_pending_comment:`Are you sure you want to discard this comment?`,actions:{add_reaction:`Add reaction`,resolve:`Resolve`,reopen:`Re-open`,edit_comment:`Edit comment`,delete_comment:`Delete comment`,more_actions:`More actions`},reactions:{reacted_by:`Reacted by`},sidebar:{marked_as_resolved:`Marked as resolved`,more_replies:e=>`${e} more replies`}},suggestion_changes:{formatting_change:`Formatting Change`,deleted:`Deleted`,inserted_by:e=>`Inserted by: ${e}`,deleted_by:e=>`Deleted by: ${e}`,formatting_change_by:(e,t)=>`Formatting change (${e}) by: ${t}`},exporter:{open_file:`Open file`,open_video_file:`Open video`,open_audio_file:`Open audio`},generic:{ctrl_shortcut:`Ctrl`,form_submit:`OK`}},wu={en:Cu,"zh-cn":{slash_menu:{heading:{title:`一级标题`,subtext:`用于顶级标题`,aliases:[`h`,`heading1`,`h1`,`标题`,`一级标题`],group:`标题`},heading_2:{title:`二级标题`,subtext:`用于关键部分`,aliases:[`h2`,`heading2`,`subheading`,`标题`,`二级标题`,`副标题`],group:`标题`},heading_3:{title:`三级标题`,subtext:`用于小节和分组标题`,aliases:[`h3`,`heading3`,`subheading`,`标题`,`三级标题`],group:`标题`},heading_4:{title:`四级标题`,subtext:`用于较小的子节标题`,aliases:[`h4`,`heading4`,`subheading4`,`四级标题`],group:`副标题`},heading_5:{title:`五级标题`,subtext:`用于较小的子节标题`,aliases:[`h5`,`heading5`,`subheading5`,`五级标题`],group:`副标题`},heading_6:{title:`六级标题`,subtext:`用于最低层级的标题`,aliases:[`h6`,`heading6`,`subheading6`,`六级标题`],group:`副标题`},toggle_heading:{title:`可折叠一级标题`,subtext:`可折叠的顶级标题`,aliases:[`h`,`heading1`,`h1`,`标题`,`一级标题`,`折叠`],group:`副标题`},toggle_heading_2:{title:`可折叠二级标题`,subtext:`可折叠的关键部分标题`,aliases:[`h2`,`heading2`,`subheading`,`标题`,`二级标题`,`副标题`,`折叠`],group:`副标题`},toggle_heading_3:{title:`可折叠三级标题`,subtext:`可折叠的小节和分组标题`,aliases:[`h3`,`heading3`,`subheading`,`标题`,`三级标题`,`折叠`],group:`副标题`},quote:{title:`引用`,subtext:`引用或摘录`,aliases:[`quotation`,`blockquote`,`bq`],group:`基本块`},numbered_list:{title:`有序列表`,subtext:`用于显示有序列表`,aliases:[`ol`,`li`,`list`,`numberedlist`,`numbered list`,`列表`,`有序列表`],group:`基础`},bullet_list:{title:`无序列表`,subtext:`用于显示无序列表`,aliases:[`ul`,`li`,`list`,`bulletlist`,`bullet list`,`列表`,`无序列表`],group:`基础`},check_list:{title:`检查清单`,subtext:`用于显示带有复选框的列表`,aliases:[`ul`,`li`,`checklist`,`checked list`,`列表`,`检查清单`,`勾选列表`,`复选框`],group:`基础`},toggle_list:{title:`可折叠列表`,subtext:`带有可隐藏子项的列表`,aliases:[`li`,`列表`,`可折叠列表`,`折叠列表`],group:`基础`},paragraph:{title:`段落`,subtext:`用于文档正文`,aliases:[`p`,`paragraph`,`text`,`正文`],group:`基础`},code_block:{title:`代码块`,subtext:`用于显示带有语法高亮的代码块`,aliases:[`code`,`pre`,`代码`,`预格式`],group:`基础`},page_break:{title:`分页符`,subtext:`页面分隔符`,aliases:[`page`,`break`,`separator`,`分页`,`分隔符`],group:`基础`},table:{title:`表格`,subtext:`使用表格`,aliases:[`table`,`表格`],group:`高级功能`},image:{title:`图片`,subtext:`插入图片`,aliases:[`图片`,`上传图片`,`上传`,`image`,`img`,`相册`,`媒体`,`url`],group:`媒体`},video:{title:`视频`,subtext:`插入视频`,aliases:[`视频`,`视频上传`,`上传`,`video`,`mp4`,`电影`,`媒体`,`url`,`驱动`,`dropbox`],group:`媒体`},audio:{title:`音频`,subtext:`插入音频`,aliases:[`音频`,`音频上传`,`上传`,`audio`,`mp3`,`声音`,`媒体`,`url`,`驱动`,`dropbox`],group:`媒体`},file:{title:`文件`,subtext:`插入文件`,aliases:[`文件`,`上传`,`file`,`嵌入`,`媒体`,`url`],group:`媒体`},emoji:{title:`表情符号`,subtext:`用于插入表情符号`,aliases:[`表情符号`,`emoji`,`face`,`emote`,`表情`,`表情表达`,`表情`],group:`其他`},divider:{title:`分隔线`,subtext:`分隔线区块`,aliases:[`divider`,`hr`,`horizontal rule`],group:`基础区块`}},placeholders:{default:`输入 '/' 以使用命令`,heading:`标题`,toggleListItem:`切换`,bulletListItem:`列表`,numberedListItem:`列表`,checkListItem:`列表`,new_comment:`写评论...`,edit_comment:`编辑评论...`,comment_reply:`添加评论...`},file_blocks:{add_button_text:{image:`添加图片`,video:`添加视频`,audio:`添加音频`,file:`添加文件`}},toggle_blocks:{add_block_button:`空的切换区。点击添加区块。`},code_block:{add_source_button_text:`添加源代码`,ok_button_text:`确定`},side_menu:{add_block_label:`添加块`,drag_handle_label:`打开菜单`},drag_handle:{delete_menuitem:`删除`,colors_menuitem:`颜色`,header_row_menuitem:`行标题`,header_column_menuitem:`列标题`},table_handle:{delete_column_menuitem:`删除列`,delete_row_menuitem:`删除行`,add_left_menuitem:`左侧添加列`,add_right_menuitem:`右侧添加列`,add_above_menuitem:`上方添加行`,add_below_menuitem:`下方添加行`,split_cell_menuitem:`拆分单元格`,merge_cells_menuitem:`合并单元格`,background_color_menuitem:`背景色`},suggestion_menu:{no_items_title:`无匹配项`},color_picker:{text_title:`文本`,background_title:`背景色`,colors:{default:`自动`,gray:`灰色`,brown:`棕色`,red:`红色`,orange:`橙色`,yellow:`黄色`,green:`绿色`,blue:`蓝色`,purple:`紫色`,pink:`粉色`}},formatting_toolbar:{bold:{tooltip:`加粗`,secondary_tooltip:`Mod+B`},italic:{tooltip:`斜体`,secondary_tooltip:`Mod+I`},underline:{tooltip:`下划线`,secondary_tooltip:`Mod+U`},strike:{tooltip:`删除线`,secondary_tooltip:`Mod+Shift+X`},code:{tooltip:`代码标记`,secondary_tooltip:``},colors:{tooltip:`颜色`},link:{tooltip:`添加链接`,secondary_tooltip:`Mod+K`},file_caption:{tooltip:`编辑标题`,input_placeholder:`编辑标题`},file_replace:{tooltip:{image:`替换图片`,video:`替换视频`,audio:`替换音频`,file:`替换文件`}},file_rename:{tooltip:{image:`重命名图片`,video:`重命名视频`,audio:`重命名音频`,file:`重命名文件`},input_placeholder:{image:`重命名图片`,video:`重命名视频`,audio:`重命名音频`,file:`重命名文件`}},file_download:{tooltip:{image:`下载图片`,video:`下载视频`,audio:`下载音频`,file:`下载文件`}},file_delete:{tooltip:{image:`删除图片`,video:`删除视频`,audio:`删除音频`,file:`删除文件`}},file_preview_toggle:{tooltip:`切换预览`},nest:{tooltip:`嵌套`,secondary_tooltip:`Tab`},unnest:{tooltip:`取消嵌套`,secondary_tooltip:`Shift+Tab`},align_left:{tooltip:`左对齐`},align_center:{tooltip:`居中`},align_right:{tooltip:`右对齐`},align_justify:{tooltip:`文本对齐`},table_cell_merge:{tooltip:`合并单元格`},comment:{tooltip:`添加评论`}},file_panel:{upload:{title:`上传`,file_placeholder:{image:`上传图片`,video:`上传视频`,audio:`上传音频`,file:`上传文件`},upload_error:`Error:上传失败`},embed:{title:`嵌入`,embed_button:{image:`嵌入图片`,video:`嵌入视频`,audio:`嵌入音频`,file:`嵌入文件`},url_placeholder:`输入图片地址`}},link_toolbar:{delete:{tooltip:`清除链接`},edit:{text:`编辑链接`,tooltip:`编辑`},open:{tooltip:`新窗口打开`},form:{title_placeholder:`编辑标题`,url_placeholder:`编辑链接地址`}},comments:{edited:`已编辑`,save_button_text:`保存`,cancel_button_text:`取消`,deleted_reference_text:`原始内容已删除`,discard_pending_comment:`确定要放弃此评论吗?`,actions:{add_reaction:`添加反应`,resolve:`解决`,reopen:`重新打开`,edit_comment:`编辑评论`,delete_comment:`删除评论`,more_actions:`更多操作`},reactions:{reacted_by:`已回应`},sidebar:{marked_as_resolved:`标记为已解决`,more_replies:e=>`还有 ${e} 条回复`}},suggestion_changes:{formatting_change:`格式更改`,deleted:`已删除`,inserted_by:e=>`插入者:${e}`,deleted_by:e=>`删除者:${e}`,formatting_change_by:(e,t)=>`格式更改(${e}),更改者:${t}`},exporter:{open_file:`打开文件`,open_video_file:`打开视频`,open_audio_file:`打开音频`},generic:{ctrl_shortcut:`Ctrl`,form_submit:`确定`}},"zh-tw":{slash_menu:{heading:{title:`一級標題`,subtext:`用於頂級標題`,aliases:[`h`,`heading1`,`h1`,`標題`,`一級標題`],group:`標題`},heading_2:{title:`二級標題`,subtext:`用於關鍵部分`,aliases:[`h2`,`heading2`,`subheading`,`標題`,`二級標題`,`副標題`],group:`標題`},heading_3:{title:`三級標題`,subtext:`用於小節和分組標題`,aliases:[`h3`,`heading3`,`subheading`,`標題`,`三級標題`],group:`標題`},heading_4:{title:`四級標題`,subtext:`用於小節和分組標題`,aliases:[`h4`,`heading4`,`subheading`,`標題`,`四級標題`],group:`副標題`},heading_5:{title:`五級標題`,subtext:`用於小節和分組標題`,aliases:[`h5`,`heading5`,`subheading`,`標題`,`五級標題`],group:`副標題`},heading_6:{title:`六級標題`,subtext:`用於小節和分組標題`,aliases:[`h6`,`heading6`,`subheading`,`標題`,`六級標題`],group:`副標題`},toggle_heading:{title:`可摺疊一級標題`,subtext:`可摺疊的頂級標題`,aliases:[`h`,`heading1`,`h1`,`標題`,`一級標題`,`摺疊`],group:`副標題`},toggle_heading_2:{title:`可摺疊二級標題`,subtext:`可摺疊的關鍵部分標題`,aliases:[`h2`,`heading2`,`subheading`,`標題`,`二級標題`,`副標題`,`摺疊`],group:`副標題`},toggle_heading_3:{title:`可摺疊三級標題`,subtext:`可摺疊的小節和分組標題`,aliases:[`h3`,`heading3`,`subheading`,`標題`,`三級標題`,`摺疊`],group:`副標題`},quote:{title:`引用`,subtext:`引用或摘錄`,aliases:[`quotation`,`blockquote`,`bq`],group:`基本區塊`},numbered_list:{title:`有序列表`,subtext:`用於顯示有序列表`,aliases:[`ol`,`li`,`list`,`numberedlist`,`numbered list`,`列表`,`有序列表`],group:`基礎`},bullet_list:{title:`無序列表`,subtext:`用於顯示無序列表`,aliases:[`ul`,`li`,`list`,`bulletlist`,`bullet list`,`列表`,`無序列表`],group:`基礎`},check_list:{title:`檢查清單`,subtext:`用於顯示帶有核取方塊的列表`,aliases:[`ul`,`li`,`checklist`,`checked list`,`列表`,`檢查清單`,`勾選列表`,`核取方塊`],group:`基礎`},toggle_list:{title:`可摺疊列表`,subtext:`帶有可隱藏子項的列表`,aliases:[`li`,`列表`,`可摺疊列表`,`摺疊列表`],group:`基礎`},paragraph:{title:`段落`,subtext:`用於文件正文`,aliases:[`p`,`paragraph`,`text`,`正文`],group:`基礎`},code_block:{title:`程式碼區塊`,subtext:`用於顯示帶有語法標記的程式碼區塊`,aliases:[`code`,`pre`,`程式碼`,`預格式`],group:`基礎`},page_break:{title:`分頁符`,subtext:`頁面分隔符`,aliases:[`page`,`break`,`separator`,`分頁`,`分隔符`],group:`基礎`},table:{title:`表格`,subtext:`使用表格`,aliases:[`table`,`表格`],group:`進階功能`},image:{title:`圖片`,subtext:`插入圖片`,aliases:[`圖片`,`上傳圖片`,`上傳`,`image`,`img`,`相簿`,`媒體`,`url`],group:`媒體`},video:{title:`影片`,subtext:`插入影片`,aliases:[`影片`,`影片上傳`,`上傳`,`video`,`mp4`,`電影`,`媒體`,`url`,`雲端硬碟`,`dropbox`],group:`媒體`},audio:{title:`音訊`,subtext:`插入音訊`,aliases:[`音訊`,`音訊上傳`,`上傳`,`audio`,`mp3`,`聲音`,`媒體`,`url`,`雲端硬碟`,`dropbox`],group:`媒體`},file:{title:`檔案`,subtext:`插入檔案`,aliases:[`檔案`,`上傳`,`file`,`嵌入`,`媒體`,`url`],group:`媒體`},emoji:{title:`表情符號`,subtext:`用於插入表情符號`,aliases:[`表情符號`,`emoji`,`face`,`emote`,`表情`,`表情表達`,`表情`],group:`其他`},divider:{title:`分隔線`,subtext:`分隔線區塊`,aliases:[`divider`,`hr`,`horizontal rule`],group:`基礎區塊`}},placeholders:{default:`輸入 '/' 以使用指令`,heading:`標題`,toggleListItem:`切換`,bulletListItem:`列表`,numberedListItem:`列表`,checkListItem:`列表`,new_comment:`撰寫評論...`,edit_comment:`編輯評論...`,comment_reply:`新增評論...`},file_blocks:{add_button_text:{image:`新增圖片`,video:`新增影片`,audio:`新增音訊`,file:`新增檔案`}},toggle_blocks:{add_block_button:`空的切換區。點擊新增區塊。`},code_block:{add_source_button_text:`新增原始碼`,ok_button_text:`確定`},side_menu:{add_block_label:`新增區塊`,drag_handle_label:`開啟選單`},drag_handle:{delete_menuitem:`刪除`,colors_menuitem:`顏色`,header_row_menuitem:`列標題`,header_column_menuitem:`欄標題`},table_handle:{delete_column_menuitem:`刪除欄`,delete_row_menuitem:`刪除列`,add_left_menuitem:`左側新增欄`,add_right_menuitem:`右側新增欄`,add_above_menuitem:`上方新增列`,add_below_menuitem:`下方新增列`,split_cell_menuitem:`分割儲存格`,merge_cells_menuitem:`合併儲存格`,background_color_menuitem:`背景色`},suggestion_menu:{no_items_title:`無相符項目`},color_picker:{text_title:`文字`,background_title:`背景色`,colors:{default:`自動`,gray:`灰色`,brown:`棕色`,red:`紅色`,orange:`橙色`,yellow:`黃色`,green:`綠色`,blue:`藍色`,purple:`紫色`,pink:`粉色`}},formatting_toolbar:{bold:{tooltip:`粗體`,secondary_tooltip:`Mod+B`},italic:{tooltip:`斜體`,secondary_tooltip:`Mod+I`},underline:{tooltip:`底線`,secondary_tooltip:`Mod+U`},strike:{tooltip:`刪除線`,secondary_tooltip:`Mod+Shift+X`},code:{tooltip:`程式碼標記`,secondary_tooltip:``},colors:{tooltip:`顏色`},link:{tooltip:`新增連結`,secondary_tooltip:`Mod+K`},file_caption:{tooltip:`編輯標題`,input_placeholder:`編輯標題`},file_replace:{tooltip:{image:`替換圖片`,video:`替換影片`,audio:`替換音訊`,file:`替換檔案`}},file_rename:{tooltip:{image:`重新命名圖片`,video:`重新命名影片`,audio:`重新命名音訊`,file:`重新命名檔案`},input_placeholder:{image:`重新命名圖片`,video:`重新命名影片`,audio:`重新命名音訊`,file:`重新命名檔案`}},file_download:{tooltip:{image:`下載圖片`,video:`下載影片`,audio:`下載音訊`,file:`下載檔案`}},file_delete:{tooltip:{image:`刪除圖片`,video:`刪除影片`,audio:`刪除音訊`,file:`刪除檔案`}},file_preview_toggle:{tooltip:`切換預覽`},nest:{tooltip:`巢狀`,secondary_tooltip:`Tab`},unnest:{tooltip:`取消巢狀`,secondary_tooltip:`Shift+Tab`},align_left:{tooltip:`靠左對齊`},align_center:{tooltip:`置中`},align_right:{tooltip:`靠右對齊`},align_justify:{tooltip:`兩端對齊`},table_cell_merge:{tooltip:`合併儲存格`},comment:{tooltip:`新增評論`}},file_panel:{upload:{title:`上傳`,file_placeholder:{image:`上傳圖片`,video:`上傳影片`,audio:`上傳音訊`,file:`上傳檔案`},upload_error:`錯誤:上傳失敗`},embed:{title:`嵌入`,embed_button:{image:`嵌入圖片`,video:`嵌入影片`,audio:`嵌入音訊`,file:`嵌入檔案`},url_placeholder:`輸入圖片網址`}},link_toolbar:{delete:{tooltip:`清除連結`},edit:{text:`編輯連結`,tooltip:`編輯`},open:{tooltip:`在新視窗開啟`},form:{title_placeholder:`編輯標題`,url_placeholder:`編輯連結網址`}},comments:{edited:`已編輯`,save_button_text:`儲存`,cancel_button_text:`取消`,deleted_reference_text:`原始內容已刪除`,discard_pending_comment:`確定要捨棄此評論嗎?`,actions:{add_reaction:`新增回應`,resolve:`解決`,reopen:`重新開啟`,edit_comment:`編輯評論`,delete_comment:`刪除評論`,more_actions:`更多操作`},reactions:{reacted_by:`已回應`},sidebar:{marked_as_resolved:`標記為已解決`,more_replies:e=>`還有 ${e} 則回覆`}},suggestion_changes:{formatting_change:`格式變更`,deleted:`已刪除`,inserted_by:e=>`插入者:${e}`,deleted_by:e=>`刪除者:${e}`,formatting_change_by:(e,t)=>`格式變更(${e}),變更者:${t}`},exporter:{open_file:`開啟檔案`,open_video_file:`開啟影片`,open_audio_file:`開啟音訊`},generic:{ctrl_shortcut:`Ctrl`,form_submit:`確定`}},ja:{slash_menu:{heading:{title:`見出し1`,subtext:`トップレベルの見出しに使用`,aliases:[`h`,`見出し1`,`h1`,`大見出し`],group:`見出し`},heading_2:{title:`見出し2`,subtext:`重要なセクションに使用`,aliases:[`h2`,`見出し2`,`subheading`,`中見出し`],group:`見出し`},heading_3:{title:`見出し3`,subtext:`セクションやグループの見出しに使用`,aliases:[`h3`,`見出し3`,`subheading`,`小見出し`],group:`見出し`},heading_4:{title:`見出し4`,subtext:`小さなサブセクションの見出しに使用`,aliases:[`h4`,`見出し4`,`subheading4`,`小見出し4`],group:`サブ見出し`},heading_5:{title:`見出し5`,subtext:`小さなサブセクションの見出しに使用`,aliases:[`h5`,`見出し5`,`subheading5`,`小見出し5`],group:`サブ見出し`},heading_6:{title:`見出し6`,subtext:`最下位レベルの見出しに使用`,aliases:[`h6`,`見出し6`,`subheading6`,`小見出し6`],group:`サブ見出し`},toggle_heading:{title:`折りたたみ見出し1`,subtext:`内容の表示/非表示が切り替え可能なトップレベルの見出し`,aliases:[`h`,`見出し1`,`h1`,`大見出し`,`折りたたみ`,`トグル`],group:`サブ見出し`},toggle_heading_2:{title:`折りたたみ見出し2`,subtext:`内容の表示/非表示が切り替え可能な重要なセクションの見出し`,aliases:[`h2`,`見出し2`,`subheading`,`中見出し`,`折りたたみ`,`トグル`],group:`サブ見出し`},toggle_heading_3:{title:`折りたたみ見出し3`,subtext:`内容の表示/非表示が切り替え可能なセクションやグループの見出し`,aliases:[`h3`,`見出し3`,`subheading`,`小見出し`,`折りたたみ`,`トグル`],group:`サブ見出し`},quote:{title:`引用`,subtext:`引用または抜粋`,aliases:[`quotation`,`blockquote`,`bq`],group:`基本ブロック`},numbered_list:{title:`番号付リスト`,subtext:`番号付リストを表示するために使用`,aliases:[`ol`,`li`,`numberedlist`,`numbered list`,`リスト`,`番号付リスト`,`番号 リスト`],group:`基本ブロック`},bullet_list:{title:`箇条書き`,subtext:`箇条書きを表示するために使用`,aliases:[`ul`,`li`,`bulletlist`,`bullet list`,`リスト`,`箇条書きリスト`],group:`基本ブロック`},check_list:{title:`チェックリスト`,subtext:`チェックボックス付きリストを表示するために使用されます`,aliases:[`ul`,`li`,`list`,`checklist`,`checked list`,`リスト`,`チェックリスト`,`チェックされたリスト`],group:`基本ブロック`},toggle_list:{title:`折りたたみリスト`,subtext:`サブ項目を非表示にできるリスト`,aliases:[`li`,`リスト`,`折りたたみリスト`,`トグルリスト`,`折りたたみリスト`],group:`基本ブロック`},paragraph:{title:`標準テキスト`,subtext:`本文に使用`,aliases:[`p`,`paragraph`,`標準テキスト`],group:`基本ブロック`},code_block:{title:`コードブロック`,subtext:`シンタックスハイライト付きのコードブロック`,aliases:[`code`,`pre`,`コード`,`コードブロック`],group:`基本ブロック`},page_break:{title:`改ページ`,subtext:`ページ区切り`,aliases:[`page`,`break`,`separator`,`改ページ`,`区切り`],group:`基本ブロック`},table:{title:`表`,subtext:`表に使用`,aliases:[`table`,`表`,`テーブル`],group:`高度なブロック`},image:{title:`画像`,subtext:`画像を挿入`,aliases:[`image`,`imageUpload`,`upload`,`img`,`picture`,`media`,`url`,`画像`],group:`メディア`},video:{title:`ビデオ`,subtext:`ビデオを挿入`,aliases:[`video`,`videoUpload`,`upload`,`mp4`,`film`,`media`,`url`,`ビデオ`],group:`メディア`},audio:{title:`オーディオ`,subtext:`オーディオを挿入`,aliases:[`audio`,`audioUpload`,`upload`,`mp3`,`sound`,`media`,`url`,`オーディオ`],group:`メディア`},file:{title:`ファイル`,subtext:`ファイルを挿入`,aliases:[`file`,`upload`,`embed`,`media`,`url`,`ファイル`],group:`メディア`},emoji:{title:`絵文字`,subtext:`絵文字を挿入するために使用します`,aliases:[`絵文字`,`顔文字`,`感情表現`,`顔`],group:`その他`},divider:{title:`区切り`,subtext:`区切りを表示するために使用`,aliases:[`divider`,`hr`,`horizontal rule`],group:`基本ブロック`}},placeholders:{default:`テキストを入力するか'/' を入力してコマンド選択`,heading:`見出し`,toggleListItem:`トグル`,bulletListItem:`リストを追加`,numberedListItem:`リストを追加`,checkListItem:`リストを追加`,new_comment:`コメントを書く...`,edit_comment:`コメントを編集...`,comment_reply:`コメントを追加...`},file_blocks:{add_button_text:{image:`画像を追加`,video:`ビデオを追加`,audio:`オーディオを追加`,file:`ファイルを追加`}},toggle_blocks:{add_block_button:`空のトグルです。クリックしてブロックを追加。`},code_block:{add_source_button_text:`ソースコードを追加`,ok_button_text:`OK`},side_menu:{add_block_label:`ブロックを追加`,drag_handle_label:`ブロックメニュー`},drag_handle:{delete_menuitem:`削除`,colors_menuitem:`色を変更`,header_row_menuitem:`行の見出し`,header_column_menuitem:`列の見出し`},table_handle:{delete_column_menuitem:`列を削除`,delete_row_menuitem:`行を削除`,add_left_menuitem:`左に列を追加`,add_right_menuitem:`右に列を追加`,add_above_menuitem:`上に行を追加`,add_below_menuitem:`下に行を追加`,split_cell_menuitem:`セルを分割`,merge_cells_menuitem:`セルを結合`,background_color_menuitem:`背景色を変更`},suggestion_menu:{no_items_title:`アイテムが見つかりません`},color_picker:{text_title:`文字色`,background_title:`背景色`,colors:{default:`自動`,gray:`グレー`,brown:`茶色`,red:`赤`,orange:`オレンジ`,yellow:`黄色`,green:`緑`,blue:`青`,purple:`紫`,pink:`ピンク`}},formatting_toolbar:{bold:{tooltip:`太字`,secondary_tooltip:`Mod+B`},italic:{tooltip:`斜体`,secondary_tooltip:`Mod+I`},underline:{tooltip:`下線`,secondary_tooltip:`Mod+U`},strike:{tooltip:`打ち消し`,secondary_tooltip:`Mod+Shift+X`},code:{tooltip:`コード`,secondary_tooltip:``},colors:{tooltip:`色`},link:{tooltip:`リンク`,secondary_tooltip:`Mod+K`},file_caption:{tooltip:`キャプションを編集`,input_placeholder:`キャプションを編集`},file_replace:{tooltip:{image:`画像を置換`,video:`ビデオを置換`,audio:`オーディオを置換`,file:`ファイルを置換`}},file_rename:{tooltip:{image:`画像の名前を変更`,video:`ビデオの名前を変更`,audio:`オーディオの名前を変更`,file:`ファイルの名前を変更`},input_placeholder:{image:`画像の名前を変更`,video:`ビデオの名前を変更`,audio:`オーディオの名前を変更`,file:`ファイルの名前を変更`}},file_download:{tooltip:{image:`画像をダウンロード`,video:`ビデオをダウンロード`,audio:`オーディオをダウンロード`,file:`ファイルをダウンロード`}},file_delete:{tooltip:{image:`画像を削除`,video:`ビデオを削除`,audio:`オーディオを削除`,file:`ファイルを削除`}},file_preview_toggle:{tooltip:`プレビューの切り替え`},nest:{tooltip:`インデント増`,secondary_tooltip:`Tab`},unnest:{tooltip:`インデント減`,secondary_tooltip:`Shift+Tab`},align_left:{tooltip:`左揃え`},align_center:{tooltip:`中央揃え`},align_right:{tooltip:`右揃え`},align_justify:{tooltip:`両端揃え`},table_cell_merge:{tooltip:`セルを結合`},comment:{tooltip:`コメントを追加`}},file_panel:{upload:{title:`アップロード`,file_placeholder:{image:`画像をアップロード`,video:`ビデオをアップロード`,audio:`オーディオをアップロード`,file:`ファイルをアップロード`},upload_error:`エラー: アップロードが失敗しました`},embed:{title:`埋め込み`,embed_button:{image:`画像を埋め込む`,video:`ビデオを埋め込む`,audio:`オーディオを埋め込む`,file:`ファイルを埋め込む`},url_placeholder:`URLを入力`}},link_toolbar:{delete:{tooltip:`リンクを解除`},edit:{text:`リンクを編集`,tooltip:`編集`},open:{tooltip:`新しいタブでリンクを開く`},form:{title_placeholder:`タイトルを編集`,url_placeholder:`URLを編集`}},comments:{edited:`編集済み`,save_button_text:`保存`,cancel_button_text:`キャンセル`,deleted_reference_text:`元のコンテンツが削除されました`,discard_pending_comment:`このコメントを破棄してもよろしいですか?`,actions:{add_reaction:`リアクションを追加`,resolve:`解決`,reopen:`再開`,edit_comment:`コメントを編集`,delete_comment:`コメントを削除`,more_actions:`その他の操作`},reactions:{reacted_by:`リアクションした人`},sidebar:{marked_as_resolved:`解決済みとしてマーク`,more_replies:e=>`${e} 件の追加返信`}},suggestion_changes:{formatting_change:`書式の変更`,deleted:`削除済み`,inserted_by:e=>`挿入者: ${e}`,deleted_by:e=>`削除者: ${e}`,formatting_change_by:(e,t)=>`書式の変更 (${e}) 変更者: ${t}`},exporter:{open_file:`ファイルを開く`,open_video_file:`動画を開く`,open_audio_file:`音声を開く`},generic:{ctrl_shortcut:`Ctrl`,form_submit:`OK`}},ko:{slash_menu:{heading:{title:`제목1`,subtext:`섹션 제목(대)`,aliases:[`h`,`제목1`,`h1`,`대제목`],group:`제목`},heading_2:{title:`제목2`,subtext:`섹션 제목(중)`,aliases:[`h2`,`제목2`,`중제목`],group:`제목`},heading_3:{title:`제목3`,subtext:`섹션 제목(소)`,aliases:[`h3`,`제목3`,`subheading`],group:`제목`},heading_4:{title:`제목4`,subtext:`하위 소단락 제목`,aliases:[`h4`,`제목4`,`소제목4`],group:`소제목`},heading_5:{title:`제목5`,subtext:`작은 하위 섹션 제목`,aliases:[`h5`,`제목5`,`소제목5`],group:`소제목`},heading_6:{title:`제목6`,subtext:`가장 하위 수준 제목`,aliases:[`h6`,`제목6`,`소제목6`],group:`소제목`},toggle_heading:{title:`접을 수 있는 제목1`,subtext:`내용을 표시하거나 숨길 수 있는 섹션 제목(대)`,aliases:[`h`,`제목1`,`h1`,`대제목`,`접기`,`토글`],group:`소제목`},toggle_heading_2:{title:`접을 수 있는 제목2`,subtext:`내용을 표시하거나 숨길 수 있는 섹션 제목(중)`,aliases:[`h2`,`제목2`,`중제목`,`접기`,`토글`],group:`소제목`},toggle_heading_3:{title:`접을 수 있는 제목3`,subtext:`내용을 표시하거나 숨길 수 있는 섹션 제목(소)`,aliases:[`h3`,`제목3`,`subheading`,`접기`,`토글`],group:`소제목`},quote:{title:`인용`,subtext:`인용문 또는 발췌`,aliases:[`quotation`,`blockquote`,`bq`],group:`기본 블록`},numbered_list:{title:`번호 매기기 목록`,subtext:`번호가 매겨진 목록을 추가합니다.`,aliases:[`ol`,`li`,`목록`,`번호 매기기 목록`,`번호 목록`],group:`기본 블록`},bullet_list:{title:`글머리 기호 목록`,subtext:`간단한 글머리 기호를 추가합니다.`,aliases:[`ul`,`li`,`목록`,`글머리 기호 목록`,`글머리 목록`],group:`기본 블록`},check_list:{title:`체크리스트`,subtext:`체크박스가 있는 목록을 표시하는 데 사용`,aliases:[`ul`,`li`,`목록`,`체크리스트`,`체크 리스트`,`체크된 목록`,`체크박스`],group:`기본 블록`},toggle_list:{title:`접을 수 있는 목록`,subtext:`숨길 수 있는 하위 항목이 있는 목록`,aliases:[`li`,`목록`,`접을 수 있는 목록`,`토글 목록`,`접기 목록`],group:`기본 블록`},paragraph:{title:`본문`,subtext:`일반 텍스트`,aliases:[`p`,`paragraph`,`본문`],group:`기본 블록`},code_block:{title:`코드 블록`,subtext:`구문 강조가 있는 코드 블록`,aliases:[`code`,`pre`],group:`기본 블록`},page_break:{title:`페이지 나누기`,subtext:`페이지 구분자`,aliases:[`page`,`break`,`separator`,`페이지`,`구분자`],group:`기본 블록`},table:{title:`표`,subtext:`간단한 표를 추가합니다.`,aliases:[`표`],group:`고급`},image:{title:`이미지`,subtext:`이미지 파일을 업로드합니다.`,aliases:[`image`,`imageUpload`,`upload`,`img`,`picture`,`media`,`이미지`,`url`],group:`미디어`},video:{title:`비디오`,subtext:`비디오 삽입`,aliases:[`video`,`videoUpload`,`upload`,`mp4`,`film`,`media`,`동영상`,`url`],group:`미디어`},audio:{title:`오디오`,subtext:`오디오 삽입`,aliases:[`audio`,`audioUpload`,`upload`,`mp3`,`sound`,`media`,`오디오`,`url`],group:`미디어`},file:{title:`파일`,subtext:`파일 삽입`,aliases:[`file`,`upload`,`embed`,`media`,`파일`,`url`],group:`미디어`},emoji:{title:`이모지`,subtext:`이모지 삽입용으로 사용됩니다`,aliases:[`이모지`,`emoji`,`감정 표현`,`emotion expression`,`표정`,`face expression`,`얼굴`,`face`],group:`기타`},divider:{title:`구분선`,subtext:`구분선 블록`,aliases:[`divider`,`hr`,`horizontal rule`],group:`기본 블록`}},placeholders:{default:`텍스트를 입력하거나 /를 입력하여 명령을 입력하세요.`,heading:`제목`,toggleListItem:`토글`,bulletListItem:`목록`,numberedListItem:`목록`,checkListItem:`목록`,new_comment:`댓글 작성...`,edit_comment:`댓글 수정...`,comment_reply:`댓글 추가...`},file_blocks:{add_button_text:{image:`이미지 추가`,video:`비디오 추가`,audio:`오디오 추가`,file:`파일 추가`}},toggle_blocks:{add_block_button:`비어 있는 토글입니다. 클릭하여 블록을 추가하세요.`},code_block:{add_source_button_text:`소스 코드 추가`,ok_button_text:`확인`},side_menu:{add_block_label:`블록 추가`,drag_handle_label:`블록 메뉴 열기`},drag_handle:{delete_menuitem:`삭제`,colors_menuitem:`색깔`,header_row_menuitem:`행 제목`,header_column_menuitem:`열 제목`},table_handle:{delete_column_menuitem:`열 1개 삭제`,delete_row_menuitem:`행 삭제`,add_left_menuitem:`왼쪽에 열 1개 추가`,add_right_menuitem:`오른쪽에 열 1개 추가`,add_above_menuitem:`위에 행 1개 추가`,add_below_menuitem:`아래에 행 1개 추가`,split_cell_menuitem:`셀 분할`,merge_cells_menuitem:`셀 병합`,background_color_menuitem:`배경색 변경`},suggestion_menu:{no_items_title:`항목을 찾을 수 없음`},color_picker:{text_title:`텍스트`,background_title:`배경`,colors:{default:`자동`,gray:`회색`,brown:`갈색`,red:`빨간색`,orange:`주황색`,yellow:`노란색`,green:`녹색`,blue:`파란색`,purple:`보라색`,pink:`분홍색`}},formatting_toolbar:{bold:{tooltip:`진하게`,secondary_tooltip:`Mod+B`},italic:{tooltip:`기울임`,secondary_tooltip:`Mod+I`},underline:{tooltip:`밑줄`,secondary_tooltip:`Mod+U`},strike:{tooltip:`취소선`,secondary_tooltip:`Mod+Shift+X`},code:{tooltip:`코드`,secondary_tooltip:``},colors:{tooltip:`색깔`},link:{tooltip:`링크 만들기`,secondary_tooltip:`Mod+K`},file_caption:{tooltip:`이미지 캡션 수정`,input_placeholder:`이미지 캡션 수정`},file_replace:{tooltip:{image:`이미지 교체`,video:`비디오 교체`,audio:`오디오 교체`,file:`파일 교체`}},file_rename:{tooltip:{image:`이미지 이름 변경`,video:`비디오 이름 변경`,audio:`오디오 이름 변경`,file:`파일 이름 변경`},input_placeholder:{image:`이미지 이름 변경`,video:`비디오 이름 변경`,audio:`오디오 이름 변경`,file:`파일 이름 변경`}},file_download:{tooltip:{image:`이미지 다운로드`,video:`비디오 다운로드`,audio:`오디오 다운로드`,file:`파일 다운로드`}},file_delete:{tooltip:{image:`이미지 삭제`,video:`비디오 삭제`,audio:`오디오 삭제`,file:`파일 삭제`}},file_preview_toggle:{tooltip:`미리보기 전환`},nest:{tooltip:`중첩 블록`,secondary_tooltip:`Tab`},unnest:{tooltip:`비중첩 블록`,secondary_tooltip:`Shift+Tab`},align_left:{tooltip:`텍스트 왼쪽 맞춤`},align_center:{tooltip:`텍스트 가운데 맞춤`},align_right:{tooltip:`텍스트 오른쪽 맞춤`},align_justify:{tooltip:`텍스트 양쪽 맞춤`},table_cell_merge:{tooltip:`셀 병합`},comment:{tooltip:`코멘트 추가`}},file_panel:{upload:{title:`업로드`,file_placeholder:{image:`이미지 업로드`,video:`비디오 업로드`,audio:`오디오 업로드`,file:`파일 업로드`},upload_error:`오류: 업로드 실패`},embed:{title:`임베드`,embed_button:{image:`이미지 삽입`,video:`비디오 삽입`,audio:`오디오 삽입`,file:`파일 삽입`},url_placeholder:`URL을 입력하세요.`}},link_toolbar:{delete:{tooltip:`링크 삭제`},edit:{text:`링크 수정`,tooltip:`수정`},open:{tooltip:`새 탭으로 열기`},form:{title_placeholder:`제목 수정`,url_placeholder:`URL 수정`}},comments:{edited:`수정됨`,save_button_text:`저장`,cancel_button_text:`취소`,deleted_reference_text:`원본 콘텐츠 삭제됨`,discard_pending_comment:`이 댓글을 삭제하시겠습니까?`,actions:{add_reaction:`반응 추가`,resolve:`해결`,reopen:`다시 열기`,edit_comment:`댓글 수정`,delete_comment:`댓글 삭제`,more_actions:`더 많은 작업`},reactions:{reacted_by:`반응한 사람`},sidebar:{marked_as_resolved:`해결됨으로 표시됨`,more_replies:e=>`${e}개의 추가 답글`}},suggestion_changes:{formatting_change:`서식 변경`,deleted:`삭제됨`,inserted_by:e=>`삽입한 사람: ${e}`,deleted_by:e=>`삭제한 사람: ${e}`,formatting_change_by:(e,t)=>`서식 변경 (${e}) 변경한 사람: ${t}`},exporter:{open_file:`파일 열기`,open_video_file:`동영상 열기`,open_audio_file:`오디오 열기`},generic:{ctrl_shortcut:`Ctrl`,form_submit:`확인`}},es:{slash_menu:{heading:{title:`Encabezado 1`,subtext:`Encabezado de primer nivel`,aliases:[`h`,`encabezado1`,`h1`],group:`Encabezados`},heading_2:{title:`Encabezado 2`,subtext:`Encabezado de sección principal`,aliases:[`h2`,`encabezado2`,`subencabezado`],group:`Encabezados`},heading_3:{title:`Encabezado 3`,subtext:`Encabezado de subsección y grupo`,aliases:[`h3`,`encabezado3`,`subencabezado`],group:`Encabezados`},heading_4:{title:`Encabezado 4`,subtext:`Encabezado de subsección menor`,aliases:[`h4`,`encabezado4`,`subencabezado4`],group:`Subencabezados`},heading_5:{title:`Encabezado 5`,subtext:`Encabezado de subsección pequeña`,aliases:[`h5`,`encabezado5`,`subencabezado5`],group:`Subencabezados`},heading_6:{title:`Encabezado 6`,subtext:`Encabezado de nivel más bajo`,aliases:[`h6`,`encabezado6`,`subencabezado6`],group:`Subencabezados`},toggle_heading:{title:`Encabezado Plegable 1`,subtext:`Encabezado de primer nivel que se puede plegar`,aliases:[`h`,`encabezado1`,`h1`,`plegable`,`contraible`],group:`Subencabezados`},toggle_heading_2:{title:`Encabezado Plegable 2`,subtext:`Encabezado de sección principal que se puede plegar`,aliases:[`h2`,`encabezado2`,`subencabezado`,`plegable`,`contraible`],group:`Subencabezados`},toggle_heading_3:{title:`Encabezado Plegable 3`,subtext:`Encabezado de subsección y grupo que se puede plegar`,aliases:[`h3`,`encabezado3`,`subencabezado`,`plegable`,`contraible`],group:`Subencabezados`},quote:{title:`Cita`,subtext:`Cita o extracto`,aliases:[`quotation`,`blockquote`,`bq`],group:`Bloques básicos`},numbered_list:{title:`Lista Numerada`,subtext:`Lista con elementos ordenados`,aliases:[`ol`,`li`,`lista`,`lista numerada`],group:`Bloques básicos`},bullet_list:{title:`Lista con Viñetas`,subtext:`Lista con elementos no ordenados`,aliases:[`ul`,`li`,`lista`,`lista con viñetas`],group:`Bloques básicos`},check_list:{title:`Lista de Verificación`,subtext:`Lista con casillas de verificación`,aliases:[`ul`,`li`,`lista`,`lista de verificación`,`lista de chequeo`,`checkbox`],group:`Bloques básicos`},toggle_list:{title:`Lista Plegable`,subtext:`Lista con subelementos ocultables`,aliases:[`li`,`lista`,`lista plegable`,`lista colapsable`],group:`Bloques básicos`},paragraph:{title:`Párrafo`,subtext:`El cuerpo de tu documento`,aliases:[`p`,`párrafo`],group:`Bloques básicos`},code_block:{title:`Bloque de Código`,subtext:`Bloque de código con resaltado de sintaxis`,aliases:[`code`,`pre`],group:`Bloques básicos`},page_break:{title:`Salto de página`,subtext:`Separador de página`,aliases:[`page`,`break`,`separator`,`salto`,`separador`],group:`Bloques básicos`},table:{title:`Tabla`,subtext:`Tabla con celdas editables`,aliases:[`tabla`],group:`Avanzado`},image:{title:`Imagen`,subtext:`Imagen redimensionable con leyenda`,aliases:[`imagen`,`subir imagen`,`cargar`,`img`,`foto`,`media`,`url`],group:`Medios`},video:{title:`Vídeo`,subtext:`Vídeo redimensionable con leyenda`,aliases:[`video`,`subir vídeo`,`cargar`,`mp4`,`película`,`media`,`url`],group:`Medios`},audio:{title:`Audio`,subtext:`Audio incrustado con leyenda`,aliases:[`audio`,`subir audio`,`cargar`,`mp3`,`sonido`,`media`,`url`],group:`Medios`},file:{title:`Archivo`,subtext:`Archivo incrustado`,aliases:[`archivo`,`cargar`,`incrustar`,`media`,`url`],group:`Medios`},emoji:{title:`Emoji`,subtext:`Busca e inserta un emoji`,aliases:[`emoji`,`emoticono`,`emoción`,`cara`],group:`Otros`},divider:{title:`Divisor`,subtext:`Divisor de bloques`,aliases:[`divisor`,`hr`,`horizontal rule`],group:`Bloques básicos`}},placeholders:{default:`Escribe o teclea '/' para comandos`,heading:`Encabezado`,toggleListItem:`Plegable`,bulletListItem:`Lista`,numberedListItem:`Lista`,checkListItem:`Lista`,new_comment:`Escribe un comentario...`,edit_comment:`Editar comentario...`,comment_reply:`Agregar comentario...`},file_blocks:{add_button_text:{image:`Agregar imagen`,video:`Agregar vídeo`,audio:`Agregar audio`,file:`Agregar archivo`}},toggle_blocks:{add_block_button:`Toggle vacío. Haz clic para añadir un bloque.`},code_block:{add_source_button_text:`Agregar código fuente`,ok_button_text:`Aceptar`},side_menu:{add_block_label:`Agregar bloque`,drag_handle_label:`Abrir menú de bloque`},drag_handle:{delete_menuitem:`Eliminar`,colors_menuitem:`Colores`,header_row_menuitem:`Fila de encabezado`,header_column_menuitem:`Columna de encabezado`},table_handle:{delete_column_menuitem:`Eliminar columna`,delete_row_menuitem:`Eliminar fila`,add_left_menuitem:`Agregar columna a la izquierda`,add_right_menuitem:`Agregar columna a la derecha`,add_above_menuitem:`Agregar fila arriba`,add_below_menuitem:`Agregar fila abajo`,split_cell_menuitem:`Dividir celda`,merge_cells_menuitem:`Combinar celdas`,background_color_menuitem:`Color de fondo`},suggestion_menu:{no_items_title:`No se encontraron elementos`},color_picker:{text_title:`Texto`,background_title:`Fondo`,colors:{default:`Automático`,gray:`Gris`,brown:`Marrón`,red:`Rojo`,orange:`Naranja`,yellow:`Amarillo`,green:`Verde`,blue:`Azul`,purple:`Morado`,pink:`Rosa`}},formatting_toolbar:{bold:{tooltip:`Negrita`,secondary_tooltip:`Mod+B`},italic:{tooltip:`Cursiva`,secondary_tooltip:`Mod+I`},underline:{tooltip:`Subrayado`,secondary_tooltip:`Mod+U`},strike:{tooltip:`Tachado`,secondary_tooltip:`Mod+Shift+S`},code:{tooltip:`Código`,secondary_tooltip:``},colors:{tooltip:`Colores`},link:{tooltip:`Crear enlace`,secondary_tooltip:`Mod+K`},file_caption:{tooltip:`Editar leyenda`,input_placeholder:`Editar leyenda`},file_replace:{tooltip:{image:`Reemplazar imagen`,video:`Reemplazar vídeo`,audio:`Reemplazar audio`,file:`Reemplazar archivo`}},file_rename:{tooltip:{image:`Renombrar imagen`,video:`Renombrar vídeo`,audio:`Renombrar audio`,file:`Renombrar archivo`},input_placeholder:{image:`Renombrar imagen`,video:`Renombrar vídeo`,audio:`Renombrar audio`,file:`Renombrar archivo`}},file_download:{tooltip:{image:`Descargar imagen`,video:`Descargar vídeo`,audio:`Descargar audio`,file:`Descargar archivo`}},file_delete:{tooltip:{image:`Eliminar imagen`,video:`Eliminar vídeo`,audio:`Eliminar audio`,file:`Eliminar archivo`}},file_preview_toggle:{tooltip:`Alternar vista previa`},nest:{tooltip:`Anidar bloque`,secondary_tooltip:`Tab`},unnest:{tooltip:`Desanidar bloque`,secondary_tooltip:`Shift+Tab`},align_left:{tooltip:`Alinear texto a la izquierda`},align_center:{tooltip:`Alinear texto al centro`},align_right:{tooltip:`Alinear texto a la derecha`},align_justify:{tooltip:`Justificar texto`},table_cell_merge:{tooltip:`Combinar celdas`},comment:{tooltip:`Añadir comentario`}},file_panel:{upload:{title:`Subir`,file_placeholder:{image:`Subir imagen`,video:`Subir vídeo`,audio:`Subir audio`,file:`Subir archivo`},upload_error:`Error: Fallo en la subida`},embed:{title:`Incrustar`,embed_button:{image:`Incrustar imagen`,video:`Incrustar vídeo`,audio:`Incrustar audio`,file:`Incrustar archivo`},url_placeholder:`Introduce la URL`}},link_toolbar:{delete:{tooltip:`Eliminar enlace`},edit:{text:`Editar enlace`,tooltip:`Editar`},open:{tooltip:`Abrir en nueva pestaña`},form:{title_placeholder:`Editar título`,url_placeholder:`Editar URL`}},comments:{edited:`editado`,save_button_text:`Guardar`,cancel_button_text:`Cancelar`,deleted_reference_text:`Contenido original eliminado`,discard_pending_comment:`¿Seguro que quieres descartar este comentario?`,actions:{add_reaction:`Agregar reacción`,resolve:`Resolver`,reopen:`Reabrir`,edit_comment:`Editar comentario`,delete_comment:`Eliminar comentario`,more_actions:`Más acciones`},reactions:{reacted_by:`Reaccionado por`},sidebar:{marked_as_resolved:`Marcado como resuelto`,more_replies:e=>`${e} respuestas más`}},suggestion_changes:{formatting_change:`Cambio de formato`,deleted:`Eliminado`,inserted_by:e=>`Insertado por: ${e}`,deleted_by:e=>`Eliminado por: ${e}`,formatting_change_by:(e,t)=>`Cambio de formato (${e}) por: ${t}`},exporter:{open_file:`Abrir archivo`,open_video_file:`Abrir vídeo`,open_audio_file:`Abrir audio`},generic:{ctrl_shortcut:`Ctrl`,form_submit:`Aceptar`}},fr:{slash_menu:{heading:{title:`Titre 1`,subtext:`Utilisé pour un titre de premier niveau`,aliases:[`h`,`titre1`,`h1`],group:`Titres`},heading_2:{title:`Titre 2`,subtext:`Titre de deuxième niveau Utilisé pour les sections clés`,aliases:[`h2`,`titre2`,`sous-titre`],group:`Titres`},heading_3:{title:`Titre 3`,subtext:`Titre de troisième niveau utilisé pour les sous-sections et les titres de groupe`,aliases:[`h3`,`titre3`,`sous-titre`],group:`Titres`},heading_4:{title:`Titre 4`,subtext:`Titre de sous‑section mineure`,aliases:[`h4`,`titre4`,`sous‑titre4`],group:`Sous-titres`},heading_5:{title:`Titre 5`,subtext:`Titre de sous-section mineure`,aliases:[`h5`,`titre5`,`sous-titre5`],group:`Sous-titres`},heading_6:{title:`Titre 6`,subtext:`Titre de niveau le plus bas`,aliases:[`h6`,`titre6`,`sous-titre6`],group:`Sous-titres`},toggle_heading:{title:`Titre Repliable 1`,subtext:`Titre de premier niveau qui peut être replié pour masquer son contenu`,aliases:[`h`,`titre1`,`h1`,`repliable`,`masquable`,`déroulant`],group:`Sous-titres`},toggle_heading_2:{title:`Titre Repliable 2`,subtext:`Titre de section qui peut être replié pour masquer son contenu`,aliases:[`h2`,`titre2`,`sous-titre`,`repliable`,`masquable`,`déroulant`],group:`Sous-titres`},toggle_heading_3:{title:`Titre Repliable 3`,subtext:`Titre de sous-section qui peut être replié pour masquer son contenu`,aliases:[`h3`,`titre3`,`sous-titre`,`repliable`,`masquable`,`déroulant`],group:`Sous-titres`},quote:{title:`Citation`,subtext:`Citation ou extrait`,aliases:[`quotation`,`blockquote`,`bq`],group:`Blocs de base`},numbered_list:{title:`Liste Numérotée`,subtext:`Utilisé pour afficher une liste numérotée`,aliases:[`ol`,`li`,`liste`,`listenumérotée`,`liste numérotée`],group:`Blocs de base`},bullet_list:{title:`Liste à puces`,subtext:`Utilisé pour afficher une liste à puce non numérotée`,aliases:[`ul`,`li`,`liste`,`listeàpuces`,`liste à puces`,`bullet points`,`bulletpoints`],group:`Blocs de base`},check_list:{title:`Liste de tâches`,subtext:`Utilisé pour afficher une liste avec des cases à cocher`,aliases:[`ul`,`li`,`liste`,`liste de vérification`,`liste cochée`,`case à cocher`,`checklist`,`checkbox`,`check box`,`to do`,`todo`],group:`Blocs de base`},toggle_list:{title:`Liste repliable`,subtext:`Liste avec des sous-éléments masquables`,aliases:[`li`,`liste`,`liste pliable`,`liste escamotable`,`liste repliable`],group:`Blocs de base`},paragraph:{title:`Paragraphe`,subtext:`Utilisé pour le corps de votre document`,aliases:[`p`,`paragraphe`,`texte`],group:`Blocs de base`},code_block:{title:`Bloc de code`,subtext:`Bloc de code avec coloration syntaxique`,aliases:[`code`,`pre`],group:`Blocs de base`},page_break:{title:`Saut de page`,subtext:`Séparateur de page`,aliases:[`page`,`break`,`separator`,`saut`,`séparateur`],group:`Blocs de base`},table:{title:`Tableau`,subtext:`Utilisé pour les tableaux`,aliases:[`tableau`,`grille`],group:`Avancé`},image:{title:`Image`,subtext:`Insérer une image`,aliases:[`image`,`uploadImage`,`télécharger image`,`téléverser image`,`uploader image`,`img`,`photo`,`média`,`url`],group:`Médias`},video:{title:`Vidéo`,subtext:`Insérer une vidéo`,aliases:[`vidéo`,`télécharger vidéo`,`téléverser vidéo`,`mp4`,`film`,`média`,`url`],group:`Média`},audio:{title:`Audio`,subtext:`Insérer un audio`,aliases:[`audio`,`télécharger audio`,`téléverser audio`,`mp3`,`son`,`média`,`url`],group:`Média`},file:{title:`Fichier`,subtext:`Insérer un fichier`,aliases:[`fichier`,`téléverser fichier`,`intégrer fichier`,`insérer fichier`,`média`,`url`],group:`Média`},emoji:{title:`Emoji`,subtext:`Utilisé pour insérer un emoji`,aliases:[`emoji`,`émoticône`,`émotion`,`visage`,`smiley`],group:`Autres`},divider:{title:`Diviseur`,subtext:`Utilisé pour diviser les blocs`,aliases:[`diviseur`,`hr`,`horizontal rule`],group:`Blocs de base`}},placeholders:{default:`Entrez du texte ou tapez '/' pour faire apparaître les options de mise en page`,heading:`Titre`,toggleListItem:`Basculer`,bulletListItem:`Liste`,numberedListItem:`Liste`,checkListItem:`Liste`,new_comment:`Écrire un commentaire...`,edit_comment:`Modifier le commentaire...`,comment_reply:`Ajouter un commentaire...`},file_blocks:{add_button_text:{image:`Ajouter une image`,video:`Ajouter une vidéo`,audio:`Ajouter un audio`,file:`Ajouter un fichier`}},toggle_blocks:{add_block_button:`Liste repliable vide. Cliquez pour ajouter un bloc.`},code_block:{add_source_button_text:`Ajouter le code source`,ok_button_text:`OK`},side_menu:{add_block_label:`Ajouter un bloc`,drag_handle_label:`Ouvrir le menu du bloc`},drag_handle:{delete_menuitem:`Supprimer`,colors_menuitem:`Couleurs`,header_row_menuitem:`En-tête de ligne`,header_column_menuitem:`En-tête de colonne`},table_handle:{delete_column_menuitem:`Supprimer la colonne`,delete_row_menuitem:`Supprimer la ligne`,add_left_menuitem:`Ajouter une colonne à gauche`,add_right_menuitem:`Ajouter une colonne à droite`,add_above_menuitem:`Ajouter une ligne au-dessus`,add_below_menuitem:`Ajouter une ligne en dessous`,split_cell_menuitem:`Diviser la cellule`,merge_cells_menuitem:`Fusionner les cellules`,background_color_menuitem:`Couleur de fond`},suggestion_menu:{no_items_title:`Aucun élément trouvé`},color_picker:{text_title:`Texte`,background_title:`Fond`,colors:{default:`Auto`,gray:`Gris`,brown:`Marron`,red:`Rouge`,orange:`Orange`,yellow:`Jaune`,green:`Vert`,blue:`Bleu`,purple:`Violet`,pink:`Rose`}},formatting_toolbar:{bold:{tooltip:`Gras`,secondary_tooltip:`Mod+B`},italic:{tooltip:`Italique`,secondary_tooltip:`Mod+I`},underline:{tooltip:`Souligner`,secondary_tooltip:`Mod+U`},strike:{tooltip:`Barré`,secondary_tooltip:`Mod+Shift+X`},code:{tooltip:`Code`,secondary_tooltip:``},colors:{tooltip:`Couleurs`},link:{tooltip:`Créer un lien`,secondary_tooltip:`Mod+K`},file_caption:{tooltip:`Modifier la légende`,input_placeholder:`Modifier la légende`},file_replace:{tooltip:{image:`Remplacer l'image`,video:`Remplacer la vidéo`,audio:`Remplacer l'audio`,file:`Remplacer le fichier`}},file_rename:{tooltip:{image:`Renommer l'image`,video:`Renommer la vidéo`,audio:`Renommer l'audio`,file:`Renommer le fichier`},input_placeholder:{image:`Renommer l'image`,video:`Renommer la vidéo`,audio:`Renommer l'audio`,file:`Renommer le fichier`}},file_download:{tooltip:{image:`Télécharger l'image`,video:`Télécharger la vidéo`,audio:`Télécharger l'audio`,file:`Télécharger le fichier`}},file_delete:{tooltip:{image:`Supprimer l'image`,video:`Supprimer la vidéo`,audio:`Supprimer l'audio`,file:`Supprimer le fichier`}},file_preview_toggle:{tooltip:`Basculer l'aperçu`},nest:{tooltip:`Augmenter le retrait du bloc`,secondary_tooltip:`Tab`},unnest:{tooltip:`Diminuer le retait du bloc`,secondary_tooltip:`Shift+Tab`},align_left:{tooltip:`Aligner le texte à gauche`},align_center:{tooltip:`Aligner le texte au centre`},align_right:{tooltip:`Aligner le texte à droite`},align_justify:{tooltip:`Justifier le texte`},table_cell_merge:{tooltip:`Fusionner les cellules`},comment:{tooltip:`Ajouter un commentaire`}},file_panel:{upload:{title:`Télécharger`,file_placeholder:{image:`Télécharger une image`,video:`Télécharger une vidéo`,audio:`Télécharger un fichier audio`,file:`Télécharger un fichier`},upload_error:`Erreur : échec du téléchargement`},embed:{title:`Intégrer`,embed_button:{image:`Intégrer une image`,video:`Intégrer une vidéo`,audio:`Intégrer un fichier audio`,file:`Intégrer un fichier`},url_placeholder:`Entrez l'URL`}},link_toolbar:{delete:{tooltip:`Supprimer le lien`},edit:{text:`Modifier le lien`,tooltip:`Modifier`},open:{tooltip:`Ouvrir dans un nouvel onglet`},form:{title_placeholder:`Modifier le titre`,url_placeholder:`Modifier l'URL`}},comments:{edited:`modifié`,save_button_text:`Enregistrer`,cancel_button_text:`Annuler`,deleted_reference_text:`Contenu d'origine supprimé`,discard_pending_comment:`Voulez-vous vraiment abandonner ce commentaire ?`,actions:{add_reaction:`Ajouter une réaction`,resolve:`Résoudre`,reopen:`Rouvrir`,edit_comment:`Modifier le commentaire`,delete_comment:`Supprimer le commentaire`,more_actions:`Plus d'actions`},reactions:{reacted_by:`Réagi par`},sidebar:{marked_as_resolved:`Marqué comme résolu`,more_replies:e=>`${e} réponses de plus`}},suggestion_changes:{formatting_change:`Modification de mise en forme`,deleted:`Supprimé`,inserted_by:e=>`Inséré par : ${e}`,deleted_by:e=>`Supprimé par : ${e}`,formatting_change_by:(e,t)=>`Modification de mise en forme (${e}) par : ${t}`},exporter:{open_file:`Ouvrir le fichier`,open_video_file:`Ouvrir la vidéo`,open_audio_file:`Ouvrir l'audio`},generic:{ctrl_shortcut:`Ctrl`,form_submit:`OK`}},de:{slash_menu:{heading:{title:`Überschrift 1`,subtext:`Hauptebene Überschrift`,aliases:[`h`,`überschrift1`,`h1`],group:`Überschriften`},heading_2:{title:`Überschrift 2`,subtext:`Wichtige Abschnittsüberschrift`,aliases:[`h2`,`überschrift2`,`unterüberschrift`],group:`Überschriften`},heading_3:{title:`Überschrift 3`,subtext:`Unterabschnitts- und Gruppenüberschrift`,aliases:[`h3`,`überschrift3`,`unterüberschrift`],group:`Überschriften`},heading_4:{title:`Überschrift 4`,subtext:`Überschrift für kleinere Unterabschnitte`,aliases:[`h4`,`überschrift4`,`unterüberschrift4`],group:`Unterüberschriften`},heading_5:{title:`Überschrift 5`,subtext:`Überschrift für tiefere Unterabschnitte`,aliases:[`h5`,`überschrift5`,`unterüberschrift5`],group:`Unterüberschriften`},heading_6:{title:`Überschrift 6`,subtext:`Überschrift auf der untersten Ebene`,aliases:[`h6`,`überschrift6`,`unterüberschrift6`],group:`Unterüberschriften`},toggle_heading:{title:`Aufklappbare Überschrift 1`,subtext:`Aufklappbare Hauptebene Überschrift`,aliases:[`h`,`überschrift1`,`h1`,`aufklappbar`,`einklappbar`],group:`Unterüberschrift`},toggle_heading_2:{title:`Aufklappbare Überschrift 2`,subtext:`Aufklappbare wichtige Abschnittsüberschrift`,aliases:[`h2`,`überschrift2`,`unterüberschrift`,`aufklappbar`,`einklappbar`],group:`Unterüberschriften`},toggle_heading_3:{title:`Aufklappbare Überschrift 3`,subtext:`Aufklappbare Unterabschnitts- und Gruppenüberschrift`,aliases:[`h3`,`überschrift3`,`unterüberschrift`,`aufklappbar`,`einklappbar`],group:`Unterüberschriften`},quote:{title:`Zitat`,subtext:`Zitat oder Auszug`,aliases:[`quotation`,`blockquote`,`bq`],group:`Grundlegende Blöcke`},numbered_list:{title:`Nummerierte Liste`,subtext:`Liste mit nummerierten Elementen`,aliases:[`ol`,`li`,`liste`,`nummerierteliste`,`nummerierte liste`],group:`Grundlegende Blöcke`},bullet_list:{title:`Aufzählungsliste`,subtext:`Liste mit unnummerierten Elementen`,aliases:[`ul`,`li`,`liste`,`aufzählungsliste`,`aufzählung liste`],group:`Grundlegende Blöcke`},check_list:{title:`Checkliste`,subtext:`Liste mit Kontrollkästchen`,aliases:[`ul`,`li`,`liste`,`checkliste`,`check liste`,`geprüfte liste`,`kontrollkästchen`],group:`Grundlegende Blöcke`},toggle_list:{title:`Aufklappbare Liste`,subtext:`Liste mit ausblendbare Unterpunkten`,aliases:[`li`,`liste`,`aufklappbare liste`,`einklappbare liste`,`aufklappbareListe`,`aufklappbare liste`],group:`Grundlegende Blöcke`},paragraph:{title:`Absatz`,subtext:`Der Hauptteil Ihres Dokuments`,aliases:[`p`,`absatz`],group:`Grundlegende Blöcke`},code_block:{title:`Codeblock`,subtext:`Codeblock mit Syntaxhervorhebung`,aliases:[`code`,`pre`],group:`Grundlegende Blöcke`},page_break:{title:`Seitenumbruch`,subtext:`Seitentrenner`,aliases:[`page`,`break`,`separator`,`seitenumbruch`,`trenner`],group:`Grundlegende Blöcke`},table:{title:`Tabelle`,subtext:`Tabelle mit editierbaren Zellen`,aliases:[`tabelle`],group:`Erweitert`},image:{title:`Bild`,subtext:`Größenveränderbares Bild mit Beschriftung`,aliases:[`bild`,`bildhochladen`,`hochladen`,`img`,`bild`,`medien`,`url`],group:`Medien`},video:{title:`Video`,subtext:`Größenveränderbares Video mit Beschriftung`,aliases:[`video`,`videoupload`,`hochladen`,`mp4`,`film`,`medien`,`url`],group:`Medien`},audio:{title:`Audio`,subtext:`Eingebettetes Audio mit Beschriftung`,aliases:[`audio`,`audioupload`,`hochladen`,`mp3`,`ton`,`medien`,`url`],group:`Medien`},file:{title:`Datei`,subtext:`Eingebettete Datei`,aliases:[`datei`,`hochladen`,`einbetten`,`medien`,`url`],group:`Medien`},emoji:{title:`Emoji`,subtext:`Nach Emoji suchen und einfügen`,aliases:[`emoji`,`emote`,`emotion`,`gesicht`],group:`Andere`},divider:{title:`Trennlinie`,subtext:`Trennlinie zwischen Blöcken`,aliases:[`trennlinie`,`hr`,`horizontal rule`],group:`Grundlegende Blöcke`}},placeholders:{default:`Text eingeben oder '/' für Befehle tippen`,heading:`Überschrift`,toggleListItem:`Umschalten`,bulletListItem:`Liste`,numberedListItem:`Liste`,checkListItem:`Liste`,new_comment:`Einen Kommentar schreiben …`,edit_comment:`Kommentar bearbeiten …`,comment_reply:`Kommentar hinzufügen …`},file_blocks:{add_button_text:{image:`Bild hinzufügen`,video:`Video hinzufügen`,audio:`Audio hinzufügen`,file:`Datei hinzufügen`}},toggle_blocks:{add_block_button:`Leerer aufklappbarer Bereich. Klicken, um einen Block hinzuzufügen.`},code_block:{add_source_button_text:`Quellcode hinzufügen`,ok_button_text:`OK`},side_menu:{add_block_label:`Block hinzufügen`,drag_handle_label:`Blockmenü öffnen`},drag_handle:{delete_menuitem:`Löschen`,colors_menuitem:`Farben`,header_row_menuitem:`Kopfzeile`,header_column_menuitem:`Kopfspalte`},table_handle:{delete_column_menuitem:`Spalte löschen`,delete_row_menuitem:`Zeile löschen`,add_left_menuitem:`Spalte links hinzufügen`,add_right_menuitem:`Spalte rechts hinzufügen`,add_above_menuitem:`Zeile oberhalb hinzufügen`,add_below_menuitem:`Zeile unterhalb hinzufügen`,split_cell_menuitem:`Zelle teilen`,merge_cells_menuitem:`Zellen zusammenführen`,background_color_menuitem:`Hintergrundfarbe`},suggestion_menu:{no_items_title:`Keine Elemente gefunden`},color_picker:{text_title:`Text`,background_title:`Hintergrund`,colors:{default:`Automatisch`,gray:`Grau`,brown:`Braun`,red:`Rot`,orange:`Orange`,yellow:`Gelb`,green:`Grün`,blue:`Blau`,purple:`Lila`,pink:`Rosa`}},formatting_toolbar:{bold:{tooltip:`Fett`,secondary_tooltip:`Mod+B`},italic:{tooltip:`Kursiv`,secondary_tooltip:`Mod+I`},underline:{tooltip:`Unterstrichen`,secondary_tooltip:`Mod+U`},strike:{tooltip:`Durchgestrichen`,secondary_tooltip:`Mod+Shift+S`},code:{tooltip:`Code`,secondary_tooltip:``},colors:{tooltip:`Farben`},link:{tooltip:`Link erstellen`,secondary_tooltip:`Mod+K`},file_caption:{tooltip:`Beschriftung bearbeiten`,input_placeholder:`Beschriftung bearbeiten`},file_replace:{tooltip:{image:`Bild ersetzen`,video:`Video ersetzen`,audio:`Audio ersetzen`,file:`Datei ersetzen`}},file_rename:{tooltip:{image:`Bild umbenennen`,video:`Video umbenennen`,audio:`Audio umbenennen`,file:`Datei umbenennen`},input_placeholder:{image:`Bild umbenennen`,video:`Video umbenennen`,audio:`Audio umbenennen`,file:`Datei umbenennen`}},file_download:{tooltip:{image:`Bild herunterladen`,video:`Video herunterladen`,audio:`Audio herunterladen`,file:`Datei herunterladen`}},file_delete:{tooltip:{image:`Bild löschen`,video:`Video löschen`,audio:`Audio löschen`,file:`Datei löschen`}},file_preview_toggle:{tooltip:`Vorschau umschalten`},nest:{tooltip:`Block verschachteln`,secondary_tooltip:`Tab`},unnest:{tooltip:`Block entnesten`,secondary_tooltip:`Shift+Tab`},align_left:{tooltip:`Text linksbündig`},align_center:{tooltip:`Text zentrieren`},align_right:{tooltip:`Text rechtsbündig`},align_justify:{tooltip:`Text Blocksatz`},table_cell_merge:{tooltip:`Zellen zusammenführen`},comment:{tooltip:`Kommentar hinzufügen`}},file_panel:{upload:{title:`Hochladen`,file_placeholder:{image:`Bild hochladen`,video:`Video hochladen`,audio:`Audio hochladen`,file:`Datei hochladen`},upload_error:`Fehler: Hochladen fehlgeschlagen`},embed:{title:`Einbetten`,embed_button:{image:`Bild einbetten`,video:`Video einbetten`,audio:`Audio einbetten`,file:`Datei einbetten`},url_placeholder:`URL eingeben`}},link_toolbar:{delete:{tooltip:`Link entfernen`},edit:{text:`Link bearbeiten`,tooltip:`Bearbeiten`},open:{tooltip:`In neuem Tab öffnen`},form:{title_placeholder:`Titel bearbeiten`,url_placeholder:`URL bearbeiten`}},comments:{edited:`bearbeitet`,save_button_text:`Speichern`,cancel_button_text:`Abbrechen`,deleted_reference_text:`Originalinhalt gelöscht`,discard_pending_comment:`Möchten Sie diesen Kommentar wirklich verwerfen?`,actions:{add_reaction:`Reaktion hinzufügen`,resolve:`Lösen`,reopen:`Wieder öffnen`,edit_comment:`Kommentar bearbeiten`,delete_comment:`Kommentar löschen`,more_actions:`Weitere Aktionen`},reactions:{reacted_by:`Reagiert von`},sidebar:{marked_as_resolved:`Als gelöst markiert`,more_replies:e=>`${e} weitere Antworten`}},suggestion_changes:{formatting_change:`Formatierungsänderung`,deleted:`Gelöscht`,inserted_by:e=>`Eingefügt von: ${e}`,deleted_by:e=>`Gelöscht von: ${e}`,formatting_change_by:(e,t)=>`Formatierungsänderung (${e}) von: ${t}`},exporter:{open_file:`Datei öffnen`,open_video_file:`Video öffnen`,open_audio_file:`Audio öffnen`},generic:{ctrl_shortcut:`Strg`,form_submit:`OK`}},it:{slash_menu:{heading:{title:`Intestazione 1`,subtext:`Intestazione di primo livello`,aliases:[`h`,`intestazione1`,`h1`],group:`Intestazioni`},heading_2:{title:`Intestazione 2`,subtext:`Intestazione di sezione chiave`,aliases:[`h2`,`intestazione2`,`sottotitolo`],group:`Intestazioni`},heading_3:{title:`Intestazione 3`,subtext:`Intestazione di sottosezione e gruppo`,aliases:[`h3`,`intestazione3`,`sottotitolo`],group:`Intestazioni`},heading_4:{title:`Intestazione 4`,subtext:`Intestazione di sottosezione minore`,aliases:[`h4`,`intestazione4`,`sottotitolo4`],group:`Sottotitoli`},heading_5:{title:`Intestazione 5`,subtext:`Intestazione di sottosezione minore`,aliases:[`h5`,`intestazione5`,`sottotitolo5`],group:`Sottotitoli`},heading_6:{title:`Intestazione 6`,subtext:`Intestazione di livello più basso`,aliases:[`h6`,`intestazione6`,`sottotitolo6`],group:`Sottotitoli`},toggle_heading:{title:`Intestazione Espandibile 1`,subtext:`Intestazione di primo livello che può essere espansa o compressa per mostrare il contenuto`,aliases:[`h`,`intestazione1`,`h1`,`espandibile`,`comprimibile`],group:`Sottotitoli`},toggle_heading_2:{title:`Intestazione Espandibile 2`,subtext:`Intestazione di sezione che può essere espansa o compressa per mostrare il contenuto`,aliases:[`h2`,`intestazione2`,`sottotitolo`,`espandibile`,`comprimibile`],group:`Sottotitoli`},toggle_heading_3:{title:`Intestazione Espandibile 3`,subtext:`Intestazione di sottosezione che può essere espansa o compressa per mostrare il contenuto`,aliases:[`h3`,`intestazione3`,`sottotitolo`,`espandibile`,`comprimibile`],group:`Sottotitoli`},quote:{title:`Citazione`,subtext:`Citazione o estratto`,aliases:[`quotation`,`blockquote`,`bq`],group:`Blocchi Base`},numbered_list:{title:`Elenco Numerato`,subtext:`Elenco con elementi ordinati`,aliases:[`ol`,`li`,`elenco`,`elenconumerato`,`elenco numerato`],group:`Blocchi Base`},bullet_list:{title:`Elenco Puntato`,subtext:`Elenco con elementi non ordinati`,aliases:[`ul`,`li`,`elenco`,`elencopuntato`,`elenco puntato`],group:`Blocchi Base`},check_list:{title:`Elenco di Controllo`,subtext:`Elenco con caselle di controllo`,aliases:[`ul`,`li`,`elenco`,`elencocontrollo`,`elenco controllo`,`elenco verificato`,`casella di controllo`],group:`Blocchi Base`},toggle_list:{title:`Elenco Espandibile`,subtext:`Elenco con elementi nascondibili`,aliases:[`li`,`elenco`,`elenco espandibile`,`elenco collassabile`,`elenco espandibile`],group:`Blocchi Base`},paragraph:{title:`Paragrafo`,subtext:`Il corpo del tuo documento`,aliases:[`p`,`paragrafo`],group:`Blocchi Base`},code_block:{title:`Blocco di Codice`,subtext:`Blocco di codice con evidenziazione della sintassi`,aliases:[`code`,`pre`],group:`Blocchi Base`},page_break:{title:`Interruzione di Pagina`,subtext:`Separatore di pagina`,aliases:[`pagina`,`interruzione`,`separatore`],group:`Blocchi base`},table:{title:`Tabella`,subtext:`Tabella con celle modificabili`,aliases:[`tabella`],group:`Avanzato`},image:{title:`Immagine`,subtext:`Immagine ridimensionabile con didascalia`,aliases:[`immagine`,`caricaImmagine`,`carica`,`img`,`foto`,`media`,`url`],group:`Media`},video:{title:`Video`,subtext:`Video ridimensionabile con didascalia`,aliases:[`video`,`caricaVideo`,`carica`,`mp4`,`film`,`media`,`url`],group:`Media`},audio:{title:`Audio`,subtext:`Audio incorporato con didascalia`,aliases:[`audio`,`caricaAudio`,`carica`,`mp3`,`suono`,`media`,`url`],group:`Media`},file:{title:`File`,subtext:`File incorporato`,aliases:[`file`,`carica`,`embed`,`media`,`url`],group:`Media`},emoji:{title:`Emoji`,subtext:`Cerca e inserisci un'emoji`,aliases:[`emoji`,`emote`,`emozione`,`faccia`],group:`Altri`},divider:{title:`Divisore`,subtext:`Divisore di blocchi`,aliases:[`divisore`,`hr`,`horizontal rule`],group:`Blocchi base`}},placeholders:{default:`Inserisci testo o digita '/' per i comandi`,heading:`Intestazione`,toggleListItem:`Attiva/Disattiva`,bulletListItem:`Elenco`,numberedListItem:`Elenco`,checkListItem:`Elenco`,new_comment:`Scrivi un commento...`,edit_comment:`Modifica commento...`,comment_reply:`Aggiungi commento...`},file_blocks:{add_button_text:{image:`Aggiungi immagine`,video:`Aggiungi video`,audio:`Aggiungi audio`,file:`Aggiungi file`}},toggle_blocks:{add_block_button:`Toggle vuoto. Clicca per aggiungere un blocco.`},code_block:{add_source_button_text:`Aggiungi codice sorgente`,ok_button_text:`OK`},side_menu:{add_block_label:`Aggiungi blocco`,drag_handle_label:`Apri menu blocco`},drag_handle:{delete_menuitem:`Elimina`,colors_menuitem:`Colori`,header_row_menuitem:`Riga intestazione`,header_column_menuitem:`Colonna intestazione`},table_handle:{delete_column_menuitem:`Elimina colonna`,delete_row_menuitem:`Elimina riga`,add_left_menuitem:`Aggiungi colonna a sinistra`,add_right_menuitem:`Aggiungi colonna a destra`,add_above_menuitem:`Aggiungi riga sopra`,add_below_menuitem:`Aggiungi riga sotto`,split_cell_menuitem:`Dividi cella`,merge_cells_menuitem:`Unisci celle`,background_color_menuitem:`Colore di sfondo`},suggestion_menu:{no_items_title:`Nessun elemento trovato`},color_picker:{text_title:`Testo`,background_title:`Sfondo`,colors:{default:`Automatico`,gray:`Grigio`,brown:`Marrone`,red:`Rosso`,orange:`Arancione`,yellow:`Giallo`,green:`Verde`,blue:`Blu`,purple:`Viola`,pink:`Rosa`}},formatting_toolbar:{bold:{tooltip:`Grassetto`,secondary_tooltip:`Cmd+B`},italic:{tooltip:`Corsivo`,secondary_tooltip:`Cmd+I`},underline:{tooltip:`Sottolineato`,secondary_tooltip:`Cmd+U`},strike:{tooltip:`Barrato`,secondary_tooltip:`Cmd+Shift+S`},code:{tooltip:`Codice`,secondary_tooltip:``},colors:{tooltip:`Colori`},link:{tooltip:`Crea link`,secondary_tooltip:`Cmd+K`},file_caption:{tooltip:`Modifica didascalia`,input_placeholder:`Modifica didascalia`},file_replace:{tooltip:{image:`Sostituisci immagine`,video:`Sostituisci video`,audio:`Sostituisci audio`,file:`Sostituisci file`}},file_rename:{tooltip:{image:`Rinomina immagine`,video:`Rinomina video`,audio:`Rinomina audio`,file:`Rinomina file`},input_placeholder:{image:`Rinomina immagine`,video:`Rinomina video`,audio:`Rinomina audio`,file:`Rinomina file`}},file_download:{tooltip:{image:`Scarica immagine`,video:`Scarica video`,audio:`Scarica audio`,file:`Scarica file`}},file_delete:{tooltip:{image:`Elimina immagine`,video:`Elimina video`,audio:`Elimina audio`,file:`Elimina file`}},file_preview_toggle:{tooltip:`Attiva/disattiva anteprima`},nest:{tooltip:`Annida blocco`,secondary_tooltip:`Tab`},unnest:{tooltip:`Disannida blocco`,secondary_tooltip:`Shift+Tab`},align_left:{tooltip:`Allinea testo a sinistra`},align_center:{tooltip:`Allinea testo al centro`},align_right:{tooltip:`Allinea testo a destra`},align_justify:{tooltip:`Giustifica testo`},table_cell_merge:{tooltip:`Unisci celle`},comment:{tooltip:`Aggiungi commento`}},file_panel:{upload:{title:`Carica`,file_placeholder:{image:`Carica immagine`,video:`Carica video`,audio:`Carica audio`,file:`Carica file`},upload_error:`Errore: Caricamento fallito`},embed:{title:`Incorpora`,embed_button:{image:`Incorpora immagine`,video:`Incorpora video`,audio:`Incorpora audio`,file:`Incorpora file`},url_placeholder:`Inserisci URL`}},link_toolbar:{delete:{tooltip:`Rimuovi link`},edit:{text:`Modifica link`,tooltip:`Modifica`},open:{tooltip:`Apri in una nuova scheda`},form:{title_placeholder:`Modifica titolo`,url_placeholder:`Modifica URL`}},comments:{edited:`modificato`,save_button_text:`Salva`,cancel_button_text:`Annulla`,deleted_reference_text:`Contenuto originale eliminato`,discard_pending_comment:`Vuoi davvero eliminare questo commento?`,actions:{add_reaction:`Aggiungi reazione`,resolve:`Risolvi`,reopen:`Riapri`,edit_comment:`Modifica commento`,delete_comment:`Elimina commento`,more_actions:`Altre azioni`},reactions:{reacted_by:`Reagito da`},sidebar:{marked_as_resolved:`Contrassegnato come risolto`,more_replies:e=>`${e} altre risposte`}},suggestion_changes:{formatting_change:`Modifica formattazione`,deleted:`Eliminato`,inserted_by:e=>`Inserito da: ${e}`,deleted_by:e=>`Eliminato da: ${e}`,formatting_change_by:(e,t)=>`Modifica formattazione (${e}) da: ${t}`},exporter:{open_file:`Apri file`,open_video_file:`Apri video`,open_audio_file:`Apri audio`},generic:{ctrl_shortcut:`Ctrl`,form_submit:`OK`}},pt:{slash_menu:{heading:{title:`Título`,subtext:`Usado para um título de nível superior`,aliases:[`h`,`titulo1`,`h1`],group:`Títulos`},heading_2:{title:`Título 2`,subtext:`Usado para seções principais`,aliases:[`h2`,`titulo2`,`subtitulo`],group:`Títulos`},heading_3:{title:`Título 3`,subtext:`Usado para subseções e títulos de grupo`,aliases:[`h3`,`titulo3`,`subtitulo`],group:`Títulos`},heading_4:{title:`Título 4`,subtext:`Usado para subseções menores`,aliases:[`h4`,`titulo4`,`subtitulo4`],group:`Subtítulos`},heading_5:{title:`Título 5`,subtext:`Usado para títulos de subseções pequenas`,aliases:[`h5`,`titulo5`,`subtitulo5`],group:`Subtítulos`},heading_6:{title:`Título 6`,subtext:`Usado para títulos de nível mais baixo`,aliases:[`h6`,`titulo6`,`subtitulo6`],group:`Subtítulos`},toggle_heading:{title:`Título Expansível`,subtext:`Título expansível de nível superior`,aliases:[`h`,`titulo1`,`h1`,`expansível`],group:`Subtítulos`},toggle_heading_2:{title:`Título Expansível 2`,subtext:`Título expansível para seções principais`,aliases:[`h2`,`titulo2`,`subtitulo`,`expansível`],group:`Subtítulos`},toggle_heading_3:{title:`Título Expansível 3`,subtext:`Título expansível para subseções e títulos de grupo`,aliases:[`h3`,`titulo3`,`subtitulo`,`expansível`],group:`Subtítulos`},quote:{title:`Citação`,subtext:`Citação ou trecho`,aliases:[`quotation`,`blockquote`,`bq`],group:`Blocos básicos`},numbered_list:{title:`Lista Numerada`,subtext:`Usado para exibir uma lista numerada`,aliases:[`ol`,`li`,`lista`,`listanumerada`,`lista numerada`],group:`Blocos básicos`},bullet_list:{title:`Lista com Marcadores`,subtext:`Usado para exibir uma lista não ordenada`,aliases:[`ul`,`li`,`lista`,`listamarcadores`,`lista com marcadores`],group:`Blocos básicos`},check_list:{title:`Lista de verificação`,subtext:`Usado para exibir uma lista com caixas de seleção`,aliases:[`ul`,`li`,`lista`,`lista de verificação`,`lista marcada`,`caixa de seleção`],group:`Blocos básicos`},toggle_list:{title:`Lista expansível`,subtext:`Lista com subitens ocultáveis`,aliases:[`li`,`lista`,`lista expansível`,`lista recolhível`],group:`Blocos básicos`},paragraph:{title:`Parágrafo`,subtext:`Usado para o corpo do seu documento`,aliases:[`p`,`paragrafo`],group:`Blocos básicos`},code_block:{title:`Bloco de Código`,subtext:`Usado para exibir código com destaque de sintaxe`,aliases:[`codigo`,`pre`],group:`Blocos básicos`},page_break:{title:`Quebra de página`,subtext:`Separador de página`,aliases:[`page`,`break`,`separator`,`quebra`,`separador`],group:`Blocos básicos`},table:{title:`Tabela`,subtext:`Usado para tabelas`,aliases:[`tabela`],group:`Avançado`},image:{title:`Imagem`,subtext:`Inserir uma imagem`,aliases:[`imagem`,`uploadImagem`,`upload`,`img`,`foto`,`media`,`url`],group:`Mídia`},video:{title:`Vídeo`,subtext:`Inserir um vídeo`,aliases:[`vídeo`,`uploadVídeo`,`upload`,`mp4`,`filme`,`mídia`,`url`],group:`Mídia`},audio:{title:`Áudio`,subtext:`Inserir um áudio`,aliases:[`áudio`,`uploadÁudio`,`upload`,`mp3`,`som`,`mídia`,`url`],group:`Mídia`},file:{title:`Arquivo`,subtext:`Inserir um arquivo`,aliases:[`arquivo`,`upload`,`incorporar`,`mídia`,`url`],group:`Mídia`},emoji:{title:`Emoji`,subtext:`Usado para inserir um emoji`,aliases:[`emoji`,`emoticon`,`expressão emocional`,`rosto`],group:`Outros`},divider:{title:`Separador`,subtext:`Separador de blocos`,aliases:[`separador`,`hr`,`horizontal rule`],group:`Blocos básicos`}},placeholders:{default:`Digite texto ou use '/' para comandos`,heading:`Título`,toggleListItem:`Alternar`,bulletListItem:`Lista`,numberedListItem:`Lista`,checkListItem:`Lista`,new_comment:`Escreva um comentário...`,edit_comment:`Editar comentário...`,comment_reply:`Adicionar comentário...`},file_blocks:{add_button_text:{image:`Adicionar imagem`,video:`Adicionar vídeo`,audio:`Adicionar áudio`,file:`Adicionar arquivo`}},toggle_blocks:{add_block_button:`Toggle vazio. Clique para adicionar um bloco.`},code_block:{add_source_button_text:`Adicionar código-fonte`,ok_button_text:`OK`},side_menu:{add_block_label:`Adicionar bloco`,drag_handle_label:`Abrir menu do bloco`},drag_handle:{delete_menuitem:`Excluir`,colors_menuitem:`Cores`,header_row_menuitem:`Cabeçalho de linha`,header_column_menuitem:`Cabeçalho de coluna`},table_handle:{delete_column_menuitem:`Excluir coluna`,delete_row_menuitem:`Excluir linha`,add_left_menuitem:`Adicionar coluna à esquerda`,add_right_menuitem:`Adicionar coluna à direita`,add_above_menuitem:`Adicionar linha acima`,add_below_menuitem:`Adicionar linha abaixo`,split_cell_menuitem:`Dividir célula`,merge_cells_menuitem:`Juntar células`,background_color_menuitem:`Alterar cor de fundo`},suggestion_menu:{no_items_title:`Nenhum item encontrado`},color_picker:{text_title:`Texto`,background_title:`Fundo`,colors:{default:`Automático`,gray:`Cinza`,brown:`Marrom`,red:`Vermelho`,orange:`Laranja`,yellow:`Amarelo`,green:`Verde`,blue:`Azul`,purple:`Roxo`,pink:`Rosa`}},formatting_toolbar:{bold:{tooltip:`Negrito`,secondary_tooltip:`Mod+B`},italic:{tooltip:`Itálico`,secondary_tooltip:`Mod+I`},underline:{tooltip:`Sublinhado`,secondary_tooltip:`Mod+U`},strike:{tooltip:`Riscado`,secondary_tooltip:`Mod+Shift+X`},code:{tooltip:`Código`,secondary_tooltip:``},colors:{tooltip:`Cores`},link:{tooltip:`Criar link`,secondary_tooltip:`Mod+K`},file_caption:{tooltip:`Editar legenda`,input_placeholder:`Editar legenda`},file_replace:{tooltip:{image:`Substituir imagem`,video:`Substituir vídeo`,audio:`Substituir áudio`,file:`Substituir arquivo`}},file_rename:{tooltip:{image:`Renomear imagem`,video:`Renomear vídeo`,audio:`Renomear áudio`,file:`Renomear arquivo`},input_placeholder:{image:`Renomear imagem`,video:`Renomear vídeo`,audio:`Renomear áudio`,file:`Renomear arquivo`}},file_download:{tooltip:{image:`Baixar imagem`,video:`Baixar vídeo`,audio:`Baixar áudio`,file:`Baixar arquivo`}},file_delete:{tooltip:{image:`Excluir imagem`,video:`Excluir vídeo`,audio:`Excluir áudio`,file:`Excluir arquivo`}},file_preview_toggle:{tooltip:`Alternar visualização`},nest:{tooltip:`Aninhar bloco`,secondary_tooltip:`Tab`},unnest:{tooltip:`Desaninhar bloco`,secondary_tooltip:`Shift+Tab`},align_left:{tooltip:`Alinhar à esquerda`},align_center:{tooltip:`Alinhar ao centro`},align_right:{tooltip:`Alinhar à direita`},align_justify:{tooltip:`Justificar texto`},table_cell_merge:{tooltip:`Juntar células`},comment:{tooltip:`Adicionar comentário`}},file_panel:{upload:{title:`Upload`,file_placeholder:{image:`Upload de imagem`,video:`Upload de vídeo`,audio:`Upload de áudio`,file:`Upload de arquivo`},upload_error:`Erro: Falha no upload`},embed:{title:`Incorporar`,embed_button:{image:`Incorporar imagem`,video:`Incorporar vídeo`,audio:`Incorporar áudio`,file:`Incorporar arquivo`},url_placeholder:`Insira a URL`}},link_toolbar:{delete:{tooltip:`Remover link`},edit:{text:`Editar link`,tooltip:`Editar`},open:{tooltip:`Abrir em nova aba`},form:{title_placeholder:`Editar título`,url_placeholder:`Editar URL`}},comments:{edited:`editado`,save_button_text:`Salvar`,cancel_button_text:`Cancelar`,deleted_reference_text:`Conteúdo original excluído`,discard_pending_comment:`Tem certeza de que deseja descartar este comentário?`,actions:{add_reaction:`Adicionar reação`,resolve:`Resolver`,reopen:`Reabrir`,edit_comment:`Editar comentário`,delete_comment:`Excluir comentário`,more_actions:`Mais ações`},reactions:{reacted_by:`Reagido por`},sidebar:{marked_as_resolved:`Marcado como resolvido`,more_replies:e=>`${e} respostas a mais`}},suggestion_changes:{formatting_change:`Alteração de formatação`,deleted:`Excluído`,inserted_by:e=>`Inserido por: ${e}`,deleted_by:e=>`Excluído por: ${e}`,formatting_change_by:(e,t)=>`Alteração de formatação (${e}) por: ${t}`},exporter:{open_file:`Abrir arquivo`,open_video_file:`Abrir vídeo`,open_audio_file:`Abrir áudio`},generic:{ctrl_shortcut:`Ctrl`,form_submit:`OK`}},ru:{slash_menu:{heading:{title:`Заголовок 1 уровня`,subtext:`Используется для заголовка верхнего уровня`,aliases:[`h`,`heading1`,`h1`,`заголовок1`],group:`Заголовки`},heading_2:{title:`Заголовок 2 уровня`,subtext:`Используется для ключевых разделов`,aliases:[`h2`,`heading2`,`subheading`,`заголовок2`,`подзаголовок`],group:`Заголовки`},heading_3:{title:`Заголовок 3 уровня`,subtext:`Используется для подразделов и групп`,aliases:[`h3`,`heading3`,`subheading`,`заголовок3`,`подзаголовок`],group:`Заголовки`},heading_4:{title:`Заголовок 4 уровня`,subtext:`Используется для более мелких подразделов`,aliases:[`h4`,`heading4`,`subheading4`,`заголовок4`,`подзаголовок4`],group:`Подзаголовки`},heading_5:{title:`Заголовок 5 уровня`,subtext:`Используется для заголовков небольших подразделов`,aliases:[`h5`,`heading5`,`subheading5`,`заголовок5`,`подзаголовок5`],group:`Подзаголовки`},heading_6:{title:`Заголовок 6 уровня`,subtext:`Используется для заголовков самого низкого уровня`,aliases:[`h6`,`heading6`,`subheading6`,`заголовок6`,`подзаголовок6`],group:`Подзаголовки`},toggle_heading:{title:`Сворачиваемый заголовок 1 уровня`,subtext:`Заголовок верхнего уровня, который можно свернуть/развернуть`,aliases:[`h`,`heading1`,`h1`,`заголовок1`,`сворачиваемый`],group:`Подзаголовки`},toggle_heading_2:{title:`Сворачиваемый заголовок 2 уровня`,subtext:`Заголовок для ключевых разделов, который можно свернуть/развернуть`,aliases:[`h2`,`heading2`,`subheading`,`заголовок2`,`подзаголовок`,`сворачиваемый`],group:`Подзаголовки`},toggle_heading_3:{title:`Сворачиваемый заголовок 3 уровня`,subtext:`Заголовок для подразделов и групп, который можно свернуть/развернуть`,aliases:[`h3`,`heading3`,`subheading`,`заголовок3`,`подзаголовок`,`сворачиваемый`],group:`Подзаголовки`},quote:{title:`Цитата`,subtext:`Цитата или отрывок`,aliases:[`quotation`,`blockquote`,`bq`],group:`Базовые блоки`},numbered_list:{title:`Нумерованный список`,subtext:`Используется для отображения нумерованного списка`,aliases:[`ol`,`li`,`list`,`numberedlist`,`numbered list`,`список`,`нумерованный список`],group:`Базовые блоки`},bullet_list:{title:`Маркированный список`,subtext:`Для отображения неупорядоченного списка`,aliases:[`ul`,`li`,`list`,`bulletlist`,`bullet list`,`список`,`маркированный список`],group:`Базовые блоки`},check_list:{title:`Контрольный список`,subtext:`Для отображения списка с флажками`,aliases:[`ul`,`li`,`list`,`checklist`,`check list`,`checked list`,`checkbox`,`список`],group:`Базовые блоки`},toggle_list:{title:`Сворачиваемый список`,subtext:`Список со скрываемыми элементами`,aliases:[`li`,`список`,`сворачиваемый список`],group:`Базовые блоки`},paragraph:{title:`Параграф`,subtext:`Основной текст`,aliases:[`p`,`paragraph`,`параграф`],group:`Базовые блоки`},code_block:{title:`Блок кода`,subtext:`Блок кода с подсветкой синтаксиса`,aliases:[`code`,`pre`,`блок кода`],group:`Базовые блоки`},page_break:{title:`Разрыв страницы`,subtext:`Разделитель страницы`,aliases:[`page`,`break`,`separator`,`разрыв`,`разделитель`],group:`Основные блоки`},table:{title:`Таблица`,subtext:`Используется для таблиц`,aliases:[`table`,`таблица`],group:`Продвинутый`},image:{title:`Картинка`,subtext:`Вставить изображение`,aliases:[`image`,`imageUpload`,`upload`,`img`,`picture`,`media`,`url`,`загрузка`,`картинка`,`рисунок`],group:`Медиа`},video:{title:`Видео`,subtext:`Вставить видео`,aliases:[`video`,`videoUpload`,`upload`,`mp4`,`film`,`media`,`url`,`загрузка`,`видео`],group:`Медиа`},audio:{title:`Аудио`,subtext:`Вставить аудио`,aliases:[`audio`,`audioUpload`,`upload`,`mp3`,`sound`,`media`,`url`,`загрузка`,`аудио`,`звук`,`музыка`],group:`Медиа`},file:{title:`Файл`,subtext:`Вставить файл`,aliases:[`file`,`upload`,`embed`,`media`,`url`,`загрузка`,`файл`],group:`Медиа`},emoji:{title:`Эмодзи`,subtext:`Используется для вставки эмодзи`,aliases:[`эмодзи`,`смайлик`,`выражение эмоций`,`лицо`],group:`Прочее`},divider:{title:`Разделитель`,subtext:`Разделитель блоков`,aliases:[`divider`,`hr`,`horizontal rule`],group:`Базовые блоки`}},placeholders:{default:`Введите текст или введите «/» для команд`,heading:`Заголовок`,toggleListItem:`Переключить`,bulletListItem:`Список`,numberedListItem:`Список`,checkListItem:`Список`,new_comment:`Напишите комментарий...`,edit_comment:`Редактировать комментарий...`,comment_reply:`Добавить комментарий...`},file_blocks:{add_button_text:{image:`Добавить изображение`,video:`Добавить видео`,audio:`Добавить аудио`,file:`Добавить файл`}},toggle_blocks:{add_block_button:`Пустой переключатель. Нажмите, чтобы добавить блок.`},code_block:{add_source_button_text:`Добавить исходный код`,ok_button_text:`ОК`},side_menu:{add_block_label:`Добавить блок`,drag_handle_label:`Открыть меню блока`},drag_handle:{delete_menuitem:`Удалить`,colors_menuitem:`Цвета`,header_row_menuitem:`Заголовок строки`,header_column_menuitem:`Заголовок столбца`},table_handle:{delete_column_menuitem:`Удалить столбец`,delete_row_menuitem:`Удалить строку`,add_left_menuitem:`Добавить столбец слева`,add_right_menuitem:`Добавить столбец справа`,add_above_menuitem:`Добавить строку выше`,add_below_menuitem:`Добавить строку ниже`,split_cell_menuitem:`Разделить ячейку`,merge_cells_menuitem:`Объединить ячейки`,background_color_menuitem:`Цвет фона`},suggestion_menu:{no_items_title:`ничего не найдено`},color_picker:{text_title:`Текст`,background_title:`Задний фон`,colors:{default:`Авто`,gray:`Серый`,brown:`Коричневый`,red:`Красный`,orange:`Оранжевый`,yellow:`Жёлтый`,green:`Зелёный`,blue:`Голубой`,purple:`Фиолетовый`,pink:`Розовый`}},formatting_toolbar:{bold:{tooltip:`Жирный`,secondary_tooltip:`Mod+B`},italic:{tooltip:`Курсив`,secondary_tooltip:`Mod+I`},underline:{tooltip:`Подчёркнутый`,secondary_tooltip:`Mod+U`},strike:{tooltip:`Зачёркнутый`,secondary_tooltip:`Mod+Shift+X`},code:{tooltip:`Код`,secondary_tooltip:``},colors:{tooltip:`Цвета`},link:{tooltip:`Создать ссылку`,secondary_tooltip:`Mod+K`},file_caption:{tooltip:`Изменить подпись`,input_placeholder:`Изменить подпись`},file_replace:{tooltip:{image:`Заменить изображение`,video:`Заменить видео`,audio:`Заменить аудио`,file:`Заменить файл`}},file_rename:{tooltip:{image:`Переименовать изображение`,video:`Переименовать видео`,audio:`Переименовать аудио`,file:`Переименовать файл`},input_placeholder:{image:`Переименовать изображение`,video:`Переименовать видео`,audio:`Переименовать аудио`,file:`Переименовать файл`}},file_download:{tooltip:{image:`Скачать картинку`,video:`Скачать видео`,audio:`Скачать аудио`,file:`Скачать файл`}},file_delete:{tooltip:{image:`Удалить картинку`,video:`Удалить видео`,audio:`Удалить аудио`,file:`Удалить файл`}},file_preview_toggle:{tooltip:`Переключить предварительный просмотр`},nest:{tooltip:`Сдвинуть вправо`,secondary_tooltip:`Tab`},unnest:{tooltip:`Сдвинуть влево`,secondary_tooltip:`Shift+Tab`},align_left:{tooltip:`Текст по левому краю`},align_center:{tooltip:`Текст по середине`},align_right:{tooltip:`Текст по правому краю`},align_justify:{tooltip:`По середине текст`},table_cell_merge:{tooltip:`Объединить ячейки`},comment:{tooltip:`Добавить комментарий`}},file_panel:{upload:{title:`Загрузить`,file_placeholder:{image:`Загрузить картинки`,video:`Загрузить видео`,audio:`Загрузить аудио`,file:`Загрузить файл`},upload_error:`Ошибка: не удалось загрузить`},embed:{title:`Вставить`,embed_button:{image:`Вставить картинку`,video:`Вставить видео`,audio:`Вставить аудио`,file:`Вставить файл`},url_placeholder:`Введите URL`}},link_toolbar:{delete:{tooltip:`Удалить ссылку`},edit:{text:`Изменить ссылку`,tooltip:`Редактировать`},open:{tooltip:`Открыть в новой вкладке`},form:{title_placeholder:`Изменить заголовок`,url_placeholder:`Изменить URL`}},comments:{edited:`изменен`,save_button_text:`Сохранить`,cancel_button_text:`Отменить`,deleted_reference_text:`Исходный контент удалён`,discard_pending_comment:`Вы уверены, что хотите отменить этот комментарий?`,actions:{add_reaction:`Добавить реакцию`,resolve:`Решить`,reopen:`Возобновить`,edit_comment:`Редактировать комментарий`,delete_comment:`Удалить комментарий`,more_actions:`Другие действия`},reactions:{reacted_by:`Отреагировал(а)`},sidebar:{marked_as_resolved:`Отмечено как решенное`,more_replies:e=>`${e} дополнительных ответов`}},suggestion_changes:{formatting_change:`Изменение форматирования`,deleted:`Удалено`,inserted_by:e=>`Вставлено: ${e}`,deleted_by:e=>`Удалено: ${e}`,formatting_change_by:(e,t)=>`Изменение форматирования (${e}): ${t}`},exporter:{open_file:`Открыть файл`,open_video_file:`Открыть видео`,open_audio_file:`Открыть аудио`},generic:{ctrl_shortcut:`Ctrl`,form_submit:`ОК`}},tr:{slash_menu:{heading:{title:`Başlık 1`,subtext:`En üst düzey başlık`,aliases:[`h`,`heading1`,`h1`,`başlık`,`başlık1`],group:`Başlıklar`},heading_2:{title:`Başlık 2`,subtext:`Ana bölüm başlığı`,aliases:[`h2`,`heading2`,`subheading`,`başlık2`,`altbaşlık`],group:`Başlıklar`},heading_3:{title:`Başlık 3`,subtext:`Alt bölüm ve grup başlığı`,aliases:[`h3`,`heading3`,`subheading`,`başlık3`,`altbaşlık`],group:`Başlıklar`},heading_4:{title:`Başlık 4`,subtext:`Küçük alt bölüm başlığı`,aliases:[`h4`,`heading4`,`subheading4`,`başlık4`,`altbaşlık4`],group:`Alt başlıklar`},heading_5:{title:`Başlık 5`,subtext:`Küçük alt bölüm başlığı`,aliases:[`h5`,`heading5`,`subheading5`,`başlık5`,`altbaşlık5`],group:`Alt başlıklar`},heading_6:{title:`Başlık 6`,subtext:`En alt düzey başlık`,aliases:[`h6`,`heading6`,`subheading6`,`başlık6`,`altbaşlık6`],group:`Alt başlıklar`},toggle_heading:{title:`Açılır başlık 1`,subtext:`Açılıp kapanabilen en üst düzey başlık`,aliases:[`h`,`heading1`,`h1`,`collapsable`,`başlık1`,`açılır`,`daraltılabilir`],group:`Alt başlıklar`},toggle_heading_2:{title:`Açılır başlık 2`,subtext:`Açılıp kapanabilen ana bölüm başlığı`,aliases:[`h2`,`heading2`,`subheading`,`collapsable`,`başlık2`,`açılır`,`daraltılabilir`],group:`Alt başlıklar`},toggle_heading_3:{title:`Açılır başlık 3`,subtext:`Açılıp kapanabilen alt bölüm ve grup başlığı`,aliases:[`h3`,`heading3`,`subheading`,`collapsable`,`başlık3`,`açılır`,`daraltılabilir`],group:`Alt başlıklar`},quote:{title:`Alıntı`,subtext:`Alıntı veya bölüm`,aliases:[`quotation`,`blockquote`,`bq`,`alıntı`,`aktarma`],group:`Temel bloklar`},toggle_list:{title:`Açılır liste`,subtext:`Alt öğeleri gizlenebilen liste`,aliases:[`li`,`list`,`toggleList`,`toggle list`,`collapsable list`,`liste`,`açılır liste`,`daraltılabilir liste`],group:`Temel bloklar`},numbered_list:{title:`Numaralı liste`,subtext:`Sıralı öğelerden oluşan liste`,aliases:[`ol`,`li`,`list`,`numberedlist`,`numbered list`,`liste`,`numaralı liste`,`sıralı liste`],group:`Temel bloklar`},bullet_list:{title:`Madde işaretli liste`,subtext:`Sırasız öğelerden oluşan liste`,aliases:[`ul`,`li`,`list`,`bulletlist`,`bullet list`,`liste`,`madde işaretli liste`,`madde`],group:`Temel bloklar`},check_list:{title:`Yapılacaklar listesi`,subtext:`Onay kutulu liste`,aliases:[`ul`,`li`,`list`,`checklist`,`check list`,`checked list`,`checkbox`,`liste`,`yapılacaklar`,`onay kutusu`,`kontrol listesi`],group:`Temel bloklar`},paragraph:{title:`Paragraf`,subtext:`Belgenizin gövdesi`,aliases:[`p`,`paragraph`,`paragraf`,`metin`],group:`Temel bloklar`},code_block:{title:`Kod bloğu`,subtext:`Söz dizimi vurgulamalı kod bloğu`,aliases:[`code`,`pre`,`kod`,`kod bloğu`],group:`Temel bloklar`},page_break:{title:`Sayfa sonu`,subtext:`Sayfa ayırıcı`,aliases:[`page`,`break`,`separator`,`sayfa`,`sayfa sonu`,`ayırıcı`],group:`Temel bloklar`},table:{title:`Tablo`,subtext:`Hücreleri düzenlenebilen tablo`,aliases:[`table`,`tablo`],group:`Gelişmiş`},image:{title:`Görsel`,subtext:`Açıklamalı, yeniden boyutlandırılabilir görsel`,aliases:[`image`,`imageUpload`,`upload`,`img`,`picture`,`media`,`url`,`görsel`,`resim`,`fotoğraf`,`yükle`,`medya`],group:`Medya`},video:{title:`Video`,subtext:`Açıklamalı, yeniden boyutlandırılabilir video`,aliases:[`video`,`videoUpload`,`upload`,`mp4`,`film`,`media`,`url`,`yükle`,`medya`],group:`Medya`},audio:{title:`Ses`,subtext:`Açıklamalı gömülü ses`,aliases:[`audio`,`audioUpload`,`upload`,`mp3`,`sound`,`media`,`url`,`ses`,`yükle`,`medya`],group:`Medya`},file:{title:`Dosya`,subtext:`Gömülü dosya`,aliases:[`file`,`upload`,`embed`,`media`,`url`,`dosya`,`yükle`,`göm`,`medya`],group:`Medya`},emoji:{title:`Emoji`,subtext:`Emoji arayın ve ekleyin`,aliases:[`emoji`,`emote`,`emotion`,`face`,`ifade`,`duygu`,`surat`],group:`Diğer`},divider:{title:`Ayırıcı`,subtext:`Blokları görsel olarak ayırın`,aliases:[`divider`,`hr`,`line`,`horizontal rule`,`ayırıcı`,`çizgi`,`yatay çizgi`],group:`Temel bloklar`}},placeholders:{default:`Metin girin ya da komutlar için '/' yazın`,heading:`Başlık`,toggleListItem:`Açılır öğe`,bulletListItem:`Liste`,numberedListItem:`Liste`,checkListItem:`Liste`,emptyDocument:void 0,new_comment:`Yorum yazın...`,edit_comment:`Yorumu düzenleyin...`,comment_reply:`Yorum ekleyin...`},file_blocks:{add_button_text:{image:`Görsel ekle`,video:`Video ekle`,audio:`Ses ekle`,file:`Dosya ekle`}},toggle_blocks:{add_block_button:`Açılır öğe boş. Blok eklemek için tıklayın.`},code_block:{add_source_button_text:`Kaynak kod ekle`,ok_button_text:`Tamam`},side_menu:{add_block_label:`Blok ekle`,drag_handle_label:`Blok menüsünü aç`},drag_handle:{delete_menuitem:`Sil`,colors_menuitem:`Renkler`,header_row_menuitem:`Başlık satırı`,header_column_menuitem:`Başlık sütunu`},table_handle:{delete_column_menuitem:`Sütunu sil`,delete_row_menuitem:`Satırı sil`,add_left_menuitem:`Sola sütun ekle`,add_right_menuitem:`Sağa sütun ekle`,add_above_menuitem:`Üste satır ekle`,add_below_menuitem:`Alta satır ekle`,split_cell_menuitem:`Hücreyi böl`,merge_cells_menuitem:`Hücreleri birleştir`,background_color_menuitem:`Arka plan rengi`},suggestion_menu:{no_items_title:`Öğe bulunamadı`},color_picker:{text_title:`Metin`,background_title:`Arka plan`,colors:{default:`Otomatik`,gray:`Gri`,brown:`Kahverengi`,red:`Kırmızı`,orange:`Turuncu`,yellow:`Sarı`,green:`Yeşil`,blue:`Mavi`,purple:`Mor`,pink:`Pembe`}},formatting_toolbar:{bold:{tooltip:`Kalın`,secondary_tooltip:`Mod+B`},italic:{tooltip:`İtalik`,secondary_tooltip:`Mod+I`},underline:{tooltip:`Altı çizili`,secondary_tooltip:`Mod+U`},strike:{tooltip:`Üstü çizili`,secondary_tooltip:`Mod+Shift+S`},code:{tooltip:`Kod`,secondary_tooltip:``},colors:{tooltip:`Renkler`},link:{tooltip:`Bağlantı oluştur`,secondary_tooltip:`Mod+K`},file_caption:{tooltip:`Açıklamayı düzenle`,input_placeholder:`Açıklamayı düzenle`},file_replace:{tooltip:{image:`Görseli değiştir`,video:`Videoyu değiştir`,audio:`Sesi değiştir`,file:`Dosyayı değiştir`}},file_rename:{tooltip:{image:`Görseli yeniden adlandır`,video:`Videoyu yeniden adlandır`,audio:`Sesi yeniden adlandır`,file:`Dosyayı yeniden adlandır`},input_placeholder:{image:`Görseli yeniden adlandır`,video:`Videoyu yeniden adlandır`,audio:`Sesi yeniden adlandır`,file:`Dosyayı yeniden adlandır`}},file_download:{tooltip:{image:`Görseli indir`,video:`Videoyu indir`,audio:`Sesi indir`,file:`Dosyayı indir`}},file_delete:{tooltip:{image:`Görseli sil`,video:`Videoyu sil`,audio:`Sesi sil`,file:`Dosyayı sil`}},file_preview_toggle:{tooltip:`Önizlemeyi aç/kapat`},nest:{tooltip:`Bloğu içeri al`,secondary_tooltip:`Tab`},unnest:{tooltip:`Bloğu dışarı al`,secondary_tooltip:`Shift+Tab`},align_left:{tooltip:`Metni sola hizala`},align_center:{tooltip:`Metni ortala`},align_right:{tooltip:`Metni sağa hizala`},align_justify:{tooltip:`Metni iki yana yasla`},table_cell_merge:{tooltip:`Hücreleri birleştir`},comment:{tooltip:`Yorum ekle`}},file_panel:{upload:{title:`Yükle`,file_placeholder:{image:`Görsel yükle`,video:`Video yükle`,audio:`Ses yükle`,file:`Dosya yükle`},upload_error:`Hata: Yükleme başarısız oldu`},embed:{title:`Göm`,embed_button:{image:`Görseli göm`,video:`Videoyu göm`,audio:`Sesi göm`,file:`Dosyayı göm`},url_placeholder:`URL girin`}},link_toolbar:{delete:{tooltip:`Bağlantıyı kaldır`},edit:{text:`Bağlantıyı düzenle`,tooltip:`Düzenle`},open:{tooltip:`Yeni sekmede aç`},form:{title_placeholder:`Başlığı düzenle`,url_placeholder:`URL'yi düzenle`}},comments:{edited:`düzenlendi`,save_button_text:`Kaydet`,cancel_button_text:`Vazgeç`,deleted_reference_text:`Özgün içerik silindi`,discard_pending_comment:`Bu yorumu atmak istediğinizden emin misiniz?`,actions:{add_reaction:`Tepki ekle`,resolve:`Çözüldü`,reopen:`Yeniden aç`,edit_comment:`Yorumu düzenle`,delete_comment:`Yorumu sil`,more_actions:`Diğer işlemler`},reactions:{reacted_by:`Tepki verenler`},sidebar:{marked_as_resolved:`Çözüldü olarak işaretlendi`,more_replies:e=>`${String(e)} yanıt daha`}},suggestion_changes:{formatting_change:`Biçim değişikliği`,deleted:`Silindi`,inserted_by:e=>`Ekleyen: ${e}`,deleted_by:e=>`Silen: ${e}`,formatting_change_by:(e,t)=>`Biçim değişikliği (${e}), yapan: ${t}`},exporter:{open_file:`Dosyayı aç`,open_video_file:`Videoyu aç`,open_audio_file:`Sesi aç`},generic:{ctrl_shortcut:`Ctrl`,form_submit:`Tamam`}},vi:{slash_menu:{heading:{title:`Tiêu đề H1`,subtext:`Sử dụng cho tiêu đề cấp cao nhất`,aliases:[`h`,`tieude1`,`dd1`],group:`Tiêu đề`},heading_2:{title:`Tiêu đề H2`,subtext:`Sử dụng cho các phần chính`,aliases:[`h2`,`tieude2`,`tieudephu`],group:`Tiêu đề`},heading_3:{title:`Tiêu đề H3`,subtext:`Sử dụng cho phụ đề và tiêu đề nhóm`,aliases:[`h3`,`tieude3`,`tieudephu`],group:`Tiêu đề`},heading_4:{title:`Tiêu đề H4`,subtext:`Sử dụng cho tiêu đề phụ nhỏ hơn`,aliases:[`h4`,`tieude4`,`tieudephu4`],group:`Tiêu đề phụ`},heading_5:{title:`Tiêu đề H5`,subtext:`Sử dụng cho tiêu đề phụ nhỏ hơn`,aliases:[`h5`,`tieude5`,`tieudephu5`],group:`Tiêu đề phụ`},heading_6:{title:`Tiêu đề H6`,subtext:`Sử dụng cho tiêu đề cấp thấp nhất`,aliases:[`h6`,`tieude6`,`tieudephu6`],group:`Tiêu đề phụ`},toggle_heading:{title:`Tiêu đề có thể thu gọn H1`,subtext:`Tiêu đề cấp cao nhất có thể thu gọn`,aliases:[`h`,`tieude1`,`dd1`,`thugon`],group:`Tiêu đề phụ`},toggle_heading_2:{title:`Tiêu đề có thể thu gọn H2`,subtext:`Tiêu đề cho các phần chính có thể thu gọn`,aliases:[`h2`,`tieude2`,`tieudephu`,`thugon`],group:`Tiêu đề phụ`},toggle_heading_3:{title:`Tiêu đề có thể thu gọn H3`,subtext:`Tiêu đề cho phụ đề và tiêu đề nhóm có thể thu gọn`,aliases:[`h3`,`tieude3`,`tieudephu`,`thugon`],group:`Tiêu đề phụ`},quote:{title:`Trích dẫn`,subtext:`Trích dẫn hoặc đoạn trích`,aliases:[`quotation`,`blockquote`,`bq`],group:`Khối cơ bản`},numbered_list:{title:`Danh sách đánh số`,subtext:`Sử dụng để hiển thị danh sách có đánh số`,aliases:[`ol`,`li`,`ds`,`danhsachdso`,`danh sach danh so`],group:`Khối cơ bản`},bullet_list:{title:`Danh sách`,subtext:`Sử dụng để hiển thị danh sách không đánh số`,aliases:[`ul`,`li`,`ds`,`danhsach`,`danh sach`],group:`Khối cơ bản`},check_list:{title:`Danh sách kiểm tra`,subtext:`Dùng để hiển thị danh sách có hộp kiểm`,aliases:[`ul`,`li`,`danh sach`,`danh sach kiem tra`,`danh sach da kiem tra`,`hop kiem`],group:`Khối cơ bản`},toggle_list:{title:`Danh sách có thể thu gọn`,subtext:`Danh sách với các mục con có thể ẩn`,aliases:[`li`,`danh sach`,`danh sach thu gon`,`danh sach co the an`],group:`Khối cơ bản`},paragraph:{title:`Đoạn văn`,subtext:`Sử dụng cho nội dung chính của tài liệu`,aliases:[`p`,`doanvan`],group:`Khối cơ bản`},code_block:{title:`Mã`,subtext:`Sử dụng để hiển thị mã với cú pháp`,aliases:[`code`,`pre`],group:`Khối cơ bản`},page_break:{title:`Ngắt trang`,subtext:`Phân cách trang`,aliases:[`page`,`break`,`separator`,`ngắt`,`phân cách`],group:`Khối cơ bản`},table:{title:`Bảng`,subtext:`Sử dụng để tạo bảng`,aliases:[`bang`],group:`Nâng cao`},image:{title:`Hình ảnh`,subtext:`Chèn hình ảnh`,aliases:[`anh`,`tai-len-anh`,`tai-len`,`img`,`hinh`,`media`,`url`],group:`Phương tiện`},video:{title:`Video`,subtext:`Chèn video`,aliases:[`video`,`tai-len-video`,`tai-len`,`mp4`,`phim`,`media`,`url`],group:`Phương tiện`},audio:{title:`Âm thanh`,subtext:`Chèn âm thanh`,aliases:[`âm thanh`,`tai-len-am-thanh`,`tai-len`,`mp3`,`am thanh`,`media`,`url`],group:`Phương tiện`},file:{title:`Tệp`,subtext:`Chèn tệp`,aliases:[`tep`,`tai-len`,`nhung`,`media`,`url`],group:`Phương tiện`},emoji:{title:`Biểu tượng cảm xúc`,subtext:`Dùng để chèn biểu tượng cảm xúc`,aliases:[`biểu tượng cảm xúc`,`emoji`,`emoticon`,`cảm xúc expression`,`khuôn mặt`,`face`],group:`Khác`},divider:{title:`Phân cách`,subtext:`Phân cách khối`,aliases:[`divider`,`hr`,`horizontal rule`],group:`Khối cơ bản`}},placeholders:{default:`Nhập văn bản hoặc gõ '/' để thêm định dạng`,heading:`Tiêu đề`,toggleListItem:`Chuyển đổi`,bulletListItem:`Danh sách`,numberedListItem:`Danh sách`,checkListItem:`Danh sách`,new_comment:`Viết bình luận...`,edit_comment:`Chỉnh sửa bình luận...`,comment_reply:`Thêm bình luận...`},file_blocks:{add_button_text:{image:`Thêm ảnh`,video:`Thêm video`,audio:`Thêm âm thanh`,file:`Thêm tệp`}},toggle_blocks:{add_block_button:`Toggle trống. Nhấp để thêm khối.`},code_block:{add_source_button_text:`Thêm mã nguồn`,ok_button_text:`OK`},side_menu:{add_block_label:`Thêm khối`,drag_handle_label:`Mở trình đơn khối`},drag_handle:{delete_menuitem:`Xóa`,colors_menuitem:`Màu sắc`,header_row_menuitem:`Tiêu đề hàng`,header_column_menuitem:`Tiêu đề cột`},table_handle:{delete_column_menuitem:`Xóa cột`,delete_row_menuitem:`Xóa hàng`,add_left_menuitem:`Thêm cột bên trái`,add_right_menuitem:`Thêm cột bên phải`,add_above_menuitem:`Thêm hàng phía trên`,add_below_menuitem:`Thêm hàng phía dưới`,split_cell_menuitem:`Chia ô`,merge_cells_menuitem:`Gộp ô`,background_color_menuitem:`Màu nền`},suggestion_menu:{no_items_title:`Không tìm thấy mục nào`},color_picker:{text_title:`Văn bản`,background_title:`Nền`,colors:{default:`Tự động`,gray:`Xám`,brown:`Nâu`,red:`Đỏ`,orange:`Cam`,yellow:`Vàng`,green:`Xanh lá`,blue:`Xanh dương`,purple:`Tím`,pink:`Hồng`}},formatting_toolbar:{bold:{tooltip:`In đậm`,secondary_tooltip:`Mod+B`},italic:{tooltip:`In nghiêng`,secondary_tooltip:`Mod+I`},underline:{tooltip:`Gạch dưới`,secondary_tooltip:`Mod+U`},strike:{tooltip:`Gạch ngang`,secondary_tooltip:`Mod+Shift+X`},code:{tooltip:`Code`,secondary_tooltip:``},colors:{tooltip:`Màu sắc`},link:{tooltip:`Tạo liên kết`,secondary_tooltip:`Mod+K`},file_caption:{tooltip:`Chỉnh sửa chú thích`,input_placeholder:`Chỉnh sửa chú thích`},file_replace:{tooltip:{image:`Thay thế hình ảnh`,video:`Thay thế video`,audio:`Thay thế âm thanh`,file:`Thay thế tệp`}},file_rename:{tooltip:{image:`Đổi tên hình ảnh`,video:`Đổi tên video`,audio:`Đổi tên âm thanh`,file:`Đổi tên tệp`},input_placeholder:{image:`Đổi tên hình ảnh`,video:`Đổi tên video`,audio:`Đổi tên âm thanh`,file:`Đổi tên tệp`}},file_download:{tooltip:{image:`Tải xuống hình ảnh`,video:`Tải xuống video`,audio:`Tải xuống âm thanh`,file:`Tải xuống tệp`}},file_delete:{tooltip:{image:`Xóa hình ảnh`,video:`Xóa video`,audio:`Xóa âm thanh`,file:`Xóa tệp`}},file_preview_toggle:{tooltip:`Chuyển đổi xem trước`},nest:{tooltip:`Lồng khối`,secondary_tooltip:`Tab`},unnest:{tooltip:`Bỏ lồng khối`,secondary_tooltip:`Shift+Tab`},align_left:{tooltip:`Căn trái văn bản`},align_center:{tooltip:`Căn giữa văn bản`},align_right:{tooltip:`Căn phải văn bản`},align_justify:{tooltip:`Căn đều văn bản`},table_cell_merge:{tooltip:`Gộp các ô`},comment:{tooltip:`Thêm bình luận`}},file_panel:{upload:{title:`Tải lên`,file_placeholder:{image:`Tải lên hình ảnh`,video:`Tải lên video`,audio:`Tải lên âm thanh`,file:`Tải lên tệp`},upload_error:`Lỗi: Tải lên thất bại`},embed:{title:`Nhúng`,embed_button:{image:`Nhúng hình ảnh`,video:`Nhúng video`,audio:`Nhúng âm thanh`,file:`Nhúng tệp`},url_placeholder:`Nhập URL`}},link_toolbar:{delete:{tooltip:`Xóa liên kết`},edit:{text:`Chỉnh sửa liên kết`,tooltip:`Chỉnh sửa`},open:{tooltip:`Mở trong tab mới`},form:{title_placeholder:`Chỉnh sửa tiêu đề`,url_placeholder:`Chỉnh sửa URL`}},comments:{edited:`đã chỉnh sửa`,save_button_text:`Lưu`,cancel_button_text:`Hủy`,deleted_reference_text:`Nội dung gốc đã bị xóa`,discard_pending_comment:`Bạn có chắc chắn muốn hủy bình luận này không?`,actions:{add_reaction:`Thêm phản ứng`,resolve:`Giải quyết`,reopen:`Mở lại`,edit_comment:`Chỉnh sửa bình luận`,delete_comment:`Xóa bình luận`,more_actions:`Thêm hành động`},reactions:{reacted_by:`Phản ứng bởi`},sidebar:{marked_as_resolved:`Đã đánh dấu là đã giải quyết`,more_replies:e=>`${e} câu trả lời nữa`}},suggestion_changes:{formatting_change:`Thay đổi định dạng`,deleted:`Đã xóa`,inserted_by:e=>`Được chèn bởi: ${e}`,deleted_by:e=>`Được xóa bởi: ${e}`,formatting_change_by:(e,t)=>`Thay đổi định dạng (${e}) bởi: ${t}`},exporter:{open_file:`Mở tệp`,open_video_file:`Mở video`,open_audio_file:`Mở âm thanh`},generic:{ctrl_shortcut:`Ctrl`,form_submit:`OK`}},th:{slash_menu:{heading:{title:`หัวเรื่อง 1`,subtext:`หัวเรื่องระดับบนสุด`,aliases:[`h`,`heading1`,`h1`,`หัวเรื่อง`,`หัวเรื่อง1`],group:`หัวเรื่อง`},heading_2:{title:`หัวเรื่อง 2`,subtext:`หัวเรื่องของส่วนหลัก`,aliases:[`h2`,`heading2`,`subheading`,`หัวเรื่อง2`,`หัวเรื่องย่อย`],group:`หัวเรื่อง`},heading_3:{title:`หัวเรื่อง 3`,subtext:`หัวเรื่องของส่วนย่อยและกลุ่ม`,aliases:[`h3`,`heading3`,`subheading`,`หัวเรื่อง3`,`หัวเรื่องย่อย`],group:`หัวเรื่อง`},heading_4:{title:`หัวเรื่อง 4`,subtext:`หัวเรื่องของส่วนย่อยรอง`,aliases:[`h4`,`heading4`,`subheading4`,`หัวเรื่อง4`],group:`หัวเรื่องย่อย`},heading_5:{title:`หัวเรื่อง 5`,subtext:`หัวเรื่องของส่วนย่อยขนาดเล็ก`,aliases:[`h5`,`heading5`,`subheading5`,`หัวเรื่อง5`],group:`หัวเรื่องย่อย`},heading_6:{title:`หัวเรื่อง 6`,subtext:`หัวเรื่องระดับต่ำสุด`,aliases:[`h6`,`heading6`,`subheading6`,`หัวเรื่อง6`],group:`หัวเรื่องย่อย`},toggle_heading:{title:`หัวเรื่องพับได้ 1`,subtext:`หัวเรื่องระดับบนสุดที่พับได้`,aliases:[`h`,`heading1`,`h1`,`collapsable`,`พับได้`,`ยุบได้`],group:`หัวเรื่องย่อย`},toggle_heading_2:{title:`หัวเรื่องพับได้ 2`,subtext:`หัวเรื่องของส่วนหลักที่พับได้`,aliases:[`h2`,`heading2`,`subheading`,`collapsable`,`พับได้`,`ยุบได้`],group:`หัวเรื่องย่อย`},toggle_heading_3:{title:`หัวเรื่องพับได้ 3`,subtext:`หัวเรื่องของส่วนย่อยและกลุ่มที่พับได้`,aliases:[`h3`,`heading3`,`subheading`,`collapsable`,`พับได้`,`ยุบได้`],group:`หัวเรื่องย่อย`},quote:{title:`คำพูดอ้างอิง`,subtext:`คำพูดหรือข้อความที่ยกมา`,aliases:[`quotation`,`blockquote`,`bq`,`อ้างอิง`,`คำพูด`],group:`บล็อกพื้นฐาน`},toggle_list:{title:`รายการพับได้`,subtext:`รายการที่ซ่อนรายการย่อยได้`,aliases:[`li`,`list`,`toggleList`,`toggle list`,`collapsable list`,`รายการ`,`พับได้`],group:`บล็อกพื้นฐาน`},numbered_list:{title:`รายการลำดับเลข`,subtext:`รายการที่มีลำดับ`,aliases:[`ol`,`li`,`list`,`numberedlist`,`numbered list`,`รายการ`,`ลำดับเลข`],group:`บล็อกพื้นฐาน`},bullet_list:{title:`รายการหัวข้อย่อย`,subtext:`รายการที่ไม่มีลำดับ`,aliases:[`ul`,`li`,`list`,`bulletlist`,`bullet list`,`รายการ`,`หัวข้อย่อย`],group:`บล็อกพื้นฐาน`},check_list:{title:`รายการตรวจสอบ`,subtext:`รายการที่มีกล่องกาเครื่องหมาย`,aliases:[`ul`,`li`,`list`,`checklist`,`check list`,`checked list`,`checkbox`,`รายการ`,`เช็กลิสต์`,`สิ่งที่ต้องทำ`],group:`บล็อกพื้นฐาน`},paragraph:{title:`ย่อหน้า`,subtext:`เนื้อหาหลักของเอกสาร`,aliases:[`p`,`paragraph`,`ย่อหน้า`,`ข้อความ`],group:`บล็อกพื้นฐาน`},code_block:{title:`บล็อกโค้ด`,subtext:`บล็อกโค้ดพร้อมไฮไลต์ไวยากรณ์`,aliases:[`code`,`pre`,`โค้ด`],group:`บล็อกพื้นฐาน`},page_break:{title:`ตัวแบ่งหน้า`,subtext:`ตัวคั่นหน้า`,aliases:[`page`,`break`,`separator`,`แบ่งหน้า`,`ตัวคั่น`],group:`บล็อกพื้นฐาน`},table:{title:`ตาราง`,subtext:`ตารางที่แก้ไขเซลล์ได้`,aliases:[`table`,`ตาราง`],group:`ขั้นสูง`},image:{title:`รูปภาพ`,subtext:`รูปภาพที่ปรับขนาดได้พร้อมคำอธิบายภาพ`,aliases:[`image`,`imageUpload`,`upload`,`img`,`picture`,`media`,`url`,`รูปภาพ`,`ภาพ`,`อัปโหลด`],group:`สื่อ`},video:{title:`วิดีโอ`,subtext:`วิดีโอที่ปรับขนาดได้พร้อมคำอธิบาย`,aliases:[`video`,`videoUpload`,`upload`,`mp4`,`film`,`media`,`url`,`วิดีโอ`,`อัปโหลด`],group:`สื่อ`},audio:{title:`เสียง`,subtext:`เสียงที่ฝังไว้พร้อมคำอธิบาย`,aliases:[`audio`,`audioUpload`,`upload`,`mp3`,`sound`,`media`,`url`,`เสียง`,`อัปโหลด`],group:`สื่อ`},file:{title:`ไฟล์`,subtext:`ไฟล์ที่ฝังไว้`,aliases:[`file`,`upload`,`embed`,`media`,`url`,`ไฟล์`,`อัปโหลด`],group:`สื่อ`},emoji:{title:`อีโมจิ`,subtext:`ค้นหาและแทรกอีโมจิ`,aliases:[`emoji`,`emote`,`emotion`,`face`,`อีโมจิ`,`อิโมจิ`],group:`อื่นๆ`},divider:{title:`เส้นคั่น`,subtext:`คั่นบล็อกให้เห็นชัดเจน`,aliases:[`divider`,`hr`,`line`,`horizontal rule`,`เส้นคั่น`,`เส้น`],group:`บล็อกพื้นฐาน`}},placeholders:{default:`ป้อนข้อความหรือพิมพ์ '/' เพื่อดูคำสั่ง`,heading:`หัวเรื่อง`,toggleListItem:`พับได้`,bulletListItem:`รายการ`,numberedListItem:`รายการ`,checkListItem:`รายการ`,emptyDocument:void 0,new_comment:`เขียนความคิดเห็น...`,edit_comment:`แก้ไขความคิดเห็น...`,comment_reply:`เพิ่มความคิดเห็น...`},file_blocks:{add_button_text:{image:`เพิ่มรูปภาพ`,video:`เพิ่มวิดีโอ`,audio:`เพิ่มเสียง`,file:`เพิ่มไฟล์`}},toggle_blocks:{add_block_button:`รายการพับได้ว่างเปล่า คลิกเพื่อเพิ่มบล็อก`},code_block:{add_source_button_text:`เพิ่มซอร์สโค้ด`,ok_button_text:`ตกลง`},side_menu:{add_block_label:`เพิ่มบล็อก`,drag_handle_label:`เปิดเมนูบล็อก`},drag_handle:{delete_menuitem:`ลบ`,colors_menuitem:`สี`,header_row_menuitem:`แถวส่วนหัว`,header_column_menuitem:`คอลัมน์ส่วนหัว`},table_handle:{delete_column_menuitem:`ลบคอลัมน์`,delete_row_menuitem:`ลบแถว`,add_left_menuitem:`เพิ่มคอลัมน์ทางซ้าย`,add_right_menuitem:`เพิ่มคอลัมน์ทางขวา`,add_above_menuitem:`เพิ่มแถวด้านบน`,add_below_menuitem:`เพิ่มแถวด้านล่าง`,split_cell_menuitem:`แยกเซลล์`,merge_cells_menuitem:`ผสานเซลล์`,background_color_menuitem:`สีพื้นหลัง`},suggestion_menu:{no_items_title:`ไม่พบรายการ`},color_picker:{text_title:`ข้อความ`,background_title:`พื้นหลัง`,colors:{default:`อัตโนมัติ`,gray:`เทา`,brown:`น้ำตาล`,red:`แดง`,orange:`ส้ม`,yellow:`เหลือง`,green:`เขียว`,blue:`น้ำเงิน`,purple:`ม่วง`,pink:`ชมพู`}},formatting_toolbar:{bold:{tooltip:`ตัวหนา`,secondary_tooltip:`Mod+B`},italic:{tooltip:`ตัวเอียง`,secondary_tooltip:`Mod+I`},underline:{tooltip:`ขีดเส้นใต้`,secondary_tooltip:`Mod+U`},strike:{tooltip:`ขีดทับ`,secondary_tooltip:`Mod+Shift+S`},code:{tooltip:`โค้ด`,secondary_tooltip:``},colors:{tooltip:`สี`},link:{tooltip:`สร้างลิงก์`,secondary_tooltip:`Mod+K`},file_caption:{tooltip:`แก้ไขคำอธิบาย`,input_placeholder:`แก้ไขคำอธิบาย`},file_replace:{tooltip:{image:`แทนที่รูปภาพ`,video:`แทนที่วิดีโอ`,audio:`แทนที่เสียง`,file:`แทนที่ไฟล์`}},file_rename:{tooltip:{image:`เปลี่ยนชื่อรูปภาพ`,video:`เปลี่ยนชื่อวิดีโอ`,audio:`เปลี่ยนชื่อเสียง`,file:`เปลี่ยนชื่อไฟล์`},input_placeholder:{image:`เปลี่ยนชื่อรูปภาพ`,video:`เปลี่ยนชื่อวิดีโอ`,audio:`เปลี่ยนชื่อเสียง`,file:`เปลี่ยนชื่อไฟล์`}},file_download:{tooltip:{image:`ดาวน์โหลดรูปภาพ`,video:`ดาวน์โหลดวิดีโอ`,audio:`ดาวน์โหลดเสียง`,file:`ดาวน์โหลดไฟล์`}},file_delete:{tooltip:{image:`ลบรูปภาพ`,video:`ลบวิดีโอ`,audio:`ลบเสียง`,file:`ลบไฟล์`}},file_preview_toggle:{tooltip:`เปิด/ปิดตัวอย่าง`},nest:{tooltip:`เยื้องบล็อกเข้า`,secondary_tooltip:`Tab`},unnest:{tooltip:`เยื้องบล็อกออก`,secondary_tooltip:`Shift+Tab`},align_left:{tooltip:`จัดข้อความชิดซ้าย`},align_center:{tooltip:`จัดข้อความกึ่งกลาง`},align_right:{tooltip:`จัดข้อความชิดขวา`},align_justify:{tooltip:`จัดข้อความเต็มแนว`},table_cell_merge:{tooltip:`ผสานเซลล์`},comment:{tooltip:`เพิ่มความคิดเห็น`}},file_panel:{upload:{title:`อัปโหลด`,file_placeholder:{image:`อัปโหลดรูปภาพ`,video:`อัปโหลดวิดีโอ`,audio:`อัปโหลดเสียง`,file:`อัปโหลดไฟล์`},upload_error:`ข้อผิดพลาด: อัปโหลดไม่สำเร็จ`},embed:{title:`ฝัง`,embed_button:{image:`ฝังรูปภาพ`,video:`ฝังวิดีโอ`,audio:`ฝังเสียง`,file:`ฝังไฟล์`},url_placeholder:`ป้อน URL`}},link_toolbar:{delete:{tooltip:`เอาลิงก์ออก`},edit:{text:`แก้ไขลิงก์`,tooltip:`แก้ไข`},open:{tooltip:`เปิดในแท็บใหม่`},form:{title_placeholder:`แก้ไขชื่อ`,url_placeholder:`แก้ไข URL`}},comments:{edited:`แก้ไขแล้ว`,save_button_text:`บันทึก`,cancel_button_text:`ยกเลิก`,deleted_reference_text:`เนื้อหาต้นฉบับถูกลบแล้ว`,discard_pending_comment:`แน่ใจหรือไม่ว่าต้องการละทิ้งความคิดเห็นนี้`,actions:{add_reaction:`เพิ่มรีแอคชัน`,resolve:`แก้ไขแล้ว`,reopen:`เปิดอีกครั้ง`,edit_comment:`แก้ไขความคิดเห็น`,delete_comment:`ลบความคิดเห็น`,more_actions:`การทำงานเพิ่มเติม`},reactions:{reacted_by:`รีแอคชันโดย`},sidebar:{marked_as_resolved:`ทำเครื่องหมายว่าแก้ไขแล้ว`,more_replies:e=>`อีก ${String(e)} คำตอบ`}},suggestion_changes:{formatting_change:`การเปลี่ยนรูปแบบ`,deleted:`ลบแล้ว`,inserted_by:e=>`แทรกโดย: ${e}`,deleted_by:e=>`ลบโดย: ${e}`,formatting_change_by:(e,t)=>`เปลี่ยนรูปแบบ (${e}) โดย: ${t}`},exporter:{open_file:`เปิดไฟล์`,open_video_file:`เปิดวิดีโอ`,open_audio_file:`เปิดเสียง`},generic:{ctrl_shortcut:`Ctrl`,form_submit:`ตกลง`}},hi:{slash_menu:{heading:{title:`हेडिंग 1`,subtext:`सबसे ऊपर के स्तर की हेडिंग`,aliases:[`h`,`heading1`,`h1`,`हेडिंग`,`हेडिंग1`,`शीर्षक`],group:`हेडिंग`},heading_2:{title:`हेडिंग 2`,subtext:`मुख्य सेक्शन की हेडिंग`,aliases:[`h2`,`heading2`,`subheading`,`हेडिंग2`,`उपशीर्षक`],group:`हेडिंग`},heading_3:{title:`हेडिंग 3`,subtext:`सब-सेक्शन और ग्रुप की हेडिंग`,aliases:[`h3`,`heading3`,`subheading`,`हेडिंग3`,`उपशीर्षक`],group:`हेडिंग`},heading_4:{title:`हेडिंग 4`,subtext:`छोटे सब-सेक्शन की हेडिंग`,aliases:[`h4`,`heading4`,`subheading4`,`हेडिंग4`,`उपशीर्षक4`],group:`सबहेडिंग`},heading_5:{title:`हेडिंग 5`,subtext:`और छोटे सब-सेक्शन की हेडिंग`,aliases:[`h5`,`heading5`,`subheading5`,`हेडिंग5`,`उपशीर्षक5`],group:`सबहेडिंग`},heading_6:{title:`हेडिंग 6`,subtext:`सबसे निचले स्तर की हेडिंग`,aliases:[`h6`,`heading6`,`subheading6`,`हेडिंग6`,`उपशीर्षक6`],group:`सबहेडिंग`},toggle_heading:{title:`टॉगल हेडिंग 1`,subtext:`खुलने-बंद होने वाली सबसे ऊपर की हेडिंग`,aliases:[`h`,`heading1`,`h1`,`collapsable`,`हेडिंग1`,`टॉगल`,`समेटने योग्य`],group:`सबहेडिंग`},toggle_heading_2:{title:`टॉगल हेडिंग 2`,subtext:`खुलने-बंद होने वाली मुख्य सेक्शन की हेडिंग`,aliases:[`h2`,`heading2`,`subheading`,`collapsable`,`हेडिंग2`,`टॉगल`,`समेटने योग्य`],group:`सबहेडिंग`},toggle_heading_3:{title:`टॉगल हेडिंग 3`,subtext:`खुलने-बंद होने वाली सब-सेक्शन और ग्रुप की हेडिंग`,aliases:[`h3`,`heading3`,`subheading`,`collapsable`,`हेडिंग3`,`टॉगल`,`समेटने योग्य`],group:`सबहेडिंग`},quote:{title:`उद्धरण`,subtext:`उद्धरण या अंश`,aliases:[`quotation`,`blockquote`,`bq`,`उद्धरण`,`कोट`],group:`बेसिक ब्लॉक`},toggle_list:{title:`टॉगल सूची`,subtext:`ऐसी सूची जिसके उप-आइटम छिपाए जा सकते हैं`,aliases:[`li`,`list`,`toggleList`,`toggle list`,`collapsable list`,`सूची`,`टॉगल`,`टॉगल सूची`],group:`बेसिक ब्लॉक`},numbered_list:{title:`नंबर वाली सूची`,subtext:`क्रम से नंबर वाले आइटम की सूची`,aliases:[`ol`,`li`,`list`,`numberedlist`,`numbered list`,`सूची`,`नंबर`,`क्रमांकित सूची`],group:`बेसिक ब्लॉक`},bullet_list:{title:`बुलेट सूची`,subtext:`बिना क्रम वाले आइटम की सूची`,aliases:[`ul`,`li`,`list`,`bulletlist`,`bullet list`,`सूची`,`बुलेट`,`बुलेट सूची`],group:`बेसिक ब्लॉक`},check_list:{title:`चेक सूची`,subtext:`चेकबॉक्स वाली सूची`,aliases:[`ul`,`li`,`list`,`checklist`,`check list`,`checked list`,`checkbox`,`सूची`,`चेकलिस्ट`,`चेकबॉक्स`,`टू-डू`],group:`बेसिक ब्लॉक`},paragraph:{title:`पैराग्राफ़`,subtext:`आपके डॉक्यूमेंट का मुख्य टेक्स्ट`,aliases:[`p`,`paragraph`,`पैराग्राफ़`,`अनुच्छेद`,`टेक्स्ट`],group:`बेसिक ब्लॉक`},code_block:{title:`कोड ब्लॉक`,subtext:`सिंटैक्स हाइलाइटिंग वाला कोड ब्लॉक`,aliases:[`code`,`pre`,`कोड`],group:`बेसिक ब्लॉक`},page_break:{title:`पेज ब्रेक`,subtext:`पेज अलग करने वाला`,aliases:[`page`,`break`,`separator`,`पेज`,`ब्रेक`,`पेज ब्रेक`],group:`बेसिक ब्लॉक`},table:{title:`टेबल`,subtext:`एडिट होने वाले सेल की टेबल`,aliases:[`table`,`टेबल`,`तालिका`],group:`एडवांस्ड`},image:{title:`इमेज`,subtext:`कैप्शन के साथ, साइज़ बदलने लायक इमेज`,aliases:[`image`,`imageUpload`,`upload`,`img`,`picture`,`media`,`url`,`इमेज`,`तस्वीर`,`फ़ोटो`,`अपलोड`],group:`मीडिया`},video:{title:`वीडियो`,subtext:`कैप्शन के साथ, साइज़ बदलने लायक वीडियो`,aliases:[`video`,`videoUpload`,`upload`,`mp4`,`film`,`media`,`url`,`वीडियो`,`फ़िल्म`,`अपलोड`],group:`मीडिया`},audio:{title:`ऑडियो`,subtext:`कैप्शन के साथ एम्बेड किया गया ऑडियो`,aliases:[`audio`,`audioUpload`,`upload`,`mp3`,`sound`,`media`,`url`,`ऑडियो`,`आवाज़`,`अपलोड`],group:`मीडिया`},file:{title:`फ़ाइल`,subtext:`एम्बेड की गई फ़ाइल`,aliases:[`file`,`upload`,`embed`,`media`,`url`,`फ़ाइल`,`अपलोड`,`एम्बेड`],group:`मीडिया`},emoji:{title:`इमोजी`,subtext:`इमोजी खोजें और डालें`,aliases:[`emoji`,`emote`,`emotion`,`face`,`इमोजी`,`चेहरा`],group:`अन्य`},divider:{title:`डिवाइडर`,subtext:`ब्लॉक को दिखने में अलग करें`,aliases:[`divider`,`hr`,`line`,`horizontal rule`,`डिवाइडर`,`लाइन`,`रेखा`],group:`बेसिक ब्लॉक`}},placeholders:{default:`टेक्स्ट लिखें या कमांड के लिए '/' टाइप करें`,heading:`हेडिंग`,toggleListItem:`टॉगल`,bulletListItem:`सूची`,numberedListItem:`सूची`,checkListItem:`सूची`,emptyDocument:void 0,new_comment:`कमेंट लिखें...`,edit_comment:`कमेंट एडिट करें...`,comment_reply:`कमेंट जोड़ें...`},file_blocks:{add_button_text:{image:`इमेज जोड़ें`,video:`वीडियो जोड़ें`,audio:`ऑडियो जोड़ें`,file:`फ़ाइल जोड़ें`}},toggle_blocks:{add_block_button:`खाली टॉगल। ब्लॉक जोड़ने के लिए क्लिक करें।`},code_block:{add_source_button_text:`सोर्स कोड जोड़ें`,ok_button_text:`ठीक है`},side_menu:{add_block_label:`ब्लॉक जोड़ें`,drag_handle_label:`ब्लॉक मेन्यू खोलें`},drag_handle:{delete_menuitem:`डिलीट करें`,colors_menuitem:`रंग`,header_row_menuitem:`हेडर पंक्ति`,header_column_menuitem:`हेडर कॉलम`},table_handle:{delete_column_menuitem:`कॉलम डिलीट करें`,delete_row_menuitem:`पंक्ति डिलीट करें`,add_left_menuitem:`बाईं ओर कॉलम जोड़ें`,add_right_menuitem:`दाईं ओर कॉलम जोड़ें`,add_above_menuitem:`ऊपर पंक्ति जोड़ें`,add_below_menuitem:`नीचे पंक्ति जोड़ें`,split_cell_menuitem:`सेल बाँटें`,merge_cells_menuitem:`सेल मिलाएँ`,background_color_menuitem:`बैकग्राउंड का रंग`},suggestion_menu:{no_items_title:`कोई आइटम नहीं मिला`},color_picker:{text_title:`टेक्स्ट`,background_title:`बैकग्राउंड`,colors:{default:`अपने आप`,gray:`स्लेटी`,brown:`भूरा`,red:`लाल`,orange:`नारंगी`,yellow:`पीला`,green:`हरा`,blue:`नीला`,purple:`बैंगनी`,pink:`गुलाबी`}},formatting_toolbar:{bold:{tooltip:`बोल्ड`,secondary_tooltip:`Mod+B`},italic:{tooltip:`इटैलिक`,secondary_tooltip:`Mod+I`},underline:{tooltip:`अंडरलाइन`,secondary_tooltip:`Mod+U`},strike:{tooltip:`स्ट्राइकथ्रू`,secondary_tooltip:`Mod+Shift+S`},code:{tooltip:`कोड`,secondary_tooltip:``},colors:{tooltip:`रंग`},link:{tooltip:`लिंक बनाएँ`,secondary_tooltip:`Mod+K`},file_caption:{tooltip:`कैप्शन एडिट करें`,input_placeholder:`कैप्शन एडिट करें`},file_replace:{tooltip:{image:`इमेज बदलें`,video:`वीडियो बदलें`,audio:`ऑडियो बदलें`,file:`फ़ाइल बदलें`}},file_rename:{tooltip:{image:`इमेज का नाम बदलें`,video:`वीडियो का नाम बदलें`,audio:`ऑडियो का नाम बदलें`,file:`फ़ाइल का नाम बदलें`},input_placeholder:{image:`इमेज का नाम बदलें`,video:`वीडियो का नाम बदलें`,audio:`ऑडियो का नाम बदलें`,file:`फ़ाइल का नाम बदलें`}},file_download:{tooltip:{image:`इमेज डाउनलोड करें`,video:`वीडियो डाउनलोड करें`,audio:`ऑडियो डाउनलोड करें`,file:`फ़ाइल डाउनलोड करें`}},file_delete:{tooltip:{image:`इमेज डिलीट करें`,video:`वीडियो डिलीट करें`,audio:`ऑडियो डिलीट करें`,file:`फ़ाइल डिलीट करें`}},file_preview_toggle:{tooltip:`प्रीव्यू दिखाएँ या छिपाएँ`},nest:{tooltip:`ब्लॉक अंदर करें`,secondary_tooltip:`Tab`},unnest:{tooltip:`ब्लॉक बाहर करें`,secondary_tooltip:`Shift+Tab`},align_left:{tooltip:`टेक्स्ट बाईं ओर करें`},align_center:{tooltip:`टेक्स्ट बीच में करें`},align_right:{tooltip:`टेक्स्ट दाईं ओर करें`},align_justify:{tooltip:`टेक्स्ट दोनों ओर बराबर करें`},table_cell_merge:{tooltip:`सेल मिलाएँ`},comment:{tooltip:`कमेंट जोड़ें`}},file_panel:{upload:{title:`अपलोड`,file_placeholder:{image:`इमेज अपलोड करें`,video:`वीडियो अपलोड करें`,audio:`ऑडियो अपलोड करें`,file:`फ़ाइल अपलोड करें`},upload_error:`गड़बड़ी: अपलोड नहीं हो सका`},embed:{title:`एम्बेड`,embed_button:{image:`इमेज एम्बेड करें`,video:`वीडियो एम्बेड करें`,audio:`ऑडियो एम्बेड करें`,file:`फ़ाइल एम्बेड करें`},url_placeholder:`URL डालें`}},link_toolbar:{delete:{tooltip:`लिंक हटाएँ`},edit:{text:`लिंक एडिट करें`,tooltip:`एडिट करें`},open:{tooltip:`नए टैब में खोलें`},form:{title_placeholder:`शीर्षक एडिट करें`,url_placeholder:`URL एडिट करें`}},comments:{edited:`एडिट किया गया`,save_button_text:`सेव करें`,cancel_button_text:`रद्द करें`,deleted_reference_text:`मूल सामग्री डिलीट हो गई`,discard_pending_comment:`क्या आप सच में यह कमेंट छोड़ना चाहते हैं?`,actions:{add_reaction:`रिएक्शन जोड़ें`,resolve:`हल करें`,reopen:`फिर से खोलें`,edit_comment:`कमेंट एडिट करें`,delete_comment:`कमेंट डिलीट करें`,more_actions:`और विकल्प`},reactions:{reacted_by:`रिएक्शन देने वाले`},sidebar:{marked_as_resolved:`हल के रूप में मार्क किया गया`,more_replies:e=>`${String(e)} और जवाब`}},suggestion_changes:{formatting_change:`फ़ॉर्मैटिंग में बदलाव`,deleted:`डिलीट किया गया`,inserted_by:e=>`जोड़ने वाले: ${e}`,deleted_by:e=>`डिलीट करने वाले: ${e}`,formatting_change_by:(e,t)=>`फ़ॉर्मैटिंग में बदलाव (${e}), करने वाले: ${t}`},exporter:{open_file:`फ़ाइल खोलें`,open_video_file:`वीडियो खोलें`,open_audio_file:`ऑडियो खोलें`},generic:{ctrl_shortcut:`Ctrl`,form_submit:`ठीक है`}}},Tu=x({en:{loading:`Opening…`,unreadable:`This doc cannot be shown right now: its file is not written as a doc. Here is what it says.`,duplicate:`Duplicate`,remove:`Delete`,colors:`Colors`,nothing:`No block by that name`,nothingToLink:`Nothing in the project by that name`,turnInto:`Turn into`,aligns:{left:`Left`,center:`Center`,right:`Right`,justify:`Justify`},copyPlace:`Copy its place in the file`,find:`Find something to do…`,text:`text`,background:`background`,placeholder:`Write, or press / for blocks`,heading:`Heading`,colorNames:{gray:`Gray`,brown:`Brown`,red:`Red`,orange:`Orange`,yellow:`Yellow`,green:`Green`,blue:`Blue`,purple:`Purple`,pink:`Pink`},embed:`Drawn by code`,title:`Title`,untitled:`Untitled`,outline:`On this page`,blocks:{paragraph:`Text`,heading1:`Heading 1`,heading2:`Heading 2`,heading3:`Heading 3`,bullet:`Bulleted list`,numbered:`Numbered list`,check:`To-do list`,toggle:`Toggle`,quote:`Quote`,callout:`Callout`,code:`Code`,divider:`Divider`,table:`Table`,image:`Image`}},"zh-cn":{loading:`正在打开…`,unreadable:`这份文档现在显示不了:文件的写法不对。下面是它的原文。`,duplicate:`复制一份`,remove:`删除`,colors:`颜色`,nothing:`没有叫这个名字的块`,nothingToLink:`项目里没有叫这个名字的内容`,turnInto:`转换为`,aligns:{left:`左对齐`,center:`居中`,right:`右对齐`,justify:`两端对齐`},copyPlace:`复制它在文件里的位置`,find:`输入要做的事…`,text:`文字`,background:`背景`,placeholder:`输入文字,或按 / 选择块`,heading:`标题`,colorNames:{gray:`灰色`,brown:`棕色`,red:`红色`,orange:`橙色`,yellow:`黄色`,green:`绿色`,blue:`蓝色`,purple:`紫色`,pink:`粉色`},embed:`由代码绘制`,title:`标题`,untitled:`未命名`,outline:`本页目录`,blocks:{paragraph:`正文`,heading1:`一级标题`,heading2:`二级标题`,heading3:`三级标题`,bullet:`无序列表`,numbered:`有序列表`,check:`待办清单`,toggle:`折叠`,quote:`引用`,callout:`提示块`,code:`代码`,divider:`分隔线`,table:`表格`,image:`图片`}},"zh-tw":{loading:`正在打開…`,unreadable:`目前無法顯示這份文件:它的檔案不是以文件的格式撰寫。以下是檔案的原文。`,duplicate:`複製一份`,remove:`刪除`,colors:`顏色`,nothing:`沒有這個名稱的區塊`,nothingToLink:`專案中沒有這個名稱的內容`,turnInto:`轉換為`,aligns:{left:`靠左對齊`,center:`置中`,right:`靠右對齊`,justify:`左右對齊`},copyPlace:`拷貝它在檔案中的位置`,find:`搜尋要做的事…`,text:`文字`,background:`背景`,placeholder:`輸入文字,或按 / 選擇區塊`,heading:`標題`,colorNames:{gray:`灰色`,brown:`棕色`,red:`紅色`,orange:`橘色`,yellow:`黃色`,green:`綠色`,blue:`藍色`,purple:`紫色`,pink:`粉紅色`},embed:`由程式碼繪製`,title:`標題`,untitled:`未命名`,outline:`本頁內容`,blocks:{paragraph:`文字`,heading1:`標題 1`,heading2:`標題 2`,heading3:`標題 3`,bullet:`項目符號清單`,numbered:`編號清單`,check:`待辦清單`,toggle:`摺疊`,quote:`引言`,callout:`標註`,code:`程式碼`,divider:`分隔線`,table:`表格`,image:`圖片`}},ja:{loading:`開いています…`,unreadable:`このドキュメントは現在表示できません:ファイルがドキュメントの形式で書かれていません。ファイルの内容は次のとおりです。`,duplicate:`複製`,remove:`削除`,colors:`カラー`,nothing:`その名前のブロックはありません`,nothingToLink:`その名前のものはプロジェクトにありません`,turnInto:`ブロックタイプの変更`,aligns:{left:`左揃え`,center:`中央揃え`,right:`右揃え`,justify:`両端揃え`},copyPlace:`ファイル内の位置をコピー`,find:`操作を検索…`,text:`文字`,background:`背景`,placeholder:`入力するか、/ でブロックを選択`,heading:`見出し`,colorNames:{gray:`グレー`,brown:`ブラウン`,red:`レッド`,orange:`オレンジ`,yellow:`イエロー`,green:`グリーン`,blue:`ブルー`,purple:`パープル`,pink:`ピンク`},embed:`コードで描画`,title:`タイトル`,untitled:`無題`,outline:`このページの内容`,blocks:{paragraph:`テキスト`,heading1:`見出し 1`,heading2:`見出し 2`,heading3:`見出し 3`,bullet:`箇条書きリスト`,numbered:`番号付きリスト`,check:`ToDo リスト`,toggle:`トグル`,quote:`引用`,callout:`コールアウト`,code:`コード`,divider:`区切り線`,table:`表`,image:`画像`}},ko:{loading:`여는 중…`,unreadable:`지금은 이 문서를 표시할 수 없습니다. 파일이 문서 형식으로 쓰여 있지 않습니다. 파일 내용은 다음과 같습니다.`,duplicate:`복제`,remove:`삭제`,colors:`색상`,nothing:`해당 이름의 블록이 없습니다`,nothingToLink:`프로젝트에 해당 이름의 항목이 없습니다`,turnInto:`변환`,aligns:{left:`왼쪽`,center:`가운데`,right:`오른쪽`,justify:`양쪽 맞춤`},copyPlace:`파일 내 위치 복사`,find:`할 작업 찾기…`,text:`텍스트`,background:`배경`,placeholder:`입력하거나 /를 눌러 블록 추가`,heading:`제목`,colorNames:{gray:`회색`,brown:`갈색`,red:`빨간색`,orange:`주황색`,yellow:`노란색`,green:`초록색`,blue:`파란색`,purple:`보라색`,pink:`분홍색`},embed:`코드로 그린 항목`,title:`제목`,untitled:`제목 없음`,outline:`이 페이지의 내용`,blocks:{paragraph:`텍스트`,heading1:`제목 1`,heading2:`제목 2`,heading3:`제목 3`,bullet:`글머리 기호 목록`,numbered:`번호 매기기 목록`,check:`할 일 목록`,toggle:`토글`,quote:`인용`,callout:`콜아웃`,code:`코드`,divider:`구분선`,table:`표`,image:`이미지`}},es:{loading:`Abriendo…`,unreadable:`Este documento no se puede mostrar ahora: su archivo no está escrito como un documento. Esto es lo que dice.`,duplicate:`Duplicar`,remove:`Eliminar`,colors:`Colores`,nothing:`Ningún bloque con ese nombre`,nothingToLink:`No hay nada en el proyecto con ese nombre`,turnInto:`Convertir en`,aligns:{left:`Izquierda`,center:`Centro`,right:`Derecha`,justify:`Justificar`},copyPlace:`Copiar su posición en el archivo`,find:`Busca qué hacer…`,text:`texto`,background:`fondo`,placeholder:`Escribe o pulsa / para ver los bloques`,heading:`Encabezado`,colorNames:{gray:`Gris`,brown:`Marrón`,red:`Rojo`,orange:`Naranja`,yellow:`Amarillo`,green:`Verde`,blue:`Azul`,purple:`Morado`,pink:`Rosa`},embed:`Dibujado con código`,title:`Título`,untitled:`Sin título`,outline:`En esta página`,blocks:{paragraph:`Texto`,heading1:`Encabezado 1`,heading2:`Encabezado 2`,heading3:`Encabezado 3`,bullet:`Lista con viñetas`,numbered:`Lista numerada`,check:`Lista de tareas`,toggle:`Desplegable`,quote:`Cita`,callout:`Destacado`,code:`Código`,divider:`Separador`,table:`Tabla`,image:`Imagen`}},fr:{loading:`Ouverture…`,unreadable:`Ce document ne peut pas être affiché pour l’instant\xA0: son fichier n’est pas écrit comme un document. Voici ce qu’il contient.`,duplicate:`Dupliquer`,remove:`Supprimer`,colors:`Couleurs`,nothing:`Aucun bloc de ce nom`,nothingToLink:`Rien de ce nom dans le projet`,turnInto:`Transformer en`,aligns:{left:`À gauche`,center:`Centré`,right:`À droite`,justify:`Justifié`},copyPlace:`Copier son emplacement dans le fichier`,find:`Rechercher une action…`,text:`texte`,background:`fond`,placeholder:`Écrivez, ou tapez / pour les blocs`,heading:`Titre`,colorNames:{gray:`Gris`,brown:`Marron`,red:`Rouge`,orange:`Orange`,yellow:`Jaune`,green:`Vert`,blue:`Bleu`,purple:`Violet`,pink:`Rose`},embed:`Dessiné par du code`,title:`Titre`,untitled:`Sans titre`,outline:`Sur cette page`,blocks:{paragraph:`Texte`,heading1:`Titre 1`,heading2:`Titre 2`,heading3:`Titre 3`,bullet:`Liste à puces`,numbered:`Liste numérotée`,check:`Liste de tâches`,toggle:`Bloc dépliable`,quote:`Citation`,callout:`Encadré`,code:`Code`,divider:`Séparateur`,table:`Tableau`,image:`Image`}},de:{loading:`Wird geöffnet …`,unreadable:`Dieses Dokument kann gerade nicht angezeigt werden: Seine Datei ist nicht als Dokument geschrieben. Hier steht, was sie enthält.`,duplicate:`Duplizieren`,remove:`Löschen`,colors:`Farben`,nothing:`Kein Block mit diesem Namen`,nothingToLink:`Nichts im Projekt mit diesem Namen`,turnInto:`Umwandeln in`,aligns:{left:`Links`,center:`Zentriert`,right:`Rechts`,justify:`Blocksatz`},copyPlace:`Stelle in der Datei kopieren`,find:`Aktion suchen …`,text:`Text`,background:`Hintergrund`,placeholder:`Schreib, oder drück / für Blöcke`,heading:`Überschrift`,colorNames:{gray:`Grau`,brown:`Braun`,red:`Rot`,orange:`Orange`,yellow:`Gelb`,green:`Grün`,blue:`Blau`,purple:`Lila`,pink:`Pink`},embed:`Per Code gezeichnet`,title:`Titel`,untitled:`Ohne Titel`,outline:`Auf dieser Seite`,blocks:{paragraph:`Text`,heading1:`Überschrift 1`,heading2:`Überschrift 2`,heading3:`Überschrift 3`,bullet:`Aufzählung`,numbered:`Nummerierte Liste`,check:`To-do-Liste`,toggle:`Toggle-Liste`,quote:`Zitat`,callout:`Hinweis`,code:`Code`,divider:`Trennlinie`,table:`Tabelle`,image:`Bild`}},it:{loading:`Apertura…`,unreadable:`Al momento questo documento non si può mostrare: il suo file non è scritto come un documento. Ecco cosa contiene.`,duplicate:`Duplica`,remove:`Elimina`,colors:`Colori`,nothing:`Nessun blocco con questo nome`,nothingToLink:`Niente nel progetto con questo nome`,turnInto:`Trasforma in`,aligns:{left:`A sinistra`,center:`Al centro`,right:`A destra`,justify:`Giustificato`},copyPlace:`Copia la sua posizione nel file`,find:`Cerca un'azione…`,text:`testo`,background:`sfondo`,placeholder:`Scrivi, o premi / per i blocchi`,heading:`Titolo`,colorNames:{gray:`Grigio`,brown:`Marrone`,red:`Rosso`,orange:`Arancione`,yellow:`Giallo`,green:`Verde`,blue:`Blu`,purple:`Viola`,pink:`Rosa`},embed:`Disegnato dal codice`,title:`Titolo`,untitled:`Senza titolo`,outline:`In questa pagina`,blocks:{paragraph:`Testo`,heading1:`Titolo 1`,heading2:`Titolo 2`,heading3:`Titolo 3`,bullet:`Elenco puntato`,numbered:`Elenco numerato`,check:`Elenco di cose da fare`,toggle:`Sezione a scomparsa`,quote:`Citazione`,callout:`Riquadro in evidenza`,code:`Codice`,divider:`Separatore`,table:`Tabella`,image:`Immagine`}},pt:{loading:`Abrindo…`,unreadable:`Não é possível mostrar este documento agora: o arquivo não está escrito como documento. Veja o que ele diz.`,duplicate:`Duplicar`,remove:`Excluir`,colors:`Cores`,nothing:`Nenhum bloco com esse nome`,nothingToLink:`Nada no projeto com esse nome`,turnInto:`Transformar em`,aligns:{left:`À esquerda`,center:`Centralizado`,right:`À direita`,justify:`Justificado`},copyPlace:`Copiar a posição no arquivo`,find:`Buscar uma ação…`,text:`texto`,background:`fundo`,placeholder:`Escreva ou pressione / para blocos`,heading:`Título`,colorNames:{gray:`Cinza`,brown:`Marrom`,red:`Vermelho`,orange:`Laranja`,yellow:`Amarelo`,green:`Verde`,blue:`Azul`,purple:`Roxo`,pink:`Rosa`},embed:`Desenhado por código`,title:`Título`,untitled:`Sem título`,outline:`Nesta página`,blocks:{paragraph:`Texto`,heading1:`Título 1`,heading2:`Título 2`,heading3:`Título 3`,bullet:`Lista com marcadores`,numbered:`Lista numerada`,check:`Lista de tarefas`,toggle:`Lista de alternância`,quote:`Citação`,callout:`Destaque`,code:`Código`,divider:`Divisor`,table:`Tabela`,image:`Imagem`}},ru:{loading:`Открытие…`,unreadable:`Сейчас этот документ нельзя показать: его файл записан не как документ. Вот что в нём написано.`,duplicate:`Дублировать`,remove:`Удалить`,colors:`Цвета`,nothing:`Нет блока с таким названием`,nothingToLink:`В проекте нет ничего с таким названием`,turnInto:`Превратить в`,aligns:{left:`По левому краю`,center:`По центру`,right:`По правому краю`,justify:`По ширине`},copyPlace:`Скопировать его место в файле`,find:`Найти действие…`,text:`текст`,background:`фон`,placeholder:`Пишите или нажмите / для выбора блока`,heading:`Заголовок`,colorNames:{gray:`Серый`,brown:`Коричневый`,red:`Красный`,orange:`Оранжевый`,yellow:`Жёлтый`,green:`Зелёный`,blue:`Синий`,purple:`Фиолетовый`,pink:`Розовый`},embed:`Отрисовано кодом`,title:`Название`,untitled:`Без названия`,outline:`На этой странице`,blocks:{paragraph:`Текст`,heading1:`Заголовок 1`,heading2:`Заголовок 2`,heading3:`Заголовок 3`,bullet:`Маркированный список`,numbered:`Нумерованный список`,check:`Список задач`,toggle:`Раскрывающийся блок`,quote:`Цитата`,callout:`Выноска`,code:`Код`,divider:`Разделитель`,table:`Таблица`,image:`Изображение`}},tr:{loading:`Açılıyor…`,unreadable:`Bu belge şu anda gösterilemiyor: dosyası bir belge olarak yazılmamış. İçeriği aşağıda.`,duplicate:`Çoğalt`,remove:`Sil`,colors:`Renkler`,nothing:`Bu adda blok yok`,nothingToLink:`Projede bu adda bir şey yok`,turnInto:`Dönüştür`,aligns:{left:`Sola`,center:`Ortaya`,right:`Sağa`,justify:`İki yana`},copyPlace:`Dosyadaki yerini kopyala`,find:`Yapılacak bir şey bulun…`,text:`metin`,background:`arka plan`,placeholder:`Yazın ya da bloklar için / tuşuna basın`,heading:`Başlık`,colorNames:{gray:`Gri`,brown:`Kahverengi`,red:`Kırmızı`,orange:`Turuncu`,yellow:`Sarı`,green:`Yeşil`,blue:`Mavi`,purple:`Mor`,pink:`Pembe`},embed:`Kodla çizildi`,title:`Başlık`,untitled:`Adsız`,outline:`Bu sayfada`,blocks:{paragraph:`Metin`,heading1:`Başlık 1`,heading2:`Başlık 2`,heading3:`Başlık 3`,bullet:`Madde işaretli liste`,numbered:`Numaralı liste`,check:`Yapılacaklar listesi`,toggle:`Açılır blok`,quote:`Alıntı`,callout:`Bilgi kutusu`,code:`Kod`,divider:`Ayırıcı`,table:`Tablo`,image:`Görsel`}},vi:{loading:`Đang mở…`,unreadable:`Hiện chưa thể hiển thị tài liệu này: tệp của nó không được viết theo dạng tài liệu. Đây là nội dung của tệp.`,duplicate:`Nhân bản`,remove:`Xóa`,colors:`Màu`,nothing:`Không có khối nào tên như vậy`,nothingToLink:`Không có gì trong dự án tên như vậy`,turnInto:`Chuyển thành`,aligns:{left:`Trái`,center:`Giữa`,right:`Phải`,justify:`Đều hai bên`},copyPlace:`Sao chép vị trí của nó trong tệp`,find:`Tìm thao tác…`,text:`chữ`,background:`nền`,placeholder:`Viết, hoặc nhấn / để chọn khối`,heading:`Đề mục`,colorNames:{gray:`Xám`,brown:`Nâu`,red:`Đỏ`,orange:`Cam`,yellow:`Vàng`,green:`Xanh lá`,blue:`Xanh dương`,purple:`Tím`,pink:`Hồng`},embed:`Được vẽ bằng mã`,title:`Tiêu đề`,untitled:`Không có tiêu đề`,outline:`Trên trang này`,blocks:{paragraph:`Văn bản`,heading1:`Đề mục 1`,heading2:`Đề mục 2`,heading3:`Đề mục 3`,bullet:`Danh sách dấu đầu dòng`,numbered:`Danh sách đánh số`,check:`Danh sách việc cần làm`,toggle:`Khối thu gọn`,quote:`Trích dẫn`,callout:`Khung chú thích`,code:`Mã`,divider:`Đường phân cách`,table:`Bảng`,image:`Hình ảnh`}},th:{loading:`กำลังเปิด…`,unreadable:`ยังแสดงเอกสารนี้ไม่ได้ในตอนนี้ เพราะไฟล์ไม่ได้เขียนในรูปแบบเอกสาร เนื้อหาในไฟล์มีดังนี้`,duplicate:`ทำสำเนา`,remove:`ลบ`,colors:`สี`,nothing:`ไม่มีบล็อกชื่อนี้`,nothingToLink:`ไม่มีสิ่งใดในโปรเจกต์ชื่อนี้`,turnInto:`เปลี่ยนเป็น`,aligns:{left:`ชิดซ้าย`,center:`กึ่งกลาง`,right:`ชิดขวา`,justify:`เต็มแนว`},copyPlace:`คัดลอกตำแหน่งในไฟล์`,find:`ค้นหาสิ่งที่จะทำ…`,text:`ข้อความ`,background:`พื้นหลัง`,placeholder:`เขียน หรือกด / เพื่อเลือกบล็อก`,heading:`หัวเรื่อง`,colorNames:{gray:`เทา`,brown:`น้ำตาล`,red:`แดง`,orange:`ส้ม`,yellow:`เหลือง`,green:`เขียว`,blue:`น้ำเงิน`,purple:`ม่วง`,pink:`ชมพู`},embed:`วาดด้วยโค้ด`,title:`ชื่อเรื่อง`,untitled:`ไม่มีชื่อ`,outline:`ในหน้านี้`,blocks:{paragraph:`ข้อความ`,heading1:`หัวเรื่อง 1`,heading2:`หัวเรื่อง 2`,heading3:`หัวเรื่อง 3`,bullet:`รายการหัวข้อย่อย`,numbered:`รายการลำดับเลข`,check:`รายการสิ่งที่ต้องทำ`,toggle:`รายการพับได้`,quote:`คำพูดอ้างอิง`,callout:`กล่องข้อความเด่น`,code:`โค้ด`,divider:`เส้นคั่น`,table:`ตาราง`,image:`รูปภาพ`}},hi:{loading:`खुल रहा है…`,unreadable:`यह डॉक अभी नहीं दिखाया जा सकता: इसकी फ़ाइल डॉक के रूप में नहीं लिखी गई है। इसमें यह लिखा है।`,duplicate:`डुप्लिकेट करें`,remove:`डिलीट करें`,colors:`रंग`,nothing:`इस नाम का कोई ब्लॉक नहीं`,nothingToLink:`प्रोजेक्ट में इस नाम का कुछ नहीं`,turnInto:`इसमें बदलें`,aligns:{left:`बाएँ`,center:`बीच में`,right:`दाएँ`,justify:`दोनों ओर बराबर`},copyPlace:`फ़ाइल में इसकी जगह कॉपी करें`,find:`कोई काम खोजें…`,text:`टेक्स्ट`,background:`बैकग्राउंड`,placeholder:`लिखें, या ब्लॉक के लिए / दबाएँ`,heading:`हेडिंग`,colorNames:{gray:`स्लेटी`,brown:`भूरा`,red:`लाल`,orange:`नारंगी`,yellow:`पीला`,green:`हरा`,blue:`नीला`,purple:`बैंगनी`,pink:`गुलाबी`},embed:`कोड से बना`,title:`शीर्षक`,untitled:`बिना शीर्षक`,outline:`इस पेज पर`,blocks:{paragraph:`टेक्स्ट`,heading1:`हेडिंग 1`,heading2:`हेडिंग 2`,heading3:`हेडिंग 3`,bullet:`बुलेट सूची`,numbered:`नंबर वाली सूची`,check:`टू-डू सूची`,toggle:`टॉगल`,quote:`उद्धरण`,callout:`कॉलआउट`,code:`कोड`,divider:`डिवाइडर`,table:`टेबल`,image:`इमेज`}}});function Eu(e){return C(wu,e)}var Du=e=>e.map(mu),Ou=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]);function ku(e,t,n){let r=Du(e),i=Du(t),a=new Map(N(r,i)),o=new Map(N(r,Du(n))),s=new Set(a.values()),c=new Set;for(let e=0;e<r.length;e++){let t=a.get(e);t!==void 0&&!o.has(e)&&c.add(t)}let l=new Map([...o].map(([e,t])=>[t,e])),u=new Map,d=-1;n.forEach((e,t)=>{let n=l.get(t);n===void 0?u.set(d,[...u.get(d)??[],e]):d=n});let f=e=>{for(let t=e;t>=0;t--){let e=a.get(t);if(e!==void 0)return e+1}return 0},p=new Map;for(let[e,n]of u){let c=f(e),l=c;for(;l<t.length&&!s.has(l);)l++;if(Ou(i.slice(c,l),Du(n)))continue;let u=e+1<r.length&&!o.has(e+1),d=e>=0&&!a.has(e),m=u||d?l:c;p.set(m,[...p.get(m)??[],...n])}let m=[];for(let e=0;e<=t.length;e++){m.push(...p.get(e)??[]);let n=t[e];n&&!c.has(e)&&m.push(n)}return m}function Au(e,t){if(!e.some(e=>e.type===`source`))return[...t];let n=new Map(N(Du(gu(e)),Du(t))),r=new Map,i=-1,a=0;for(let o of e){if(o.type!==`source`){i++;let e=n.get(i);e!==void 0&&(a=e+1);continue}let e=i<0?0:(n.get(i)??a-1)+1,s=Math.max(0,Math.min(t.length,e));r.set(s,[...r.get(s)??[],o])}let o=[];for(let e=0;e<=t.length;e++){o.push(...r.get(e)??[]);let n=t[e];n&&o.push(n)}return o}var ju=e=>e.blocks.length===0&&e.problems.length>0,Mu=class{doc;constructor(e){this.doc=Bl(e)}get source(){return this.doc.source}get problems(){return this.doc.problems}get unreadable(){return ju(this.doc)}lineOf(e){let t=0;for(let n of this.doc.segments){let r=gu(n.blocks).length;if(e<t+r)return this.doc.source.slice(0,n.start).split(`
59
- `).length;t+=r}}shown(){return gu(this.doc.blocks)}textFor(e){let t=Au(this.doc.blocks,e);if(hu(t,this.doc.blocks))return;let n=_u(this.doc,t);return n===this.doc.source?void 0:n}adopt(e){e!==this.doc.source&&(this.doc=Bl(e))}incoming(e,t){if(e===this.doc.source)return;let n=this.shown(),r=Bl(e);if(this.doc=r,ju(r))return;let i=ku(n,t,gu(r.blocks));return hu(i,t)?void 0:i}},Nu=`input:not([inert]):not([inert] *),select:not([inert]):not([inert] *),textarea:not([inert]):not([inert] *),a[href]:not([inert]):not([inert] *),area[href]:not([inert]):not([inert] *),button:not([inert]):not([inert] *),[tabindex]:not(slot):not([inert]):not([inert] *),audio[controls]:not([inert]):not([inert] *),video[controls]:not([inert]):not([inert] *),[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *),details>summary:first-of-type:not([inert]):not([inert] *),details:not([inert]):not([inert] *)`,Pu=typeof Element>`u`,Fu=Pu?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Iu=!Pu&&Element.prototype.getRootNode?function(e){return e==null||e.getRootNode==null?void 0:e.getRootNode()}:function(e){return e?.ownerDocument},Lu=function(e,t){t===void 0&&(t=!0);var n=e==null||e.getAttribute==null?void 0:e.getAttribute(`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):Lu(e.parentNode))},Ru=function(e){var t,n=e==null||e.getAttribute==null||(t=e.getAttribute(`contenteditable`))==null?void 0:t.toLowerCase();return n===``||n===`true`||n===`plaintext-only`},zu=function(e,t,n){if(Lu(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Nu));return t&&Fu.call(e,Nu)&&r.unshift(e),r=r.filter(n),r},Bu=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!Lu(a,!1)){if(a.tagName===`SLOT`){var o=a.assignedElements(),s=Bu(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{Fu.call(a,Nu)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!Lu(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=Bu(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}}return r},Vu=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},Hu=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Ru(e))&&!Vu(e)?0:e.tabIndex},Uu=function(e,t){var n=Hu(e);return n<0&&t&&!Vu(e)?0:n},Wu=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Gu=function(e){return e.tagName===`INPUT`},Ku=function(e){return Gu(e)&&e.type===`hidden`},qu=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},Ju=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},Yu=function(e){if(!e.name)return!0;var t=e.form||Iu(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){return console.error(`Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s`,e.message),!1}var i=Ju(r,e.form);return!i||i===e},Xu=function(e){return Gu(e)&&e.type===`radio`},Zu=function(e){return Xu(e)&&!Yu(e)},Qu=function(e){var t=e&&Iu(e),n=t?.host,r=!1;if(t&&t!==e){var i,a;for(r=!!((i=n)!=null&&(i=i.ownerDocument)!=null&&i.contains(n)||e!=null&&(a=e.ownerDocument)!=null&&a.contains(e));!r&&n;){var o;t=Iu(n),n=t?.host,r=!!((o=n)!=null&&(o=o.ownerDocument)!=null&&o.contains(n))}}return r},$u=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},ed=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});var i=getComputedStyle(e).visibility;if(i===`hidden`||i===`collapse`)return!0;var a=Fu.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(Fu.call(a,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var o=e;e;){var s=e.parentElement,c=Iu(e);if(s&&!s.shadowRoot&&r(s)===!0)return $u(e);e=e.assignedSlot?e.assignedSlot:!s&&c!==e.ownerDocument?c.host:s}e=o}if(Qu(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return $u(e);return!1},td=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return Fu.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},nd=function(e,t){return!(t.disabled||Ku(t)||ed(t,e)||qu(t)||td(t))},rd=function(e,t){return!(Zu(t)||Hu(t)<0||!nd(e,t))},id=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},ad=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=Uu(a,i),s=i?ad(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(Wu).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},od=function(e,t){return t||={},ad(t.getShadowRoot?Bu([e],t.includeContainer,{filter:rd.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:id}):zu(e,t.includeContainer,rd.bind(null,t)))},sd=function(e,t){return t||={},t.getShadowRoot?Bu([e],t.includeContainer,{filter:nd.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):zu(e,t.includeContainer,nd.bind(null,t))},cd=function(e,t){if(t||={},!e)throw Error(`No node provided`);return Fu.call(e,Nu)!==!1&&rd(t,e)};function ld(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function ud(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+`/`+n}).join(` `):navigator.userAgent}function dd(){return/apple/i.test(navigator.vendor)}function fd(){let e=/android/i;return e.test(ld())||e.test(ud())}function pd(){return ud().includes(`jsdom/`)}var md=`data-floating-ui-focusable`,hd=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;function gd(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function _d(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&oe(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function vd(e){return`composedPath`in e?e.composedPath()[0]:e.target}function yd(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function bd(e){return e.matches(`html,body`)}function xd(e){return e?.ownerDocument||document}function Sd(e){return ae(e)&&e.matches(hd)}function Cd(e){return e?e.getAttribute(`role`)===`combobox`&&Sd(e):!1}function wd(e){return e?e.hasAttribute(md)?e:e.querySelector(`[`+md+`]`)||e:null}function Td(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...Td(e,t.id,n)])}function Ed(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function Dd(e){e.preventDefault(),e.stopPropagation()}function Od(e){return`nativeEvent`in e}function kd(e){return e.mozInputSource===0&&e.isTrusted?!0:fd()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function Ad(e){return pd()?!1:!fd()&&e.width===0&&e.height===0||fd()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function jd(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}var Md=typeof document<`u`?J.useLayoutEffect:function(){},Nd={...J};function Pd(e){let t=J.useRef(e);return Md(()=>{t.current=e}),t}var Fd=Nd.useInsertionEffect||(e=>e());function Id(e){let t=J.useRef(()=>{});return Fd(()=>{t.current=e}),J.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}var Ld=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver==`function`&&ResizeObserver.toString().includes(`[native code]`)?`full`:`none`});function Rd(e,t){let n=od(e,Ld()),r=n.length;if(r===0)return;let i=gd(xd(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function zd(e){return Rd(xd(e).body,1)||e}function Bd(e){return Rd(xd(e).body,-1)||e}function Vd(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!_d(n,r)}function Hd(e){od(e,Ld()).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function Ud(e){e.querySelectorAll(`[data-tabindex]`).forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}var Wd=t(f(),1);function Gd(e){let t=J.useRef(void 0),n=J.useCallback(t=>{let n=e.map(e=>{if(e!=null){if(typeof e==`function`){let n=e,r=n(t);return typeof r==`function`?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}}});return()=>{n.forEach(e=>e?.())}},e);return J.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}var Kd=`data-floating-ui-focusable`,qd=`active`,Jd=`selected`,Yd=`ArrowLeft`,Xd=`ArrowRight`,Zd=`ArrowUp`,Qd=`ArrowDown`,$d=[Yd,Xd],ef=[Zd,Qd];[...$d,...ef];var tf={...J},nf=!1,rf=0,af=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+rf++;function of(){let[e,t]=J.useState(()=>nf?af():void 0);return Md(()=>{e??t(af())},[]),J.useEffect(()=>{nf=!0},[]),e}var sf=tf.useId||of;function cf(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}var lf=J.createContext(null),uf=J.createContext(null),df=()=>J.useContext(lf)?.id||null,ff=()=>J.useContext(uf);function pf(e){return`data-floating-ui-`+e}function mf(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}var hf=pf(`safe-polygon`);function gf(e,t,n){if(n&&!jd(n))return 0;if(typeof e==`number`)return e;if(typeof e==`function`){let n=e();return typeof n==`number`?n:n?.[t]}return e?.[t]}function _f(e){return typeof e==`function`?e():e}function vf(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:i,events:a,elements:o}=e,{enabled:s=!0,delay:c=0,handleClose:l=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=ff(),m=df(),h=Pd(l),g=Pd(c),_=Pd(n),v=Pd(d),y=J.useRef(),b=J.useRef(-1),x=J.useRef(),S=J.useRef(-1),C=J.useRef(!0),w=J.useRef(!1),T=J.useRef(()=>{}),E=J.useRef(!1),D=Id(()=>{let e=i.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`});J.useEffect(()=>{if(!s)return;function e(e){let{open:t}=e;t||(mf(b),mf(S),C.current=!0,E.current=!1)}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[s,a]),J.useEffect(()=>{if(!s||!h.current||!n)return;function e(e){D()&&r(!1,e,`hover`)}let t=xd(o.floating).documentElement;return t.addEventListener(`mouseleave`,e),()=>{t.removeEventListener(`mouseleave`,e)}},[o.floating,n,r,s,h,D]);let O=J.useCallback(function(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=`hover`);let i=gf(g.current,`close`,y.current);i&&!x.current?(mf(b),b.current=window.setTimeout(()=>r(!1,e,n),i)):t&&(mf(b),r(!1,e,n))},[g,r]),k=Id(()=>{T.current(),x.current=void 0}),A=Id(()=>{if(w.current){let e=xd(o.floating).body;e.style.pointerEvents=``,e.removeAttribute(hf),w.current=!1}}),j=Id(()=>i.current.openEvent?[`click`,`mousedown`].includes(i.current.openEvent.type):!1);J.useEffect(()=>{if(!s)return;function e(e){if(mf(b),C.current=!1,u&&!jd(y.current)||_f(v.current)>0&&!gf(g.current,`open`))return;let t=gf(g.current,`open`,y.current);t?b.current=window.setTimeout(()=>{_.current||r(!0,e,`hover`)},t):n||r(!0,e,`hover`)}function t(e){if(j()){A();return}T.current();let t=xd(o.floating);if(mf(S),E.current=!1,h.current&&i.current.floatingContext){n||mf(b),x.current=h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){A(),k(),j()||O(e,!0,`safe-polygon`)}});let r=x.current;t.addEventListener(`mousemove`,r),T.current=()=>{t.removeEventListener(`mousemove`,r)}}else y.current===`touch`&&_d(o.floating,e.relatedTarget)||O(e)}function a(e){j()||i.current.floatingContext&&(h.current==null||h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){A(),k(),j()||O(e)}})(e))}function c(){mf(b)}function l(e){j()||O(e,!1)}if(R(o.domReference)){let r=o.domReference,i=o.floating;return n&&r.addEventListener(`mouseleave`,a),f&&r.addEventListener(`mousemove`,e,{once:!0}),r.addEventListener(`mouseenter`,e),r.addEventListener(`mouseleave`,t),i&&(i.addEventListener(`mouseleave`,a),i.addEventListener(`mouseenter`,c),i.addEventListener(`mouseleave`,l)),()=>{n&&r.removeEventListener(`mouseleave`,a),f&&r.removeEventListener(`mousemove`,e),r.removeEventListener(`mouseenter`,e),r.removeEventListener(`mouseleave`,t),i&&(i.removeEventListener(`mouseleave`,a),i.removeEventListener(`mouseenter`,c),i.removeEventListener(`mouseleave`,l))}}},[o,s,e,u,f,O,k,A,r,n,_,p,g,h,i,j,v]),Md(()=>{var e;if(s&&n&&(e=h.current)!=null&&(e=e.__options)!=null&&e.blockPointerEvents&&D()){w.current=!0;let e=o.floating;if(R(o.domReference)&&e){var t;let n=xd(o.floating).body;n.setAttribute(hf,``);let r=o.domReference,i=p==null||(t=p.nodesRef.current.find(e=>e.id===m))==null||(t=t.context)==null?void 0:t.elements.floating;return i&&(i.style.pointerEvents=``),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,e.style.pointerEvents=`auto`,()=>{n.style.pointerEvents=``,r.style.pointerEvents=``,e.style.pointerEvents=``}}}},[s,n,m,o,p,h,D]),Md(()=>{n||(y.current=void 0,E.current=!1,k(),A())},[n,k,A]),J.useEffect(()=>()=>{k(),mf(b),mf(S),A()},[s,o.domReference,k,A]);let M=J.useMemo(()=>{function e(e){y.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function i(){!C.current&&!_.current&&r(!0,t,`hover`)}u&&!jd(y.current)||n||_f(v.current)===0||E.current&&e.movementX**2+e.movementY**2<2||(mf(S),y.current===`touch`?i():(E.current=!0,S.current=window.setTimeout(i,_f(v.current))))}}},[u,r,n,_,v]);return J.useMemo(()=>s?{reference:M}:{},[s,M])}var yf=0;function bf(e,t){t===void 0&&(t={});let{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(yf);let a=()=>e?.focus({preventScroll:n});i?a():yf=requestAnimationFrame(a)}function xf(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&oe(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Sf(e){return`composedPath`in e?e.composedPath()[0]:e.target}function Cf(e){return e?.ownerDocument||document}var wf={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Tf(e){return e===`inert`?wf.inert:e===`aria-hidden`?wf[`aria-hidden`]:wf.none}var Ef=new WeakSet,Df={},Of=0,kf=()=>typeof HTMLElement<`u`&&`inert`in HTMLElement.prototype;function Af(e){return e?oe(e)?e.host:Af(e.parentNode):null}var jf=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=Af(t);return e.contains(n)?n:null}).filter(e=>e!=null);function Mf(e,t,n,r){let i=`data-floating-ui-inert`,a=r?`inert`:n?`aria-hidden`:null,o=jf(t,e),s=new Set,c=new Set(o),l=[];Df[i]||(Df[i]=new WeakMap);let u=Df[i];o.forEach(f),p(t),s.clear();function f(e){e&&!s.has(e)&&(s.add(e),e.parentNode&&f(e.parentNode))}function p(e){e&&!c.has(e)&&[].forEach.call(e.children,e=>{if(d(e)!==`script`){if(s.has(e))p(e);else{let t=a?e.getAttribute(a):null,n=t!==null&&t!==`false`,r=Tf(a),o=(r.get(e)||0)+1,s=(u.get(e)||0)+1;r.set(e,o),u.set(e,s),l.push(e),o===1&&n&&Ef.add(e),s===1&&e.setAttribute(i,``),!n&&a&&e.setAttribute(a,a===`inert`?``:`true`)}}})}return Of++,()=>{l.forEach(e=>{let t=Tf(a),n=(t.get(e)||0)-1,r=(u.get(e)||0)-1;t.set(e,n),u.set(e,r),n||(!Ef.has(e)&&a&&e.removeAttribute(a),Ef.delete(e)),r||e.removeAttribute(i)}),Of--,Of||(wf.inert=new WeakMap,wf[`aria-hidden`]=new WeakMap,wf.none=new WeakMap,Ef=new WeakSet,Df={})}}function Nf(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);let r=Cf(e[0]).body;return Mf(e.concat(Array.from(r.querySelectorAll(`[aria-live],[role="status"],output`))),r,t,n)}var Pf={border:0,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`fixed`,whiteSpace:`nowrap`,width:`1px`,top:0,left:0},Ff=J.forwardRef(function(e,t){let[n,r]=J.useState();Md(()=>{dd()&&r(`button`)},[]);let i={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[pf(`focus-guard`)]:``,style:Pf};return(0,Y.jsx)(`span`,{...e,...i})}),If={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},Lf=J.createContext(null),Rf=pf(`portal`);function zf(e){e===void 0&&(e={});let{id:t,root:n}=e,r=sf(),i=Vf(),[a,o]=J.useState(null),s=J.useRef(null);return Md(()=>()=>{a?.remove(),queueMicrotask(()=>{s.current=null})},[a]),Md(()=>{if(!r||s.current)return;let e=t?document.getElementById(t):null;if(!e)return;let n=document.createElement(`div`);n.id=r,n.setAttribute(Rf,``),e.appendChild(n),s.current=n,o(n)},[t,r]),Md(()=>{if(n===null||!r||s.current)return;let e=n||i?.portalNode;e&&!S(e)&&(e=e.current),e||=document.body;let a=null;t&&(a=document.createElement(`div`),a.id=t,e.appendChild(a));let c=document.createElement(`div`);c.id=r,c.setAttribute(Rf,``),e=a||e,e.appendChild(c),s.current=c,o(c)},[t,n,r,i]),a}function Bf(e){let{children:t,id:n,root:r,preserveTabOrder:i=!0}=e,a=zf({id:n,root:r}),[o,s]=J.useState(null),c=J.useRef(null),l=J.useRef(null),u=J.useRef(null),d=J.useRef(null),f=o?.modal,p=o?.open,m=!!o&&!o.modal&&o.open&&i&&!!(r||a);return J.useEffect(()=>{if(!a||!i||f)return;function e(e){a&&Vd(e)&&(e.type===`focusin`?Ud:Hd)(a)}return a.addEventListener(`focusin`,e,!0),a.addEventListener(`focusout`,e,!0),()=>{a.removeEventListener(`focusin`,e,!0),a.removeEventListener(`focusout`,e,!0)}},[a,i,f]),J.useEffect(()=>{a&&(p||Ud(a))},[p,a]),(0,Y.jsxs)(Lf.Provider,{value:J.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:c,afterOutsideRef:l,beforeInsideRef:u,afterInsideRef:d,portalNode:a,setFocusManagerState:s}),[i,a]),children:[m&&a&&(0,Y.jsx)(Ff,{"data-type":`outside`,ref:c,onFocus:e=>{if(Vd(e,a)){var t;(t=u.current)==null||t.focus()}else Bd(o?o.domReference:null)?.focus()}}),m&&a&&(0,Y.jsx)(`span`,{"aria-owns":a.id,style:If}),a&&Wd.createPortal(t,a),m&&a&&(0,Y.jsx)(Ff,{"data-type":`outside`,ref:l,onFocus:e=>{if(Vd(e,a)){var t;(t=d.current)==null||t.focus()}else zd(o?o.domReference:null)?.focus(),o!=null&&o.closeOnFocusOut&&o?.onOpenChange(!1,e.nativeEvent,`focus-out`)}})]})}var Vf=()=>J.useContext(Lf);function Hf(e){return J.useMemo(()=>t=>{e.forEach(e=>{e&&(e.current=t)})},e)}var Uf=20,Wf=[];function Gf(){Wf=Wf.filter(e=>e.deref()?.isConnected)}function Kf(e){Gf(),e&&d(e)!==`body`&&(Wf.push(new WeakRef(e)),Wf.length>Uf&&(Wf=Wf.slice(-20)))}function qf(){return Gf(),Wf[Wf.length-1]?.deref()}function Jf(e){let t=Ld();return cd(e,t)?e:od(e,t)[0]||e}function Yf(e,t){var n;if(!t.current.includes(`floating`)&&!((n=e.getAttribute(`role`))!=null&&n.includes(`dialog`)))return;let r=Ld(),i=sd(e,r).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return cd(e,r)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),a=e.getAttribute(`tabindex`);t.current.includes(`floating`)||i.length===0?a!==`0`&&e.setAttribute(`tabindex`,`0`):(a!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}var Xf=J.forwardRef(function(e,t){return(0,Y.jsx)(`button`,{...e,type:`button`,ref:t,tabIndex:-1,style:Pf})});function Zf(e){let{context:t,children:n,disabled:r=!1,order:i=[`content`],guards:a=!0,initialFocus:o=0,returnFocus:s=!0,restoreFocus:c=!1,modal:l=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0,outsideElementsInert:f=!1,getInsideElements:p=()=>[]}=e,{open:m,onOpenChange:h,events:g,dataRef:_,elements:{domReference:v,floating:y}}=t,b=Id(()=>_.current.floatingContext?.nodeId),x=Id(p),S=typeof o==`number`&&o<0,C=Cd(v)&&S,w=kf(),T=!w||a,E=!T||w&&f,D=Pd(i),O=Pd(o),k=Pd(s),A=ff(),j=Vf(),M=J.useRef(null),N=J.useRef(null),P=J.useRef(!1),F=J.useRef(!1),I=J.useRef(-1),L=J.useRef(-1),R=j!=null,z=wd(y),B=Id(function(e){return e===void 0&&(e=z),e?od(e,Ld()):[]}),ee=Id(e=>{let t=B(e);return D.current.map(e=>v&&e===`reference`?v:z&&e===`floating`?z:t).filter(Boolean).flat()});J.useEffect(()=>{if(r||!l)return;function e(e){if(e.key===`Tab`){_d(z,gd(xd(z)))&&B().length===0&&!C&&Dd(e);let t=ee(),n=vd(e);D.current[0]===`reference`&&n===v&&(Dd(e),e.shiftKey?bf(t[t.length-1]):bf(t[1])),D.current[1]===`floating`&&n===z&&e.shiftKey&&(Dd(e),bf(t[0]))}}let t=xd(z);return t.addEventListener(`keydown`,e),()=>{t.removeEventListener(`keydown`,e)}},[r,v,z,l,D,C,B,ee]),J.useEffect(()=>{if(r||!y)return;function e(e){let t=vd(e),n=B().indexOf(t);n!==-1&&(I.current=n)}return y.addEventListener(`focusin`,e),()=>{y.removeEventListener(`focusin`,e)}},[r,y,B]),J.useEffect(()=>{if(r||!d)return;function e(){F.current=!0,setTimeout(()=>{F.current=!1})}function t(e){let t=e.relatedTarget,n=e.currentTarget,r=vd(e);queueMicrotask(()=>{let i=b(),a=!(_d(v,t)||_d(y,t)||_d(t,y)||_d(j?.portalNode,t)||t!=null&&t.hasAttribute(pf(`focus-guard`))||A&&(Td(A.nodesRef.current,i).find(e=>_d(e.context?.elements.floating,t)||_d(e.context?.elements.domReference,t))||Ed(A.nodesRef.current,i).find(e=>[e.context?.elements.floating,wd(e.context?.elements.floating)].includes(t)||e.context?.elements.domReference===t)));if(n===v&&z&&Yf(z,D),c&&n!==v&&!(r!=null&&r.isConnected)&&gd(xd(z))===xd(z).body){ae(z)&&z.focus();let e=I.current,t=B(),n=t[e]||t[t.length-1]||z;ae(n)&&n.focus()}_.current.insideReactTree?_.current.insideReactTree=!1:(C||!l)&&t&&a&&!F.current&&t!==qf()&&(P.current=!0,h(!1,e,`focus-out`))})}let n=!(A||!j);function i(){mf(L),_.current.insideReactTree=!0,L.current=window.setTimeout(()=>{_.current.insideReactTree=!1})}if(y&&ae(v))return v.addEventListener(`focusout`,t),v.addEventListener(`pointerdown`,e),y.addEventListener(`focusout`,t),n&&y.addEventListener(`focusout`,i,!0),()=>{v.removeEventListener(`focusout`,t),v.removeEventListener(`pointerdown`,e),y.removeEventListener(`focusout`,t),n&&y.removeEventListener(`focusout`,i,!0)}},[r,v,y,z,l,A,j,h,d,c,B,C,b,D,_]);let te=J.useRef(null),ne=J.useRef(null),re=Hf([te,j?.beforeInsideRef]),ie=Hf([ne,j?.afterInsideRef]);J.useEffect(()=>{var e,t;if(r||!y)return;let n=Array.from((j==null||(e=j.portalNode)==null?void 0:e.querySelectorAll(`[`+pf(`portal`)+`]`))||[]),i=(t=(A?Ed(A.nodesRef.current,b()):[]).find(e=>Cd(e.context?.elements.domReference||null)))==null||(t=t.context)==null?void 0:t.elements.domReference,a=[y,i,...n,...x(),M.current,N.current,te.current,ne.current,j?.beforeOutsideRef.current,j?.afterOutsideRef.current,D.current.includes(`reference`)||C?v:null].filter(e=>e!=null),o=l||C?Nf(a,!E,E):Nf(a);return()=>{o()}},[r,v,y,l,D,j,C,T,E,A,b,x]),Md(()=>{if(r||!ae(z))return;let e=gd(xd(z));queueMicrotask(()=>{let t=ee(z),n=O.current,r=(typeof n==`number`?t[n]:n.current)||z,i=_d(z,e);!S&&!i&&m&&bf(r,{preventScroll:r===z})})},[r,m,z,S,ee,O]),Md(()=>{if(r||!z)return;let e=xd(z);Kf(gd(e));function t(e){let{reason:t,event:n,nested:r}=e;if([`hover`,`safe-polygon`].includes(t)&&n.type===`mouseleave`&&(P.current=!0),t===`outside-press`){if(r)P.current=!1;else if(kd(n)||Ad(n))P.current=!1;else{let e=!1;document.createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?P.current=!1:P.current=!0}}}g.on(`openchange`,t);let n=e.createElement(`span`);n.setAttribute(`tabindex`,`-1`),n.setAttribute(`aria-hidden`,`true`),Object.assign(n.style,Pf),R&&v&&v.insertAdjacentElement(`afterend`,n);function i(){if(typeof k.current==`boolean`){let e=v||qf();return e&&e.isConnected?e:n}return k.current.current||n}return()=>{g.off(`openchange`,t);let r=gd(e),a=_d(y,r)||A&&Td(A.nodesRef.current,b(),!1).some(e=>_d(e.context?.elements.floating,r)),o=i();queueMicrotask(()=>{let t=Jf(o);k.current&&!P.current&&ae(t)&&(t===r||r===e.body||a)&&t.focus({preventScroll:!0}),n.remove()})}},[r,y,z,k,_,g,A,R,v,b]),J.useEffect(()=>(queueMicrotask(()=>{P.current=!1}),()=>{queueMicrotask(Gf)}),[r]),Md(()=>{if(!r&&j)return j.setFocusManagerState({modal:l,closeOnFocusOut:d,open:m,onOpenChange:h,domReference:v}),()=>{j.setFocusManagerState(null)}},[r,j,l,m,h,d,v]),Md(()=>{r||z&&Yf(z,D)},[r,z,D]);function V(e){return r||!u||!l?null:(0,Y.jsx)(Xf,{ref:e===`start`?M:N,onClick:e=>h(!1,e.nativeEvent),children:typeof u==`string`?u:`Dismiss`})}let oe=!r&&T&&(!l||!C)&&(R||l);return(0,Y.jsxs)(Y.Fragment,{children:[oe&&(0,Y.jsx)(Ff,{"data-type":`inside`,ref:re,onFocus:e=>{if(l){let e=ee();bf(i[0]===`reference`?e[0]:e[e.length-1])}else if(j!=null&&j.preserveTabOrder&&j.portalNode){if(P.current=!1,Vd(e,j.portalNode))zd(v)?.focus();else{var t;(t=j.beforeOutsideRef.current)==null||t.focus()}}}}),!C&&V(`start`),n,V(`end`),oe&&(0,Y.jsx)(Ff,{"data-type":`inside`,ref:ie,onFocus:e=>{if(l)bf(ee()[0]);else if(j!=null&&j.preserveTabOrder&&j.portalNode){if(d&&(P.current=!0),Vd(e,j.portalNode))Bd(v)?.focus();else{var t;(t=j.afterOutsideRef.current)==null||t.focus()}}}})]})}var Qf={pointerdown:`onPointerDown`,mousedown:`onMouseDown`,click:`onClick`},$f={pointerdown:`onPointerDownCapture`,mousedown:`onMouseDownCapture`,click:`onClickCapture`},ep=e=>({escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0});function tp(e,t){t===void 0&&(t={});let{open:n,onOpenChange:i,elements:a,dataRef:o}=e,{enabled:s=!0,escapeKey:c=!0,outsidePress:l=!0,outsidePressEvent:u=`pointerdown`,referencePress:d=!1,referencePressEvent:f=`pointerdown`,ancestorScroll:p=!1,bubbles:m,capture:h}=t,g=ff(),_=Id(typeof l==`function`?l:()=>!1),y=typeof l==`function`?_:l,b=J.useRef(!1),{escapeKey:x,outsidePress:S}=ep(m),{escapeKey:C,outsidePress:T}=ep(h),D=J.useRef(!1),O=Id(e=>{if(!n||!s||!c||e.key!==`Escape`||D.current)return;let t=o.current.floatingContext?.nodeId,r=g?Td(g.nodesRef.current,t):[];if(!x&&(e.stopPropagation(),r.length>0)){let e=!0;if(r.forEach(t=>{var n;(n=t.context)!=null&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles&&(e=!1)}),!e)return}i(!1,Od(e)?e.nativeEvent:e,`escape-key`)}),k=Id(e=>{var t;let n=()=>{var t;O(e),(t=vd(e))==null||t.removeEventListener(`keydown`,n)};(t=vd(e))==null||t.addEventListener(`keydown`,n)}),A=Id(e=>{let t=o.current.insideReactTree;o.current.insideReactTree=!1;let n=b.current;if(b.current=!1,u===`click`&&n||t||typeof y==`function`&&!y(e))return;let r=vd(e),s=`[`+pf(`inert`)+`]`,c=xd(a.floating).querySelectorAll(s),l=R(r)?r:null;for(;l&&!M(l);){let e=E(l);if(M(e)||!R(e))break;l=e}if(c.length&&R(r)&&!bd(r)&&!_d(r,a.floating)&&Array.from(c).every(e=>!_d(l,e)))return;if(ae(r)&&P){let t=M(r),n=v(r),i=/auto|scroll/,a=t||i.test(n.overflowX),o=t||i.test(n.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=r.offsetWidth-r.clientWidth:e.offsetX>r.clientWidth),d=s&&e.offsetY>r.clientHeight;if(u||d)return}let d=o.current.floatingContext?.nodeId,f=g&&Td(g.nodesRef.current,d).some(t=>yd(e,t.context?.elements.floating));if(yd(e,a.floating)||yd(e,a.domReference)||f)return;let p=g?Td(g.nodesRef.current,d):[];if(p.length>0){let e=!0;if(p.forEach(t=>{var n;(n=t.context)!=null&&n.open&&!t.context.dataRef.current.__outsidePressBubbles&&(e=!1)}),!e)return}i(!1,e,`outside-press`)}),j=Id(e=>{var t;let n=()=>{var t;A(e),(t=vd(e))==null||t.removeEventListener(u,n)};(t=vd(e))==null||t.addEventListener(u,n)});J.useEffect(()=>{if(!n||!s)return;o.current.__escapeKeyBubbles=x,o.current.__outsidePressBubbles=S;let e=-1;function t(e){i(!1,e,`ancestor-scroll`)}function l(){window.clearTimeout(e),D.current=!0}function d(){e=window.setTimeout(()=>{D.current=!1},w()?5:0)}let f=xd(a.floating);c&&(f.addEventListener(`keydown`,C?k:O,C),f.addEventListener(`compositionstart`,l),f.addEventListener(`compositionend`,d)),y&&f.addEventListener(u,T?j:A,T);let m=[];return p&&(R(a.domReference)&&(m=r(a.domReference)),R(a.floating)&&(m=m.concat(r(a.floating))),!R(a.reference)&&a.reference&&a.reference.contextElement&&(m=m.concat(r(a.reference.contextElement)))),m=m.filter(e=>e!==f.defaultView?.visualViewport),m.forEach(e=>{e.addEventListener(`scroll`,t)}),()=>{c&&(f.removeEventListener(`keydown`,C?k:O,C),f.removeEventListener(`compositionstart`,l),f.removeEventListener(`compositionend`,d)),y&&f.removeEventListener(u,T?j:A,T),m.forEach(e=>{e.removeEventListener(`scroll`,t)}),window.clearTimeout(e)}},[o,a,c,y,u,n,i,p,s,x,S,O,C,k,A,T,j]),J.useEffect(()=>{o.current.insideReactTree=!1},[o,y,u]);let N=J.useMemo(()=>({onKeyDown:O,...d&&{[Qf[f]]:e=>{i(!1,e.nativeEvent,`reference-press`)},...f!==`click`&&{onClick(e){i(!1,e.nativeEvent,`reference-press`)}}}}),[O,i,d,f]),P=J.useMemo(()=>{function e(e){e.button===0&&(b.current=!0)}return{onKeyDown:O,onMouseDown:e,onMouseUp:e,[$f[u]]:()=>{o.current.insideReactTree=!0}}},[O,u,o]);return J.useMemo(()=>s?{reference:N,floating:P}:{},[s,N,P])}function np(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=sf(),a=J.useRef({}),[o]=J.useState(()=>cf()),s=df()!=null,[c,l]=J.useState(r.reference),u=Id((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=J.useMemo(()=>({setPositionReference:l}),[]),f=J.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return J.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function rp(e){let{elements:t,...n}=e===void 0?{}:e,{nodeId:r}=n,i=np({...n,elements:{reference:t?.reference??null,floating:t?.floating??null}}),a=n.rootContext||i,o=a.elements,[s,l]=J.useState(null),[u,d]=J.useState(null),f=o?.domReference||s,p=J.useRef(null),m=ff();Md(()=>{f&&(p.current=f)},[f]);let h=c({...n,elements:{...o,...u&&{reference:u}}}),g=J.useCallback(e=>{let t=R(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;d(t),h.refs.setReference(t)},[h.refs]),_=J.useCallback(e=>{(R(e)||e===null)&&(p.current=e,l(e)),(R(h.refs.reference.current)||h.refs.reference.current===null||e!==null&&!R(e))&&h.refs.setReference(e)},[h.refs]),v=J.useMemo(()=>({...h.refs,setReference:_,setPositionReference:g,domReference:p}),[h.refs,_,g]),y=J.useMemo(()=>({...h.elements,domReference:f}),[h.elements,f]),b=J.useMemo(()=>({...h,...a,refs:v,elements:y,nodeId:r}),[h,v,y,r,a]);return Md(()=>{a.dataRef.current.floatingContext=b;let e=m?.nodesRef.current.find(e=>e.id===r);e&&(e.context=b)}),J.useMemo(()=>({...h,context:b,refs:v,elements:y}),[h,v,y,b])}function ip(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[qd]:t,[Jd]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[Kd]:``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[qd,Jd].includes(n))){if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){var e=[...arguments];return r.get(n)?.map(t=>t(...e)).find(e=>e!==void 0)}}}else e[n]=a}}),e),{})}}function ap(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=J.useCallback(t=>ip(t,e,`reference`),t),a=J.useCallback(t=>ip(t,e,`floating`),n),o=J.useCallback(t=>ip(t,e,`item`),r);return J.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}var op=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,t)=>(t?`-`:``)+e.toLowerCase());function sp(e,t){return typeof e==`function`?e(t):e}function cp(e,t){let[n,r]=J.useState(e);return e&&!n&&r(!0),J.useEffect(()=>{if(!e&&n){let e=setTimeout(()=>r(!1),t);return()=>clearTimeout(e)}},[e,n,t]),n}function lp(e,t){t===void 0&&(t={});let{open:n,elements:{floating:r}}=e,{duration:i=250}=t,a=(typeof i==`number`?i:i.close)||0,[o,s]=J.useState(`unmounted`),c=cp(n,a);return!c&&o===`close`&&s(`unmounted`),Md(()=>{if(r){if(n){s(`initial`);let e=requestAnimationFrame(()=>{Wd.flushSync(()=>{s(`open`)})});return()=>{cancelAnimationFrame(e)}}s(`close`)}},[n,r]),{isMounted:c,status:o}}function up(e,t){t===void 0&&(t={});let{initial:n={opacity:0},open:r,close:i,common:a,duration:o=250}=t,s=e.placement,c=s.split(`-`)[0],l=J.useMemo(()=>({side:c,placement:s}),[c,s]),u=typeof o==`number`,d=(u?o:o.open)||0,f=(u?o:o.close)||0,[p,m]=J.useState(()=>({...sp(a,l),...sp(n,l)})),{isMounted:h,status:g}=lp(e,{duration:o}),_=Pd(n),v=Pd(r),y=Pd(i),b=Pd(a);return Md(()=>{let e=sp(_.current,l),t=sp(y.current,l),n=sp(b.current,l),r=sp(v.current,l)||Object.keys(e).reduce((e,t)=>(e[t]=``,e),{});if(g===`initial`&&m(t=>({transitionProperty:t.transitionProperty,...n,...e})),g===`open`&&m({transitionProperty:Object.keys(r).map(op).join(`,`),transitionDuration:d+`ms`,...n,...r}),g===`close`){let r=t||e;m({transitionProperty:Object.keys(r).map(op).join(`,`),transitionDuration:f+`ms`,...n,...r})}},[f,y,_,v,b,d,g,l]),{isMounted:h,styles:p}}function dp(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...dp(e,t.id,n)])}function fp(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e<a;o=e++){let[a,s]=t[e]||[0,0],[c,l]=t[o]||[0,0];s>=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function pp(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function mp(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i={current:-1},a=!1,o=null,s=null,c=typeof performance<`u`?performance.now():0;function l(e,t){let n=performance.now(),r=n-c;if(o===null||s===null||r===0)return o=e,s=t,c=n,null;let i=e-o,a=t-s,l=Math.sqrt(i*i+a*a)/r;return o=e,s=t,c=n,l}let u=e=>{let{x:n,y:o,placement:s,elements:c,onClose:u,nodeId:d,tree:f}=e;return function(e){function p(){mf(i),u()}if(mf(i),!c.domReference||!c.floating||s==null||n==null||o==null)return;let{clientX:m,clientY:h}=e,g=[m,h],_=Sf(e),v=e.type===`mouseleave`,y=xf(c.floating,_),b=xf(c.domReference,_),x=c.domReference.getBoundingClientRect(),S=c.floating.getBoundingClientRect(),C=s.split(`-`)[0],w=n>S.right-S.width/2,T=o>S.bottom-S.height/2,E=pp(g,x),D=S.width>x.width,O=S.height>x.height,k=(D?x:S).left,A=(D?x:S).right,j=(O?x:S).top,M=(O?x:S).bottom;if(y&&(a=!0,!v))return;if(b&&(a=!1),b&&!v){a=!0;return}if(v&&R(e.relatedTarget)&&xf(c.floating,e.relatedTarget)||f&&dp(f.nodesRef.current,d).length)return;if(C===`top`&&o>=x.bottom-1||C===`bottom`&&o<=x.top+1||C===`left`&&n>=x.right-1||C===`right`&&n<=x.left+1)return p();let N=[];switch(C){case`top`:N=[[k,x.top+1],[k,S.bottom-1],[A,S.bottom-1],[A,x.top+1]];break;case`bottom`:N=[[k,S.top+1],[k,x.bottom-1],[A,x.bottom-1],[A,S.top+1]];break;case`left`:N=[[S.right-1,M],[S.right-1,j],[x.left+1,j],[x.left+1,M]];break;case`right`:N=[[x.right-1,M],[x.right-1,j],[S.left+1,j],[S.left+1,M]]}function P(e){let[n,r]=e;switch(C){case`top`:return[[D?n+t/2:w?n+t*4:n-t*4,r+t+1],[D?n-t/2:w?n+t*4:n-t*4,r+t+1],[S.left,w||D?S.bottom-t:S.top],[S.right,w?D?S.bottom-t:S.top:S.bottom-t]];case`bottom`:return[[D?n+t/2:w?n+t*4:n-t*4,r-t],[D?n-t/2:w?n+t*4:n-t*4,r-t],[S.left,w||D?S.top+t:S.bottom],[S.right,w?D?S.top+t:S.bottom:S.top+t]];case`left`:{let e=[n+t+1,O?r+t/2:T?r+t*4:r-t*4],i=[n+t+1,O?r-t/2:T?r+t*4:r-t*4];return[[T||O?S.right-t:S.left,S.top],[T?O?S.right-t:S.left:S.right-t,S.bottom],e,i]}case`right`:return[[n-t,O?r+t/2:T?r+t*4:r-t*4],[n-t,O?r-t/2:T?r+t*4:r-t*4],[T||O?S.left+t:S.right,S.top],[T?O?S.left+t:S.right:S.left+t,S.bottom]]}}if(!fp([m,h],N)){if(a&&!E)return p();if(!v&&r){let t=l(e.clientX,e.clientY);if(t!==null&&t<.1)return p()}fp([m,h],P([n,o]))?!a&&r&&(i.current=window.setTimeout(p,40)):p()}}};return u.__options={blockPointerEvents:n},u}var hp=n((e=>{var t=i();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),gp=n(((e,t)=>{t.exports=hp()})),_p=n((e=>{var t=i(),n=gp();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:r,o=n.useSyncExternalStore,s=t.useRef,c=t.useEffect,l=t.useMemo,u=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),vp=n(((e,t)=>{t.exports=_p()})),yp=n(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(i of t.entries())if(!n.has(i[0]))return!1;for(i of t.entries())if(!e(i[1],n.get(i[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(i of t.entries())if(!n.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(t[i]!==n[i])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!(o===`_owner`&&t.$$typeof)&&!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}})),bp=vp(),xp=t(yp(),1),Sp=Object.defineProperty,Cp=(e,t)=>{let n={};for(var r in e)Sp(n,r,{get:e[r],enumerable:!0});return t||Sp(n,Symbol.toStringTag,{value:`Module`}),n};function wp(e,t=null){return function(n,r){let{$from:i,$to:a}=n.selection,o=i.blockRange(a);if(!o)return!1;let s=r?n.tr:null;return Tp(s,o,e,t)?(r&&r(s.scrollIntoView()),!0):!1}}function Tp(e,t,n,r=null){let i=!1,a=t,o=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let e=o.resolve(t.start-2);a=new Ve(e,e,t.depth),t.endIndex<t.parent.childCount&&(t=new Ve(t.$from,o.resolve(t.$to.end(t.depth)),t.depth)),i=!0}let s=we(a,n,r,t);return s?(e&&Ep(e,t,s,i,n),!0):!1}function Ep(e,t,n,r,i){let a=U.empty;for(let e=n.length-1;e>=0;e--)a=U.from(n[e].type.create(n[e].attrs,a));e.step(new vt(t.start-(r?2:0),t.end,t.start,t.end,new _e(a,0,0),n.length,!0));let o=0;for(let e=0;e<n.length;e++)n[e].type==i&&(o=e+1);let s=n.length-o,c=t.start+n.length-(r?2:0),l=t.parent;for(let n=t.startIndex,r=t.endIndex,i=!0;n<r;n++,i=!1)!i&&Le(e.doc,c,s)&&(e.split(c,s),c+=2*s),c+=l.child(n).nodeSize;return e}function Dp(e){return function(t,n){let{$from:r,$to:i}=t.selection,a=r.blockRange(i,t=>t.childCount>0&&t.firstChild.type==e);return a?n?r.node(a.depth-1).type==e?Op(t,n,e,a):kp(t,n,a):!0:!1}}function Op(e,t,n,r){let i=e.tr,a=r.end,o=r.$to.end(r.depth);a<o&&(i.step(new vt(a-1,o,a,o,new _e(U.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new Ve(i.doc.resolve(r.$from.pos),i.doc.resolve(o),r.depth));let s=lt(r);if(s==null)return!1;i.lift(r,s);let c=i.doc.resolve(i.mapping.map(a,-1)-1);return Te(i.doc,c.pos)&&c.nodeBefore.type==c.nodeAfter.type&&i.join(c.pos),t(i.scrollIntoView()),!0}function kp(e,t,n){let r=e.tr,i=n.parent;for(let e=n.end,t=n.endIndex-1,a=n.startIndex;t>a;t--)e-=i.child(t).nodeSize,r.delete(e-1,e+1);let a=r.doc.resolve(n.start),o=a.nodeAfter;if(r.mapping.map(n.end)!=n.start+a.nodeAfter.nodeSize)return!1;let s=n.startIndex==0,c=n.endIndex==i.childCount,l=a.node(-1),u=a.index(-1);if(!l.canReplace(u+ +!s,u+1,o.content.append(c?U.empty:U.from(i))))return!1;let d=a.pos,f=d+o.nodeSize;return r.step(new vt(d-+!!s,f+ +!!c,d+1,f-1,new _e((s?U.empty:U.from(i.copy(U.empty))).append(c?U.empty:U.from(i.copy(U.empty))),+!s,+!c),+!s)),t(r.scrollIntoView()),!0}function Ap(e){return function(t,n){let{$from:r,$to:i}=t.selection,a=r.blockRange(i,t=>t.childCount>0&&t.firstChild.type==e);if(!a)return!1;let o=a.startIndex;if(o==0)return!1;let s=a.parent,c=s.child(o-1);if(c.type!=e)return!1;if(n){let r=c.lastChild&&c.lastChild.type==s.type,i=U.from(r?e.create():null),o=new _e(U.from(e.create(null,U.from(s.type.create(null,i)))),r?3:1,0),l=a.start,u=a.end;n(t.tr.step(new vt(l-(r?3:1),u,l,u,o,1,!0)).scrollIntoView())}return!0}}function jp(e){let{state:t,transaction:n}=e,{selection:r}=n,{doc:i}=n,{storedMarks:a}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return a},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,a=n.storedMarks,n}}}var Mp=class e{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:i}=n,a=this.buildProps(i);return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,(...e)=>{let n=t(...e)(a);return!i.getMeta(`preventDispatch`)&&!this.hasCustomState&&r.dispatch(i),n}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){let{rawCommands:n,editor:r,state:i}=this,{view:a}=r,o=[],s=!!e,c=e||i.tr,l=()=>(!s&&t&&!c.getMeta(`preventDispatch`)&&!this.hasCustomState&&a.dispatch(c),o.every(e=>e===!0)),u={...Object.fromEntries(Object.entries(n).map(([e,n])=>[e,(...e)=>{let r=this.buildProps(c,t),i=n(...e)(r);return o.push(i),u}])),run:l};return u}static createFakeChain(){let e=new Proxy({},{get:(t,n)=>{if(n!==`then`)return n===`run`?()=>!1:()=>e}});return e}createCan(e){let{rawCommands:t,state:n}=this,r=e||n.tr,i=this.buildProps(r,!1);return{...Object.fromEntries(Object.entries(t).map(([e,t])=>[e,(...e)=>t(...e)({...i,dispatch:void 0})])),chain:()=>this.createChain(r,!1)}}static createFallbackCan(){let t=e.createFakeChain();return new Proxy({chain:()=>t},{get:(e,t)=>{if(t!==`then`)return t===`chain`?e.chain:()=>!1}})}buildProps(e,t=!0){let{rawCommands:n,editor:r,state:i}=this,{view:a}=r,o={tr:e,editor:r,view:a,state:jp({state:i,transaction:e}),dispatch:t?()=>void 0:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([e,t])=>[e,(...e)=>t(...e)(o)]))}};return o}},Np=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{if(!e.isDestroyed){var n;t.dom.blur(),(n=window)==null||(n=n.getSelection())==null||n.removeAllRanges()}}),!0),Pp=(e=!0)=>({commands:t})=>t.setContent(``,{emitUpdate:e}),Fp=()=>({state:e,tr:t,dispatch:n})=>{let{selection:r}=t,{ranges:i}=r;return n&&i.forEach(({$from:n,$to:r})=>{e.doc.nodesBetween(n.pos,r.pos,(e,n)=>{if(e.type.isText)return;let{doc:r,mapping:i}=t,a=r.resolve(i.map(n)),o=r.resolve(i.map(n+e.nodeSize)),s=a.blockRange(o);if(!s)return;let c=lt(s);if(e.type.isTextblock){let{defaultType:e}=a.parent.contentMatchAt(a.index());t.setNodeMarkup(s.start,e)}(c||c===0)&&t.lift(s,c)})}),!0},Ip=e=>t=>e(t),Lp=()=>({state:e,dispatch:t})=>qe(e,t),Rp=(e,t)=>({editor:n,tr:r})=>{let{state:i}=n,a=i.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);let o=r.mapping.map(t);return r.insert(o,a.content),r.setSelection(new H(r.doc.resolve(Math.max(o-1,0)))),!0},zp=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;let i=e.selection.$anchor;for(let n=i.depth;n>0;--n)if(i.node(n).type===r.type){if(t){let t=i.before(n),r=i.after(n);e.delete(t,r).scrollIntoView()}return!0}return!1};function Bp(e,t){if(typeof e==`string`){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}var Vp=e=>({tr:t,state:n,dispatch:r})=>{let i=Bp(e,n.schema),a=t.selection.$anchor;for(let e=a.depth;e>0;--e)if(a.node(e).type===i){if(r){let n=a.before(e),r=a.after(e);t.delete(n,r).scrollIntoView()}return!0}return!1},Hp=e=>({tr:t,dispatch:n})=>{let{from:r,to:i}=e;return n&&t.delete(r,i),!0},Up=e=>e.content?/^text(\*|\+)/.test(e.content):!1,Wp=(e,t,n)=>{if(!e.parent.isInline||n===`left`&&e.pos>e.start()||n===`right`&&e.pos<e.end())return e.pos;let r=t.nodes[e.parent.type.name].spec;return Up(r)?n===`left`?e.start()-1:e.end()+1:e.pos},Gp=(e,t,n)=>({from:Wp(e,n,`left`),to:Wp(t,n,`right`)}),Kp=()=>({state:e,dispatch:t})=>{if(e.selection.empty)return!1;if(t){let n=e.tr,{ranges:r}=e.selection,i=n.steps.length;r.forEach(t=>{let r=n.mapping.slice(i),{from:a,to:o}=Gp(n.doc.resolve(r.map(t.$from.pos)),n.doc.resolve(r.map(t.$to.pos)),e.schema);n.deleteRange(a,o)}),n.selection.empty||n.setSelection(H.near(n.doc.resolve(n.selection.from))),n.scrollIntoView(),t(n)}return!0},qp=()=>({commands:e})=>e.keyboardShortcut(`Enter`),Jp=()=>({state:e,dispatch:t})=>Ye(e,t);function Yp(e){return Object.prototype.toString.call(e)===`[object RegExp]`}function Xp(e,t,n={strict:!0}){let r=Object.keys(t);return!r.length||r.every(r=>n.strict?t[r]===e[r]:Yp(t[r])?t[r].test(e[r]):t[r]===e[r])}function Zp(e,t,n={}){return e.find(e=>e.type===t&&Xp(Object.fromEntries(Object.keys(n).map(t=>[t,e.attrs[t]])),n))}function Qp(e,t,n={}){return!!Zp(e,t,n)}function $p(e,t,n){if(!e||!t)return;let r=e.parent.childAfter(e.parentOffset);if(r.node&&r.node.marks.some(e=>e.type===t)||(r=e.parent.childBefore(e.parentOffset)),!r.node||!r.node.marks.some(e=>e.type===t))return;if(!n){let e=r.node.marks.find(e=>e.type===t);e&&(n=e.attrs)}if(!Zp([...r.node.marks],t,n))return;let i=r.index,a=e.start()+r.offset,o=i+1,s=a+r.node.nodeSize;for(;i>0&&Qp([...e.parent.child(i-1).marks],t,n);)--i,a-=e.parent.child(i).nodeSize;for(;o<e.parent.childCount&&Qp([...e.parent.child(o).marks],t,n);)s+=e.parent.child(o).nodeSize,o+=1;return{from:a,to:s}}function em(e,t){if(typeof e==`string`){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}var tm=(e,t)=>({tr:n,state:r,dispatch:i})=>{let a=em(e,r.schema),{doc:o,selection:s}=n,{$from:c,from:l,to:u}=s;if(i){let e=$p(c,a,t);if(e&&e.from<=l&&e.to>=u){let t=H.create(o,e.from,e.to);n.setSelection(t)}}return!0},nm=e=>t=>{let n=typeof e==`function`?e(t):e;for(let e=0;e<n.length;e+=1)if(n[e](t))return!0;return!1};function rm(e){return e instanceof H}function im(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function am(e,t=null){if(!t)return null;let n=Me.atStart(e),r=Me.atEnd(e);if(t===`start`||t===!0)return n;if(t===`end`)return r;let i=n.from,a=r.to;return t===`all`?H.create(e,im(0,i,a),im(e.content.size,i,a)):H.create(e,im(t,i,a),im(t,i,a))}function om(){return[`Android`].includes(navigator.platform)||/android/i.test(navigator.userAgent)}function sm(){return[`iPad Simulator`,`iPhone Simulator`,`iPod Simulator`,`iPad`,`iPhone`,`iPod`].includes(navigator.platform)||navigator.userAgent.includes(`Mac`)&&`ontouchend`in document}function cm(){return typeof navigator<`u`&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}var lm=(e=null,t={})=>({editor:n,view:r,tr:i,dispatch:a})=>{t={scrollIntoView:!0,...t};let o=()=>{(sm()||om())&&r.dom.focus(),cm()&&!sm()&&!om()&&r.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t?.scrollIntoView&&n.commands.scrollIntoView())})};try{if(r.hasFocus()&&e===null||e===!1)return!0}catch{return!1}if(a&&e===null&&!rm(n.state.selection))return o(),!0;let s=am(i.doc,e)||n.state.selection,c=n.state.selection.eq(s);return a&&(c||i.setSelection(s),c&&i.storedMarks&&i.setStoredMarks(i.storedMarks),o()),!0},um=(e,t)=>n=>e.every((e,r)=>t(e,{...n,index:r})),dm=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),fm=e=>{let t=e.childNodes;for(let n=t.length-1;n>=0;--n){let r=t[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):r.nodeType===1&&fm(r)}return e};function pm(e){if(typeof window>`u`)throw Error(`[tiptap error]: there is no window object available, so this function cannot be used`);let t=`<body>${e}</body>`,n=new window.DOMParser().parseFromString(t,`text/html`).body;return fm(n)}function mm(e){return typeof e?.nodesBetween==`function`}function hm(e,t,n){if(mm(e))return e;let r=typeof e==`object`&&!!e;n={slice:!0,parseOptions:{},...n};let i=typeof e==`string`;if(r)try{if(Array.isArray(e)&&e.length>0)return U.fromArray(e.map(e=>t.nodeFromJSON(e)));let r=t.nodeFromJSON(e);return n.errorOnInvalidContent&&r.check(),r}catch(r){if(n.errorOnInvalidContent)throw Error(`[tiptap error]: Invalid JSON content`,{cause:r});return console.warn(`[tiptap warn]: Invalid content.`,`Passed value:`,e,`Error:`,r),hm(``,t,n)}if(i){if(n.errorOnInvalidContent){let r=!1,i=``,a=new Ne({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:`inline*`,group:`block`,parseDOM:[{tag:`*`,getAttrs:e=>(r=!0,i=typeof e==`string`?e:e.outerHTML,null)}]}})});if(n.slice?Ee.fromSchema(a).parseSlice(pm(e),n.parseOptions):Ee.fromSchema(a).parse(pm(e),n.parseOptions),n.errorOnInvalidContent&&r)throw Error(`[tiptap error]: Invalid HTML content`,{cause:Error(`Invalid element found: ${i}`)})}let r=Ee.fromSchema(t);return n.slice?r.parseSlice(pm(e),n.parseOptions).content:r.parse(pm(e),n.parseOptions)}return hm(``,t,n)}function gm(e){return!(`type`in e)}function _m(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof ye||i instanceof vt))return;let a=e.mapping.maps[r],o=0;a.forEach((e,t,n,r)=>{o===0&&(o=r)}),e.setSelection(Me.near(e.doc.resolve(o),n))}var vm=(e,t,n)=>({tr:r,dispatch:i,editor:a})=>{if(i){n={parseOptions:a.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let i,o=e=>{a.emit(`contentError`,{editor:a,error:e,disableCollaboration:()=>{`collaboration`in a.storage&&typeof a.storage.collaboration==`object`&&a.storage.collaboration&&(a.storage.collaboration.isDisabled=!0)}})},s={preserveWhitespace:`full`,...n.parseOptions};if(!n.errorOnInvalidContent&&!a.options.enableContentCheck&&a.options.emitContentError)try{hm(t,a.schema,{parseOptions:s,errorOnInvalidContent:!0})}catch(e){o(e)}try{i=hm(t,a.schema,{parseOptions:s,errorOnInvalidContent:n.errorOnInvalidContent??a.options.enableContentCheck})}catch(e){return o(e),!1}let{from:c,to:l}=typeof e==`number`?{from:e,to:e}:{from:e.from,to:e.to},u=!0,d=!0,f=gm(i)?i.content:[i];if(f.forEach(e=>{e.check(),u=u?e.isText&&e.marks.length===0:!1,d=d?e.isBlock:!1}),c===l&&d){let{parent:e}=r.doc.resolve(c);e.isTextblock&&!e.type.spec.code&&!e.childCount&&(--c,l+=1)}let p;if(u)p=Array.isArray(t)?t.map(e=>e.text||``).join(``):mm(t)?f.map(e=>e.text??``).join(``):typeof t==`object`&&t&&t.text?t.text:t,r.insertText(p,c,l);else{p=U.from(f);let e=r.doc.resolve(c),t=e.node(),n=e.parentOffset===0,i=t.isText||t.isTextblock,a=t.content.size>0;n&&i&&a&&d&&(c=Math.max(0,c-1)),r.replaceWith(c,l,f)}n.updateSelection&&_m(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta(`applyInputRules`,{from:c,text:p}),n.applyPasteRules&&r.setMeta(`applyPasteRules`,{from:c,text:p})}return!0};function ym(e){for(let t=0;t<e.edgeCount;t+=1){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}var bm=(e={})=>({tr:t,dispatch:n,editor:r})=>{let{pos:i,attrs:a,content:o,updateSelection:s=!0}=e,c;c=typeof i==`number`?t.doc.resolve(i):i||t.selection.$from;let l=ym(c.parent.contentMatchAt(c.index()));if(!l)return!1;let u=Object.keys(l.spec.attrs||{}),d=a?Object.fromEntries(Object.entries(a).filter(([e])=>u.includes(e))):{},f;if(o){let e=hm(o,r.schema);f=l.createAndFill(d,e)}else f=l.createAndFill(d);return f?(n&&(t.insert(c.pos,f),s&&_m(t,t.steps.length-1,-1)),!0):!1},xm=()=>({state:e,dispatch:t})=>mt(e,t),Sm=()=>({state:e,dispatch:t})=>rt(e,t),Cm=()=>({state:e,dispatch:t})=>ct(e,t),wm=()=>({state:e,dispatch:t})=>Ze(e,t),Tm=(e,t)=>{let n=e.resolve(t),r=n.nodeBefore,i=n.nodeAfter;return!r||!i?!1:!r.type.spec.isolating&&!i.type.spec.isolating},Em=()=>({state:e,dispatch:t,tr:n})=>{try{let r=De(e.doc,e.selection.$from.pos,-1);return r==null||!Tm(e.doc,r)?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},Dm=()=>({state:e,dispatch:t,tr:n})=>{try{let r=De(e.doc,e.selection.$from.pos,1);return r==null||!Tm(e.doc,r)?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},Om=()=>({state:e,dispatch:t})=>Xe(e,t),km=()=>({state:e,dispatch:t})=>He(e,t);function Am(){return typeof navigator<`u`&&/Mac/.test(navigator.platform)}function jm(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n===`Space`&&(n=` `);let r,i,a,o;for(let e=0;e<t.length-1;e+=1){let n=t[e];if(/^(cmd|meta|m)$/i.test(n))o=!0;else if(/^a(lt)?$/i.test(n))r=!0;else if(/^(c|ctrl|control)$/i.test(n))i=!0;else if(/^s(hift)?$/i.test(n))a=!0;else if(/^mod$/i.test(n))sm()||Am()?o=!0:i=!0;else throw Error(`Unrecognized modifier name: ${n}`)}return r&&(n=`Alt-${n}`),i&&(n=`Ctrl-${n}`),o&&(n=`Meta-${n}`),a&&(n=`Shift-${n}`),n}var Mm=e=>({editor:t,view:n,tr:r,dispatch:i})=>{let a=jm(e).split(/-(?!$)/),o=a.find(e=>![`Alt`,`Ctrl`,`Meta`,`Shift`].includes(e)),s=new KeyboardEvent(`keydown`,{key:o===`Space`?` `:o,altKey:a.includes(`Alt`),ctrlKey:a.includes(`Ctrl`),metaKey:a.includes(`Meta`),shiftKey:a.includes(`Shift`),bubbles:!0,cancelable:!0});return t.captureTransaction(()=>{n.someProp(`handleKeyDown`,e=>e(n,s))})?.steps.forEach(e=>{let t=e.map(r.mapping);t&&i&&r.maybeStep(t)}),!0};function Nm(e,t,n={}){let{from:r,to:i,empty:a}=e.selection,o=t?Bp(t,e.schema):null,s=[];e.doc.nodesBetween(r,i,(e,t)=>{if(e.isText)return;let n=Math.max(r,t),a=Math.min(i,t+e.nodeSize);s.push({node:e,from:n,to:a})});let c=i-r,l=s.filter(e=>!o||o.name===e.node.type.name).filter(e=>Xp(e.node.attrs,n,{strict:!1}));return a?!!l.length:l.reduce((e,t)=>e+t.to-t.from,0)>=c}var Pm=(e,t={})=>({state:n,dispatch:r})=>Nm(n,Bp(e,n.schema),t)?_t(n,r):!1,Fm=()=>({state:e,dispatch:t})=>Ge(e,t),Im=e=>({state:t,dispatch:n})=>Dp(Bp(e,t.schema))(t,n),Lm=()=>({state:e,dispatch:t})=>gt(e,t);function Rm(e,t){return t.nodes[e]?`node`:t.marks[e]?`mark`:null}function zm(e,t){let n=typeof t==`string`?[t]:t;return Object.keys(e).reduce((t,r)=>(n.includes(r)||(t[r]=e[r]),t),{})}var Bm=(e,t)=>({tr:n,state:r,dispatch:i})=>{let a=null,o=null,s=Rm(typeof e==`string`?e:e.name,r.schema);if(!s)return!1;s===`node`&&(a=Bp(e,r.schema)),s===`mark`&&(o=em(e,r.schema));let c=!1;return n.selection.ranges.forEach(e=>{r.doc.nodesBetween(e.$from.pos,e.$to.pos,(e,r)=>{a&&a===e.type&&(c=!0,i&&n.setNodeMarkup(r,void 0,zm(e.attrs,t))),o&&e.marks.length&&e.marks.forEach(a=>{o===a.type&&(c=!0,i&&n.addMark(r,r+e.nodeSize,o.create(zm(a.attrs,t))))})})}),c},Vm=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),Hm=()=>({tr:e,dispatch:t})=>{if(t){let t=new tt(e.doc);e.setSelection(t)}return!0},Um=()=>({state:e,dispatch:t})=>Fe(e,t),Wm=()=>({state:e,dispatch:t})=>be(e,t),Gm=()=>({state:e,dispatch:t})=>ht(e,t),Km=()=>({state:e,dispatch:t})=>Ie(e,t),qm=()=>({state:e,dispatch:t})=>Se(e,t);function Jm(e,t,n={},r={}){return hm(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var Ym=(e,{errorOnInvalidContent:t,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:i,tr:a,dispatch:o,commands:s})=>{let{doc:c}=a;if(r.preserveWhitespace!==`full`){let s=Jm(e,i.schema,r,{errorOnInvalidContent:t??i.options.enableContentCheck});if(o){let e=gm(s)?s.content:[s];a.replaceWith(0,c.content.size,e).setMeta(`preventUpdate`,!n)}return!0}return o&&a.setMeta(`preventUpdate`,!n),s.insertContentAt({from:0,to:c.content.size},e,{parseOptions:r,errorOnInvalidContent:t??i.options.enableContentCheck})};function Xm(e,t){let n=em(t,e.schema),{from:r,to:i,empty:a}=e.selection,o=[];a?(e.storedMarks&&o.push(...e.storedMarks),o.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,i,e=>{o.push(...e.marks)});let s=o.find(e=>e.type.name===n.name);return s?{...s.attrs}:{}}function Zm(e,t){let n=new Re(e);return t.forEach(e=>{e.steps.forEach(e=>{n.step(e)})}),n}function Qm(e,t,n){let r=[];return e.nodesBetween(t.from,t.to,(e,t)=>{n(e)&&r.push({node:e,pos:t})}),r}function $m(e,t){for(let n=e.depth;n>0;--n){let r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function eh(e){return t=>$m(t.$from,e)}function X(e,t,n){return e.config[t]===void 0&&e.parent?X(e.parent,t,n):typeof e.config[t]==`function`?e.config[t].bind({...n,parent:e.parent?X(e.parent,t,n):null}):e.config[t]}function th(e){return e.map(e=>{let t=X(e,`addExtensions`,{name:e.name,options:e.options,storage:e.storage});return t?[e,...th(t())]:e}).flat(10)}function nh(e,t){let n=Be.fromSchema(t).serializeFragment(e),r=document.implementation.createHTMLDocument().createElement(`div`);return r.appendChild(n),r.innerHTML}function rh(e,t){let n=new Map;for(let t of e){let e=n.get(t.type)??new Map;e.set(t.name,t),n.set(t.type,e)}return[...Object.values(t.nodes),...Object.values(t.marks)].flatMap(e=>Object.entries(e.spec.attrs??{}).map(([t,r])=>{let i=n.get(e.name)?.get(t),a=Object.hasOwn(r,`default`);return{type:e.name,name:t,attribute:{rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,...i?.attribute,default:r.default,isRequired:!a,validate:r.validate}}}))}var ih={content:`string`,marks:`string`,group:`string`,inline:`boolean`,atom:`boolean`,selectable:`boolean`,draggable:`boolean`,code:`boolean`,whitespace:[`pre`,`normal`],definingAsContext:`boolean`,definingForContent:`boolean`,defining:`boolean`,isolating:`boolean`,linebreakReplacement:`boolean`},ah={inclusive:`boolean`,excludes:`string`,group:`string`,spanning:`boolean`,code:`boolean`};function oh(e,t,n){return Object.fromEntries(Object.entries(t).flatMap(([t,r])=>{let i=e[t];if(i===void 0)return[];if(!(typeof r==`string`?typeof i===r:typeof i==`string`&&r.includes(i)))throw RangeError(`Invalid schemaSpec field '${n}.${t}'`);return[[t,i]]}))}function sh(e,t,n,r){return{...Object.fromEntries(Object.entries(t).filter(([e])=>e!==`attrs`&&!Object.hasOwn(r,e))),...oh(n,r,e),attrs:n.attrs}}function ch(e,t,n){for(let r of Object.keys(t))if(!Object.hasOwn(e,r))throw RangeError(`schemaSpec requires a local ${n} extension named '${r}'`);for(let r of Object.keys(e))if(!Object.hasOwn(t,r))throw RangeError(`Local ${n} extension '${r}' is not in schemaSpec`)}function lh(e,t){ch(e.nodes,t.nodes,`node`),ch(e.marks,t.marks,`mark`);let n=t.spec.nodes,r=t.spec.marks;return t.spec.nodes.forEach((t,r)=>{n=n.update(t,sh(t,e.nodes[t],r,ih))}),t.spec.marks.forEach((t,n)=>{r=r.update(t,sh(t,e.marks[t],n,ah))}),{topNode:t.topNodeType.name,nodes:n,marks:r}}function uh(e){let t=e.filter((t,n)=>e.indexOf(t)!==n);return Array.from(new Set(t))}function dh(e){return{baseExtensions:e.filter(e=>e.type===`extension`),nodeExtensions:e.filter(e=>e.type===`node`),markExtensions:e.filter(e=>e.type===`mark`)}}function fh(e){let t=[],{nodeExtensions:n,markExtensions:r}=dh(e),i=[...n,...r],a={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},o=n.filter(e=>e.name!==`text`).map(e=>e.name),s=r.map(e=>e.name),c=[...o,...s];return e.forEach(e=>{let n=X(e,`addGlobalAttributes`,{name:e.name,options:e.options,storage:e.storage,extensions:i});n&&n().forEach(e=>{let n;n=Array.isArray(e.types)?e.types:e.types===`*`?c:e.types===`nodes`?o:e.types===`marks`?s:[],n.forEach(n=>{Object.entries(e.attributes).forEach(([e,r])=>{t.push({type:n,name:e,attribute:{...a,...r}})})})})}),i.forEach(e=>{let n=X(e,`addAttributes`,{name:e.name,options:e.options,storage:e.storage});if(!n)return;let r=n();Object.entries(r).forEach(([n,r])=>{let i={...a,...r};typeof i?.default==`function`&&(i.default=i.default()),i?.isRequired&&i?.default===void 0&&delete i.default,t.push({type:e.name,name:n,attribute:i})})}),t}function ph(e){return typeof e==`function`}function mh(e,t=void 0,...n){return ph(e)?t?e.bind(t)(...n):e(...n):e}function hh(e={}){return Object.keys(e).length===0&&e.constructor===Object}function gh(e){let t=[],n=``,r=!1,i=!1,a=0,o=e.length;for(let s=0;s<o;s+=1){let o=e[s];if(o===`'`&&!i)r=!r,n+=o;else if(o===`"`&&!r)i=!i,n+=o;else{if(!r&&!i){if(o===`(`){a+=1,n+=o;continue}if(o===`)`&&a>0){--a,n+=o;continue}if(o===`;`&&a===0){t.push(n),n=``;continue}}n+=o}}return n&&t.push(n),t}function _h(e){let t=[],n=gh(e||``),r=n.length;for(let e=0;e<r;e+=1){let r=n[e],i=r.indexOf(`:`);if(i===-1)continue;let a=r.slice(0,i).trim(),o=r.slice(i+1).trim();a&&o&&t.push([a,o])}return t}function vh(...e){return e.filter(e=>!!e).reduce((e,t)=>{let n={...e};return Object.entries(t).forEach(([e,t])=>{if(e===`__proto__`)Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:t,writable:!0});else if(!n[e])n[e]=t;else if(e===`class`){let r=t?String(t).split(` `):[],i=n[e]?n[e].split(` `):[],a=r.filter(e=>!i.includes(e));n[e]=[...i,...a].join(` `)}else if(e===`style`){let r=new Map([..._h(n[e]),..._h(t)]);n[e]=Array.from(r.entries()).map(([e,t])=>`${e}: ${t}`).join(`; `)}else n[e]=t}),n},{})}function yh(e,t){return t.filter(t=>t.type===e.type.name).filter(e=>e.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(e.attrs)||{}:{[t.name]:e.attrs[t.name]}).reduce((e,t)=>vh(e,t),{})}function bh(e){return typeof e==`string`?e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e===`true`||e!==`false`&&e:e}function xh(e,t){return`style`in e?e:{...e,getAttrs:n=>{let r=e.getAttrs?e.getAttrs(n):e.attrs;if(r===!1)return!1;let i=t.reduce((e,t)=>{let r=t.attribute.parseHTML?t.attribute.parseHTML(n):bh(n.getAttribute(t.name));return r==null?e:{...e,[t.name]:r}},{});return{...r,...i}}}}function Sh(e){return Object.fromEntries(Object.entries(e).filter(([e,t])=>e===`attrs`&&hh(t)?!1:t!=null))}function Ch(e){var t,n;let r={};return!(e!=null&&(t=e.attribute)!=null&&t.isRequired)&&`default`in(e?.attribute||{})&&(r.default=e.attribute.default),(e==null||(n=e.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=e.attribute.validate),[e.name,r]}function wh(e,t,n=fh(e)){let{nodeExtensions:r,markExtensions:i}=dh(e);return{topNode:r.find(e=>X(e,`topNode`))?.name,nodes:Object.fromEntries(r.map(r=>{let i=n.filter(e=>e.type===r.name),a={name:r.name,options:r.options,storage:r.storage,editor:t},o=Sh({...e.reduce((e,t)=>{let n=X(t,`extendNodeSchema`,a);return{...e,...n?n(r):{}}},{}),content:mh(X(r,`content`,a)),marks:mh(X(r,`marks`,a)),group:mh(X(r,`group`,a)),inline:mh(X(r,`inline`,a)),atom:mh(X(r,`atom`,a)),selectable:mh(X(r,`selectable`,a)),draggable:mh(X(r,`draggable`,a)),code:mh(X(r,`code`,a)),whitespace:mh(X(r,`whitespace`,a)),linebreakReplacement:mh(X(r,`linebreakReplacement`,a)),defining:mh(X(r,`defining`,a)),isolating:mh(X(r,`isolating`,a)),attrs:Object.fromEntries(i.map(Ch))}),s=mh(X(r,`parseHTML`,a));s&&(o.parseDOM=s.map(e=>xh(e,i)));let c=X(r,`renderHTML`,a);c&&(o.toDOM=e=>c({node:e,HTMLAttributes:yh(e,i)}));let l=X(r,`renderText`,a);return l&&(o.toText=l),[r.name,o]})),marks:Object.fromEntries(i.map(r=>{let i=n.filter(e=>e.type===r.name),a={name:r.name,options:r.options,storage:r.storage,editor:t},o=Sh({...e.reduce((e,t)=>{let n=X(t,`extendMarkSchema`,a);return{...e,...n?n(r):{}}},{}),inclusive:mh(X(r,`inclusive`,a)),excludes:mh(X(r,`excludes`,a)),group:mh(X(r,`group`,a)),spanning:mh(X(r,`spanning`,a)),code:mh(X(r,`code`,a)),attrs:Object.fromEntries(i.map(Ch))}),s=mh(X(r,`parseHTML`,a));s&&(o.parseDOM=s.map(e=>xh(e,i)));let c=X(r,`renderHTML`,a);return c&&(o.toDOM=e=>c({mark:e,HTMLAttributes:yh(e,i)})),[r.name,o]}))}}function Th(e,t,n){if(n===void 0)return new Ne(wh(e,t));let r=uh(e.filter(e=>e.type!==`extension`).map(e=>e.name));if(r.length)throw RangeError(`Duplicate local schema types: ${r.join(`, `)}`);let i=new Ne(n),a=wh(e,t,rh(fh(e),i));return new Ne(lh(a,i))}function Eh(e){return e.sort((e,t)=>{let n=X(e,`priority`)||100,r=X(t,`priority`)||100;return n>r?-1:+(n<r)})}function Dh(e){let t=Eh(th(e)),n=uh(t.map(e=>e.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(e=>`'${e}'`).join(`, `)}]. This can lead to issues.`),t}function Oh(e,t){return Th(Dh(e),t)}function kh(e,t,n){let{from:r,to:i}=t,{blockSeparator:a=`
60
-
61
- `,textSerializers:o={}}=n||{},s=``;return e.nodesBetween(r,i,(e,n,c,l)=>{e.isBlock&&n>r&&(s+=a);let u=o?.[e.type.name];if(u)return c&&(s+=u({node:e,pos:n,parent:c,index:l,range:t})),!1;if(e.isText){var d;s+=e==null||(d=e.text)==null?void 0:d.slice(Math.max(r,n)-n,i-n)}}),s}function Ah(e,t){return kh(e,{from:0,to:e.content.size},t)}function jh(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}function Mh(e,t){let n=Bp(t,e.schema),{from:r,to:i}=e.selection,a=[];e.doc.nodesBetween(r,i,e=>{a.push(e)});let o=a.reverse().find(e=>e.type.name===n.name);return o?{...o.attrs}:{}}function Nh(e,t){let n=Rm(typeof t==`string`?t:t.name,e.schema);return n===`node`?Mh(e,t):n===`mark`?Xm(e,t):{}}function Ph(e,t=JSON.stringify){let n={};return e.filter(e=>{let r=t(e);return Object.prototype.hasOwnProperty.call(n,r)?!1:n[r]=!0})}function Fh(e){let t=Ph(e);return t.length===1?t:t.filter((e,n)=>!t.filter((e,t)=>t!==n).some(t=>e.oldRange.from>=t.oldRange.from&&e.oldRange.to<=t.oldRange.to&&e.newRange.from>=t.newRange.from&&e.newRange.to<=t.newRange.to))}function Ih(e){let{mapping:t,steps:n}=e,r=[];return t.maps.forEach((e,i)=>{let a=[];if(e.ranges.length)e.forEach((e,t)=>{a.push({from:e,to:t})});else{let{from:e,to:t}=n[i];if(e===void 0||t===void 0)return;a.push({from:e,to:t})}a.forEach(({from:e,to:n})=>{let a=t.slice(i).map(e,-1),o=t.slice(i).map(n),s=t.invert().map(a,-1),c=t.invert().map(o);r.push({oldRange:{from:s,to:c},newRange:{from:a,to:o}})})}),Fh(r)}function Lh(e,t,n){let r=[];return e===t?n.resolve(e).marks().forEach(t=>{let i=$p(n.resolve(e),t.type);i&&r.push({mark:t,...i})}):n.nodesBetween(e,t,(e,t)=>{e&&e?.nodeSize!==void 0&&r.push(...e.marks.map(n=>({from:t,to:t+e.nodeSize,mark:n})))}),r}function Rh(e,t){return t.nodes[e]||t.marks[e]||null}function zh(e,t,n){return Object.fromEntries(Object.entries(n).filter(([n])=>{let r=e.find(e=>e.type===t&&e.name===n);return r?r.attribute.keepOnSplit:!1}))}var Bh=(e,t=500)=>{let n=``,r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(e,t,i,a)=>{var o;let s=(o=e.type.spec).toText?.call(o,{node:e,pos:t,parent:i,index:a})||e.textContent||`%leaf%`;n+=e.isAtom&&!e.isText?s:s.slice(0,Math.max(0,r-t))}),n};function Vh(e,t,n={}){let{empty:r,ranges:i}=e.selection,a=t?em(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(e=>!a||a.name===e.type.name).find(e=>Xp(e.attrs,n,{strict:!1}));let o=0,s=[];if(i.forEach(({$from:t,$to:n})=>{let r=t.pos,i=n.pos;e.doc.nodesBetween(r,i,(e,t)=>{if(a&&e.inlineContent&&!e.type.allowsMarkType(a))return!1;if(!e.isText&&!e.marks.length)return;let n=Math.max(r,t),c=Math.min(i,t+e.nodeSize),l=c-n;o+=l,s.push(...e.marks.map(e=>({mark:e,from:n,to:c})))})}),o===0)return!1;let c=s.filter(e=>!a||a.name===e.mark.type.name).filter(e=>Xp(e.mark.attrs,n,{strict:!1})).reduce((e,t)=>e+t.to-t.from,0),l=s.filter(e=>!a||e.mark.type!==a&&e.mark.type.excludes(a)).reduce((e,t)=>e+t.to-t.from,0);return(c>0?c+l:c)>=o}function Hh(e,t,n={}){if(!t)return Nm(e,null,n)||Vh(e,null,n);let r=Rm(t,e.schema);return r===`node`?Nm(e,t,n):r===`mark`&&Vh(e,t,n)}function Uh(e,t){return Array.isArray(t)?t.some(t=>(typeof t==`string`?t:t.name)===e.name):t}function Wh(e,t){let{nodeExtensions:n}=dh(t),r=n.find(t=>t.name===e);if(!r)return!1;let i=mh(X(r,`group`,{name:r.name,options:r.options,storage:r.storage}));return typeof i==`string`&&i.split(` `).includes(`list`)}function Gh(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){if(n){if(e.type.name===`hardBreak`)return!0;if(e.isText)return!/\S/.test(e.text??``)}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let r=!0;return e.content.forEach(e=>{r!==!1&&(Gh(e,{ignoreWhitespace:n,checkChildren:t})||(r=!1))}),r}return!1}function Kh(e){return e instanceof et}function qh(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.apply==`function`&&typeof t.getMap==`function`&&typeof t.invert==`function`&&typeof t.map==`function`&&typeof t.merge==`function`&&typeof t.toJSON==`function`}function Jh(e){if(typeof e!=`object`||!e)return!1;let t=e;if(!qh(t))return!1;let n=t.toJSON();return!(typeof n!=`object`||!n||n.stepType!==`replace`)}var Yh=class e{constructor(e){this.position=e}static fromJSON(t){return new e(t.position)}toJSON(){return{position:this.position}}};function Xh(e,t){let n=t.mapping.mapResult(e.position);return{position:new Yh(n.pos),mapResult:n}}function Zh(e){return new Yh(e)}function Qh(e,t,n){let r=e.state.doc.content.size,i=im(t,0,r),a=im(n,0,r),o=e.coordsAtPos(i),s=e.coordsAtPos(a,-1),c=Math.min(o.top,s.top),l=Math.max(o.bottom,s.bottom),u=Math.min(o.left,s.left),d=Math.max(o.right,s.right),f={top:c,bottom:l,left:u,right:d,width:d-u,height:l-c,x:u,y:c};return{...f,toJSON:()=>f}}function $h(e,t,n){let{selection:r}=t,i=null;if(rm(r)&&(i=r.$cursor),i){let t=e.storedMarks??i.marks();return i.parent.type.allowsMarkType(n)&&(!!n.isInSet(t)||!t.some(e=>e.type.excludes(n)))}let{ranges:a}=r;return a.some(({$from:t,$to:r})=>{let i=t.depth===0&&e.doc.inlineContent&&e.doc.type.allowsMarkType(n);return e.doc.nodesBetween(t.pos,r.pos,(e,t,r)=>{if(i)return!1;if(e.isInline){let t=!r||r.type.allowsMarkType(n),a=!!n.isInSet(e.marks)||!e.marks.some(e=>e.type.excludes(n));i=t&&a}return!i}),i})}var eg=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let{selection:a}=n,{empty:o,ranges:s}=a,c=em(e,r.schema);if(i){if(o){let e=Xm(r,c);n.addStoredMark(c.create({...e,...t}))}else s.forEach(e=>{let i=e.$from.pos,a=e.$to.pos;r.doc.nodesBetween(i,a,(e,r)=>{let o=Math.max(r,i),s=Math.min(r+e.nodeSize,a);e.marks.find(e=>e.type===c)?e.marks.forEach(e=>{c===e.type&&n.addMark(o,s,c.create({...e.attrs,...t}))}):n.addMark(o,s,c.create(t))})})}return $h(r,n,c)},tg=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),ng=(e,t={})=>({state:n,dispatch:r,chain:i})=>{let a=Bp(e,n.schema),o;return n.selection.$anchor.sameParent(n.selection.$head)&&(o=n.selection.$anchor.parent.attrs),a.isTextblock?i().command(({commands:e})=>xe(a,{...o,...t})(n)?!0:e.clearNodes()).command(({state:e})=>xe(a,{...o,...t})(e,r)).run():(console.warn(`[tiptap warn]: Currently "setNode()" only supports text block nodes.`),!1)},rg=e=>({tr:t,dispatch:n})=>{if(n){let{doc:n}=t,r=im(e,0,n.content.size),i=et.create(n,r);t.setSelection(i)}return!0},ig=(e,t)=>({tr:n,state:r,dispatch:i})=>{let{selection:a}=r,o,s;return typeof t==`number`?(o=t,s=t):t&&`from`in t&&`to`in t?(o=t.from,s=t.to):(o=a.from,s=a.to),i&&n.doc.nodesBetween(o,s,(t,r)=>{t.isText||n.setNodeMarkup(r,void 0,{...t.attrs,dir:e})}),!0},ag=e=>({tr:t,dispatch:n})=>{if(n){let{doc:n}=t,{from:r,to:i}=typeof e==`number`?{from:e,to:e}:e,a=H.atStart(n).from,o=H.atEnd(n).to,s=im(r,a,o),c=im(i,a,o),l=H.create(n,s,c);t.setSelection(l)}return!0},og=e=>({state:t,dispatch:n})=>Ap(Bp(e,t.schema))(t,n);function sg(e,t){let n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){let r=n.filter(e=>t?.includes(e.type.name));e.tr.ensureMarks(r)}}var cg=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:i})=>{let{selection:a,doc:o}=t,{$from:s,$to:c}=a,l=i.extensionManager.attributes,u=zh(l,s.node().type.name,s.node().attrs);if(a instanceof et&&a.node.isBlock)return!s.parentOffset||!Le(o,s.pos)?!1:(r&&(e&&sg(n,i.extensionManager.splittableMarks),t.split(s.pos).scrollIntoView()),!0);if(!s.parent.isBlock)return!1;let d=c.parentOffset===c.parent.content.size,f=s.depth===0?void 0:ym(s.node(-1).contentMatchAt(s.indexAfter(-1))),p=d&&f?[{type:f,attrs:u}]:void 0,m=a instanceof H&&!a.empty?ve.create({doc:t.doc,selection:a}).tr.deleteSelection():null,h=m?m.doc:t.doc,g=m?m.mapping.map(s.pos):s.pos,_=Le(h,g,1,p);if(!p&&!_&&Le(h,g,1,f?[{type:f}]:void 0)&&(_=!0,p=f?[{type:f,attrs:u}]:void 0),r){if(_){let e=t.steps.length;if(a instanceof H&&t.deleteSelection(),t.split(t.mapping.slice(e).map(s.pos),1,p),f&&!d&&!s.parentOffset&&s.parent.type!==f){let n=t.mapping.slice(e).map(s.before()),r=t.doc.resolve(n);s.node(-1).canReplaceWith(r.index(),r.index()+1,f)&&t.setNodeMarkup(t.mapping.slice(e).map(s.before()),f)}}e&&sg(n,i.extensionManager.splittableMarks),t.scrollIntoView()}return _},lg=(e,t={})=>({tr:n,state:r,dispatch:i,editor:a})=>{let o=Bp(e,r.schema),{$from:s,$to:c}=r.selection,l=r.selection.node;if(l&&l.isBlock||s.depth<2||!s.sameParent(c))return!1;let u=s.node(-1);if(u.type!==o)return!1;let d=a.extensionManager.attributes;if(s.parent.content.size===0&&s.node(-1).childCount===s.indexAfter(-1)){if(s.depth===2||s.node(-3).type!==o||s.index(-2)!==s.node(-2).childCount-1)return!1;if(i){let e=U.empty,r=s.index(-1)?1:s.index(-2)?2:3;for(let t=s.depth-r;t>=s.depth-3;--t)e=U.from(s.node(t).copy(e));let i=s.indexAfter(-1)<s.node(-2).childCount?1:s.indexAfter(-2)<s.node(-3).childCount?2:3,a={...zh(d,s.node().type.name,s.node().attrs),...t},c=o.contentMatch.defaultType?.createAndFill(a)||void 0;e=e.append(U.from(o.createAndFill(null,c)||void 0));let l=s.before(s.depth-(r-1));n.replace(l,s.after(-i),new _e(e,4-r,0));let u=-1;n.doc.nodesBetween(l,n.doc.content.size,(e,t)=>{if(u>-1)return!1;e.isTextblock&&e.content.size===0&&(u=t+1)}),u>-1&&n.setSelection(H.near(n.doc.resolve(u))),n.scrollIntoView()}return!0}let f=c.pos===s.end()?u.contentMatchAt(0).defaultType:null,p={...zh(d,u.type.name,u.attrs),...t},m={...zh(d,s.node().type.name,s.node().attrs),...t},h=s.parentOffset===0&&s.index(-1)===0,g=s.before(-1);n.delete(s.pos,c.pos);let _=h?u.attrs:p,v=f?[{type:o,attrs:_},{type:f,attrs:m}]:[{type:o,attrs:_}];if(!Le(n.doc,s.pos,2))return!1;if(i){let{selection:e,storedMarks:t}=r,{splittableMarks:o}=a.extensionManager,c=t||e.$to.parentOffset&&e.$from.marks();if(n.split(s.pos,2,v).scrollIntoView(),h&&n.setNodeMarkup(g,void 0,p),!c||!i)return!0;let l=c.filter(e=>o.includes(e.type.name));n.ensureMarks(l)}return!0};function ug(e,t,n){if(!e.validContent(t))return null;try{return e.create(n,t)}catch{return null}}function dg(e,t){if(e.pendingContent.length===0)return!0;let n=ug(t,U.from(e.pendingContent));return n?(e.items.push(n),e.pendingContent=[],!0):!1}function fg(e,t,n){return n.validContent(U.from([...t.pendingContent,e]))?(t.pendingContent.push(e),!0):!dg(t,n)||!n.validContent(U.from(e))?!1:(t.pendingContent.push(e),!0)}function pg(e,t,n,r){let i=r(e,n);if(!i)return!1;let a=ug(n.listType,U.from(i),e.attrs);return a?n.itemType.validContent(U.from([...t.pendingContent,a]))?(t.pendingContent.push(a),!0):dg(t,n.itemType)?(t.items.push(...i),!0):!1:!1}function mg(e,t,n){let r={items:[],pendingContent:[]};for(let i=0;i<e.childCount;i+=1){let a=e.child(i);if(!(t.isListNode(a)?pg(a,r,t,n):fg(a,r,t.itemType)))return null}return dg(r,t.itemType)?r.items:null}function hg(e,t){let n=[];for(let r=0;r<e.childCount;r+=1){let i=mg(e.child(r),t,hg);if(!i)return null;n.push(...i)}return n}function gg(e,t){let n=null;return e.descendants((e,r)=>e!==t||(n=r,!1)),n}function _g(e){return!e||e===`1`?null:e}function vg(e,t){return _g(e)===_g(t)}var yg=(e,t)=>{let n=eh(e=>e.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;let i=e.doc.nodeAt(r);return!(n.node.type===i?.type&&Te(e.doc,n.pos))||!vg(n.node.attrs.type,i?.attrs.type)||e.join(n.pos),!0},bg=(e,t)=>{let n=eh(e=>e.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;let i=e.doc.nodeAt(r);return!(n.node.type===i?.type&&Te(e.doc,r))||!vg(n.node.attrs.type,i?.attrs.type)||e.join(r),!0};function xg(e){let t=e.doc,n=t.firstChild;if(!n)return null;let r=t.resolve(1),i=t.resolve(n.nodeSize-1);return H.between(r,i)}var Sg=(e,t,n,r={})=>({editor:i,tr:a,state:o,dispatch:s,chain:c,commands:l,can:u})=>{let{extensions:d,splittableMarks:f}=i.extensionManager,p=Bp(e,o.schema),m=Bp(t,o.schema),{selection:h,storedMarks:g}=o,{$from:_,$to:v}=h,y=_.blockRange(v),b=g||h.$to.parentOffset&&h.$from.marks();if(!y)return!1;let x=eh(e=>Wh(e.type.name,d))(h),S=h.from===0&&h.to===o.doc.content.size,C=o.doc.content.content,w=C.length===1?C[0]:null,T=S&&w&&Wh(w.type.name,d)?{node:w,pos:0,depth:0}:null,E=x??T,D=!!x&&y.depth>=1&&y.depth-x.depth<=1,O=!!T;if((D||O)&&E){if(E.node.type===p)return S&&O?c().command(({tr:e,dispatch:t})=>{let n=xg(e);return n?(e.setSelection(n),t&&t(e),!0):!1}).liftListItem(m).run():l.liftListItem(m);if(Wh(E.node.type.name,d)&&p.validContent(E.node.content))return c().command(()=>(a.setNodeMarkup(E.pos,p),!0)).command(()=>yg(a,p)).command(()=>bg(a,p)).run();if(Wh(E.node.type.name,d)){let e=E.node.firstChild?.type;if(e&&e!==m){let e=hg(E.node,{listType:p,itemType:m,isListNode:e=>Wh(e.type.name,d)}),t=e?U.from(e):null;return!t||!p.validContent(t)?!1:c().command(()=>{let{$anchor:e,$head:n}=a.selection,i=e.parent,o=n.parent,s=e.parentOffset,c=n.parentOffset,l;try{l=p.create(r,t)}catch{return!1}if(a.replaceWith(E.pos,E.pos+E.node.nodeSize,l),i.inlineContent&&o.inlineContent){let e=gg(l,i),t=gg(l,o);if(e!==null&&t!==null){let n=E.pos+e+2+s,r=E.pos+t+2+c;a.setSelection(H.create(a.doc,n,r))}}return!0}).command(()=>yg(a,p)).command(()=>bg(a,p)).run()}}}return!n||!b||!s?c().command(()=>u().wrapInList(p,r)?!0:l.clearNodes()).wrapInList(p,r).command(()=>yg(a,p)).command(()=>bg(a,p)).run():c().command(()=>{let e=u().wrapInList(p,r),t=b.filter(e=>f.includes(e.type.name));return a.ensureMarks(t),e?!0:l.clearNodes()}).wrapInList(p,r).command(()=>yg(a,p)).command(()=>bg(a,p)).run()},Cg=(e,t={},n={})=>({state:r,commands:i})=>{let{extendEmptyMarkRange:a=!1}=n,o=em(e,r.schema);return Vh(r,o,t)?i.unsetMark(o,{extendEmptyMarkRange:a}):i.setMark(o,t)},wg=(e,t,n={})=>({state:r,commands:i})=>{let a=Bp(e,r.schema),o=Bp(t,r.schema),s=Nm(r,a,n),c;return r.selection.$anchor.sameParent(r.selection.$head)&&(c=r.selection.$anchor.parent.attrs),s?i.setNode(o,c):i.setNode(a,{...c,...n})},Tg=(e,t={})=>({state:n,commands:r})=>{let i=Bp(e,n.schema);return Nm(n,i,t)?r.lift(i):r.wrapIn(i,t)},Eg=()=>({state:e,dispatch:t})=>{let n=e.plugins;for(let r=0;r<n.length;r+=1){let i=n[r],a;if(i.spec.isInputRules&&(a=i.getState(e))){if(t){let t=e.tr,n=a.transform;for(let e=n.steps.length-1;e>=0;--e)t.step(n.steps[e].invert(n.docs[e]));if(a.text){let n=t.doc.resolve(a.from).marks();t.replaceWith(a.from,a.to,e.schema.text(a.text,n))}else t.delete(a.from,a.to)}return!0}}return!1},Dg=(e={})=>({tr:t,dispatch:n,editor:r})=>{let{ignoreClearable:i=!1}=e,{selection:a}=t,{empty:o,ranges:s}=a;if(o)return!0;let{nonClearableMarks:c}=r.extensionManager;if(n){let e=Object.values(r.schema.marks).filter(e=>i||!c.includes(e.name));s.forEach(n=>{for(let r of e)t.removeMark(n.$from.pos,n.$to.pos,r)})}return!0},Og=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let{extendEmptyMarkRange:a=!1}=t,{selection:o}=n,s=em(e,r.schema),{$from:c,empty:l,ranges:u}=o;if(!i)return!0;if(l&&a){let{from:e,to:t}=o,r=$p(c,s,c.marks().find(e=>e.type===s)?.attrs);r&&(e=r.from,t=r.to),n.removeMark(e,t,s)}else u.forEach(e=>{n.removeMark(e.$from.pos,e.$to.pos,s)});return n.removeStoredMark(s),!0},kg=e=>({tr:t,state:n,dispatch:r})=>{let{selection:i}=n,a,o;return typeof e==`number`?(a=e,o=e):e&&`from`in e&&`to`in e?(a=e.from,o=e.to):(a=i.from,o=i.to),r&&t.doc.nodesBetween(a,o,(e,n)=>{if(e.isText)return;let r={...e.attrs};delete r.dir,t.setNodeMarkup(n,void 0,r)}),!0},Ag=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let a=null,o=null,s=Rm(typeof e==`string`?e:e.name,r.schema);if(!s)return!1;s===`node`&&(a=Bp(e,r.schema)),s===`mark`&&(o=em(e,r.schema));let c=!1;return n.selection.ranges.forEach(e=>{let s=e.$from.pos,l=e.$to.pos,u,d,f,p;n.selection.empty?r.doc.nodesBetween(s,l,(e,t)=>{a&&a===e.type&&(c=!0,f=Math.max(t,s),p=Math.min(t+e.nodeSize,l),u=t,d=e)}):r.doc.nodesBetween(s,l,(e,r)=>{r<s&&a&&a===e.type&&(c=!0,f=Math.max(r,s),p=Math.min(r+e.nodeSize,l),u=r,d=e),r>=s&&r<=l&&(a&&a===e.type&&(c=!0,i&&n.setNodeMarkup(r,void 0,{...e.attrs,...t})),o&&e.marks.length&&e.marks.forEach(a=>{if(o===a.type&&(c=!0,i)){let i=Math.max(r,s),c=Math.min(r+e.nodeSize,l);n.addMark(i,c,o.create({...a.attrs,...t}))}}))}),d&&(u!==void 0&&i&&n.setNodeMarkup(u,void 0,{...d.attrs,...t}),o&&d.marks.length&&d.marks.forEach(e=>{o===e.type&&i&&n.addMark(f,p,o.create({...e.attrs,...t}))}))}),c},jg=new Ae(`__tiptap_decorations__`),Mg=e=>({tr:t,dispatch:n})=>(n&&t.setMeta(jg,{type:`force`,name:e}),!0),Ng=(e,t={})=>({state:n,dispatch:r})=>{let i=Bp(e,n.schema);return je(i,t)(n,r)},Pg=(e,t={})=>({state:n,dispatch:r})=>wp(Bp(e,n.schema),t)(n,r),Fg=Cp({blur:()=>Np,clearContent:()=>Pp,clearNodes:()=>Fp,command:()=>Ip,createParagraphNear:()=>Lp,cut:()=>Rp,deleteCurrentNode:()=>zp,deleteNode:()=>Vp,deleteRange:()=>Hp,deleteSelection:()=>Kp,enter:()=>qp,exitCode:()=>Jp,extendMarkRange:()=>tm,first:()=>nm,focus:()=>lm,forEach:()=>um,insertContent:()=>dm,insertContentAt:()=>vm,insertDefaultBlock:()=>bm,joinBackward:()=>Cm,joinDown:()=>Sm,joinForward:()=>wm,joinItemBackward:()=>Em,joinItemForward:()=>Dm,joinTextblockBackward:()=>Om,joinTextblockForward:()=>km,joinUp:()=>xm,keyboardShortcut:()=>Mm,lift:()=>Pm,liftEmptyBlock:()=>Fm,liftListItem:()=>Im,newlineInCode:()=>Lm,resetAttributes:()=>Bm,scrollIntoView:()=>Vm,selectAll:()=>Hm,selectNodeBackward:()=>Um,selectNodeForward:()=>Wm,selectParentNode:()=>Gm,selectTextblockEnd:()=>Km,selectTextblockStart:()=>qm,setContent:()=>Ym,setMark:()=>eg,setMeta:()=>tg,setNode:()=>ng,setNodeSelection:()=>rg,setTextDirection:()=>ig,setTextSelection:()=>ag,sinkListItem:()=>og,splitBlock:()=>cg,splitListItem:()=>lg,toggleList:()=>Sg,toggleMark:()=>Cg,toggleNode:()=>wg,toggleWrap:()=>Tg,undoInputRule:()=>Eg,unsetAllMarks:()=>Dg,unsetMark:()=>Og,unsetTextDirection:()=>kg,updateAttributes:()=>Ag,updateDecorations:()=>Mg,wrapIn:()=>Ng,wrapInList:()=>Pg}),Ig=new WeakMap;function Lg(e,t){Ig.set(e,(Ig.get(e)??0)+1);try{return t()}finally{let t=(Ig.get(e)??1)-1;t>0?Ig.set(e,t):Ig.delete(e)}}function Rg(e){return Ig.has(e)}var zg=class{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){let n=this.callbacks[e];return n&&n.forEach(e=>e.apply(this,t)),this}off(e,t){let n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter(e=>e!==t):delete this.callbacks[e]),this}once(e,t){let n=(...r)=>{this.off(e,n),t.apply(this,r)};return this.on(e,n)}removeAllListeners(){this.callbacks={}}},Bg=typeof process<`u`&&!1;function Vg(e){return e.kind===`widget`}function Hg(e,t){let n=[],r=new Set;for(let i of e)i.kind===`widget`&&Vg(i)&&r.add(i.key),n.push(i.toPMDecoration(t));return{decorations:n,widgetKeys:r}}function Ug(e,t,n){let{decorations:r,widgetKeys:i}=Hg(t,n);return{set:Ke.create(e,r),widgetKeys:i}}function Wg({position:e,from:t,to:n,docSize:r}){return e<t?!1:e<n||e===n&&n===r}function Gg({decorations:e,from:t,to:n,docSize:r,extensionName:i,warnedExtensions:a}){return e.filter(e=>Wg({position:e.anchor,from:t,to:n,docSize:r})?!0:(e.anchor===n||a.has(i)||(a.add(i),console.warn(`[tiptap warn]: Extension "${i}" returned a decoration outside the requested range [${t}, ${n}). It was ignored.`)),!1))}function Kg(e){let t=e.spec?.key;return typeof t==`string`?t:void 0}function qg(e){let t=new Map,n=new Map;for(let r of e.find()){let e=Kg(r);if(!e)continue;let i=r.spec.extensionName??`unknown`,a=t.get(e)??new Set;a.add(i),t.set(e,a),n.set(e,(n.get(e)??0)+1)}return Array.from(t,([e,t])=>({key:e,extensions:t})).filter(({key:e})=>(n.get(e)??0)>1)}function Jg(e){return e.jsonID===`attr`}function Yg(e){let t=!1;if(e.getMap().forEach(()=>{t=!0}),t||Jg(e))return!0;let n=e;return typeof n.from==`number`&&typeof n.to==`number`}function Xg(e,t){let n=null,r=0,i=0;for(let a=0;a<e.childCount&&!(i>t.to);a+=1){let o=i+e.child(a).nodeSize;o>=t.from&&(n===null&&(n=i),r=o),i=o}return n===null?null:{from:n,to:r}}function Zg(e,t){if(e.steps.some(e=>!Yg(e)))return{type:`full`};let n=Ih(e).map(({newRange:e})=>e);e.steps.forEach((t,r)=>{if(!Jg(t))return;let i=e.mapping.slice(r);n.push({from:i.map(t.pos,-1),to:i.map(t.pos+1)})});let r=[];for(let e of n){let n=Xg(t,e);n&&r.push(n)}r.sort((e,t)=>e.from-t.from);let i=[];for(let e of r){let t=i[i.length-1];t&&e.from<=t.to?t.to=Math.max(t.to,e.to):i.push({...e})}return{type:`ranges`,ranges:i}}function Qg(e,t,n,r){return e.map(t,n,{onRemove:e=>{let t=e?.key;typeof t==`string`&&r.delete(t)}})}function $g(e,t,n){let r=t.decorationSetsByExtension[e]??Ke.empty,i=new Set(t.widgetKeysByExtension[e]??[]);return{set:Qg(r,n.mapping,n.doc,i),widgetKeys:i}}function e_(e,t){let n=Object.values(t).flatMap(e=>e.find());return Ke.create(e,n)}function t_(e){let t=new Set;for(let n of Object.values(e))for(let e of n)t.add(e);return t}function n_(e,t){switch(t.update??`document`){case`document`:if(t.createInRange)throw Error(`[tiptap error]: Extension "${e}" provides createInRange() but does not use the "changedRanges" decoration update strategy.`);return;case`changedRanges`:if(!t.createInRange)throw Error(`[tiptap error]: Extension "${e}" uses the "changedRanges" decoration update strategy but does not provide createInRange().`);return;case`manual`:if(t.createInRange)throw Error(`[tiptap error]: Extension "${e}" uses the "manual" decoration update strategy, which is not compatible with createInRange(). createInRange() requires the "changedRanges" strategy.`);if(t.shouldUpdate)throw Error(`[tiptap error]: Extension "${e}" cannot combine the "manual" decoration update strategy with shouldUpdate().`);return;default:throw Error(`[tiptap error]: Extension "${e}" uses an unknown decoration update strategy. Expected "document", "changedRanges", or "manual".`)}}function r_(e,t,n){return n?!0:e.update===`manual`?!1:e.shouldUpdate?e.shouldUpdate(t):t.tr.docChanged}var i_=new Set,a_=class{constructor(e){this.warnedWidgetKeys=new Set,this.warnedOutOfRangeExtensions=new Set,this.handleBeforeTransaction=({nextState:e})=>{let t=jg.getState(e);t&&this.warnDuplicateWidgetKeys(t)},this.editor=e.editor,this.entries=this.resolveEntries(e.entries),this.entries.forEach(({name:e,spec:t})=>n_(e,t)),this.plugin=this.entries.length>0?this.createPlugin():null,this.editor.on(`beforeTransaction`,this.handleBeforeTransaction)}destroy(){this.editor.off(`beforeTransaction`,this.handleBeforeTransaction)}liveWidgetKeys(){return jg.getState(this.editor.state)?.widgetKeys??i_}get mountedView(){return this.editor.isDestroyed?null:this.editor.view}resolveEntries(e){let t=[];for(let{name:n,addDecorations:r}of e){let e=r();e&&t.push({name:n,spec:e})}return t}createPlugin(){let{editor:e,entries:t}=this;return new ke({key:jg,state:{init:(e,n)=>{let r={},i={};for(let{name:e,spec:a}of t){let{set:t,widgetKeys:o}=this.buildFullSet(e,a,n);r[e]=t,i[e]=o}let a={decorationSetsByExtension:r,widgetKeysByExtension:i,mergedDecorationSet:this.buildMergedSet(n.doc,r),widgetKeys:t_(i)};return this.warnDuplicateWidgetKeys(a),a},apply:(n,r,i,a)=>{let o=n.getMeta(jg),s=o?.type===`force`&&!o.name,c=o?.type===`force`?o.name:void 0,l={},u={},d=new Set;return Lg(e,()=>{for(let{name:o,spec:f}of t){let t=s||c===o;if(!r_(f,{editor:e,tr:n,oldState:i,newState:a},t)){let e=$g(o,r,n);l[o]=e.set,u[o]=e.widgetKeys}else if(f.update===`changedRanges`&&n.docChanged&&!t){let e=this.applyChangedRangesRecompute(o,f,r,n,a);l[o]=e.set,u[o]=e.widgetKeys,d.add(o)}else{let{set:e,widgetKeys:t}=this.buildFullSet(o,f,a);l[o]=e,u[o]=t,d.add(o)}}}),d.size===0&&!n.docChanged?r:{decorationSetsByExtension:l,widgetKeysByExtension:u,mergedDecorationSet:this.mergeAfterApply({entries:t,previous:r,tr:n,decorationSetsByExtension:l,recomputedNames:d}),widgetKeys:t_(u)}}},props:{decorations(e){return jg.getState(e)?.mergedDecorationSet??Ke.empty}}})}applyChangedRangesRecompute(e,t,n,r,i){let a=Zg(r,i.doc);return a.type===`full`?this.buildFullSet(e,t,i):this.rebuildRanges(e,t,n,r,i,a.ranges)}rebuildRanges(e,t,n,r,i,a){let o=n.decorationSetsByExtension[e]??Ke.empty,s=new Set(n.widgetKeysByExtension[e]??[]),c=Qg(o,r.mapping,r.doc,s),l=i.doc.content.size;for(let{from:n,to:r}of a){let a=c.find(n,r).filter(e=>Wg({position:e.from,from:n,to:r,docSize:l}));for(let e of a){let t=Kg(e);t&&s.delete(t)}c=c.remove(a);let{decorations:o,widgetKeys:u}=Hg(Gg({decorations:this.runCreate(e,`createInRange`,()=>t.createInRange({editor:this.editor,state:i,view:this.mountedView,from:n,to:r})),from:n,to:r,docSize:l,extensionName:e,warnedExtensions:this.warnedOutOfRangeExtensions}),e);c=c.add(i.doc,o);for(let e of u)s.add(e)}return{set:c,widgetKeys:s}}buildFullSet(e,t,n){let r=this.runCreate(e,`create`,()=>t.create({editor:this.editor,state:n,view:this.mountedView}));return Ug(n.doc,r,e)}runCreate(e,t,n){try{return n()}catch(n){return console.error(`[tiptap error]: Extension "${e}" threw in \`addDecorations().${t}()\`. Its decorations were dropped for this update.`,n),[]}}warnDuplicateWidgetKeys(e){if(!Bg)return;if(e.widgetKeys.size===0){this.warnedWidgetKeys.clear();return}let t=qg(e.mergedDecorationSet),n=new Set(t.map(({key:e})=>e));for(let{key:e,extensions:n}of t){if(this.warnedWidgetKeys.has(e))continue;let t=Array.from(n).map(e=>`"${e}"`).join(`, `);console.warn(`[tiptap warn]: Duplicate widget decoration key "${e}" in extension${n.size===1?``:`s`} ${t}. Widget decoration keys must be globally unique, otherwise ProseMirror misplaces the widget DOM. Use a stable, unique key (e.g. \`comment-\${id}\`).`)}this.warnedWidgetKeys=n}buildMergedSet(e,t){let n=Object.keys(t);return n.length===1?t[n[0]]:e_(e,t)}mergeAfterApply({entries:e,previous:t,tr:n,decorationSetsByExtension:r,recomputedNames:i}){return e.length===1?r[e[0].name]:i.size===0?t.mergedDecorationSet.map(n.mapping,n.doc):e_(n.doc,r)}};function o_(e,t,n){let r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:``}]`);if(r!==null)return r;let i=document.createElement(`style`);return t&&i.setAttribute(`nonce`,t),i.setAttribute(`data-tiptap-style${n?`-${n}`:``}`,``),i.innerHTML=e,document.getElementsByTagName(`head`)[0].appendChild(i),i}function s_(e){return typeof e==`number`}function c_(e){return Object.prototype.toString.call(e).slice(8,-1)}function l_(e){return c_(e)===`Object`&&e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function u_(e,t){let n={...e};return l_(e)&&l_(t)&&Object.keys(t).forEach(r=>{l_(t[r])&&l_(e[r])?n[r]=u_(e[r],t[r]):n[r]=t[r]}),n}function d_(e,t,n={}){let{state:r}=t,{doc:i,tr:a}=r,o=e;i.descendants((t,r)=>{let i=a.mapping.map(r),s=a.mapping.map(r)+t.nodeSize,c=null;if(t.marks.forEach(e=>{if(e!==o)return!1;c=e}),!c)return;let l=!1;if(Object.keys(n).forEach(e=>{n[e]!==c.attrs[e]&&(l=!0)}),l){let t=e.type.create({...e.attrs,...n});a.removeMark(i,s,e.type),a.addMark(i,s,t)}}),a.docChanged&&t.view.dispatch(a)}var f_=class{constructor(e){this.find=e.find,this.handler=e.handler,this.undoable=e.undoable??!0}},p_=(e,t)=>{if(Yp(t))return t.exec(e);let n=t(e);if(!n)return null;let r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn(`[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".`),r.push(n.replaceWith)),r};function m_(e){let{editor:t,from:n,to:r,text:i,insertText:a}=e;if(!a)return{inputTransaction:null,tr:t.view.state.tr};let o=t.view.state.tr.insertText(i,n,r);return{inputTransaction:o,tr:ve.create({doc:o.doc,selection:o.selection,storedMarks:o.storedMarks}).tr}}function h_(e){let{editor:t,from:n,to:r,text:i,rule:a,match:o,plugin:s,insertText:c}=e,{view:l}=t,{inputTransaction:u,tr:d}=m_({editor:t,from:n,to:r,text:i,insertText:c}),f=u?n+i.length:r,p=jp({state:l.state,transaction:d}),m={from:n-(o[0].length-i.length),to:f},{commands:h,chain:g,can:_}=new Mp({editor:t,state:p});return a.handler({state:p,range:m,match:o,commands:h,chain:g,can:_})===null||!d.steps.length?!1:(u&&(l.dispatch(u),!l.state.doc.eq(u.doc))||(W(d),d.setMeta(`inputRule`,!0),a.undoable&&d.setMeta(s,{transform:d,from:n,to:f,text:i}),l.dispatch(d)),!0)}function g_(e,t,n){let r=t[0].length-n.length;if(r<=0)return!0;let i=e.parentOffset-r;return i>=0&&e.parent.textBetween(i,e.parentOffset)===t[0].slice(0,r)}function __(e){let{editor:t,from:n,to:r,text:i,rules:a,plugin:o,insertText:s}=e,{view:c}=t;if(c.composing)return!1;let l=c.state.doc.resolve(n);if(l.parent.type.spec.code||(l.nodeBefore||l.nodeAfter)?.marks.find(e=>e.type.spec.code))return!1;let u=Bh(l)+i;for(let e of a){let a=p_(u,e.find);if(a&&g_(l,a,i)&&h_({editor:t,from:n,to:r,text:i,rule:e,match:a,plugin:o,insertText:s}))return!0}return!1}function v_(e){let{editor:t,rules:n}=e,r=new ke({state:{init(){return null},apply(e,i,a){let o=e.getMeta(r);if(o)return o;let s=e.getMeta(`applyInputRules`);return s&&setTimeout(()=>{let{text:e}=s;e=typeof e==`string`?e:nh(U.from(e),a.schema);let{from:i}=s,o=i+e.length;__({editor:t,from:i,to:o,text:e,rules:n,plugin:r})}),e.selectionSet||e.docChanged?null:i}},props:{handleTextInput(e,i,a,o){return __({editor:t,from:i,to:a,text:o,rules:n,plugin:r,insertText:!0})},handleDOMEvents:{compositionend:e=>(setTimeout(()=>{let{$cursor:i}=e.state.selection;i&&__({editor:t,from:i.pos,to:i.pos,text:``,rules:n,plugin:r})}),!1)},handleKeyDown(e,i){if(i.key!==`Enter`)return!1;let{$cursor:a}=e.state.selection;return a?__({editor:t,from:a.pos,to:a.pos,text:`
62
- `,rules:n,plugin:r}):!1}},isInputRules:!0});return r}var y_=class{constructor(e={}){this.type=`extendable`,this.parent=null,this.child=null,this.name=``,this.config={name:this.name},this.config={...this.config,...e},this.name=this.config.name}get options(){return{...mh(X(this,`addOptions`,{name:this.name}))}}get storage(){return{...mh(X(this,`addStorage`,{name:this.name,options:this.options}))}}configure(e={}){let t=this.extend({...this.config,addOptions:()=>u_(this.options,e)});return t.name=this.name,t.parent=this.parent,this.child=null,t}extend(e={}){let t=new this.constructor({...this.config,...e});return t.parent=this,this.child=t,t.name=`name`in e?e.name:t.parent.name,t}},b_=class e extends y_{constructor(...e){super(...e),this.type=`mark`}static create(t={}){let n=typeof t==`function`?t():t;return new e(n)}static handleExit({editor:e,mark:t}){let{tr:n}=e.state,r=e.state.selection.$from;if(r.pos===r.end()){let i=r.marks();if(!i.find(e=>e?.type.name===t.name))return!1;let a=i.find(e=>e?.type.name===t.name);return a&&n.removeStoredMark(a),n.insertText(` `,r.pos),e.view.dispatch(n),!0}return!1}configure(e){return super.configure(e)}extend(e){let t=typeof e==`function`?e():e;return super.extend(t)}},x_=class{constructor(e){this.find=e.find,this.handler=e.handler}},S_=(e,t,n)=>{if(Yp(t))return[...e.matchAll(t)];let r=t(e,n);return r?r.map(t=>{let n=[t.text];return n.index=t.index,n.input=e,n.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn(`[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".`),n.push(t.replaceWith)),n}):[]};function C_(e){let{editor:t,state:n,from:r,to:i,rule:a,pasteEvent:o,dropEvent:s}=e,{commands:c,chain:l,can:u}=new Mp({editor:t,state:n}),d=[];return n.doc.nodesBetween(r,i,(e,t)=>{var f;if((f=e.type)!=null&&(f=f.spec)!=null&&f.code||!(e.isText||e.isTextblock||e.isInline))return;let p=e.content?.size??e.nodeSize??0,m=Math.max(r,t),h=Math.min(i,t+p);m>=h||S_(e.isText?e.text||``:e.textBetween(m-t,h-t,void 0,``),a.find,o).forEach(e=>{if(e.index===void 0)return;let t=m+e.index+1,r=t+e[0].length,i={from:n.tr.mapping.map(t),to:n.tr.mapping.map(r)},f=a.handler({state:n,range:i,match:e,commands:c,chain:l,can:u,pasteEvent:o,dropEvent:s});d.push(f)})}),d.every(e=>e!==null)}var w_=null,T_=e=>{var t;let n=new ClipboardEvent(`paste`,{clipboardData:new DataTransfer});return(t=n.clipboardData)==null||t.setData(`text/html`,e),n};function E_(e){let{editor:t,rules:n}=e,r=null,i=!1,a=!1,o=typeof ClipboardEvent<`u`?new ClipboardEvent(`paste`):null,s;try{s=typeof DragEvent<`u`?new DragEvent(`drop`):null}catch{s=null}let c=({state:e,from:n,to:r,rule:i,pasteEvt:a})=>{let c=e.tr,l=jp({state:e,transaction:c});if(C_({editor:t,state:l,from:Math.max(n-1,0),to:r.b-1,rule:i,pasteEvent:a,dropEvent:s})&&c.steps.length){try{s=typeof DragEvent<`u`?new DragEvent(`drop`):null}catch{s=null}return o=typeof ClipboardEvent<`u`?new ClipboardEvent(`paste`):null,c}};return t.on(`destroy`,()=>{w_===t&&(w_=null)}),n.map(e=>new ke({view(e){let n=n=>{r=e.dom.parentElement?.contains(n.target)?e.dom.parentElement:null,r&&(w_=t)},i=()=>{w_&&=null};return window.addEventListener(`dragstart`,n),window.addEventListener(`dragend`,i),{destroy(){window.removeEventListener(`dragstart`,n),window.removeEventListener(`dragend`,i)}}},props:{handleDOMEvents:{drop:(e,t)=>{if(a=r===e.dom.parentElement,s=t,!a){let e=w_;e?.isEditable&&setTimeout(()=>{if(e.isDestroyed)return;let t=e.state.selection;t&&e.commands.deleteRange({from:t.from,to:t.to})},10)}return!1},paste:(e,t)=>{let n=t.clipboardData?.getData(`text/html`);return o=t,i=!!n?.includes(`data-pm-slice`),!1}}},appendTransaction:(t,n,r)=>{let s=t[0],l=s.getMeta(`uiEvent`)===`paste`&&!i,u=s.getMeta(`uiEvent`)===`drop`&&!a,d=s.getMeta(`applyPasteRules`),f=!!d;if(!l&&!u&&!f)return;if(f){let{text:t}=d;t=typeof t==`string`?t:nh(U.from(t),r.schema);let{from:n}=d,i=n+t.length,a=T_(t);return c({rule:e,state:r,from:n,to:{b:i},pasteEvt:a})}let p=n.doc.content.findDiffStart(r.doc.content),m=n.doc.content.findDiffEnd(r.doc.content);if(s_(p)&&m&&p!==m.b)return c({rule:e,state:r,from:p,to:m,pasteEvt:o})}}))}var D_=class{constructor(e,t){this.splittableMarks=[],this.nonClearableMarks=[],this.decorationManager=null,this.editor=t,this.baseExtensions=e,this.extensions=Dh(e),this.hasSchemaSpec=t.options.schemaSpec!==void 0,this.schema=Th(this.extensions,t,t.options.schemaSpec),this.setupExtensions()}get commands(){return this.extensions.reduce((e,t)=>{let n=X(t,`addCommands`,{name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:Rh(t.name,this.schema)});return n?{...e,...n()}:e},{})}get plugins(){let{editor:e}=this,t=Eh([...this.extensions].reverse()).flatMap(t=>{let n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:Rh(t.name,this.schema)},r=[],i=X(t,`addKeyboardShortcuts`,n),a={};if(t.type===`mark`&&X(t,`exitable`,n)&&(a.ArrowRight=()=>b_.handleExit({editor:e,mark:t})),i){let t=Object.fromEntries(Object.entries(i()).map(([t,n])=>[t,()=>n({editor:e})]));a={...a,...t}}let o=ot(a);r.push(o);let s=X(t,`addInputRules`,n);if(Uh(t,e.options.enableInputRules)&&s){let t=s();if(t&&t.length){let n=v_({editor:e,rules:t}),i=Array.isArray(n)?n:[n];r.push(...i)}}let c=X(t,`addPasteRules`,n);if(Uh(t,e.options.enablePasteRules)&&c){let t=c();if(t&&t.length){let n=E_({editor:e,rules:t});r.push(...n)}}let l=X(t,`addProseMirrorPlugins`,n);if(l){let e=l();r.push(...e)}return r}),n=this.createDecorationPlugin();return n&&t.push(n),t}createDecorationPlugin(){var e;let{editor:t}=this;(e=this.decorationManager)==null||e.destroy();let n=[];return this.extensions.forEach(e=>{let r=X(e,`addDecorations`,{name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:t,type:Rh(e.name,this.schema)});r&&n.push({name:e.name,addDecorations:r})}),this.decorationManager=new a_({editor:t,entries:n}),this.decorationManager.plugin}get attributes(){let e=fh(this.extensions);return this.hasSchemaSpec?rh(e,this.schema):e}get nodeViews(){let{editor:e}=this,{nodeExtensions:t}=dh(this.extensions);return Object.fromEntries(t.filter(e=>!!X(e,`addNodeView`)).map(t=>{let n=this.attributes.filter(e=>e.type===t.name),r=X(t,`addNodeView`,{name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:Bp(t.name,this.schema)});if(!r)return[];let i=r();return i?[t.name,(r,a,o,s,c)=>{let l=yh(r,n);return i({node:r,view:a,getPos:o,decorations:s,innerDecorations:c,editor:e,extension:t,HTMLAttributes:l})}]:[]}))}dispatchTransaction(e){let{editor:t}=this;return Eh([...this.extensions].reverse()).reduceRight((e,n)=>{let r={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:Rh(n.name,this.schema)},i=X(n,`dispatchTransaction`,r);return i?t=>{i.call(r,{transaction:t,next:e})}:e},e)}transformPastedHTML(e){let{editor:t}=this;return Eh([...this.extensions]).reduce((e,n)=>{let r={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:Rh(n.name,this.schema)},i=X(n,`transformPastedHTML`,r);return i?(t,n)=>{let a=e(t,n);return i.call(r,a)}:e},e||(e=>e))}get markViews(){let{editor:e}=this,{markExtensions:t}=dh(this.extensions);return Object.fromEntries(t.filter(e=>!!X(e,`addMarkView`)).map(t=>{let n=this.attributes.filter(e=>e.type===t.name),r=X(t,`addMarkView`,{name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:em(t.name,this.schema)});return r?[t.name,(i,a,o)=>{let s=yh(i,n);return r()({mark:i,view:a,inline:o,editor:e,extension:t,HTMLAttributes:s,updateAttributes:t=>{d_(i,e,t)}})}]:[]}))}destroy(){var e;(e=this.decorationManager)==null||e.destroy(),this.extensions.forEach(e=>{let t=e;for(;t.parent;){let e=t.parent;e.child===t&&(e.child=null),t=e}}),this.extensions=[],this.baseExtensions=[],this.decorationManager=null,this.schema=null,this.editor=null}setupExtensions(){let e=this.extensions;this.editor.extensionStorage=Object.fromEntries(e.map(e=>[e.name,e.storage])),e.forEach(e=>{let t={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:Rh(e.name,this.schema)};e.type===`mark`&&((mh(X(e,`keepOnSplit`,t))??!0)&&this.splittableMarks.push(e.name),(mh(X(e,`clearable`,t))??!0)||this.nonClearableMarks.push(e.name));let n=X(e,`onBeforeCreate`,t),r=X(e,`onCreate`,t),i=X(e,`onUpdate`,t),a=X(e,`onSelectionUpdate`,t),o=X(e,`onTransaction`,t),s=X(e,`onFocus`,t),c=X(e,`onBlur`,t),l=X(e,`onDestroy`,t);n&&this.editor.on(`beforeCreate`,n),r&&this.editor.on(`create`,r),i&&this.editor.on(`update`,i),a&&this.editor.on(`selectionUpdate`,a),o&&this.editor.on(`transaction`,o),s&&this.editor.on(`focus`,s),c&&this.editor.on(`blur`,c),l&&this.editor.on(`destroy`,l)})}};D_.resolve=Dh,D_.sort=Eh,D_.flatten=th;var O_=class e extends y_{constructor(...e){super(...e),this.type=`extension`}static create(t={}){let n=typeof t==`function`?t():t;return new e(n)}configure(e){return super.configure(e)}extend(e){let t=typeof e==`function`?e():e;return super.extend(t)}},k_=O_.create({name:`clipboardTextSerializer`,addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new ke({key:new Ae(`clipboardTextSerializer`),props:{clipboardTextSerializer:()=>{let{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:i}=t,a=jh(n),{blockSeparator:o}=this.options,s={...o===void 0?{}:{blockSeparator:o},textSerializers:a};return[...i.ranges].sort((e,t)=>e.$from.pos-t.$from.pos).map(({$from:e,$to:t})=>kh(r,{from:e.pos,to:t.pos},s)).join(o??`
63
-
64
- `)}}})]}}),A_=O_.create({name:`commands`,addCommands(){return{...Fg}}}),j_=O_.create({name:`delete`,onUpdate({transaction:e,appendedTransactions:t}){var n;let r=()=>{var n,r;if(((n=this.editor.options.coreExtensionOptions)==null||(n=n.delete)==null||(r=n.filterTransaction)==null?void 0:r.call(n,e))??e.getMeta(`y-sync$`))return;let i=Zm(e.before,[e,...t]);Ih(i).forEach(t=>{i.mapping.mapResult(t.oldRange.from).deletedAfter&&i.mapping.mapResult(t.oldRange.to).deletedBefore&&i.before.nodesBetween(t.oldRange.from,t.oldRange.to,(n,r)=>{let a=r+n.nodeSize-2,o=t.oldRange.from<=r&&a<=t.oldRange.to;this.editor.emit(`delete`,{type:`node`,node:n,from:r,to:a,newFrom:i.mapping.map(r),newTo:i.mapping.map(a),deletedRange:t.oldRange,newRange:t.newRange,partial:!o,editor:this.editor,transaction:e,combinedTransform:i})})});let a=i.mapping;i.steps.forEach((t,n)=>{if(t instanceof Pe){let r=a.slice(n).map(t.from,-1),o=a.slice(n).map(t.to),s=a.invert().map(r,-1),c=a.invert().map(o),l=r>0&&i.doc.nodeAt(r-1)?.marks.some(e=>e.eq(t.mark)),u=i.doc.nodeAt(o)?.marks.some(e=>e.eq(t.mark));this.editor.emit(`delete`,{type:`mark`,mark:t.mark,from:t.from,to:t.to,deletedRange:{from:s,to:c},newRange:{from:r,to:o},partial:!!(u||l),editor:this.editor,transaction:e,combinedTransform:i})}})};((n=this.editor.options.coreExtensionOptions)==null||(n=n.delete)==null?void 0:n.async)??!0?setTimeout(r,0):r()}}),M_=O_.create({name:`drop`,addProseMirrorPlugins(){return[new ke({key:new Ae(`tiptapDrop`),props:{handleDrop:(e,t,n,r)=>{this.editor.emit(`drop`,{editor:this.editor,event:t,slice:n,moved:r})}}})]}}),N_=O_.create({name:`editable`,addProseMirrorPlugins(){return[new ke({key:new Ae(`editable`),props:{editable:()=>this.editor.options.editable}})]}}),P_=new Ae(`focusEvents`),F_=O_.create({name:`focusEvents`,addProseMirrorPlugins(){let{editor:e}=this;return[new ke({key:P_,props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;let r=e.state.tr.setMeta(`focus`,{event:n}).setMeta(`addToHistory`,!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;let r=e.state.tr.setMeta(`blur`,{event:n}).setMeta(`addToHistory`,!1);return t.dispatch(r),!1}}}})]}}),I_=O_.create({name:`keymap`,addKeyboardShortcuts(){let e=()=>this.editor.commands.first(({commands:e})=>[()=>e.undoInputRule(),()=>e.command(({tr:t})=>{let{selection:n,doc:r}=t,{empty:i,$anchor:a}=n,{pos:o,parent:s}=a,c=a.parent.isTextblock&&o>0?t.doc.resolve(o-1):a,l=c.parent.type.spec.isolating,u=a.pos-a.parentOffset,d=l&&c.parent.childCount===1?u===a.pos:Me.atStart(r).from===o;return!i||!s.type.isTextblock||s.textContent.length||!d||d&&a.parent.type.name===`paragraph`?!1:e.clearNodes()}),()=>e.deleteSelection(),()=>e.joinBackward(),()=>e.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:e})=>[()=>e.deleteSelection(),()=>e.deleteCurrentNode(),()=>e.joinForward(),()=>e.selectNodeForward()]),n={Enter:()=>this.editor.commands.first(({commands:e})=>[()=>e.newlineInCode(),()=>e.createParagraphNear(),()=>e.liftEmptyBlock(),()=>e.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},r={...n},i={...n,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return sm()||Am()?i:r},addProseMirrorPlugins(){return[new ke({key:new Ae(`clearDocument`),appendTransaction:(e,t,n)=>{if(e.some(e=>e.getMeta(`composition`)))return;let r=e.some(e=>e.docChanged)&&!t.doc.eq(n.doc),i=e.some(e=>e.getMeta(`preventClearDocument`));if(!r||i)return;let{empty:a,from:o,to:s}=t.selection,c=Me.atStart(t.doc).from,l=Me.atEnd(t.doc).to;if(a||o!==c||s!==l||!Gh(n.doc))return;let u=n.tr,d=jp({state:n,transaction:u}),{commands:f}=new Mp({editor:this.editor,state:d});if(f.clearNodes(),u.steps.length)return u}})]}}),L_=O_.create({name:`paste`,addProseMirrorPlugins(){return[new ke({key:new Ae(`tiptapPaste`),props:{handlePaste:(e,t,n)=>{this.editor.emit(`paste`,{editor:this.editor,event:t,slice:n})}}})]}}),R_=O_.create({name:`tabindex`,addOptions(){return{value:void 0}},addProseMirrorPlugins(){return[new ke({key:new Ae(`tabindex`),props:{attributes:()=>!this.editor.isEditable&&this.options.value===void 0?{}:{tabindex:this.options.value??`0`}}})]}}),z_=O_.create({name:`textDirection`,addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];let{nodeExtensions:e}=dh(this.extensions);return[{types:e.filter(e=>e.name!==`text`).map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{let t=e.getAttribute(`dir`);return t&&(t===`ltr`||t===`rtl`||t===`auto`)?t:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new ke({key:new Ae(`textDirection`),props:{attributes:()=>{let e=this.options.direction;return e?{dir:e}:{}}}})]}}),B_=Cp({ClipboardTextSerializer:()=>k_,Commands:()=>A_,Delete:()=>j_,Drop:()=>M_,Editable:()=>N_,FocusEvents:()=>F_,Keymap:()=>I_,Paste:()=>L_,Tabindex:()=>R_,TextDirection:()=>z_,focusEventsPluginKey:()=>P_}),V_=!1;function H_(e){if(V_)return;V_=!0;let t;try{let n=ye.fromJSON(e,{from:0,to:0});if(!Jh(n))return;t=n.slice.content}catch{return}t instanceof U||console.warn(`[tiptap warn]: prosemirror-model is loaded more than once. Wrapping and splitting nodes will fail. Deduplicate it in your lock file, or alias it to a single copy in your bundler.`)}var U_=class e{get name(){return this.node.type.name}constructor(e,t,n=!1,r=null){this.currentNode=null,this.actualDepth=null,this.isBlock=n,this.resolvedPos=e,this.editor=t,this.currentNode=r}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){return this.actualDepth??this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let t=this.from,n=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}t=this.from+1,n=this.to-1}this.editor.commands.insertContentAt({from:t,to:n},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+ +!this.node.isText}get parent(){if(this.depth===0)return null;let t=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(t);return new e(n,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new e(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new e(t,this.editor)}get children(){let t=[];return this.node.content.forEach((n,r)=>{let i=n.isBlock&&!n.isTextblock,a=n.isAtom&&!n.isText,o=n.isInline,s=this.pos+r+ +!a;if(s<0||s>this.resolvedPos.doc.nodeSize-2)return;let c=this.resolvedPos.doc.resolve(s);if(!i&&!o&&c.depth<=this.depth)return;let l=new e(c,this.editor,i,i||o?n:null);i&&(l.actualDepth=this.depth+1),t.push(l)}),t}get firstChild(){return this.children[0]||null}get lastChild(){let e=this.children;return e[e.length-1]||null}closest(e,t={}){let n=null,r=this.parent;for(;r&&!n;){if(r.node.type.name===e){if(Object.keys(t).length>0){let e=r.node.attrs,n=Object.keys(t);for(let r=0;r<n.length;r+=1){let i=n[r];if(e[i]!==t[i])break}}else n=r}r=r.parent}return n}querySelector(e,t={}){return this.querySelectorAll(e,t,!0)[0]||null}querySelectorAll(e,t={},n=!1){let r=[];if(!this.children||this.children.length===0)return r;let i=Object.keys(t);return this.children.forEach(a=>{n&&r.length>0||(a.node.type.name===e&&i.every(e=>t[e]===a.node.attrs[e])&&r.push(a),!(n&&r.length>0)&&(r=r.concat(a.querySelectorAll(e,t,n))))}),r}setAttribute(e){let{tr:t}=this.editor.state;t.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(t)}},W_=`.ProseMirror {
65
- position: relative;
66
- }
67
-
68
- .ProseMirror {
69
- word-wrap: break-word;
70
- white-space: pre-wrap;
71
- white-space: break-spaces;
72
- -webkit-font-variant-ligatures: none;
73
- font-variant-ligatures: none;
74
- font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
75
- }
76
-
77
- .ProseMirror [contenteditable="false"] {
78
- white-space: normal;
79
- }
80
-
81
- .ProseMirror [contenteditable="false"] [contenteditable="true"] {
82
- white-space: pre-wrap;
83
- }
84
-
85
- .ProseMirror pre {
86
- white-space: pre-wrap;
87
- }
88
-
89
- img.ProseMirror-separator {
90
- display: inline !important;
91
- border: none !important;
92
- margin: 0 !important;
93
- width: 0 !important;
94
- height: 0 !important;
95
- }
96
-
97
- .ProseMirror-gapcursor {
98
- display: none;
99
- pointer-events: none;
100
- position: absolute;
101
- margin: 0;
102
- }
103
-
104
- .ProseMirror-gapcursor:after {
105
- content: "";
106
- display: block;
107
- position: absolute;
108
- top: -2px;
109
- width: 20px;
110
- border-top: 1px solid black;
111
- animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
112
- }
113
-
114
- @keyframes ProseMirror-cursor-blink {
115
- to {
116
- visibility: hidden;
117
- }
118
- }
119
-
120
- .ProseMirror-hideselection *::selection {
121
- background: transparent;
122
- }
123
-
124
- .ProseMirror-hideselection *::-moz-selection {
125
- background: transparent;
126
- }
127
-
128
- .ProseMirror-hideselection * {
129
- caret-color: transparent;
130
- }
131
-
132
- .ProseMirror-focused .ProseMirror-gapcursor {
133
- display: block;
134
- }`,G_=class extends zg{constructor(e={}){super(),this.css=null,this.className=`tiptap`,this.editorView=null,this.isFocused=!1,this.destroyed=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.hasWarnedStaleDecorationRead=!1,this.options={element:typeof document<`u`?document.createElement(`div`):null,content:``,injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:e})=>{throw e},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:Xh,createMappablePosition:Zh},this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on(`beforeCreate`,this.options.onBeforeCreate),this.emit(`beforeCreate`,{editor:this}),this.on(`mount`,this.options.onMount),this.on(`unmount`,this.options.onUnmount),this.on(`contentError`,this.options.onContentError),this.on(`create`,this.options.onCreate),this.on(`update`,this.options.onUpdate),this.on(`selectionUpdate`,this.options.onSelectionUpdate),this.on(`transaction`,this.options.onTransaction),this.on(`focus`,this.options.onFocus),this.on(`blur`,this.options.onBlur),this.on(`destroy`,this.options.onDestroy),this.on(`drop`,({event:e,slice:t,moved:n})=>this.options.onDrop(e,t,n)),this.on(`paste`,({event:e,slice:t})=>this.options.onPaste(e,t)),this.on(`delete`,this.options.onDelete);let t=this.createDoc();if(!this.editorState){let e=am(t,this.options.autofocus);this.editorState=ve.create({doc:t,schema:this.schema,selection:e||void 0})}H_(this.schema),this.options.element&&this.mount(this.options.element)}mount(e){if(typeof document>`u`)throw Error(`[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.`);this.createView(e),this.emit(`mount`,{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit(`create`,{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){this.editorState=this.editorView.state;let e=this.editorView.dom;e?.editor&&delete e.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove==`function`?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(e){console.warn(`Failed to remove CSS element:`,e)}this.css=null,this.emit(`unmount`,{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager?this.commandManager.chain():Mp.createFakeChain()}can(){return this.commandManager?this.commandManager.can():Mp.createFallbackCan()}injectCSS(){this.options.injectCSS&&typeof document<`u`&&(this.css=o_(W_,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},this.editorView&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps({...this.options.editorProps,attributes:this.getEditorViewAttributes()}),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit(`update`,{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:e=>{this.editorState=e},dispatch:e=>{this.dispatchTransaction(e)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(e,t)=>{if(this.editorView)return this.editorView[t];if(t===`state`)return this.editorState;if(t in e)return Reflect.get(e,t);throw Error(`[tiptap error]: The editor view is not available. Cannot access view['${t}']. The editor may not be mounted yet.`)}})}get state(){return Bg&&!this.hasWarnedStaleDecorationRead&&Rg(this)&&(this.hasWarnedStaleDecorationRead=!0,console.warn("[tiptap warn]: `editor.state` was read while decoration `create()` was running. It returns the pre-transaction document. Use the `state` argument passed to `create()` instead. Helpers like `editor.isActive()` read `editor.state` too, so pass `state` to their standalone versions instead of calling them on the editor.")),this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(e,t){let n=ph(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(e){if(this.isDestroyed)return;let t=this.state.plugins,n=t;if([].concat(e).forEach(e=>{let t=typeof e==`string`?`${e}$`:e.key;n=n.filter(e=>!e.key.startsWith(t))}),t.length===n.length)return;let r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var e,t;let n=[...this.options.enableCoreExtensions?[N_,k_.configure({blockSeparator:(e=this.options.coreExtensionOptions)==null||(e=e.clipboardTextSerializer)==null?void 0:e.blockSeparator}),A_,F_,I_,R_.configure({value:(t=this.options.coreExtensionOptions)==null||(t=t.tabindex)==null?void 0:t.value}),M_,L_,j_,z_.configure({direction:this.options.textDirection})].filter(e=>typeof this.options.enableCoreExtensions!=`object`||this.options.enableCoreExtensions[e.name]!==!1):[],...this.options.extensions].filter(e=>[`extension`,`node`,`mark`].includes(e?.type));this.extensionManager=new D_(n,this)}createCommandManager(){this.commandManager=new Mp({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=Jm(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(e){if(!(e instanceof Error)||![`[tiptap error]: Invalid JSON content`,`[tiptap error]: Invalid HTML content`].includes(e.message))throw e;let t=Jm(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1});return this.editorState=ve.create({doc:t,schema:this.schema,selection:am(t,this.options.autofocus)||void 0}),this.emit(`contentError`,{editor:this,error:e,disableCollaboration:()=>{`collaboration`in this.storage&&typeof this.storage.collaboration==`object`&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(e=>e.name!==`collaboration`),this.createExtensionManager()}}),this.editorState.doc}return e}getEditorViewAttributes(){let e=this.options.editorProps?.attributes;return ph(e)?t=>({role:`textbox`,...e(t)}):{role:`textbox`,...e}}createView(e){let{editorProps:t,enableExtensionDispatchTransaction:n}=this.options,r=t.dispatchTransaction||this.dispatchTransaction.bind(this),i=n?this.extensionManager.dispatchTransaction(r):r,a=t.transformPastedHTML,o=this.extensionManager.transformPastedHTML(a);this.editorView=new nt(e,{...t,attributes:this.getEditorViewAttributes(),dispatchTransaction:i,transformPastedHTML:o,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});let s=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(s),this.prependClass(),this.injectCSS();let c=this.view.dom;c.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;let t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(e=>this.capturedTransaction?.step(e));return}let{state:t,transactions:n}=this.state.applyTransaction(e),r=!this.state.selection.eq(t.selection),i=n.includes(e),a=this.state;if(this.emit(`beforeTransaction`,{editor:this,transaction:e,nextState:t}),!i)return;this.view.updateState(t),this.emit(`transaction`,{editor:this,transaction:e,appendedTransactions:n.slice(1)}),r&&this.emit(`selectionUpdate`,{editor:this,transaction:e});let o=n.findLast(e=>e.getMeta(`focus`)||e.getMeta(`blur`)),s=o?.getMeta(`focus`),c=o?.getMeta(`blur`);s&&this.emit(`focus`,{editor:this,event:s.event,transaction:o}),c&&this.emit(`blur`,{editor:this,event:c.event,transaction:o}),!(e.getMeta(`preventUpdate`)||!n.some(e=>e.docChanged)||a.doc.eq(t.doc))&&this.emit(`update`,{editor:this,transaction:e,appendedTransactions:n.slice(1)})}getAttributes(e){return Nh(this.state,e)}isActive(e,t){let n=typeof e==`string`?e:null,r=typeof e==`string`?t:e;return Hh(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return nh(this.state.doc.content,this.schema)}getText(e){let{blockSeparator:t=`
135
-
136
- `,textSerializers:n={}}=e||{};return Ah(this.state.doc,{blockSeparator:t,textSerializers:{...jh(this.schema),...n}})}get isEmpty(){return Gh(this.state.doc)}destroy(){this.destroyed||(this.destroyed=!0,this.emit(`destroy`),this.unmount(),this.removeAllListeners(),this.extensionManager.destroy(),this.extensionManager=null,this.schema=null,this.commandManager=null,this.extensionStorage={})}get isDestroyed(){return this.editorView?.isDestroyed??!0}$node(e,t){return this.$doc?.querySelector(e,t)||null}$nodes(e,t){return this.$doc?.querySelectorAll(e,t)||null}$pos(e){let t=this.state.doc.resolve(e),n=e>0&&t.nodeAfter&&!t.nodeAfter.isText&&t.nodeAfter.isAtom?t.nodeAfter:null;return new U_(t,this,!1,n)}get $doc(){return this.$pos(0)}};function K_(e){return new f_({find:e.find,handler:({state:t,range:n,match:r})=>{let i=mh(e.getAttributes,void 0,r);if(i===!1||i===null)return null;let{tr:a}=t,o=r[r.length-1],s=r[0];if(o){let r=s.search(/\S/),c=n.from+s.indexOf(o),l=c+o.length;if(Lh(n.from,n.to,t.doc).filter(t=>t.mark.type.excluded.find(n=>n===e.type&&n!==t.mark.type)).filter(e=>e.to>c).length)return null;l<n.to&&a.delete(l,n.to),c>n.from&&a.delete(n.from+r,c);let u=n.from+r+o.length;a.addMark(n.from+r,u,e.type.create(i||{})),a.removeStoredMark(e.type)}},undoable:e.undoable})}var q_=class e extends y_{constructor(...e){super(...e),this.type=`node`}static create(t={}){let n=typeof t==`function`?t():t;return new e(n)}configure(e){return super.configure(e)}extend(e){let t=typeof e==`function`?e():e;return super.extend(t)}},J_=class{constructor(e,t,n){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.innerDecorations=t.innerDecorations,this.view=t.view,this.HTMLAttributes=t.HTMLAttributes,this.getPos=()=>{try{return t.getPos()}catch{return}},this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){let{view:t}=this.editor,n=e.target,r=n.nodeType===3?n.parentElement?.closest(`[data-drag-handle]`):n.closest(`[data-drag-handle]`);if(!this.dom||this.contentDOM?.contains(n)||!r)return;let i=0,a=0;if(this.dom!==r){let t=this.dom.getBoundingClientRect(),n=r.getBoundingClientRect(),o=e.offsetX??e.nativeEvent?.offsetX,s=e.offsetY??e.nativeEvent?.offsetY;i=n.x-t.x+o,a=n.y-t.y+s}let o=this.dom.cloneNode(!0);try{let e=this.dom.getBoundingClientRect();o.style.width=`${Math.round(e.width)}px`,o.style.height=`${Math.round(e.height)}px`,o.style.boxSizing=`border-box`,o.style.pointerEvents=`none`}catch{}let s=null;try{var c;s=document.createElement(`div`),s.style.position=`absolute`,s.style.top=`-9999px`,s.style.left=`-9999px`,s.style.pointerEvents=`none`,s.appendChild(o),document.body.appendChild(s),(c=e.dataTransfer)==null||c.setDragImage(o,i,a)}finally{s&&setTimeout(()=>{try{s?.remove()}catch{}},0)}let l=this.getPos();if(typeof l!=`number`)return;let u=et.create(t.state.doc,l),d=t.state.tr.setSelection(u);t.dispatch(d)}stopEvent(e){if(!this.dom)return!1;if(typeof this.options.stopEvent==`function`)return this.options.stopEvent({event:e});let t=e.target;if(!this.dom.contains(t)||this.contentDOM?.contains(t))return!1;let n=e.type.startsWith(`drag`),r=e.type===`dragover`||e.type===`dragenter`,i=e.type===`drop`;if(([`INPUT`,`BUTTON`,`SELECT`,`TEXTAREA`].includes(t.tagName)||t.isContentEditable)&&!i&&!n)return!0;let{isEditable:a}=this.editor,{isDragging:o}=this,s=!!this.node.type.spec.draggable,c=et.isSelectable(this.node),l=e.type===`copy`,u=e.type===`paste`,d=e.type===`cut`,f=e.type===`mousedown`;if(!s&&c&&n&&e.target===this.dom&&e.preventDefault(),s&&n&&!o&&e.target===this.dom)return e.preventDefault(),!1;if(s&&a&&!o&&f){let e=t.closest(`[data-drag-handle]`);e&&(this.dom===e||this.dom.contains(e))&&(this.isDragging=!0,document.addEventListener(`dragend`,()=>{this.isDragging=!1},{once:!0}),document.addEventListener(`drop`,()=>{this.isDragging=!1},{once:!0}),document.addEventListener(`mouseup`,()=>{this.isDragging=!1},{once:!0}))}return!(o||r||i||l||u||d||f&&c)}ignoreMutation(e){return this.dom?this.contentDOM?typeof this.options.ignoreMutation==`function`?this.options.ignoreMutation({mutation:e}):this.node.isLeaf||this.node.isAtom?!0:e.type===`selection`||this.contentDOM.contains(e.target)&&e.type===`childList`&&(sm()||om())&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(e=>e.isContentEditable)?!1:this.contentDOM===e.target&&e.type===`attributes`||!this.contentDOM.contains(e.target):e.type!==`selection`:!0}updateAttributes(e){this.editor.commands.command(({tr:t})=>{let n=this.getPos();return typeof n==`number`&&(t.setNodeMarkup(n,void 0,{...this.node.attrs,...e}),!0)})}deleteNode(){let e=this.getPos();if(typeof e!=`number`)return;let t=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:t})}};function Y_(e){return new x_({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:i})=>{let a=mh(e.getAttributes,void 0,r,i);if(a===!1||a===null)return null;let{tr:o}=t,s=r[r.length-1],c=r[0],l=n.to;if(s){let i=c.search(/\S/),u=n.from+c.indexOf(s),d=u+s.length;if(Lh(n.from,n.to,t.doc).filter(t=>t.mark.type.excluded.find(n=>n===e.type&&n!==t.mark.type)).filter(e=>e.to>u).length)return null;d<n.to&&o.delete(d,n.to),u>n.from&&o.delete(n.from+i,u),l=n.from+i+s.length,o.addMark(n.from+i,l,e.type.create(a||{})),r.index!==void 0&&r.input!==void 0&&r.index+r[0].length>=r.input.length||o.removeStoredMark(e.type)}}})}var X_=`annotation`;function Z_(e){return e&&e.options.extensions.some(e=>{if(e.type!==`mark`)return!1;let t=X(e,`group`);return typeof t==`string`&&t.split(` `).includes(`annotation`)})?X_:``}var Q_=class{listeners=new Set;state;prevState;options;constructor(e,t){this.prevState=e,this.state=e,this.options=t}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});setState(e){this.prevState=this.state,this.state=$_(e)?e(this.prevState):e,nv(this)}_notify(){let e={prevVal:this.prevState,currentVal:this.state};for(let t of this.listeners)t(e)}};function $_(e){return typeof e==`function`}var ev=!1,tv=new Set;function nv(e){tv.add(e);let t=!ev;ev=!0;try{if(e.options?.onUpdate?.(e.state,e.prevState),!t)return;for(;tv.size>0;){let e=Array.from(tv);tv.clear();for(let t of e)t._notify()}}finally{t&&(ev=!1,tv.clear())}}var rv=Symbol(`originalFactory`);function iv(e){if(typeof e==`object`&&`key`in e)return function t(){return e[rv]=t,e};if(typeof e!=`function`)throw Error(`factory must be a function`);return function t(n){return r=>{let i=e({editor:r.editor,options:n});return i[rv]=t,i}}}function av(e,t){return new Q_(e,t)}crypto.subtle;var ov=crypto.getRandomValues.bind(crypto),sv=()=>ov(new Uint32Array(1))[0],cv=`10000000-1000-4000-8000-100000000000`,lv=()=>cv.replace(/[018]/g,e=>(e^sv()&15>>e/4).toString(16)),uv,dv;if(typeof WeakMap<`u`){let e=new WeakMap;uv=t=>e.get(t),dv=(t,n)=>(e.set(t,n),n)}else{let e=[],t=0;uv=t=>{for(let n=0;n<e.length;n+=2)if(e[n]==t)return e[n+1]},dv=(n,r)=>(t==10&&(t=0),e[t++]=n,e[t++]=r)}var fv=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t<this.map.length;t++){let n=this.map[t];if(n!=e)continue;let r=t%this.width,i=t/this.width|0,a=r+1,o=i+1;for(let e=1;a<this.width&&this.map[t+e]==n;e++)a++;for(let e=1;o<this.height&&this.map[t+this.width*e]==n;e++)o++;return{left:r,top:i,right:a,bottom:o}}throw RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){let{left:r,right:i,top:a,bottom:o}=this.findCell(e);return t==`horiz`?(n<0?r==0:i==this.width)?null:this.map[a*this.width+(n<0?r-1:i)]:(n<0?a==0:o==this.height)?null:this.map[r+this.width*(n<0?a-1:o)]}rectBetween(e,t){let{left:n,right:r,top:i,bottom:a}=this.findCell(e),{left:o,right:s,top:c,bottom:l}=this.findCell(t);return{left:Math.min(n,o),top:Math.min(i,c),right:Math.max(r,s),bottom:Math.max(a,l)}}cellsInRect(e){let t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let i=e.left;i<e.right;i++){let a=r*this.width+i,o=this.map[a];n[o]||(n[o]=!0,!(i==e.left&&i&&this.map[a-1]==o||r==e.top&&r&&this.map[a-this.width]==o)&&t.push(o))}return t}positionAt(e,t,n){for(let r=0,i=0;;r++){let a=i+n.child(r).nodeSize;if(r==e){let n=t+e*this.width,r=(e+1)*this.width;for(;n<r&&this.map[n]<i;)n++;return n==r?a-1:this.map[n]}i=a}}static get(e){return uv(e)||dv(e,pv(e))}};function pv(e){if(e.type.spec.tableRole!=`table`)throw RangeError(`Not a table node: `+e.type.name);let t=mv(e),n=e.childCount,r=[],i=0,a=null,o=[];for(let e=0,i=t*n;e<i;e++)r[e]=0;for(let s=0,c=0;s<n;s++){let l=e.child(s);c++;for(let e=0;;e++){for(;i<r.length&&r[i]!=0;)i++;if(e==l.childCount)break;let u=l.child(e),{colspan:d,rowspan:f,colwidth:p}=u.attrs;for(let e=0;e<f;e++){if(e+s>=n){(a||=[]).push({type:`overlong_rowspan`,pos:c,n:f-e});break}let l=i+e*t;for(let e=0;e<d;e++){r[l+e]==0?r[l+e]=c:(a||=[]).push({type:`collision`,row:s,pos:c,n:d-e});let n=p&&p[e];if(n){let r=(l+e)%t*2,i=o[r];i==null||i!=n&&o[r+1]==1?(o[r]=n,o[r+1]=1):i==n&&o[r+1]++}}}i+=d,c+=u.nodeSize}let u=(s+1)*t,d=0;for(;i<u;)r[i++]==0&&d++;d&&(a||=[]).push({type:`missing`,row:s,n:d}),c++}(t===0||n===0)&&(a||=[]).push({type:`zero_sized`});let s=new fv(t,n,r,a),c=!1;for(let e=0;!c&&e<o.length;e+=2)o[e]!=null&&o[e+1]<n&&(c=!0);return c&&hv(s,o,e),s}function mv(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){let i=e.child(r),a=0;if(n)for(let t=0;t<r;t++){let n=e.child(t);for(let e=0;e<n.childCount;e++){let i=n.child(e);t+i.attrs.rowspan>r&&(a+=i.attrs.colspan)}}for(let e=0;e<i.childCount;e++){let t=i.child(e);a+=t.attrs.colspan,t.attrs.rowspan>1&&(n=!0)}t==-1?t=a:t!=a&&(t=Math.max(t,a))}return t}function hv(e,t,n){e.problems||=[];let r={};for(let i=0;i<e.map.length;i++){let a=e.map[i];if(r[a])continue;r[a]=!0;let o=n.nodeAt(a);if(!o)throw RangeError(`No cell with offset ${a} found`);let s=null,c=o.attrs;for(let n=0;n<c.colspan;n++){let r=t[(i+n)%e.width*2];r==null||c.colwidth&&c.colwidth[n]==r||((s||=gv(c))[n]=r)}s&&e.problems.unshift({type:`colwidth mismatch`,pos:a,colwidth:s})}}function gv(e){if(e.colwidth)return e.colwidth.slice();let t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function _v(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(let n in e.nodes){let r=e.nodes[n],i=r.spec.tableRole;i&&(t[i]=r)}}return t}var vv=new Ae(`selectingCells`);function yv(e){for(let t=e.depth-1;t>0;t--)if(e.node(t).type.spec.tableRole==`row`)return e.node(0).resolve(e.before(t+1));return null}function bv(e){for(let t=e.depth;t>0;t--){let n=e.node(t).type.spec.tableRole;if(n===`cell`||n===`header_cell`)return e.node(t)}return null}function xv(e){let t=e.selection.$head;for(let e=t.depth;e>0;e--)if(t.node(e).type.spec.tableRole==`row`)return!0;return!1}function Sv(e){let t=e.selection;if(`$anchorCell`in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if(`node`in t&&t.node&&t.node.type.spec.tableRole==`cell`)return t.$anchor;let n=yv(t.$head)||Cv(t.$head);if(n)return n;throw RangeError(`No cell found around position ${t.head}`)}function Cv(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){let r=t.type.spec.tableRole;if(r==`cell`||r==`header_cell`)return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){let r=t.type.spec.tableRole;if(r==`cell`||r==`header_cell`)return e.doc.resolve(n-t.nodeSize)}}function wv(e){return e.parent.type.spec.tableRole==`row`&&!!e.nodeAfter}function Tv(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function Ev(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function Dv(e,t,n){let r=e.node(-1),i=fv.get(r),a=e.start(-1),o=i.nextCell(e.pos-a,t,n);return o==null?null:e.node(0).resolve(a+o)}function Ov(e,t,n=1){let r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(e=>e>0)||(r.colwidth=null)),r}function kv(e,t,n=1){let r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let e=0;e<n;e++)r.colwidth.splice(t,0,0)}return r}function Av(e,t,n){let r=_v(t.type.schema).header_cell;for(let i=0;i<e.height;i++)if(t.nodeAt(e.map[n+i*e.width]).type!=r)return!1;return!0}var jv=class e extends Me{constructor(e,t=e){let n=e.node(-1),r=fv.get(n),i=e.start(-1),a=r.rectBetween(e.pos-i,t.pos-i),o=e.node(0),s=r.cellsInRect(a).filter(e=>e!=t.pos-i);s.unshift(t.pos-i);let c=s.map(e=>{let t=n.nodeAt(e);if(!t)throw RangeError(`No cell with offset ${e} found`);let r=i+e+1;return new Ce(o.resolve(r),o.resolve(r+t.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=e,this.$headCell=t}map(t,n){let r=t.resolve(n.map(this.$anchorCell.pos)),i=t.resolve(n.map(this.$headCell.pos));if(wv(r)&&wv(i)&&Ev(r,i)){let t=this.$anchorCell.node(-1)!=r.node(-1);return t&&this.isRowSelection()?e.rowSelection(r,i):t&&this.isColSelection()?e.colSelection(r,i):new e(r,i)}return H.between(r,i)}content(){let e=this.$anchorCell.node(-1),t=fv.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),i={},a=[];for(let n=r.top;n<r.bottom;n++){let o=[];for(let a=n*t.width+r.left,s=r.left;s<r.right;s++,a++){let n=t.map[a];if(i[n])continue;i[n]=!0;let s=t.findCell(n),c=e.nodeAt(n);if(!c)throw RangeError(`No cell with offset ${n} found`);let l=r.left-s.left,u=s.right-r.right;if(l>0||u>0){let e=c.attrs;if(l>0&&(e=Ov(e,0,l)),u>0&&(e=Ov(e,e.colspan-u,u)),s.left<r.left){if(c=c.type.createAndFill(e),!c)throw RangeError(`Could not create cell with attrs ${JSON.stringify(e)}`)}else c=c.type.create(e,c.content)}if(s.top<r.top||s.bottom>r.bottom){let e={...c.attrs,rowspan:Math.min(s.bottom,r.bottom)-Math.max(s.top,r.top)};c=s.top<r.top?c.type.createAndFill(e):c.type.create(e,c.content)}o.push(c)}a.push(e.child(n).copy(U.from(o)))}let o=this.isColSelection()&&this.isRowSelection()?e:a;return new _e(U.from(o),1,1)}replace(e,t=_e.empty){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:a,$to:o}=r[i],s=e.mapping.slice(n);e.replace(s.map(a.pos),s.map(o.pos),i?_e.empty:t)}let i=Me.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,t){this.replace(e,new _e(U.from(t),0,0))}forEachCell(e){let t=this.$anchorCell.node(-1),n=fv.get(t),r=this.$anchorCell.start(-1),i=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let n=0;n<i.length;n++)e(t.nodeAt(i[n]),r+i[n])}isColSelection(){let e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;let n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){let r=t.node(-1),i=fv.get(r),a=t.start(-1),o=i.findCell(t.pos-a),s=i.findCell(n.pos-a),c=t.node(0);return o.top<=s.top?(o.top>0&&(t=c.resolve(a+i.map[o.left])),s.bottom<i.height&&(n=c.resolve(a+i.map[i.width*(i.height-1)+s.right-1]))):(s.top>0&&(n=c.resolve(a+i.map[s.left])),o.bottom<i.height&&(t=c.resolve(a+i.map[i.width*(i.height-1)+o.right-1]))),new e(t,n)}isRowSelection(){let e=this.$anchorCell.node(-1),t=fv.get(e),n=this.$anchorCell.start(-1),r=t.colCount(this.$anchorCell.pos-n),i=t.colCount(this.$headCell.pos-n);if(Math.min(r,i)>0)return!1;let a=r+this.$anchorCell.nodeAfter.attrs.colspan,o=i+this.$headCell.nodeAfter.attrs.colspan;return Math.max(a,o)==t.width}eq(t){return t instanceof e&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){let r=t.node(-1),i=fv.get(r),a=t.start(-1),o=i.findCell(t.pos-a),s=i.findCell(n.pos-a),c=t.node(0);return o.left<=s.left?(o.left>0&&(t=c.resolve(a+i.map[o.top*i.width])),s.right<i.width&&(n=c.resolve(a+i.map[i.width*(s.top+1)-1]))):(s.left>0&&(n=c.resolve(a+i.map[s.top*i.width])),o.right<i.width&&(t=c.resolve(a+i.map[i.width*(o.top+1)-1]))),new e(t,n)}toJSON(){return{type:`cell`,anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){return new e(t.resolve(n),t.resolve(r))}getBookmark(){return new Mv(this.$anchorCell.pos,this.$headCell.pos)}};jv.prototype.visible=!1,Me.jsonID(`cell`,jv);var Mv=class e{constructor(e,t){this.anchor=e,this.head=t}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(e){let t=e.resolve(this.anchor),n=e.resolve(this.head);return t.parent.type.spec.tableRole==`row`&&n.parent.type.spec.tableRole==`row`&&t.index()<t.parent.childCount&&n.index()<n.parent.childCount&&Ev(t,n)?new jv(t,n):Me.near(n,1)}};function Nv(e){if(!(e.selection instanceof jv))return null;let t=[];return e.selection.forEachCell((e,n)=>{t.push(ft.node(n,n+e.nodeSize,{class:`selectedCell`}))}),Ke.create(e.doc,t)}function Pv({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let n=e.pos,r=t.pos,i=e.depth;for(;i>=0&&!(e.after(i+1)<e.end(i));i--,n++);for(let e=t.depth;e>=0&&!(t.before(e+1)>t.start(e));e--,r--);return n==r&&/row|table/.test(e.node(i).type.spec.tableRole)}function Fv({$from:e,$to:t}){let n,r;for(let t=e.depth;t>0;t--){let r=e.node(t);if(r.type.spec.tableRole===`cell`||r.type.spec.tableRole===`header_cell`){n=r;break}}for(let e=t.depth;e>0;e--){let n=t.node(e);if(n.type.spec.tableRole===`cell`||n.type.spec.tableRole===`header_cell`){r=n;break}}return n!==r&&t.parentOffset===0}function Iv(e,t,n){let r=(t||e).selection,i=(t||e).doc,a,o;if(r instanceof et&&(o=r.node.type.spec.tableRole)){if(o==`cell`||o==`header_cell`)a=jv.create(i,r.from);else if(o==`row`){let e=i.resolve(r.from+1);a=jv.rowSelection(e,e)}else if(!n){let e=fv.get(r.node),t=r.from+1,n=t+e.map[e.width*e.height-1];a=jv.create(i,t+1,n)}}else r instanceof H&&Pv(r)?a=H.create(i,r.from):r instanceof H&&Fv(r)&&(a=H.create(i,r.$from.start(),r.$from.end()));return a&&(t||=e.tr).setSelection(a),t}var Lv=new Ae(`fix-tables`);function Rv(e,t,n,r){let i=e.childCount,a=t.childCount;outer:for(let o=0,s=0;o<a;o++){let a=t.child(o);for(let t=s,r=Math.min(i,o+3);t<r;t++)if(e.child(t)==a){s=t+1,n+=a.nodeSize;continue outer}r(a,n),s<i&&e.child(s).sameMarkup(a)?Rv(e.child(s),a,n+1,r):a.nodesBetween(0,a.content.size,r,n+1),n+=a.nodeSize}}function zv(e,t){let n,r=(t,r)=>{t.type.spec.tableRole==`table`&&(n=Bv(e,t,r,n))};return t?t.doc!=e.doc&&Rv(t.doc,e.doc,0,r):e.doc.descendants(r),n}function Bv(e,t,n,r){let i=fv.get(t);if(!i.problems)return r;r||=e.tr;let a=[];for(let e=0;e<i.height;e++)a.push(0);for(let e=0;e<i.problems.length;e++){let o=i.problems[e];if(o.type==`collision`){let e=t.nodeAt(o.pos);if(!e)continue;let i=e.attrs;for(let e=0;e<i.rowspan;e++)a[o.row+e]+=o.n;r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,Ov(i,i.colspan-o.n,o.n))}else if(o.type==`missing`)a[o.row]+=o.n;else if(o.type==`overlong_rowspan`){let e=t.nodeAt(o.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,{...e.attrs,rowspan:e.attrs.rowspan-o.n})}else if(o.type==`colwidth mismatch`){let e=t.nodeAt(o.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,{...e.attrs,colwidth:o.colwidth})}else if(o.type==`zero_sized`){let e=r.mapping.map(n);r.delete(e,e+t.nodeSize)}}let o,s;for(let e=0;e<a.length;e++)a[e]&&(o??=e,s=e);for(let c=0,l=n+1;c<i.height;c++){let n=t.child(c),i=l+n.nodeSize,u=a[c];if(u>0){let t=`cell`;n.firstChild&&(t=n.firstChild.type.spec.tableRole);let a=[];for(let n=0;n<u;n++){let n=_v(e.schema)[t].createAndFill();n&&a.push(n)}let d=(c==0||o==c-1)&&s==c?l+1:i-1;r.insert(r.mapping.map(d),a)}l=i}return r.setMeta(Lv,{fixTables:!0})}function Vv(e){let t=e.selection,n=Sv(e),r=n.node(-1),i=n.start(-1),a=fv.get(r);return{...t instanceof jv?a.rectBetween(t.$anchorCell.pos-i,t.$headCell.pos-i):a.findCell(n.pos-i),tableStart:i,map:a,table:r}}function Hv(e,{map:t,tableStart:n,table:r},i){let a=i>0?-1:0;Av(t,r,i+a)&&(a=i==0||i==t.width?null:0);for(let o=0;o<t.height;o++){let s=o*t.width+i;if(i>0&&i<t.width&&t.map[s-1]==t.map[s]){let a=t.map[s],c=r.nodeAt(a);e.setNodeMarkup(e.mapping.map(n+a),null,kv(c.attrs,i-t.colCount(a))),o+=c.attrs.rowspan-1}else{let c=a==null?_v(r.type.schema).cell:r.nodeAt(t.map[s+a]).type,l=t.positionAt(o,i,r);e.insert(e.mapping.map(n+l),c.createAndFill())}}return e}function Uv(e,t){if(!xv(e))return!1;if(t){let n=Vv(e);t(Hv(e.tr,n,n.left))}return!0}function Wv(e,t){if(!xv(e))return!1;if(t){let n=Vv(e);t(Hv(e.tr,n,n.right))}return!0}function Gv(e,{map:t,table:n,tableStart:r},i){let a=e.mapping.maps.length;for(let o=0;o<t.height;){let s=o*t.width+i,c=t.map[s],l=n.nodeAt(c),u=l.attrs;if(i>0&&t.map[s-1]==c||i<t.width-1&&t.map[s+1]==c)e.setNodeMarkup(e.mapping.slice(a).map(r+c),null,Ov(u,i-t.colCount(c)));else{let t=e.mapping.slice(a).map(r+c);e.delete(t,t+l.nodeSize)}o+=u.rowspan}}function Kv(e,t){if(!xv(e))return!1;if(t){let n=Vv(e),r=e.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let e=n.right-1;Gv(r,n,e),e!=n.left;e--){let e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError(`No table found`);n.table=e,n.map=fv.get(e)}t(r)}return!0}function qv(e,t,n){let r=_v(t.type.schema).header_cell;for(let i=0;i<e.width;i++)if(t.nodeAt(e.map[i+n*e.width])?.type!=r)return!1;return!0}function Jv(e,{map:t,tableStart:n,table:r},i){let a=n;for(let e=0;e<i;e++)a+=r.child(e).nodeSize;let o=[],s=i>0?-1:0;qv(t,r,i+s)&&(s=i==0||i==t.height?null:0);for(let a=0,c=t.width*i;a<t.width;a++,c++)if(i>0&&i<t.height&&t.map[c]==t.map[c-t.width]){let i=t.map[c],o=r.nodeAt(i).attrs;e.setNodeMarkup(n+i,null,{...o,rowspan:o.rowspan+1}),a+=o.colspan-1}else{let e=(s==null?_v(r.type.schema).cell:r.nodeAt(t.map[c+s*t.width])?.type)?.createAndFill();e&&o.push(e)}return e.insert(a,_v(r.type.schema).row.create(null,o)),e}function Yv(e,t){if(!xv(e))return!1;if(t){let n=Vv(e);t(Jv(e.tr,n,n.top))}return!0}function Xv(e,t){if(!xv(e))return!1;if(t){let n=Vv(e);t(Jv(e.tr,n,n.bottom))}return!0}function Zv(e,{map:t,table:n,tableStart:r},i){let a=0;for(let e=0;e<i;e++)a+=n.child(e).nodeSize;let o=a+n.child(i).nodeSize,s=e.mapping.maps.length;e.delete(a+r,o+r);let c=new Set;for(let a=0,o=i*t.width;a<t.width;a++,o++){let l=t.map[o];if(!c.has(l)){if(c.add(l),i>0&&l==t.map[o-t.width]){let t=n.nodeAt(l).attrs;e.setNodeMarkup(e.mapping.slice(s).map(l+r),null,{...t,rowspan:t.rowspan-1}),a+=t.colspan-1}else if(i<t.height&&l==t.map[o+t.width]){let o=n.nodeAt(l),c=o.attrs,u=o.type.create({...c,rowspan:o.attrs.rowspan-1},o.content),d=t.positionAt(i+1,a,n);e.insert(e.mapping.slice(s).map(r+d),u),a+=c.colspan-1}}}}function Qv(e,t){if(!xv(e))return!1;if(t){let n=Vv(e),r=e.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let e=n.bottom-1;Zv(r,n,e),e!=n.top;e--){let e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError(`No table found`);n.table=e,n.map=fv.get(n.table)}t(r)}return!0}function $v(e){let t=e.content;return t.childCount==1&&t.child(0).isTextblock&&t.child(0).childCount==0}function ey({width:e,height:t,map:n},r){let i=r.top*e+r.left,a=i,o=(r.bottom-1)*e+r.left,s=i+(r.right-r.left-1);for(let t=r.top;t<r.bottom;t++){if(r.left>0&&n[a]==n[a-1]||r.right<e&&n[s]==n[s+1])return!0;a+=e,s+=e}for(let a=r.left;a<r.right;a++){if(r.top>0&&n[i]==n[i-e]||r.bottom<t&&n[o]==n[o+e])return!0;i++,o++}return!1}function ty(e,t){let n=e.selection;if(!(n instanceof jv)||n.$anchorCell.pos==n.$headCell.pos)return!1;let r=Vv(e),{map:i}=r;if(ey(i,r))return!1;if(t){let n=e.tr,a={},o=U.empty,s,c;for(let e=r.top;e<r.bottom;e++)for(let t=r.left;t<r.right;t++){let l=i.map[e*i.width+t],u=r.table.nodeAt(l);if(!a[l]&&u){if(a[l]=!0,s==null)s=l,c=u;else{$v(u)||(o=o.append(u.content));let e=n.mapping.map(l+r.tableStart);n.delete(e,e+u.nodeSize)}}}if(s==null||c==null)return!0;if(n.setNodeMarkup(s+r.tableStart,null,{...kv(c.attrs,c.attrs.colspan,r.right-r.left-c.attrs.colspan),rowspan:r.bottom-r.top}),o.size>0){let e=s+1+c.content.size,t=$v(c)?s+1:e;n.replaceWith(t+r.tableStart,e+r.tableStart,o)}n.setSelection(new jv(n.doc.resolve(s+r.tableStart))),t(n)}return!0}function ny(e,t){let n=_v(e.schema);return ry(({node:e})=>n[e.type.spec.tableRole])(e,t)}function ry(e){return(t,n)=>{let r=t.selection,i,a;if(r instanceof jv){if(r.$anchorCell.pos!=r.$headCell.pos)return!1;i=r.$anchorCell.nodeAfter,a=r.$anchorCell.pos}else{if(i=bv(r.$from),!i)return!1;a=yv(r.$from)?.pos}if(i==null||a==null||i.attrs.colspan==1&&i.attrs.rowspan==1)return!1;if(n){let o=i.attrs,s=[],c=o.colwidth;o.rowspan>1&&(o={...o,rowspan:1}),o.colspan>1&&(o={...o,colspan:1});let l=Vv(t),u=t.tr;for(let e=0;e<l.right-l.left;e++)s.push(c?{...o,colwidth:c&&c[e]?[c[e]]:null}:o);let d;for(let t=l.top;t<l.bottom;t++){let n=l.map.positionAt(t,l.left,l.table);t==l.top&&(n+=i.nodeSize);for(let r=l.left,a=0;r<l.right;r++,a++)(r!=l.left||t!=l.top)&&u.insert(d=u.mapping.map(n+l.tableStart,1),e({node:i,row:t,col:r}).createAndFill(s[a]))}u.setNodeMarkup(a,e({node:i,row:l.top,col:l.left}),s[0]),r instanceof jv&&u.setSelection(new jv(u.doc.resolve(r.$anchorCell.pos),d?u.doc.resolve(d):void 0)),n(u)}return!0}}function iy(e){return function(t,n){if(!xv(t))return!1;if(n){let r=_v(t.schema),i=Vv(t),a=t.tr,o=i.map.cellsInRect(e==`column`?{left:i.left,top:0,right:i.right,bottom:i.map.height}:e==`row`?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),s=o.map(e=>i.table.nodeAt(e));for(let e=0;e<o.length;e++)s[e].type==r.header_cell&&a.setNodeMarkup(i.tableStart+o[e],r.cell,s[e].attrs);if(a.steps.length===0)for(let e=0;e<o.length;e++)a.setNodeMarkup(i.tableStart+o[e],r.header_cell,s[e].attrs);n(a)}return!0}}function ay(e,t,n){let r=t.map.cellsInRect({left:0,top:0,right:e==`row`?t.map.width:1,bottom:e==`column`?t.map.height:1});for(let e=0;e<r.length;e++){let i=t.table.nodeAt(r[e]);if(i&&i.type!==n.header_cell)return!1}return!0}function oy(e,t){return t||={useDeprecatedLogic:!1},t.useDeprecatedLogic?iy(e):function(t,n){if(!xv(t))return!1;if(n){let r=_v(t.schema),i=Vv(t),a=t.tr,o=ay(`row`,i,r),s=ay(`column`,i,r),c=(e===`column`?o:e===`row`&&s)?1:0,l=e==`column`?{left:0,top:c,right:1,bottom:i.map.height}:e==`row`?{left:c,top:0,right:i.map.width,bottom:1}:i,u=e==`column`?s?r.cell:r.header_cell:e==`row`?o?r.cell:r.header_cell:r.cell;i.map.cellsInRect(l).forEach(e=>{let t=e+i.tableStart,n=a.doc.nodeAt(t);n&&a.setNodeMarkup(t,u,n.attrs)}),n(a)}return!0}}oy(`row`,{useDeprecatedLogic:!0}),oy(`column`,{useDeprecatedLogic:!0}),oy(`cell`,{useDeprecatedLogic:!0});function sy(e,t){if(t<0){let t=e.nodeBefore;if(t)return e.pos-t.nodeSize;for(let t=e.index(-1)-1,n=e.before();t>=0;t--){let r=e.node(-1).child(t),i=r.lastChild;if(i)return n-1-i.nodeSize;n-=r.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;let t=e.node(-1);for(let n=e.indexAfter(-1),r=e.after();n<t.childCount;n++){let e=t.child(n);if(e.childCount)return r+1;r+=e.nodeSize}}return null}function cy(e){return function(t,n){if(!xv(t))return!1;let r=sy(Sv(t),e);if(r==null)return!1;if(n){let e=t.doc.resolve(r);n(t.tr.setSelection(H.between(e,Tv(e))).scrollIntoView())}return!0}}function ly(e,t){let n=e.selection;if(!(n instanceof jv))return!1;if(t){let r=e.tr,i=_v(e.schema).cell.createAndFill().content;n.forEachCell((e,t)=>{e.content.eq(i)||r.replace(r.mapping.map(t+1),r.mapping.map(t+e.nodeSize-1),new _e(i,0,0))}),r.docChanged&&t(r)}return!0}function uy(e){if(e.size===0)return null;let{content:t,openStart:n,openEnd:r}=e;for(;t.childCount==1&&(n>0&&r>0||t.child(0).type.spec.tableRole==`table`);)n--,r--,t=t.child(0).content;let i=t.child(0),a=i.type.spec.tableRole,o=i.type.schema,s=[];if(a==`row`)for(let e=0;e<t.childCount;e++){let i=t.child(e).content,a=e?0:Math.max(0,n-1),c=e<t.childCount-1?0:Math.max(0,r-1);(a||c)&&(i=fy(_v(o).row,new _e(i,a,c)).content),s.push(i)}else if(a==`cell`||a==`header_cell`)s.push(n||r?fy(_v(o).row,new _e(t,n,r)).content:t);else return null;return dy(o,s)}function dy(e,t){let n=[];for(let e=0;e<t.length;e++){let r=t[e];for(let t=r.childCount-1;t>=0;t--){let{rowspan:i,colspan:a}=r.child(t).attrs;for(let t=e;t<e+i;t++)n[t]=(n[t]||0)+a}}let r=0;for(let e=0;e<n.length;e++)r=Math.max(r,n[e]);for(let i=0;i<n.length;i++)if(i>=t.length&&t.push(U.empty),n[i]<r){let a=_v(e).cell.createAndFill(),o=[];for(let e=n[i];e<r;e++)o.push(a);t[i]=t[i].append(U.from(o))}return{height:t.length,width:r,rows:t}}function fy(e,t){let n=e.createAndFill();return new Re(n).replace(0,n.content.size,t).doc}function py({width:e,height:t,rows:n},r,i){if(e!=r){let t=[],i=[];for(let e=0;e<n.length;e++){let a=n[e],o=[];for(let n=t[e]||0,i=0;n<r;i++){let s=a.child(i%a.childCount);n+s.attrs.colspan>r&&(s=s.type.createChecked(Ov(s.attrs,s.attrs.colspan,n+s.attrs.colspan-r),s.content)),o.push(s),n+=s.attrs.colspan;for(let n=1;n<s.attrs.rowspan;n++)t[e+n]=(t[e+n]||0)+s.attrs.colspan}i.push(U.from(o))}n=i,e=r}if(t!=i){let e=[];for(let r=0,a=0;r<i;r++,a++){let o=[],s=n[a%t];for(let e=0;e<s.childCount;e++){let t=s.child(e);r+t.attrs.rowspan>i&&(t=t.type.create({...t.attrs,rowspan:Math.max(1,i-t.attrs.rowspan)},t.content)),o.push(t)}e.push(U.from(o))}n=e,t=i}return{width:e,height:t,rows:n}}function my(e,t,n,r,i,a,o){let s=e.doc.type.schema,c=_v(s),l,u;if(i>t.width)for(let a=0,s=0;a<t.height;a++){let d=n.child(a);s+=d.nodeSize;let f=[],p;p=d.lastChild==null||d.lastChild.type==c.cell?l||=c.cell.createAndFill():u||=c.header_cell.createAndFill();for(let e=t.width;e<i;e++)f.push(p);e.insert(e.mapping.slice(o).map(s-1+r),f)}if(a>t.height){let s=[];for(let e=0,r=(t.height-1)*t.width;e<Math.max(t.width,i);e++){let i=e>=t.width?!1:n.nodeAt(t.map[r+e]).type==c.header_cell;s.push(i?u||=c.header_cell.createAndFill():l||=c.cell.createAndFill())}let d=c.row.create(null,U.from(s)),f=[];for(let e=t.height;e<a;e++)f.push(d);e.insert(e.mapping.slice(o).map(r+n.nodeSize-2),f)}return!!(l||u)}function hy(e,t,n,r,i,a,o,s){if(o==0||o==t.height)return!1;let c=!1;for(let l=i;l<a;l++){let i=o*t.width+l,a=t.map[i];if(t.map[i-t.width]==a){c=!0;let i=n.nodeAt(a),{top:u,left:d}=t.findCell(a);e.setNodeMarkup(e.mapping.slice(s).map(a+r),null,{...i.attrs,rowspan:o-u}),e.insert(e.mapping.slice(s).map(t.positionAt(o,d,n)),i.type.createAndFill({...i.attrs,rowspan:u+i.attrs.rowspan-o})),l+=i.attrs.colspan-1}}return c}function gy(e,t,n,r,i,a,o,s){if(o==0||o==t.width)return!1;let c=!1;for(let l=i;l<a;l++){let i=l*t.width+o,a=t.map[i];if(t.map[i-1]==a){c=!0;let i=n.nodeAt(a),u=t.colCount(a),d=e.mapping.slice(s).map(a+r);e.setNodeMarkup(d,null,Ov(i.attrs,o-u,i.attrs.colspan-(o-u))),e.insert(d+i.nodeSize,i.type.createAndFill(Ov(i.attrs,0,o-u))),l+=i.attrs.rowspan-1}}return c}function _y(e,t,n,r,i){let a=n?e.doc.nodeAt(n-1):e.doc;if(!a)throw Error(`No table found`);let o=fv.get(a),{top:s,left:c}=r,l=c+i.width,u=s+i.height,d=e.tr,f=0;function p(){if(a=n?d.doc.nodeAt(n-1):d.doc,!a)throw Error(`No table found`);o=fv.get(a),f=d.mapping.maps.length}my(d,o,a,n,l,u,f)&&p(),hy(d,o,a,n,c,l,s,f)&&p(),hy(d,o,a,n,c,l,u,f)&&p(),gy(d,o,a,n,s,u,c,f)&&p(),gy(d,o,a,n,s,u,l,f)&&p();for(let e=s;e<u;e++){let t=o.positionAt(e,c,a),r=o.positionAt(e,l,a);d.replace(d.mapping.slice(f).map(t+n),d.mapping.slice(f).map(r+n),new _e(i.rows[e-s],0,0))}p(),d.setSelection(new jv(d.doc.resolve(n+o.positionAt(s,c,a)),d.doc.resolve(n+o.positionAt(u-1,l-1,a)))),t(d)}var vy=Ue({ArrowLeft:by(`horiz`,-1),ArrowRight:by(`horiz`,1),ArrowUp:by(`vert`,-1),ArrowDown:by(`vert`,1),"Shift-ArrowLeft":xy(`horiz`,-1),"Shift-ArrowRight":xy(`horiz`,1),"Shift-ArrowUp":xy(`vert`,-1),"Shift-ArrowDown":xy(`vert`,1),Backspace:ly,"Mod-Backspace":ly,Delete:ly,"Mod-Delete":ly});function yy(e,t,n){return!n.eq(e.selection)&&(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function by(e,t){return(n,r,i)=>{if(!i)return!1;let a=n.selection;if(a instanceof jv)return yy(n,r,Me.near(a.$headCell,t));if(e!=`horiz`&&!a.empty)return!1;let o=Ty(i,e,t);if(o==null)return!1;if(e==`horiz`)return yy(n,r,Me.near(n.doc.resolve(a.head+t),t));{let i=n.doc.resolve(o),a=Dv(i,e,t),s;return s=a?Me.near(a,1):t<0?Me.near(n.doc.resolve(i.before(-1)),-1):Me.near(n.doc.resolve(i.after(-1)),1),yy(n,r,s)}}}function xy(e,t){return(n,r,i)=>{if(!i)return!1;let a=n.selection,o;if(a instanceof jv)o=a;else{let r=Ty(i,e,t);if(r==null)return!1;o=new jv(n.doc.resolve(r))}let s=Dv(o.$headCell,e,t);return s?yy(n,r,new jv(o.$anchorCell,s)):!1}}function Sy(e,t){let n=e.state.doc,r=yv(n.resolve(t));return r?(e.dispatch(e.state.tr.setSelection(new jv(r))),!0):!1}function Cy(e,t,n){if(!xv(e.state))return!1;let r=uy(n),i=e.state.selection;if(i instanceof jv){r||={width:1,height:1,rows:[U.from(fy(_v(e.state.schema).cell,n))]};let t=i.$anchorCell.node(-1),a=i.$anchorCell.start(-1),o=fv.get(t).rectBetween(i.$anchorCell.pos-a,i.$headCell.pos-a);return r=py(r,o.right-o.left,o.bottom-o.top),_y(e.state,e.dispatch,a,o,r),!0}if(r){let t=Sv(e.state),n=t.start(-1);return _y(e.state,e.dispatch,n,fv.get(t.node(-1)).findCell(t.pos-n),r),!0}return!1}function wy(e,t){if(t.button!=0||t.ctrlKey||t.metaKey)return;let n=Ey(e,t.target),r;if(t.shiftKey&&e.state.selection instanceof jv)i(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&n&&(r=yv(e.state.selection.$anchor))!=null&&Dy(e,t)?.pos!=r.pos)i(r,t),t.preventDefault();else if(!n)return;function i(t,n){let r=Dy(e,n),i=vv.getState(e.state)==null;if(!r||!Ev(t,r)){if(i)r=t;else return}let a=new jv(t,r);if(i||!e.state.selection.eq(a)){let n=e.state.tr.setSelection(a);i&&n.setMeta(vv,t.pos),e.dispatch(n)}}function a(){e.root.removeEventListener(`mouseup`,a),e.root.removeEventListener(`dragstart`,a),e.root.removeEventListener(`mousemove`,o),vv.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(vv,-1))}function o(r){let o=r,s=vv.getState(e.state),c;if(s!=null)c=e.state.doc.resolve(s);else if(Ey(e,o.target)!=n&&(c=Dy(e,t),!c))return a();c&&i(c,o)}e.root.addEventListener(`mouseup`,a),e.root.addEventListener(`dragstart`,a),e.root.addEventListener(`mousemove`,o)}function Ty(e,t,n){if(!(e.state.selection instanceof H))return null;let{$head:r}=e.state.selection;for(let i=r.depth-1;i>=0;i--){let a=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:a.childCount))return null;if(a.type.spec.tableRole==`cell`||a.type.spec.tableRole==`header_cell`){let a=r.before(i),o=t==`vert`?n>0?`down`:`up`:n>0?`right`:`left`;return e.endOfTextblock(o)?a:null}}return null}function Ey(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName==`TD`||t.nodeName==`TH`)return t;return null}function Dy(e,t){let n=e.posAtCoords({left:t.clientX,top:t.clientY});if(!n)return null;let{inside:r,pos:i}=n;return r>=0&&yv(e.state.doc.resolve(r))||yv(e.state.doc.resolve(i))}var Oy=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement(`div`),this.dom.className=`tableWrapper`,this.table=this.dom.appendChild(document.createElement(`table`)),this.table.style.setProperty(`--default-cell-min-width`,`${t}px`),this.colgroup=this.table.appendChild(document.createElement(`colgroup`)),ky(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement(`tbody`))}update(e){return e.type==this.node.type&&(this.node=e,ky(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type==`attributes`&&(e.target==this.table||this.colgroup.contains(e.target))}};function ky(e,t,n,r,i,a){let o=0,s=!0,c=t.firstChild,l=e.firstChild;if(l){for(let e=0,n=0;e<l.childCount;e++){let{colspan:u,colwidth:d}=l.child(e).attrs;for(let e=0;e<u;e++,n++){let l=i==n?a:d&&d[e],u=l?l+`px`:``;if(o+=l||r,l||(s=!1),c)c.style.width!=u&&(c.style.width=u),c=c.nextSibling;else{let e=document.createElement(`col`);e.style.width=u,t.appendChild(e)}}}for(;c;){var u;let e=c.nextSibling;(u=c.parentNode)==null||u.removeChild(c),c=e}s?(n.style.width=o+`px`,n.style.minWidth=``):(n.style.width=``,n.style.minWidth=o+`px`)}}var Ay=new Ae(`tableColumnResizing`);function jy({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:r=Oy,lastColumnResizable:i=!0}={}){let a=new ke({key:Ay,state:{init(e,t){var i;let o=(i=a.spec)==null||(i=i.props)==null?void 0:i.nodeViews,s=_v(t.schema).table.name;return r&&o&&(o[s]=(e,t)=>new r(e,n,t)),new My(-1,!1)},apply(e,t){return t.apply(e)}},props:{attributes:e=>{let t=Ay.getState(e);return t&&t.activeHandle>-1?{class:`resize-cursor`}:{}},handleDOMEvents:{mousemove:(t,n)=>{Ny(t,n,e,i)},mouseleave:e=>{Py(e)},mousedown:(e,r)=>{Fy(e,r,t,n)}},decorations:e=>{let t=Ay.getState(e);if(t&&t.activeHandle>-1)return Wy(e,t.activeHandle)},nodeViews:{}}});return a}var My=class e{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(t){let n=this,r=t.getMeta(Ay);if(r&&r.setHandle!=null)return new e(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new e(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&t.docChanged){let r=t.mapping.map(n.activeHandle,-1);return wv(t.doc.resolve(r))||(r=-1),new e(r,n.dragging)}return n}};function Ny(e,t,n,r){if(!e.editable)return;let i=Ay.getState(e.state);if(i&&!i.dragging){let a=Ly(t.target),o=-1;if(a){let{left:r,right:i}=a.getBoundingClientRect();t.clientX-r<=n?o=Ry(e,t,`left`,n):i-t.clientX<=n&&(o=Ry(e,t,`right`,n))}if(o!=i.activeHandle){if(!r&&o!==-1){let t=e.state.doc.resolve(o),n=t.node(-1),r=fv.get(n),i=t.start(-1);if(r.colCount(t.pos-i)+t.nodeAfter.attrs.colspan-1==r.width-1)return}By(e,o)}}}function Py(e){if(!e.editable)return;let t=Ay.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&By(e,-1)}function Fy(e,t,n,r){if(!e.editable)return!1;let i=e.dom.ownerDocument.defaultView??window,a=Ay.getState(e.state);if(!a||a.activeHandle==-1||a.dragging)return!1;let o=e.state.doc.nodeAt(a.activeHandle),s=Iy(e,a.activeHandle,o.attrs);e.dispatch(e.state.tr.setMeta(Ay,{setDragging:{startX:t.clientX,startWidth:s}}));function c(t){i.removeEventListener(`mouseup`,c),i.removeEventListener(`mousemove`,l);let r=Ay.getState(e.state);r?.dragging&&(Vy(e,r.activeHandle,zy(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(Ay,{setDragging:null})))}function l(t){if(!t.which)return c(t);let i=Ay.getState(e.state);if(i&&i.dragging){let a=zy(i.dragging,t,n);Hy(e,i.activeHandle,a,r)}}return Hy(e,a.activeHandle,s,r),i.addEventListener(`mouseup`,c),i.addEventListener(`mousemove`,l),t.preventDefault(),!0}function Iy(e,t,{colspan:n,colwidth:r}){let i=r&&r[r.length-1];if(i)return i;let a=e.domAtPos(t),o=a.node.childNodes[a.offset].offsetWidth,s=n;if(r)for(let e=0;e<n;e++)r[e]&&(o-=r[e],s--);return o/s}function Ly(e){for(;e&&e.nodeName!=`TD`&&e.nodeName!=`TH`;)e=e.classList&&e.classList.contains(`ProseMirror`)?null:e.parentNode;return e}function Ry(e,t,n,r){let i=n==`right`?-r:r,a=e.posAtCoords({left:t.clientX+i,top:t.clientY});if(!a)return-1;let{pos:o}=a,s=yv(e.state.doc.resolve(o));if(!s)return-1;if(n==`right`)return s.pos;let c=fv.get(s.node(-1)),l=s.start(-1),u=c.map.indexOf(s.pos-l);return u%c.width==0?-1:l+c.map[u-1]}function zy(e,t,n){let r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function By(e,t){e.dispatch(e.state.tr.setMeta(Ay,{setHandle:t}))}function Vy(e,t,n){let r=e.state.doc.resolve(t),i=r.node(-1),a=fv.get(i),o=r.start(-1),s=a.colCount(r.pos-o)+r.nodeAfter.attrs.colspan-1,c=e.state.tr;for(let e=0;e<a.height;e++){let t=e*a.width+s;if(e&&a.map[t]==a.map[t-a.width])continue;let r=a.map[t],l=i.nodeAt(r).attrs,u=l.colspan==1?0:s-a.colCount(r);if(l.colwidth&&l.colwidth[u]==n)continue;let d=l.colwidth?l.colwidth.slice():Uy(l.colspan);d[u]=n,c.setNodeMarkup(o+r,null,{...l,colwidth:d})}c.docChanged&&e.dispatch(c)}function Hy(e,t,n,r){let i=e.state.doc.resolve(t),a=i.node(-1),o=i.start(-1),s=fv.get(a).colCount(i.pos-o)+i.nodeAfter.attrs.colspan-1,c=e.domAtPos(i.start(-1)).node;for(;c&&c.nodeName!=`TABLE`;)c=c.parentNode;c&&ky(a,c.firstChild,c,r,s,n)}function Uy(e){return Array(e).fill(0)}function Wy(e,t){let n=[],r=e.doc.resolve(t),i=r.node(-1);if(!i)return Ke.empty;let a=fv.get(i),o=r.start(-1),s=a.colCount(r.pos-o)+r.nodeAfter.attrs.colspan-1;for(let t=0;t<a.height;t++){let r=s+t*a.width;if((s==a.width-1||a.map[r]!=a.map[r+1])&&(t==0||a.map[r]!=a.map[r-a.width])){let t=a.map[r],s=o+t+i.nodeAt(t).nodeSize-1,c=document.createElement(`div`);c.className=`column-resize-handle`,Ay.getState(e)?.dragging&&n.push(ft.node(o+t,o+t+i.nodeAt(t).nodeSize,{class:`column-resize-dragging`})),n.push(ft.widget(s,c))}}return Ke.create(e.doc,n)}function Gy({allowTableNodeSelection:e=!1}={}){return new ke({key:vv,state:{init(){return null},apply(e,t){let n=e.getMeta(vv);if(n!=null)return n==-1?null:n;if(t==null||!e.docChanged)return t;let{deleted:r,pos:i}=e.mapping.mapResult(t);return r?null:i}},props:{decorations:Nv,handleDOMEvents:{mousedown:wy},createSelectionBetween(e){return vv.getState(e.state)==null?null:e.state.selection},handleTripleClick:Sy,handleKeyDown:vy,handlePaste:Cy},appendTransaction(t,n,r){return Iv(r,zv(r,n),e)}})}var Ky=new WeakSet,qy=new WeakSet;function Jy(e){let t=e;return Ky.add(t),t}function Yy(e){return Array.isArray(e)&&Ky.has(e)}function Xy(e){return e.flatMap(e=>e==null?[]:Array.isArray(e)&&qy.has(e)&&!Yy(e)?Xy(e):[e])}function Zy(e,t){if(e===`slot`)return 0;if(e instanceof Function){let n=e(t);return Array.isArray(n)&&!Yy(n)&&!qy.has(n)?Jy(n):n}let{children:n,...r}=t??{};if(e===`svg`)throw Error(`SVG elements are not supported in the JSX syntax, use the array syntax instead`);if(Array.isArray(n)){if(Yy(n))return Jy([e,r,n]);if(n.length===0)return Jy([e,r]);let t=Xy(n);return t.length===0?Jy([e,r]):Jy([e,r,...t])}return Jy(n==null?[e,r]:[e,r,n])}var Qy=(e,t)=>Zy(e,t),$y=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,eb=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,tb=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,nb=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,rb=b_.create({name:`bold`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`strong`},{tag:`b`,getAttrs:e=>e.style.fontWeight!==`normal`&&null},{style:`font-weight=400`,clearMark:e=>e.type.name===this.name},{style:`font-weight`,getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return Qy(`strong`,{...vh(this.options.HTMLAttributes,e),children:Qy(`slot`,{})})},markdownTokenName:`strong`,parseMarkdown:(e,t)=>t.applyMark(`bold`,t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:`<strong>`,close:`</strong>`}},renderMarkdown:(e,t)=>`**${t.renderChildren(e)}**`,addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[K_({find:$y,type:this.type}),K_({find:tb,type:this.type})]},addPasteRules(){return[Y_({find:eb,type:this.type}),Y_({find:nb,type:this.type})]}}),ib=e=>{let t=/`([^`]+)`(?!`)$/.exec(e);return!t||t.index>0&&e[t.index-1]==="`"?null:{index:t.index,text:t[0],replaceWith:t[1]}},ab=e=>{let t=/`([^`]+)`(?!`)/g,n=[],r;for(;(r=t.exec(e))!==null;)r.index>0&&e[r.index-1]==="`"||n.push({index:r.index,text:r[0],replaceWith:r[1]});return n};function ob(e){let t=new Set((e.match(/`+/g)||[]).map(e=>e.length)),n=1;for(;t.has(n);)n+=1;return n}var sb=b_.create({name:`code`,addOptions(){return{HTMLAttributes:{}}},excludes:`_`,code:!0,exitable:!0,parseHTML(){return[{tag:`code`}]},renderHTML({HTMLAttributes:e}){return[`code`,vh(this.options.HTMLAttributes,e),0]},markdownTokenName:`codespan`,parseMarkdown:(e,t)=>t.applyMark(`code`,[{type:`text`,text:e.text||``}]),renderMarkdown:(e,t,n)=>{var r;if(!e.content)return``;let i=typeof(n==null||(r=n.meta)==null?void 0:r.markText)==`string`?n.meta.markText:``,a="`".repeat(ob(i)),o=i.startsWith("`")||i.endsWith("`")?` `:``;return`${a}${o}${t.renderChildren(e.content)}${o}${a}`},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[K_({find:ib,type:this.type})]},addPasteRules(){return[Y_({find:ab,type:this.type})]}}),cb=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,lb=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,ub=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,db=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,fb=b_.create({name:`italic`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`em`},{tag:`i`,getAttrs:e=>e.style.fontStyle!==`normal`&&null},{style:`font-style=normal`,clearMark:e=>e.type.name===this.name},{style:`font-style=italic`}]},renderHTML({HTMLAttributes:e}){return[`em`,vh(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},markdownTokenName:`em`,parseMarkdown:(e,t)=>t.applyMark(`italic`,t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:`<em>`,close:`</em>`}},renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[K_({find:cb,type:this.type}),K_({find:ub,type:this.type})]},addPasteRules(){return[Y_({find:lb,type:this.type}),Y_({find:db,type:this.type})]}}),pb=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,mb=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,hb=b_.create({name:`strike`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`s`},{tag:`del`},{tag:`strike`},{style:`text-decoration`,consuming:!1,getAttrs:e=>e.includes(`line-through`)?{}:!1}]},renderHTML({HTMLAttributes:e}){return[`s`,vh(this.options.HTMLAttributes,e),0]},markdownTokenName:`del`,parseMarkdown:(e,t)=>t.applyMark(`strike`,t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[K_({find:pb,type:this.type})]},addPasteRules(){return[Y_({find:mb,type:this.type})]}}),gb=b_.create({name:`underline`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`u`},{style:`text-decoration`,consuming:!1,getAttrs:e=>e.includes(`underline`)?{}:!1}]},renderHTML({HTMLAttributes:e}){return[`u`,vh(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||`underline`,t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`++${t.renderChildren(e)}++`},markdownTokenizer:{name:`underline`,level:`inline`,start(e){return e.indexOf(`++`)},tokenize(e,t,n){let r=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!r)return;let i=r[2].trim();return{type:`underline`,raw:r[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function _b(e){return e.marks.some(e=>[`y-attributed-delete`].includes(e.type.name))}function vb(e,t){let n=e.attrs.id;if(!n)throw Error(`Node ${e.type.name} does not have an ID`);if(_b(e)){let r=0,i=!1;if(t.descendants(t=>{if(i)return!1;if(t.attrs.id===n){if(t===e)return i=!0,!1;r++}return!0}),!i)throw Error(`Node ${e.type.name} with ID ${n} not found in document`);return`${n}-${r}`}return n}function yb(e,t){let n=e.resolve(t);if(n.nodeAfter&&n.nodeAfter.type.isInGroup(`bnBlock`))return{posBeforeNode:n.pos,node:n.nodeAfter};let r=n.depth,i=n.node(r);for(;r>0;){if(i.type.isInGroup(`bnBlock`))return{posBeforeNode:n.before(r),node:i};r--,i=n.node(r)}let a=[];e.descendants((e,t)=>{e.type.isInGroup(`bnBlock`)&&a.push(t)}),console.warn(`Position ${t} is not within a blockContainer node.`);let o=e.resolve(a.find(e=>e>=t)||a[a.length-1]);return{posBeforeNode:o.pos,node:o.nodeAfter}}function bb(e,t){if(!e.type.isInGroup(`bnBlock`))throw Error(`Attempted to get bnBlock node at position but found node of different type ${e.type.name}`);let n=e,r=t,i={node:n,beforePos:r,afterPos:r+n.nodeSize};if(n.type.name===`blockContainer`){let e,t;if(n.forEach((n,i)=>{if(n.type.spec.group===`blockContent`){let t=n,a=r+i+1;e={node:t,beforePos:a,afterPos:a+n.nodeSize}}else if(n.type.name===`blockGroup`){let e=n,a=r+i+1;t={node:e,beforePos:a,afterPos:a+n.nodeSize}}}),!e)throw Error(`blockContainer node does not contain a blockContent node in its children: ${n}`);return{isBlockContainer:!0,bnBlock:i,blockContent:e,childContainer:t,blockNoteType:e.node.type.name}}if(!i.node.type.isInGroup(`childContainer`))throw Error(`bnBlock node is not in the childContainer group: ${i.node}`);return{isBlockContainer:!1,bnBlock:i,childContainer:i,blockNoteType:i.node.type.name}}function xb(e){return bb(e.node,e.posBeforeNode)}function Sb(e){if(!e.nodeAfter)throw Error(`Attempted to get blockContainer node at position ${e.pos} but a node at this position does not exist`);return bb(e.nodeAfter,e.pos)}function Cb(e){return wb(e,e.selection.anchor)}function wb(e,t){return xb(yb(e.doc,t))}function Tb(e,t=JSON.stringify){let n={};return e.filter(e=>{let r=t(e);return Object.prototype.hasOwnProperty.call(n,r)?!1:n[r]=!0})}function Eb(e){return Tb(e.filter((t,n)=>e.indexOf(t)!==n))}function Db(e){return e.marks.some(e=>e.type.name===`y-attributed-delete`)}var Ob=O_.create({name:`uniqueID`,priority:1e4,addOptions(){return{types:[],setIdAttribute:!1,isWithinEditor:void 0,generateID:()=>{if(typeof window<`u`&&window.__TEST_OPTIONS){let e=window.__TEST_OPTIONS;return e.mockID===void 0?e.mockID=0:e.mockID++,e.mockID.toString()}return lv()}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{id:{default:null,parseHTML:e=>e.getAttribute(`data-id`),renderHTML:e=>{let t={"data-id":e.id};return this.options.setIdAttribute?{...t,id:e.id}:t}}}}]},addProseMirrorPlugins(){let{isWithinEditor:e}=this.options,t=null,n=!1;return[new ke({key:new Ae(`uniqueID`),appendTransaction:(e,t,n)=>{if(!e.some(e=>e.docChanged)||t.doc.eq(n.doc))return;let{tr:r}=n,{types:i,generateID:a}=this.options,o=Zm(t.doc,e),{mapping:s}=o;if(Ih(o).forEach(({newRange:e})=>{let o=Qm(n.doc,e,e=>i.includes(e.type.name)),c=Eb(o.map(({node:e})=>e.attrs.id).filter(e=>e!==null));o.forEach(({node:e,pos:i})=>{if(Db(e))return;let o=r.doc.nodeAt(i)?.attrs.id;if(o===null){let o=t.doc.type.createAndFill().content;if(t.doc.content.findDiffStart(o)===null){let t=JSON.parse(JSON.stringify(n.doc.toJSON()));if(t.content[0].content[0].attrs.id=`initialBlockId`,JSON.stringify(t.content)===JSON.stringify(o.toJSON())){r.setNodeMarkup(i,void 0,{...e.attrs,id:`initialBlockId`});return}}r.setNodeMarkup(i,void 0,{...e.attrs,id:a()});return}let{deleted:l}=s.invert().mapResult(i);l&&c.includes(o)&&!_b(e)&&r.setNodeMarkup(i,void 0,{...e.attrs,id:a()})})}),r.steps.length)return r.setMeta(`uniqueID`,!0),r},view(n){let r=r=>{let i=n.dom.parentElement;t=i?.contains(r.target)||e?.(r.target)?i:null};return window.addEventListener(`dragstart`,r),{destroy(){window.removeEventListener(`dragstart`,r)}}},props:{handleDOMEvents:{drop:(e,r)=>(n=t!==e.dom.parentElement||r.dataTransfer?.effectAllowed===`copy`,t=null,!1),paste:()=>(n=!0,!1)},transformPasted:e=>{if(!n)return e;let{types:t}=this.options,r=e=>{let n=[];return e.forEach(e=>{if(e.isText){n.push(e);return}if(!t.includes(e.type.name)){n.push(e.copy(r(e.content)));return}let i=e.type.create({...e.attrs,id:null},r(e.content),e.marks);n.push(i)}),U.from(n)};return n=!1,new _e(r(e.content),e.openStart,e.openEnd)}}})]}});function kb(e){return e.type===`link`}function Ab(e){return typeof e!=`string`&&e.type===`link`}function jb(e){return typeof e!=`string`&&e.type===`text`}function Mb(e){return Pb(e)?{...e}:Nb(e)?{type:`tableCell`,content:[].concat(e.content),props:{backgroundColor:e.props?.backgroundColor??`default`,textColor:e.props?.textColor??`default`,textAlignment:e.props?.textAlignment??`left`,colspan:e.props?.colspan??1,rowspan:e.props?.rowspan??1}}:{type:`tableCell`,content:[].concat(e),props:{backgroundColor:`default`,textColor:`default`,textAlignment:`left`,colspan:1,rowspan:1}}}function Nb(e){return e!=null&&typeof e!=`string`&&!Array.isArray(e)&&e.type===`tableCell`}function Pb(e){return Nb(e)&&e.props!==void 0&&e.content!==void 0}function Fb(e){return Pb(e)?e.props.colspan??1:1}function Ib(e){return Pb(e)?e.props.rowspan??1:1}var Lb=class extends Error{constructor(e){super(`Unreachable case: ${e}`)}};function Rb(e,t=!0){let{"data-test":n,...r}=e;if(Object.keys(r).length>0&&t)throw Error(`Object must be empty `+JSON.stringify(e))}var zb=()=>typeof navigator<`u`&&(/Mac/.test(navigator.platform)||/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent));function Bb(e,t=`Ctrl`){return zb()?e.replace(`Mod`,`⌘`):e.replace(`Mod`,t)}function Vb(...e){return[...new Set(e.filter(e=>e).join(` `).split(` `))].join(` `)}var Hb=()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Ub,Wb=()=>typeof navigator>`u`||typeof window>`u`?!1:(Ub===void 0&&(Ub=navigator.maxTouchPoints>0&&typeof window.matchMedia==`function`&&window.matchMedia(`(pointer: coarse)`).matches),Ub);function Gb(e,t,n,r){let i=document.createElement(`div`);i.className=Vb(`bn-block-content`,n.class),i.setAttribute(`data-content-type`,e);for(let[e,t]of Object.entries(n))e!==`class`&&i.setAttribute(e,t);let a=document.createElement(t);a.className=Vb(`bn-inline-content`,r.class);for(let[e,t]of Object.entries(r))e!==`class`&&a.setAttribute(e,t);return i.appendChild(a),{dom:i,contentDOM:a}}var Kb=(e,t)=>{let n=cS(e,t.pmSchema);n.type.name===`blockContainer`&&(n=n.firstChild);let r=t.pmSchema.nodes[n.type.name].spec.toDOM;if(r===void 0)throw Error("This block has no default HTML serialization as its corresponding TipTap node doesn't implement `renderHTML`.");let i=r(n);if(typeof i!=`object`||!(`dom`in i))throw Error("Cannot use this block's default HTML serialization as its corresponding TipTap node's `renderHTML` function does not return an object with the `dom` property.");return i};function qb(e,t=`<br>`){let n=e.querySelectorAll(`p`);if(n.length>1){let e=n[0];for(let r=1;r<n.length;r++){let i=n[r];e.innerHTML+=t+i.innerHTML,i.remove()}}}function Jb(e){return e.type!==`attributes`||!e.attributeName?!1:e.attributeName.startsWith(`data-darkreader`)?!0:e.attributeName===`style`?(e.target.getAttribute(`style`)??``).includes(`--darkreader`)||(e.oldValue??``).includes(`--darkreader`):!1}function Yb(e){let t=e.ignoreMutation?.bind(e),n=e.contentDOM;e.ignoreMutation=e=>Jb(e)?!0:t?t(e):!n&&e.type!==`selection`}function Xb(e){return`doc`in e?e.doc.type.schema:e.type.schema}function Zb(e){return e.cached.blockNoteEditor}function Qb(e){return Zb(e).schema}function $b(e){return Qb(e).blockSchema}function ex(e){return Qb(e).inlineContentSchema}function tx(e){return Qb(e).styleSchema}function nx(e){return Zb(e).blockCache}function rx(e,t){if($b(e)[t.name]?.content===`plain`)return!0;let n=ex(e)[t.name];return typeof n==`object`&&n.content===`plain`}function ix(e,t,n){let r={type:`tableContent`,columnWidths:[],headerRows:void 0,headerCols:void 0,rows:[]},i=[];e.content.forEach((e,a,o)=>{let s={cells:[]};o===0&&e.content.forEach(e=>{let t=e.attrs.colwidth;t??=Array(e.attrs.colspan??1).fill(void 0),r.columnWidths.push(...t)}),s.cells=e.content.content.map((e,r)=>(i[o]||(i[o]=[]),i[o][r]=e.type.name===`tableHeader`,{type:`tableCell`,content:e.content.content.map(e=>ax(e,t,n)).reduce((e,t)=>{if(!e.length)return t;let n=e[e.length-1],r=t[0];return r&&jb(n)&&jb(r)&&JSON.stringify(n.styles)===JSON.stringify(r.styles)?(n.text+=`
137
- `+r.text,e.push(...t.slice(1)),e):(e.push(...t),e)},[]),props:{colspan:e.attrs.colspan,rowspan:e.attrs.rowspan,backgroundColor:e.attrs.backgroundColor,textColor:e.attrs.textColor,textAlignment:e.attrs.textAlignment}})),r.rows.push(s)});for(let e=0;e<i.length;e++)i[e]?.every(e=>e)&&(r.headerRows=(r.headerRows??0)+1);for(let e=0;e<i[0]?.length;e++)i?.every(t=>t[e])&&(r.headerCols=(r.headerCols??0)+1);return r}function ax(e,t,n){let r=[],i;return e.content.forEach(e=>{if(e.type.name===`hardBreak`){if(i){if(jb(i))i.text+=`
138
- `;else if(kb(i))i.content[i.content.length-1].text+=`
139
- `;else throw Error(`unexpected`)}else i={type:`text`,text:`
140
- `,styles:{}};return}if(e.type.name!==`link`&&e.type.name!==`text`){if(!t[e.type.name]){console.warn(`unrecognized inline content type`,e.type.name);return}i&&=(r.push(i),void 0),r.push(ox(e,t,n));return}let a={},o;for(let t of e.marks)if(t.type.name===`link`)o=t;else{let e=n[t.type.name];if(!e){if(t.type.spec.blocknoteIgnore)continue;throw Error(`style ${t.type.name} not found in styleSchema`)}if(e.propSchema===`boolean`)a[e.type]=!0;else if(e.propSchema===`string`)a[e.type]=t.attrs.stringValue;else throw new Lb(e.propSchema)}i?jb(i)?o?(r.push(i),i={type:`link`,href:o.attrs.href,content:[{type:`text`,text:e.textContent,styles:a}]}):JSON.stringify(i.styles)===JSON.stringify(a)?i.text+=e.textContent:(r.push(i),i={type:`text`,text:e.textContent,styles:a}):kb(i)&&(o?i.href===o.attrs.href?JSON.stringify(i.content[i.content.length-1].styles)===JSON.stringify(a)?i.content[i.content.length-1].text+=e.textContent:i.content.push({type:`text`,text:e.textContent,styles:a}):(r.push(i),i={type:`link`,href:o.attrs.href,content:[{type:`text`,text:e.textContent,styles:a}]}):(r.push(i),i={type:`text`,text:e.textContent,styles:a})):i=o?{type:`link`,href:o.attrs.href,content:[{type:`text`,text:e.textContent,styles:a}]}:{type:`text`,text:e.textContent,styles:a}}),i&&r.push(i),r}function ox(e,t,n){if(e.type.name===`text`||e.type.name===`link`)throw Error(`unexpected`);let r={},i=t[e.type.name];for(let[t,n]of Object.entries(e.attrs)){if(!i)throw Error(`ic node is of an unrecognized type: `+e.type.name);t in i.propSchema&&(r[t]=n)}let a;return a=i.content===`styled`?ax(e,t,n):i.content===`plain`?e.textContent:void 0,{type:e.type.name,props:r,content:a}}function sx(e,t){let n=e.type.schema,r=$b(n),i=ex(n),a=tx(n),o=nx(n);if(!e.type.isInGroup(`bnBlock`))throw Error(`Node should be a bnBlock, but is instead: `+e.type.name);let s=o?.get(e);if(s)return s;let c=bb(e,0),l;try{l=vb(c.bnBlock.node,t)}catch{l=Ob.options.generateID()}let u=r[c.blockNoteType];if(!u)throw Error(`Block is of an unrecognized type: `+c.blockNoteType);let d={};for(let[t,n]of Object.entries({...e.attrs,...c.isBlockContainer?c.blockContent.node.attrs:{}})){let e=u.propSchema;t in e&&(e[t].default!==void 0||n!==void 0)&&(d[t]=n)}let f=r[c.blockNoteType],p=[];c.childContainer?.node.forEach(e=>{p.push(sx(e,t))});let m;if(f.content===`inline`){if(!c.isBlockContainer)throw Error(`impossible`);m=ax(c.blockContent.node,i,a)}else if(f.content===`table`){if(!c.isBlockContainer)throw Error(`impossible`);m=ix(c.blockContent.node,i,a)}else if(f.content===`plain`){if(!c.isBlockContainer)throw Error(`impossible`);let e=c.blockContent.node.textContent;m=e.length>0?[{type:`text`,text:e,styles:{}}]:[]}else if(f.content===`none`)m=void 0;else throw new Lb(f.content);let h={id:l,type:f.type,props:d,content:m,children:p};return o?.set(e,h),h}function cx(e){let t=[];return e.firstChild&&e.firstChild.descendants(n=>(t.push(sx(n,e)),!1)),t}function lx(e){function t(n,r,i){if(n.type.name!==`blockGroup`)throw Error(`unexpected`);let a=[],o,s;return n.forEach((c,l,u)=>{if(c.type.name!==`blockContainer`)throw Error(`unexpected`);if(c.childCount===0)return;if(c.childCount===0||c.childCount>2)throw Error(`unexpected, blockContainer.childCount: `+c.childCount);let d=u===0,f=u===n.childCount-1;if(c.firstChild.type.name===`blockGroup`){if(!d)throw Error(`unexpected`);let e=t(c.firstChild,Math.max(0,r-1),f?Math.max(0,i-1):0);o=e.blockCutAtStart,f&&(s=e.blockCutAtEnd),a.push(...e.blocks);return}let p=sx(c,e.content.firstChild),m=c.childCount>1?c.child(1):void 0,h=[];if(m){let e=t(m,0,f?Math.max(0,i-1):0);h=e.blocks,f&&(s=e.blockCutAtEnd)}f&&!m&&i>1&&(s=p.id),d&&r>1&&(o=p.id),a.push({...p,children:h})}),{blocks:a,blockCutAtStart:o,blockCutAtEnd:s}}if(e.content.childCount===0)return{blocks:[],blockCutAtStart:void 0,blockCutAtEnd:void 0};if(e.content.childCount!==1)throw Error(`slice must be a single block, did you forget includeParents=true?`);return t(e.content.firstChild,Math.max(e.openStart-1,0),Math.max(e.openEnd-1,0))}function ux(e){return`data-`+e.replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}function dx(e){let t=e.split(`/`);return!t.length||t[t.length-1]===``?e:t[t.length-1]}function fx(e){let t=[`mp4`,`webm`,`ogg`,`mov`,`mkv`,`flv`,`avi`,`wmv`,`m4v`];try{let n=new URL(e).pathname.split(`.`).pop()?.toLowerCase()||``;return t.includes(n)}catch{return!1}}function px(e){let t={};return Object.entries(e).forEach(([e,n])=>{t[e]={default:n.default,keepOnSplit:!0,parseHTML:t=>{let r=t.getAttribute(ux(e));if(r===null)return null;if(n.default===void 0&&n.type===`boolean`||n.default!==void 0&&typeof n.default==`boolean`)return r===`true`||r!==`false`&&null;if(n.default===void 0&&n.type===`number`||n.default!==void 0&&typeof n.default==`number`){let e=parseFloat(r);return!Number.isNaN(e)&&Number.isFinite(e)?e:null}return r},renderHTML:t=>t[e]===n.default?{}:{[ux(e)]:t[e]}}}),t}function mx(e,t){let n=e();if(n===void 0)throw Error(`Cannot find node position`);let r=t.resolve(n).node();if(!r)throw Error(`Cannot find block container`);return sx(r,t)}function hx(e,t,n){try{return mx(e,n)}catch(e){let r=n.type.schema.nodes.blockContainer?.createAndFill(null,t);if(r)return sx(r,n);throw e}}function gx(e,t,n,r,i=!1,a){let o=document.createElement(`div`);if(a!==void 0)for(let[e,t]of Object.entries(a))e!==`class`&&o.setAttribute(e,t);o.className=Vb(`bn-block-content`,a?.class||``),o.setAttribute(`data-content-type`,t);for(let[e,t]of Object.entries(n))t!==r[e]?.default&&o.setAttribute(ux(e),t);return i&&o.setAttribute(`data-file-block`,``),o.appendChild(e.dom),e.contentDOM&&(e.contentDOM.className=Vb(`bn-inline-content`,e.contentDOM.className)),{...e,dom:o}}function _x(e,t,n){return{config:{type:e.type,content:e.content,propSchema:t},implementation:{node:e.node,render:Kb,toExternalHTML:Kb},extensions:n}}function vx(e,t){e.stopEvent=e=>(e.type===`mousedown`&&setTimeout(()=>{t.view.dom.blur()},10),!0)}function yx(e,t){let n=[{tag:`[data-content-type=`+e.type+`]`,contentElement:`.bn-inline-content`}];return t.parse&&n.push({tag:`*`,getAttrs(e){if(typeof e==`string`)return!1;let n=t.parse?.(e);return n!==void 0&&n},preserveWhitespace:!0,getContent:e.content===`inline`||e.content===`none`||e.content===`plain`?(n,r)=>{if(t.parseContent){let e=t.parseContent({el:n,schema:r});if(e!==void 0)return e}if(e.content===`inline`||e.content===`plain`){let i=n.cloneNode(!0);qb(i,e.content===`plain`||t.meta?.code?`
141
- `:`<br>`);let a=Ee.fromSchema(r).parse(i,{topNode:r.nodes.paragraph.create(),preserveWhitespace:!0});if(e.content===`plain`){let e=[];return a.content.forEach(t=>{if(t.isText)e.push(t);else{let n=t.type===r.linebreakReplacement?`
142
- `:t.textContent;n&&e.push(r.text(n,t.marks))}}),U.fromArray(e)}return a.content}return U.empty}:void 0}),n}function bx(e,t,n,r){let i=t.node||q_.create({name:e.type,content:e.content===`inline`?`inline*`:e.content===`plain`?`text*`:e.content===`none`?``:e.content,marks(){return e.content===`plain`?Z_(this.editor):void 0},group:`blockContent`,selectable:t.meta?.selectable??!0,isolating:t.meta?.isolating??!0,code:t.meta?.code??!1,defining:t.meta?.defining??!0,priority:r,addAttributes(){return px(e.propSchema)},parseHTML(){return yx(e,t)},renderHTML({HTMLAttributes:n}){let r=document.createElement(`div`);return gx({dom:r,contentDOM:e.content===`inline`||e.content===`plain`?r:void 0},e.type,{},e.propSchema,t.meta?.fileBlockAccept!==void 0,n)},addNodeView(){return n=>{let r=this.options.editor,i=hx(n.getPos,n.node,n.view.state.doc),a=this.options.domAttributes?.blockContent||{},o=t.render.call({blockContentDOMAttributes:a,props:n,renderType:`nodeView`,propSchema:e.propSchema},i,r);return t.meta?.selectable===!1&&vx(o,this.editor),Yb(o),o}}});if(i.name!==e.type)throw Error(`Node name does not match block type. This is a bug in BlockNote.`);return{config:e,implementation:{...t,node:i,render(n,r){let a=i.options.domAttributes?.blockContent||{};return t.render.call({blockContentDOMAttributes:a,props:void 0,renderType:`dom`,propSchema:e.propSchema},n,r)},toExternalHTML:(n,r,a)=>{let o=i.options.domAttributes?.blockContent||{};return t.toExternalHTML?.call({blockContentDOMAttributes:o,propSchema:e.propSchema},n,r,a)??t.render.call({blockContentDOMAttributes:o,renderType:`dom`,props:void 0,propSchema:e.propSchema},n,r)}},extensions:n}}function xx(e){return e}function Sx(e,t,n){return(r={})=>{let i=typeof e==`function`?e(r):e,a=typeof t==`function`?t(r):t,o=n?typeof n==`function`?n(r):n:void 0;return{config:i,implementation:{...a,toExternalHTML(e,t,n){let r=a.toExternalHTML?.call({blockContentDOMAttributes:this.blockContentDOMAttributes},e,t,n);if(r!==void 0)return gx(r,e.type,e.props,this.propSchema??i.propSchema,a.meta?.fileBlockAccept!==void 0)},render(e,t){return gx(a.render.call({blockContentDOMAttributes:this.blockContentDOMAttributes,renderType:this.renderType,props:this.props},e,t),e.type,e.props,this.propSchema??i.propSchema,a.meta?.fileBlockAccept!==void 0,this.blockContentDOMAttributes)}},extensions:o}}}function Cx(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,t.config]))}function wx(e){return e===`boolean`?{}:{stringValue:{default:void 0,keepOnSplit:!0,parseHTML:e=>e.getAttribute(`data-value`),renderHTML:e=>e.stringValue===void 0?{}:{"data-value":e.stringValue}}}}function Tx(e,t,n,r){return e.dom.setAttribute(`data-style-type`,t),r===`string`&&e.dom.setAttribute(`data-value`,n),e.contentDOM&&e.contentDOM.setAttribute(`data-editable`,``),e}function Ex(e,t){return{config:e,implementation:t}}function Dx(e,t){return Ex({type:e.name,propSchema:t},{mark:e,render(t,n){let r=n.pmSchema.marks[e.name].spec.toDOM;if(r===void 0)throw Error("This block has no default HTML serialization as its corresponding TipTap node doesn't implement `renderHTML`.");let i=n.pmSchema.mark(e.name,{stringValue:t}),a=Be.renderSpec(document,r(i,!0));if(typeof a!=`object`||!(`dom`in a))throw Error("Cannot use this block's default HTML serialization as its corresponding TipTap mark's `renderHTML` function does not return an object with the `dom` property.");return a},toExternalHTML(t,n){let r=n.pmSchema.marks[e.name].spec.toDOM;if(r===void 0)throw Error("This block has no default HTML serialization as its corresponding TipTap node doesn't implement `renderHTML`.");let i=n.pmSchema.mark(e.name,{stringValue:t}),a=Be.renderSpec(document,r(i,!0));if(typeof a!=`object`||!(`dom`in a))throw Error("Cannot use this block's default HTML serialization as its corresponding TipTap mark's `renderHTML` function does not return an object with the `dom` property.");return a}})}function Ox(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,t.config]))}function kx(e,t){let n=[{tag:`[data-style-type="${e.type}"]`,contentElement:e=>{let t=e;return t.matches(`[data-editable]`)?t:t.querySelector(`[data-editable]`)||t}}];return t&&n.push({tag:`*`,consuming:!1,getAttrs(e){if(typeof e==`string`)return!1;let n=t?.(e);return n!==void 0&&{stringValue:n}}}),n}function Ax(e,t){let n=b_.create({name:e.type,addAttributes(){return wx(e.propSchema)},parseHTML(){return kx(e,t.parse)},renderHTML({mark:n}){return Tx((t.toExternalHTML||t.render)(n.attrs.stringValue),e.type,n.attrs.stringValue,e.propSchema)},addMarkView(){return({mark:n})=>Tx(t.render(n.attrs.stringValue),e.type,n.attrs.stringValue,e.propSchema)}});return Ex(e,{...t,mark:n,render:n=>Tx(t.render(n),e.type,n,e.propSchema),toExternalHTML:n=>Tx((t.toExternalHTML||t.render)(n),e.type,n,e.propSchema)})}function jx(e){let t=Nx(e),{roots:n,nonRoots:r}=Px(t),i=[];for(;n.size;){i.push(n);let r=new Set;for(let i of n){let n=e.get(i);if(n)for(let e of n){let n=t.get(e);if(n===void 0)continue;let i=n-1;t.set(e,i),i===0&&r.add(e)}}n=r}if(r=Px(t).nonRoots,r.size)throw Error(`Cycle(s) detected; toposort only works on acyclic graphs. Cyclic nodes: ${Array.from(r).join(`, `)}`);return i}function Mx(e){return jx(Fx(e))}function Nx(e){let t=new Map;for(let[n,r]of e.entries()){t.has(n)||t.set(n,0);for(let e of r){let n=t.get(e)??0;t.set(e,n+1)}}return t}function Px(e){let t=new Set,n=new Set;for(let[r,i]of e.entries())i===0?t.add(r):n.add(r);return{roots:t,nonRoots:n}}function Fx(e){let t=new Map;for(let[n,r]of e.entries()){t.has(n)||t.set(n,new Set);for(let e of r)t.has(e)||t.set(e,new Set),t.get(e).add(n)}return t}function Ix(){return new Map}function Lx(e,t,n){return e.has(t)||e.set(t,new Set),e.get(t).add(n),e}function Rx(e){let t=Ix();for(let n of e)Array.isArray(n.runsBefore)&&n.runsBefore.length>0?n.runsBefore.forEach(e=>{Lx(t,n.key,e)}):Lx(t,`default`,n.key);let n=Mx(t),r=n.findIndex(e=>e.has(`default`));return e=>91+(n.findIndex(t=>t.has(e))+r)*10}function zx(e){return e&&Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0))}var Bx=class{opts;BlockNoteEditor=`only for types`;Block=`only for types`;PartialBlock=`only for types`;inlineContentSpecs;styleSpecs;blockSpecs;blockSchema;inlineContentSchema;styleSchema;constructor(e){this.opts=e;let{blockSpecs:t,inlineContentSpecs:n,styleSpecs:r,blockSchema:i,inlineContentSchema:a,styleSchema:o}=this.init();this.blockSpecs=t,this.styleSpecs=r,this.styleSchema=o,this.inlineContentSpecs=n,this.blockSchema=i,this.inlineContentSchema=a}init(){let e=Rx(Object.entries({...this.opts.blockSpecs,...this.opts.inlineContentSpecs,...this.opts.styleSpecs}).map(([e,t])=>({key:e,runsBefore:t.implementation?.runsBefore??[]}))),t=Object.fromEntries(Object.entries(this.opts.blockSpecs).map(([t,n])=>[t,bx(n.config,n.implementation,n.extensions,e(t))])),n=Object.fromEntries(Object.entries(this.opts.inlineContentSpecs).map(([t,n])=>typeof n.config==`object`?[t,{...n,implementation:{...n.implementation,node:n.implementation?.node.extend({priority:e(t)})}}]:[t,n])),r=Object.fromEntries(Object.entries(this.opts.styleSpecs).map(([t,n])=>[t,{...n,implementation:{...n.implementation,mark:n.implementation?.mark.extend({priority:e(t)})}}]));return{blockSpecs:t,blockSchema:Object.fromEntries(Object.entries(t).map(([e,t])=>[e,t.config])),inlineContentSpecs:zx(n),styleSpecs:zx(r),inlineContentSchema:Cx(n),styleSchema:Ox(r)}}extend(e){this.opts={blockSpecs:{...this.opts.blockSpecs,...e.blockSpecs},inlineContentSpecs:{...this.opts.inlineContentSpecs,...e.inlineContentSpecs},styleSpecs:{...this.opts.styleSpecs,...e.styleSpecs}};let{blockSpecs:t,inlineContentSpecs:n,styleSpecs:r,blockSchema:i,inlineContentSchema:a,styleSchema:o}=this.init();return this.blockSpecs=t,this.styleSpecs=r,this.styleSchema=o,this.inlineContentSpecs=n,this.blockSchema=i,this.inlineContentSchema=a,this}};function Vx(e){let{height:t,width:n}=Wx(e),r=Array(t).fill(!1).map(()=>Array(n).fill(null)),i=(e,i)=>{for(let a=e;a<t;a++)for(let e=i;e<n;e++)if(!r[a][e])return{row:a,col:e};throw Error(`Unable to create occupancy grid for table, no more available cells`)};for(let t=0;t<e.content.rows.length;t++)for(let n=0;n<e.content.rows[t].cells.length;n++){let a=Mb(e.content.rows[t].cells[n]),o=Ib(a),s=Fb(a),{row:c,col:l}=i(t,n);for(let e=c;e<c+o;e++)for(let i=l;i<l+s;i++){if(r[e][i])throw Error(`Unable to create occupancy grid for table, cell at ${e},${i} is already occupied`);r[e][i]={row:t,col:n,rowspan:o,colspan:s,cell:a}}}return r}function Hx(e){let t=new Set;return e.map(e=>({cells:e.map(e=>!t.has(e.row+`:`+e.col)&&(t.add(e.row+`:`+e.col),e.cell)).filter(e=>e!==!1)}))}function Ux(e,t,n=Vx(t)){for(let t=0;t<n.length;t++)for(let r=0;r<n[t].length;r++){let i=n[t][r];if(i&&i.row===e.row&&i.col===e.col)return{row:t,col:r,cell:i.cell}}throw Error(`Unable to resolve relative table cell indices for table, cell at ${e.row},${e.col} is not occupied`)}function Wx(e){let t=e.content.rows.length,n=0;return e.content.rows.forEach(e=>{let t=0;e.cells.forEach(e=>{t+=Fb(e)}),n=Math.max(n,t)}),{height:t,width:n}}function Gx(e,t,n=Vx(t)){let r=n[e.row]?.[e.col];if(r)return{row:r.row,col:r.col,cell:r.cell}}function Kx(e,t){let n=Vx(e);if(t<0||t>=n.length)return[];let r=0;for(let e=0;e<t;e++){let e=n[r]?.[0];if(!e)return[];r+=e.rowspan}let i=Array(n[0].length).fill(!1).map((t,i)=>Gx({row:r,col:i},e,n)).filter(e=>e!==void 0);return i.filter((e,t)=>i.findIndex(t=>t.row===e.row&&t.col===e.col)===t)}function qx(e,t){let n=Vx(e);if(t<0||t>=n[0].length)return[];let r=0;for(let e=0;e<t;e++){let e=n[0]?.[r];if(!e)return[];r+=e.colspan}let i=Array(n.length).fill(!1).map((t,i)=>Gx({row:i,col:r},e,n)).filter(e=>e!==void 0);return i.filter((e,t)=>i.findIndex(t=>t.row===e.row&&t.col===e.col)===t)}function Jx(e,t,n,r=Vx(e)){let{col:i}=Ux({row:0,col:t},e,r),{col:a}=Ux({row:0,col:n},e,r);return r.forEach(e=>{let[t]=e.splice(i,1);e.splice(a,0,t)}),Hx(r)}function Yx(e,t,n,r=Vx(e)){let{row:i}=Ux({row:t,col:0},e,r),{row:a}=Ux({row:n,col:0},e,r),[o]=r.splice(i,1);return r.splice(a,0,o),Hx(r)}function Xx(e){return e?Nb(e)?Xx(e.content):typeof e==`string`?e.length===0:Array.isArray(e)?e.every(e=>typeof e==`string`?e.length===0:jb(e)?e.text.length===0:Ab(e)?typeof e.content==`string`?e.content.length===0:e.content.every(e=>e.text.length===0):!1):!1:!0}function Zx(e,t,n=Vx(e)){if(t===`columns`){let e=0;for(let t=n[0].length-1;t>=0&&n.every(e=>Xx(e[t].cell)&&e[t].colspan===1);t--)e++;for(let t=n.length-1;t>=0;t--){let r=Math.max(n[t].length-e,1);n[t]=n[t].slice(0,r)}return Hx(n)}let r=0;for(let e=n.length-1;e>=0&&n[e].every(e=>Xx(e.cell)&&e.rowspan===1);e--)r++;let i=Math.min(r,n.length-1);return n.splice(n.length-i,i),Hx(n)}function Qx(e,t,n,r=Vx(e)){let{width:i,height:a}=Wx(e);if(t===`columns`)r.forEach((e,t)=>{if(n>=0)for(let r=0;r<n;r++)e.push({row:t,col:Math.max(...e.map(e=>e.col))+1,rowspan:1,colspan:1,cell:Mb(``)});else e.splice(i+n,-1*n)});else if(n>0)for(let e=0;e<n;e++){let t=Array(i).fill(null).map((t,n)=>({row:a+e,col:n,rowspan:1,colspan:1,cell:Mb(``)}));r.push(t)}else n<0&&r.splice(a+n,-1*n);return Hx(r)}function $x(e,t,n){let r=Kx(e,n);if(!r.some(e=>Ib(e.cell)>1))return!0;let i=n,a=n;return r.forEach(e=>{let t=Ib(e.cell);i=Math.max(i,e.row+t-1),a=Math.min(a,e.row)}),t<n?n===i:n===a}function eS(e,t,n){let r=qx(e,n);if(!r.some(e=>Fb(e.cell)>1))return!0;let i=n,a=n;return r.forEach(e=>{let t=Fb(e.cell);i=Math.max(i,e.col+t-1),a=Math.min(a,e.col)}),t<n?n===i:n===a}function tS(e,t,n){let r=Ux(e,n),i=Ux(t,n);return r.col===i.col}function nS(e,t,n,r){let i=[];for(let[r,a]of Object.entries(e.styles||{})){let e=n[r];if(!e)throw Error(`style ${r} not found in styleSchema`);if(e.propSchema===`boolean`)a&&i.push(t.mark(r));else if(e.propSchema===`string`)a&&i.push(t.mark(r,{stringValue:a}));else throw new Lb(e.propSchema)}let a=r&&t.nodes[r]&&rx(t,t.nodes[r])?[...t.nodes[r].allowedMarks(i)]:i;return!r||!rx(t,t.nodes[r])?e.text.split(/(\n)/g).filter(e=>e.length>0).map(e=>e===`
143
- `?t.nodes.hardBreak.createChecked():t.text(e,a)):e.text.length>0?[t.text(e.text,a)]:[]}function rS(e,t,n){let r=t.marks.link.create({href:e.href});return iS(e.content,t,n).map(e=>{if(e.type.name===`text`)return e.mark([...e.marks,r]);if(e.type.name===`hardBreak`)return e;throw Error(`unexpected node type`)})}function iS(e,t,n,r){let i=[];if(typeof e==`string`)return i.push(...nS({type:`text`,text:e,styles:{}},t,n,r)),i;for(let a of e)i.push(...nS(a,t,n,r));return i}function aS(e,t,n,r=tx(t)){let i=[];for(let a of e)typeof a==`string`?i.push(...iS(a,t,r,n)):Ab(a)?i.push(...rS(a,t,r)):jb(a)?i.push(...iS([a],t,r,n)):i.push(sS(a,t,r));return i}function oS(e,t,n=tx(t)){let r=[],i=Array(e.headerRows??0).fill(!0),a=Array(e.headerCols??0).fill(!0),o=e.columnWidths??[];for(let s=0;s<e.rows.length;s++){let c=e.rows[s],l=[],u=i[s];for(let r=0;r<c.cells.length;r++){let i=c.cells[r],d=a[r],f=null,p=Ux({row:s,col:r},{type:`table`,content:e}),m=o[p.col]?[o[p.col]]:null;if(i){if(typeof i==`string`)f=t.text(i);else if(Nb(i)){i.content&&(f=aS(i.content,t,`tableParagraph`,n));let e=Fb(i);e>1&&(m=Array(e).fill(!1).map((e,t)=>o[p.col+t]??void 0))}else f=aS(i,t,`tableParagraph`,n)}let h=t.nodes[d||u?`tableHeader`:`tableCell`].createChecked({...Nb(i)?i.props:{},colwidth:m},t.nodes.tableParagraph.createChecked(void 0,f));l.push(h)}let d=t.nodes.tableRow.createChecked({},l);r.push(d)}return r}function sS(e,t,n){let r,i=e.type;if(i===void 0&&(i=`paragraph`),!t.nodes[i])throw Error(`node type ${i} not found in schema`);if(!e.content)r=t.nodes[i].createChecked(e.props);else if(typeof e.content==`string`){let a=aS([e.content],t,i,n);r=t.nodes[i].createChecked(e.props,a)}else if(Array.isArray(e.content)){let a=aS(e.content,t,i,n);r=t.nodes[i].createChecked(e.props,a)}else if(e.content.type===`tableContent`){let a=oS(e.content,t,n);r=t.nodes[i].createChecked(e.props,a)}else throw new Lb(e.content.type);return r}function cS(e,t,n=tx(t)){let r=e.id;r===void 0&&(r=Ob.options.generateID());let i=[];if(e.children)for(let r of e.children)i.push(cS(r,t,n));if(!e.type||t.nodes[e.type].isInGroup(`blockContent`)){let a=sS(e,t,n),o=i.length>0?t.nodes.blockGroup.createChecked({},i):void 0;return t.nodes.blockContainer.createChecked({id:r,...e.props},o?[a,o]:a)}if(t.nodes[e.type].isInGroup(`bnBlock`))return t.nodes[e.type].create({id:r,...e.props},i);throw Error(`block type ${e.type} doesn't match blockContent or bnBlock group`)}function lS(e,t){let n,r;if(t.firstChild.descendants((i,a)=>n?!1:!uS(i)||!i.attrs.id||vb(i,t)!==e||(n=i,r=a+1,!1)),n!==void 0&&r!==void 0)return{node:n,posBeforeNode:r}}function uS(e){return e.type.isInGroup(`bnBlock`)}var dS=(e,t)=>({tr:n,dispatch:r})=>(r&&fS(n,e,t),!0);function fS(e,t,n,r,i){let a=Sb(e.doc.resolve(t)),o=null;a.blockNoteType===`table`&&(o=yS(e));let s=Xb(e);if(r!==void 0&&i!==void 0&&r>i)throw Error(`Invalid replaceFromPos or replaceToPos`);let c=s.nodes[a.blockNoteType],l=s.nodes[n.type||a.blockNoteType],u=l.isInGroup(`bnBlock`)?l:s.nodes.blockContainer;if(a.isBlockContainer&&l.isInGroup(`blockContent`)){let t=r!==void 0&&r>a.blockContent.beforePos&&r<a.blockContent.afterPos?r-a.blockContent.beforePos-1:void 0,o=i!==void 0&&i>a.blockContent.beforePos&&i<a.blockContent.afterPos?i-a.blockContent.beforePos-1:void 0;_S(n,e,a),pS(n,e,c,l,a,t,o)}else if(!a.isBlockContainer&&l.isInGroup(`bnBlock`))_S(n,e,a);else{let t=cS({children:sx(a.bnBlock.node,e.doc).children,...n},s);t.check(),e.replaceWith(a.bnBlock.beforePos,a.bnBlock.afterPos,t);return}hS(e,a.bnBlock.beforePos,u,{...n.props}),o&&bS(e,a,o)}function pS(e,t,n,r,i,a,o){let s=Xb(t),c=`keep`;if(e.content){if(typeof e.content==`string`)c=aS([e.content],s,r.name);else if(Array.isArray(e.content))c=aS(e.content,s,r.name);else if(e.content.type===`tableContent`)c=oS(e.content,s);else throw new Lb(e.content.type)}else{let e=i.blockContent.node.content;if(n.spec.content!==``&&r.spec.content!==n.spec.content&&!r.validContent(e)){if(r.inlineContent&&n.inlineContent){let e=i.blockContent.node.textContent;c=e.length>0?[s.text(e)]:[]}else c=[]}}if(c===`keep`)hS(t,i.blockContent.beforePos,r,{...e.props});else if(a!==void 0||o!==void 0){let n=gS(t,i.blockContent.beforePos,r,{...e.props}),s=n+1+(a??0),l=n+1+(o??i.blockContent.node.content.size),u=t.doc.resolve(n).depth,d=t.doc.resolve(s).depth,f=t.doc.resolve(l).depth;t.replace(s,l,new _e(U.from(c),d-u-1,f-u-1))}else r===n||r.validContent(i.blockContent.node.content)?mS(t,gS(t,i.blockContent.beforePos,r,{...e.props}),U.from(c)):t.replaceWith(i.blockContent.beforePos,i.blockContent.afterPos,r.createChecked({...i.blockContent.node.attrs,...e.props},c))}function mS(e,t,n){let r=e.doc.nodeAt(t);if(!r)throw RangeError(`No node at given position`);let i=r.content,a=t+1;if(r.isTextblock){let t=i.findDiffStart(n);if(t===null)return;let{a:r,b:o}=i.findDiffEnd(n),s=Math.max(0,t-r,t-o);s>0&&(r+=s,o+=s),e.replace(a+t,a+r,new _e(n.cut(t,o),0,0));return}let o=i.childCount,s=n.childCount,c=0;for(;c<o&&c<s&&i.child(c).eq(n.child(c));)c++;let l=o,u=s;for(;l>c&&u>c&&i.child(l-1).eq(n.child(u-1));)l--,u--;if(c===l&&c===u)return;let d=a;for(let e=0;e<c;e++)d+=i.child(e).nodeSize;let f=d;for(let e=c;e<l;e++)f+=i.child(e).nodeSize;let p=[];for(let e=c;e<u;e++)p.push(n.child(e));e.step(new ye(d,f,new _e(U.from(p),0,0)))}function hS(e,t,n,r){let i=e.doc.nodeAt(t);if(!i)throw RangeError(`No node at given position`);let a=n.spec.attrs??{},o={};for(let e of Object.keys(r))e in a&&(o[e]=r[e]);let s={...i.attrs,...o};if(i.type===n)for(let n of Object.keys(s))s[n]!==i.attrs[n]&&e.setNodeAttribute(t,n,s[n]);else e.setNodeMarkup(t,n,s)}function gS(e,t,n,r){let i=e.mapping.maps.length;return hS(e,t,n,r),e.mapping.slice(i).map(t,-1)}function _S(e,t,n){let r=Xb(t);if(e.children!==void 0&&e.children.length>0){let i=e.children.map(e=>{let t=cS(e,r);return t.check(),t});if(n.childContainer)mS(t,n.childContainer.beforePos,U.from(i));else{if(!n.isBlockContainer)throw Error(`impossible`);t.insert(n.blockContent.afterPos,r.nodes.blockGroup.createChecked({},i))}}}function vS(e,t,n,r,i){let a=typeof t==`string`?t:t.id,o=lS(a,e.doc);if(!o)throw Error(`Block with ID ${a} not found`);return fS(e,o.posBeforeNode,n,r,i),sx(e.doc.resolve(o.posBeforeNode+1).node(),e.doc)}function yS(e){let t=`selection`in e?e.selection:null;if(!(t instanceof H))return null;let n=e.doc.resolve(t.head),r=-1,i=-1;for(let e=n.depth;e>=0;e--){let t=n.node(e).type.name;if(r<0&&(t===`tableCell`||t===`tableHeader`)&&(r=e),t===`table`){i=e;break}}if(r<0||i<0)return null;let a=n.before(r),o=n.before(i),s=e.doc.nodeAt(o);if(!s||s.type.name!==`table`)return null;let c=fv.get(s),l=a-(o+1),u=c.map.indexOf(l);if(u<0)return null;let d=Math.floor(u/c.width),f=u%c.width,p=a+1+1;return{row:d,col:f,offset:Math.max(0,t.head-p)}}function bS(e,t,n){if(t.blockNoteType!==`table`)return!1;let r=-1;if(t.isBlockContainer)r=e.mapping.map(t.blockContent.beforePos);else{let n=e.mapping.map(t.bnBlock.beforePos),i=n+(e.doc.nodeAt(n)?.nodeSize||0);e.doc.nodesBetween(n,i,(e,t)=>e.type.name!==`table`||(r=t,!1))}let i=r>=0?e.doc.nodeAt(r):null;if(!i||i.type.name!==`table`)return!1;let a=fv.get(i),o=Math.max(0,Math.min(n.row,a.height-1)),s=Math.max(0,Math.min(n.col,a.width-1)),c=o*a.width+s,l=a.map[c];if(l==null)return!1;let u=r+1+l+1,d=e.doc.nodeAt(u),f=u+1,p=d?d.content.size:0,m=f+Math.max(0,Math.min(n.offset,p));return`selection`in e&&e.setSelection(H.create(e.doc,m)),!0}var xS={gray:{text:`#9b9a97`,background:`#ebeced`},brown:{text:`#64473a`,background:`#e9e5e3`},red:{text:`#e03e3e`,background:`#fbe4e4`},orange:{text:`#d9730d`,background:`#f6e9d9`},yellow:{text:`#dfab01`,background:`#fbf3db`},green:{text:`#4d6461`,background:`#ddedea`},blue:{text:`#0b6e99`,background:`#ddebf1`},purple:{text:`#6940a5`,background:`#eae4f2`},pink:{text:`#ad1a72`,background:`#f4dfeb`}},SS={backgroundColor:{default:`default`},textColor:{default:`default`},textAlignment:{default:`left`,values:[`left`,`center`,`right`,`justify`]}},CS=e=>{let t={};return e.hasAttribute(`data-background-color`)?t.backgroundColor=e.getAttribute(`data-background-color`):e.style.backgroundColor&&(t.backgroundColor=e.style.backgroundColor),e.hasAttribute(`data-text-color`)?t.textColor=e.getAttribute(`data-text-color`):e.style.color&&(t.textColor=e.style.color),t.textAlignment=SS.textAlignment.values.includes(e.style.textAlign)?e.style.textAlign:void 0,t},wS=(e,t)=>{e.backgroundColor&&e.backgroundColor!==SS.backgroundColor.default&&(t.style.backgroundColor=e.backgroundColor in xS?xS[e.backgroundColor].background:e.backgroundColor),e.textColor&&e.textColor!==SS.textColor.default&&(t.style.color=e.textColor in xS?xS[e.textColor].text:e.textColor),e.textAlignment&&e.textAlignment!==SS.textAlignment.default&&(t.style.textAlign=e.textAlignment)},TS=(e=`backgroundColor`)=>({default:SS.backgroundColor.default,parseHTML:e=>e.hasAttribute(`data-background-color`)?e.getAttribute(`data-background-color`):e.style.backgroundColor?e.style.backgroundColor:SS.backgroundColor.default,renderHTML:t=>t[e]===SS.backgroundColor.default?{}:{"data-background-color":t[e]}}),ES=(e=`textColor`)=>({default:SS.textColor.default,parseHTML:e=>e.hasAttribute(`data-text-color`)?e.getAttribute(`data-text-color`):e.style.color?e.style.color:SS.textColor.default,renderHTML:t=>t[e]===SS.textColor.default?{}:{"data-text-color":t[e]}}),DS=(e,t)=>{let n=e.querySelector(t);if(n)return{targetElement:n,caption:e.querySelector(`figcaption`)?.textContent??void 0}},OS=iv(({editor:e})=>{let t=av(void 0);function n(){t.setState(void 0)}return{key:`filePanel`,store:t,mount({signal:t}){let r=e.onChange(n,!1),i=e.onSelectionChange(n,!1);t.addEventListener(`abort`,()=>{r(),i()})},closeMenu:n,showMenu(e){t.setState(e)}}}),kS=(e,t,n)=>{let r=document.createElement(`div`);r.className=`bn-add-file-button`;let i=document.createElement(`div`);i.className=`bn-add-file-button-icon`,n?i.appendChild(n):i.innerHTML=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z"></path></svg>`,r.appendChild(i);let a=document.createElement(`p`);a.className=`bn-add-file-button-text`,a.innerHTML=e.type in t.dictionary.file_blocks.add_button_text?t.dictionary.file_blocks.add_button_text[e.type]:t.dictionary.file_blocks.add_button_text.file,r.appendChild(a);let o=e=>{e.preventDefault(),e.stopPropagation()},s=()=>{t.isEditable&&t.getExtension(OS)?.showMenu(e.id)};return r.addEventListener(`mousedown`,o,!0),r.addEventListener(`click`,s,!0),{dom:r,destroy:()=>{r.removeEventListener(`mousedown`,o,!0),r.removeEventListener(`click`,s,!0)}}},AS=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z"></path></svg>`,jS=e=>{let t=document.createElement(`div`);t.className=`bn-file-name-with-icon`;let n=document.createElement(`div`);n.className=`bn-file-icon`,n.innerHTML=AS,t.appendChild(n);let r=document.createElement(`p`);return r.className=`bn-file-name`,r.textContent=e.props.name,t.appendChild(r),{dom:t}},MS=(e,t,n,r)=>{let i=e.props.url!==``&&!!e.props.caption,a=document.createElement(i?`figure`:`div`);if(a.className=`bn-file-block-content-wrapper`,e.props.url===``){let n=kS(e,t,r);a.appendChild(n.dom);let i=t.onUploadStart(t=>{if(t===e.id){a.removeChild(n.dom);let e=document.createElement(`div`);e.className=`bn-file-loading-preview`,e.textContent=`Loading...`,a.appendChild(e)}});return{dom:a,destroy:()=>{i(),n.destroy()}}}let o={dom:a};if(e.props.showPreview===!1||!n){let t=jS(e);a.appendChild(t.dom),o.destroy=()=>{t.destroy?.()}}else a.appendChild(n.dom);if(e.props.caption){let t=document.createElement(`figcaption`);t.className=`bn-file-caption`,t.textContent=e.props.caption,a.appendChild(t)}return o},NS=(e,t)=>{let n=document.createElement(`figure`),r=document.createElement(`figcaption`);return r.textContent=t,n.appendChild(e),n.appendChild(r),{dom:n}},PS=(e,t)=>{let n=document.createElement(`div`),r=document.createElement(`p`);return r.textContent=t,n.appendChild(e),n.appendChild(r),{dom:n}},FS=e=>({url:e.src||void 0}),IS=xx(e=>({type:`audio`,propSchema:{backgroundColor:SS.backgroundColor,name:{default:``},url:{default:``},caption:{default:``},showPreview:{default:!0}},content:`none`})),LS=(e={})=>e=>{if(e.tagName===`AUDIO`){if(e.closest(`figure`))return;let{backgroundColor:t}=CS(e);return{...FS(e),backgroundColor:t}}if(e.tagName===`FIGURE`){let t=DS(e,`audio`);if(!t)return;let{targetElement:n,caption:r}=t,{backgroundColor:i}=CS(e);return{...FS(n),backgroundColor:i,caption:r}}},RS=(e={})=>(t,n)=>{let r=document.createElement(`div`);r.innerHTML=e.icon??`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z"></path></svg>`;let i=document.createElement(`audio`);return i.className=`bn-audio`,n.resolveFileUrl?n.resolveFileUrl(t.props.url).then(e=>{i.src=e}):i.src=t.props.url,i.controls=!0,i.contentEditable=`false`,i.draggable=!1,MS(t,n,{dom:i},r.firstElementChild)},zS=(e={})=>(e,t)=>{if(!e.props.url)return{dom:document.createElement(`audio`)};let n;return e.props.showPreview?(n=document.createElement(`audio`),n.src=e.props.url):(n=document.createElement(`a`),n.href=e.props.url,n.textContent=e.props.name||e.props.url),e.props.caption?e.props.showPreview?NS(n,e.props.caption):PS(n,e.props.caption):{dom:n}},BS=Sx(IS,e=>({meta:{fileBlockAccept:[`audio/*`]},parse:LS(e),render:RS(e),toExternalHTML:zS(e),runsBefore:[`file`]})),VS=e=>{{if(e.tagName!==`PRE`||e.childElementCount!==1||e.firstElementChild?.tagName!==`CODE`)return;let t=e.firstElementChild;return{language:t.getAttribute(`data-language`)||t.className.split(` `).find(e=>e.startsWith(`language-`))?.replace(`language-`,``)}}},HS=({el:e,schema:t},n)=>{let r=Ee.fromSchema(t),i=e.firstElementChild;return r.parse(i,{preserveWhitespace:`full`,topNode:t.nodes[n].create()}).content},US=e=>{let t=document.createElement(`pre`),n=document.createElement(`code`);return n.className=`language-${e.props.language}`,n.dataset.language=e.props.language,t.appendChild(n),{dom:t,contentDOM:n}};function WS(e,t){let n=t.trim().toLowerCase();return Object.entries(e.supportedLanguages??{}).find(([e,{aliases:t}])=>e.toLowerCase()===n||t?.some(e=>e.toLowerCase()===n))?.[0]}var GS=e=>(t,n)=>iv({key:t,keyboardShortcuts:{Delete:({editor:e})=>e.transact(t=>{let{block:r}=e.getTextCursorPosition();if(r.type!==n)return!1;let{$from:i}=t.selection;return!i.parent.textContent&&(e.removeBlocks([r]),!0)}),Tab:({editor:t})=>e.indentLineWithTab!==!1&&t.transact(e=>{let{block:r}=t.getTextCursorPosition();return r.type===n&&(e.insertText(` `),!0)}),Enter:({editor:e})=>e.transact(t=>{let{block:r,nextBlock:i}=e.getTextCursorPosition();if(r.type!==n)return!1;let{$from:a}=t.selection,o=a.parentOffset===a.parent.nodeSize-2,s=a.parent.textContent.endsWith(`
144
-
145
- `);if(o&&s){if(t.delete(a.pos-2,a.pos),i)return e.setTextCursorPosition(i,`start`),!0;let[n]=e.insertBlocks([{type:`paragraph`}],r,`after`);return e.setTextCursorPosition(n,`start`),!0}return t.insertText(`
146
- `),!0}),"Shift-Enter":({editor:e})=>e.transact(()=>{let{block:t}=e.getTextCursorPosition();if(t.type!==n)return!1;let[r]=e.insertBlocks([{type:`paragraph`}],t,`after`);return e.setTextCursorPosition(r,`start`),!0})},inputRules:[{find:/^```(.*?)\s$/,replace:({match:t})=>{let r=t[1].trim();return{type:n,props:{language:{language:WS(e,r)??r}.language},content:[]}}}]}),KS=(e,t,n,r)=>{if(!(n in r))throw Error(`Language ${n} is not supported.`);let i=document.createElement(`select`);Object.entries(r).forEach(([e,{name:t}])=>{let n=document.createElement(`option`);n.value=e,n.text=t,i.appendChild(n)}),i.value=n;let a=n=>{t.isEditable&&t.updateBlock(e.id,{props:{language:n.target.value}})};t.isEditable?i.addEventListener(`change`,a):i.disabled=!0;let o=document.createElement(`div`);return o.contentEditable=`false`,o.appendChild(i),{dom:o,destroy:()=>i.removeEventListener(`change`,a)}},qS=(e,t,n)=>{let r=document.createElement(`pre`),i=document.createElement(`code`);r.appendChild(i);let a=document.createDocumentFragment(),o;return n&&Object.keys(n.supportedLanguages).length>1&&(o=KS(e,t,n.selectedLanguage,n.supportedLanguages),a.appendChild(o.dom)),a.appendChild(r),{dom:a,contentDOM:i,destroy:()=>{o?.destroy()}}},JS=`code-block-keyboard-shortcuts`,YS=Sx(xx(({defaultLanguage:e=`text`})=>({type:`codeBlock`,propSchema:{language:{default:e}},content:`plain`})),e=>({meta:{code:!0,defining:!0,isolating:!1,highlight:e=>e.props.language},parse:e=>VS(e),parseContent:e=>HS(e,`codeBlock`),render:(t,n)=>qS(t,n,e.supportedLanguages&&{selectedLanguage:t.props.language,supportedLanguages:e.supportedLanguages}),toExternalHTML:e=>US(e)}),e=>[GS(e)(JS,`codeBlock`)]),XS=Sx(xx(()=>({type:`divider`,propSchema:{},content:`none`})),{meta:{isolating:!1},parse(e){if(e.tagName===`HR`)return{}},render(){return{dom:document.createElement(`hr`)}}},[iv({key:`divider-block-shortcuts`,inputRules:[{find:RegExp(`^---$`),replace(){return{type:`divider`,props:{},content:[]}}}]})]),ZS=e=>({url:e.src||void 0}),QS=Sx(xx(()=>({type:`file`,propSchema:{backgroundColor:SS.backgroundColor,name:{default:``},url:{default:``},caption:{default:``}},content:`none`})),{meta:{fileBlockAccept:[`*/*`]},parse:e=>{if(e.tagName===`EMBED`){if(e.closest(`figure`))return;let{backgroundColor:t}=CS(e);return{...ZS(e),backgroundColor:t}}if(e.tagName===`FIGURE`){let t=DS(e,`embed`);if(!t)return;let{targetElement:n,caption:r}=t,{backgroundColor:i}=CS(e);return{...ZS(n),backgroundColor:i,caption:r}}},render(e,t){return MS(e,t)},toExternalHTML(e){if(!e.props.url)return{dom:document.createElement(`embed`)};let t=document.createElement(`a`);return t.href=e.props.url,t.textContent=e.props.name||e.props.url,e.props.caption?PS(t,e.props.caption):{dom:t}}});function $S(e,t,n){let r=Ee.fromSchema(t),i=e.querySelector(`:scope > summary`),a;if(i){let e=i.cloneNode(!0);qb(e),a=r.parse(e,{topNode:t.nodes.paragraph.create(),preserveWhitespace:!0}).content}else a=U.empty;let o=document.createElement(`div`);o.setAttribute(`data-node-type`,`blockGroup`);let s=!1;for(let t of Array.from(e.childNodes))t.tagName!==`SUMMARY`&&(t.nodeType===3&&!t.textContent?.trim()||(s=!0,o.appendChild(t.cloneNode(!0))));let c=t.nodes[n].create({},a);if(!s)return c.content;let l=r.parse(o,{topNode:t.nodes.blockGroup.create()});return l.content.size>0?c.content.addToEnd(l):c.content}var eC={set:(e,t)=>window.localStorage.setItem(`toggle-${e.id}`,t?`true`:`false`),get:e=>window.localStorage.getItem(`toggle-${e.id}`)===`true`},tC=(e,t,n,r=eC)=>{if(`isToggleable`in e.props&&!e.props.isToggleable)return{dom:n};let i=document.createElement(`div`),a=document.createElement(`div`);a.className=`bn-toggle-wrapper`;let o=document.createElement(`button`);o.className=`bn-toggle-button`,o.type=`button`,o.innerHTML=`<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="CURRENTCOLOR"><path d="M320-200v-560l440 280-440 280Z"/></svg>`;let s=e=>e.preventDefault();o.addEventListener(`mousedown`,s);let c=()=>{let n=t.getBlock(e);n&&(a.getAttribute(`data-show-children`)===`true`?(a.setAttribute(`data-show-children`,`false`),r.set(n,!1),i.contains(l)&&i.removeChild(l)):(a.setAttribute(`data-show-children`,`true`),r.set(n,!0),t.isEditable&&n.children.length===0&&!i.contains(l)&&i.appendChild(l)))};o.addEventListener(`click`,c),a.appendChild(o),a.appendChild(n);let l=document.createElement(`button`);l.className=`bn-toggle-add-block-button`,l.type=`button`,l.textContent=t.dictionary.toggle_blocks.add_block_button;let u=e=>e.preventDefault();l.addEventListener(`mousedown`,u);let d=()=>{t.transact(()=>{let n=t.updateBlock(e,{children:[{}]});t.setTextCursorPosition(n.children[0].id,`end`),t.focus()})};l.addEventListener(`click`,d),i.appendChild(a);let f=e.children.length,p=t.onChange(()=>{let n=t.getBlock(e)?.children.length??0;if(n>f){if(a.getAttribute(`data-show-children`)===`false`){a.setAttribute(`data-show-children`,`true`);let n=t.getBlock(e);n&&r.set(n,!0)}i.contains(l)&&i.removeChild(l)}else if(n===0&&n<f){if(a.getAttribute(`data-show-children`)===`true`){a.setAttribute(`data-show-children`,`false`);let n=t.getBlock(e);n&&r.set(n,!1)}i.contains(l)&&i.removeChild(l)}f=n});return r.get(e)?(a.setAttribute(`data-show-children`,`true`),t.isEditable&&e.children.length===0&&i.appendChild(l)):a.setAttribute(`data-show-children`,`false`),{dom:i,ignoreMutation:e=>e instanceof MutationRecord&&(e.type===`attributes`&&e.target===a&&e.attributeName===`data-show-children`||e.type===`childList`&&(e.addedNodes[0]===l||e.removedNodes[0]===l)),destroy:()=>{o.removeEventListener(`mousedown`,s),o.removeEventListener(`click`,c),l.removeEventListener(`mousedown`,u),l.removeEventListener(`click`,d),p?.()}}},nC=[1,2,3,4,5,6],rC=e=>({editor:t})=>{let n=t.getTextCursorPosition();return t.schema.blockSchema[n.block.type].content===`inline`&&(t.updateBlock(n.block,{type:`heading`,props:{level:e}}),!0)},iC=Sx(xx(({defaultLevel:e=1,levels:t=nC,allowToggleHeadings:n=!0}={})=>({type:`heading`,propSchema:{...SS,level:{default:e,values:t},...n?{isToggleable:{default:!1,optional:!0}}:{}},content:`inline`})),({allowToggleHeadings:e=!0}={})=>({meta:{isolating:!1},parse(t){if(e&&t.tagName===`DETAILS`){let e=t.querySelector(`:scope > summary`);if(!e)return;let n=e.querySelector(`h1, h2, h3, h4, h5, h6`);return n?{...CS(n),level:parseInt(n.tagName[1]),isToggleable:!0}:void 0}let n;switch(t.tagName){case`H1`:n=1;break;case`H2`:n=2;break;case`H3`:n=3;break;case`H4`:n=4;break;case`H5`:n=5;break;case`H6`:n=6;break;default:return}return{...CS(t),level:n}},...e?{parseContent:({el:e,schema:t})=>{if(e.tagName===`DETAILS`)return $S(e,t,`heading`)}}:{},runsBefore:[`toggleListItem`],render(t,n){let r=document.createElement(`h${t.props.level}`);return e?{...tC(t,n,r),contentDOM:r}:{dom:r,contentDOM:r}},toExternalHTML(t){let n=document.createElement(`h${t.props.level}`);if(wS(t.props,n),e&&t.props.isToggleable){let e=document.createElement(`details`);e.setAttribute(`open`,``);let t=document.createElement(`summary`);return t.appendChild(n),e.appendChild(t),{dom:e,contentDOM:n,childrenDOM:e}}return{dom:n,contentDOM:n}}}),({levels:e=nC}={})=>[iv({key:`heading-shortcuts`,keyboardShortcuts:Object.fromEntries(e.map(e=>[`Mod-Alt-${e}`,rC(e)])??[]),inputRules:e.map(e=>({find:RegExp(`^(#{${e}})\\s$`),replace({match:e}){return{type:`heading`,props:{level:e[1].length}}}}))})]),aC=(e,t,n,r,i)=>{let{dom:a,destroy:o}=MS(e,t,n,i),s=a;s.style.position=`relative`,e.props.url&&e.props.showPreview&&(e.props.previewWidth?s.style.width=`${e.props.previewWidth}px`:s.style.width=`fit-content`);let c=document.createElement(`div`);c.className=`bn-resize-handle`,c.style.left=`4px`,c.style.display=`none`,r.appendChild(c);let l=document.createElement(`div`);l.className=`bn-resize-handle`,l.style.right=`4px`,l.style.display=`none`,r.appendChild(l);let u=document.createElement(`div`);u.style.position=`absolute`,u.style.height=`100%`,u.style.width=`100%`;let d,f=e.props.previewWidth,p=n=>{if(!d){t.isEditable||(c.style.display=`none`,l.style.display=`none`);return}let r,i=`touches`in n?n.touches[0].clientX:n.clientX;r=e.props.textAlignment===`center`?d.handleUsed===`left`?d.initialWidth+(d.initialClientX-i)*2:d.initialWidth+(i-d.initialClientX)*2:d.handleUsed===`left`?d.initialWidth+d.initialClientX-i:d.initialWidth+i-d.initialClientX,f=Math.min(Math.max(r,64),t.domElement?.firstElementChild?.clientWidth||Number.MAX_VALUE),s.style.width=`${f}px`},m=n=>{n.target&&s.contains(n.target)&&t.isEditable||(c.style.display=`none`,l.style.display=`none`),d&&(d=void 0,s.contains(u)&&s.removeChild(u),t.updateBlock(e,{props:{previewWidth:f}}))},h=()=>{t.isEditable&&(c.style.display=``,l.style.display=``)},g=e=>{e.relatedTarget!==c&&e.relatedTarget!==l&&(d||t.isEditable&&(c.style.display=`none`,l.style.display=`none`))},_=e=>{e.preventDefault(),s.contains(u)||s.appendChild(u);let t=`touches`in e?e.touches[0].clientX:e.clientX;d={handleUsed:`left`,initialWidth:s.clientWidth,initialClientX:t}},v=e=>{e.preventDefault(),s.contains(u)||s.appendChild(u);let t=`touches`in e?e.touches[0].clientX:e.clientX;d={handleUsed:`right`,initialWidth:s.clientWidth,initialClientX:t}};return window.addEventListener(`mousemove`,p),window.addEventListener(`touchmove`,p),window.addEventListener(`mouseup`,m),window.addEventListener(`touchend`,m),s.addEventListener(`mouseenter`,h),s.addEventListener(`mouseleave`,g),c.addEventListener(`mousedown`,_),c.addEventListener(`touchstart`,_),l.addEventListener(`mousedown`,v),l.addEventListener(`touchstart`,v),{dom:s,destroy:()=>{o?.(),window.removeEventListener(`mousemove`,p),window.removeEventListener(`touchmove`,p),window.removeEventListener(`mouseup`,m),window.removeEventListener(`touchend`,m),s.removeEventListener(`mouseenter`,h),s.removeEventListener(`mouseleave`,g),c.removeEventListener(`mousedown`,_),c.removeEventListener(`touchstart`,_),l.removeEventListener(`mousedown`,v),l.removeEventListener(`touchstart`,v)}}},oC=e=>({url:e.src||void 0,previewWidth:e.width||void 0,name:e.alt||void 0}),sC=xx((e={})=>({type:`image`,propSchema:{textAlignment:SS.textAlignment,backgroundColor:SS.backgroundColor,name:{default:``},url:{default:``},caption:{default:``},showPreview:{default:!0},previewWidth:{default:void 0,type:`number`}},content:`none`})),cC=(e={})=>e=>{if(e.tagName===`IMG`){if(e.closest(`figure`))return;let{backgroundColor:t}=CS(e);return{...oC(e),backgroundColor:t}}if(e.tagName===`FIGURE`){let t=DS(e,`img`);if(!t)return;let{targetElement:n,caption:r}=t,{backgroundColor:i}=CS(e);return{...oC(n),backgroundColor:i,caption:r}}},lC=(e={})=>(t,n)=>{let r=document.createElement(`div`);r.innerHTML=e.icon??`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M5 11.1005L7 9.1005L12.5 14.6005L16 11.1005L19 14.1005V5H5V11.1005ZM4 3H20C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3ZM15.5 10C14.6716 10 14 9.32843 14 8.5C14 7.67157 14.6716 7 15.5 7C16.3284 7 17 7.67157 17 8.5C17 9.32843 16.3284 10 15.5 10Z"></path></svg>`;let i=document.createElement(`div`);i.className=`bn-visual-media-wrapper`;let a=document.createElement(`img`);return a.className=`bn-visual-media`,n.resolveFileUrl?n.resolveFileUrl(t.props.url).then(e=>{a.src=e}):a.src=t.props.url,a.alt=t.props.name||``,a.contentEditable=`false`,a.draggable=!1,t.props.previewWidth&&(a.width=t.props.previewWidth),i.appendChild(a),aC(t,n,{dom:i},i,r.firstElementChild)},uC=(e={})=>(e,t)=>{if(!e.props.url)return{dom:document.createElement(`img`)};let n;return e.props.showPreview?(n=document.createElement(`img`),n.src=e.props.url,n.alt=e.props.name||``,e.props.previewWidth&&(n.width=e.props.previewWidth)):(n=document.createElement(`a`),n.href=e.props.url,n.textContent=e.props.name||e.props.url),e.props.caption?e.props.showPreview?NS(n,e.props.caption):PS(n,e.props.caption):{dom:n}},dC=Sx(sC,e=>({meta:{fileBlockAccept:[`image/*`]},parse:cC(e),render:lC(e),toExternalHTML:uC(e),runsBefore:[`file`]})),fC=(e,t,n)=>({state:r,dispatch:i})=>!i||pC(r.tr,e,t,n),pC=(e,t,n,r)=>{let i=xb(yb(e.doc,t));if(!i.isBlockContainer)return!1;let a=Xb(e),o=[{type:i.bnBlock.node.type,attrs:r?{...i.bnBlock.node.attrs,id:void 0}:{}},{type:n?i.blockContent.node.type:a.nodes.paragraph,attrs:r?{...i.blockContent.node.attrs}:{}}];return e.split(t,2,o),!0},mC=(e,t)=>{let{blockInfo:n,selectionEmpty:r}=e.transact(e=>({blockInfo:Cb(e),selectionEmpty:e.selection.anchor===e.selection.head}));if(!n.isBlockContainer)return!1;let{bnBlock:i,blockContent:a}=n;return a.node.type.name!==t||!r?!1:a.node.childCount===0?(e.transact(e=>{fS(e,i.beforePos,{type:`paragraph`,props:{}})}),!0):a.node.childCount>0&&e.transact(e=>(e.deleteSelection(),e.scrollIntoView(),pC(e,e.selection.from,!0)))};function hC(e,t,n){let r=Ee.fromSchema(t),i=e,a=document.createElement(`div`);a.setAttribute(`data-node-type`,`blockGroup`);for(let e of Array.from(i.childNodes))a.appendChild(e.cloneNode(!0));let o=r.parse(a,{topNode:t.nodes.blockGroup.create()});o.firstChild?.firstChild?.type.name===`checkListItem`&&(o=o.copy(o.content.cut(o.firstChild.firstChild.nodeSize+2)));let s=o.firstChild?.firstChild;if(!s?.isTextblock)return U.from(o);let c=t.nodes[n].create({},s.content),l=o.content.cut(s.nodeSize+2);if(l.size>0){let e=o.copy(l);return c.content.addToEnd(e)}return c.content}var gC=Sx(xx(()=>({type:`bulletListItem`,propSchema:{...SS},content:`inline`})),{meta:{isolating:!1},parse(e){if(e.tagName!==`LI`)return;let t=e.parentElement;if(t===null||t.tagName===`UL`||t.tagName===`DIV`&&t.parentElement?.tagName===`UL`||!e.closest(`ul, ol`))return CS(e)},parseContent:({el:e,schema:t})=>hC(e,t,`bulletListItem`),render(){let e=document.createElement(`p`);return{dom:e,contentDOM:e}},toExternalHTML(e){let t=document.createElement(`li`),n=document.createElement(`p`);return wS(e.props,t),t.appendChild(n),{dom:t,contentDOM:n}}},[iv({key:`bullet-list-item-shortcuts`,keyboardShortcuts:{Enter:({editor:e})=>mC(e,`bulletListItem`),"Mod-Shift-8":({editor:e})=>{let t=e.getTextCursorPosition();return e.schema.blockSchema[t.block.type].content===`inline`&&(e.updateBlock(t.block,{type:`bulletListItem`,props:{}}),!0)}},inputRules:[{find:/^\s?[-+*]\s$/,replace({editor:e}){if(Cb(e.prosemirrorState).blockNoteType!==`heading`)return{type:`bulletListItem`,props:{}}}}]})]),_C=Sx(xx(()=>({type:`checkListItem`,propSchema:{...SS,checked:{default:!1,type:`boolean`}},content:`inline`})),{meta:{isolating:!1},parse(e){if(e.tagName===`input`)return e.closest(`[data-content-type]`)||e.closest(`li`)?void 0:e.type===`checkbox`?{checked:e.checked}:void 0;if(e.tagName!==`LI`)return;let t=e.parentElement;if(t!==null&&(t.tagName===`UL`||t.tagName===`DIV`&&t.parentElement?.tagName===`UL`)){let t=e.querySelector(`input[type=checkbox]`)||null;return t===null?void 0:{...CS(e),checked:t.checked}}},parseContent:({el:e,schema:t})=>hC(e,t,`checkListItem`),render(e,t){let n=document.createDocumentFragment(),r=document.createElement(`input`);r.type=`checkbox`,r.checked=e.props.checked,e.props.checked&&r.setAttribute(`checked`,``),r.disabled=!t.isEditable,r.addEventListener(`change`,()=>{t.isEditable&&t.updateBlock(e,{props:{checked:!e.props.checked}})});let i=document.createElement(`p`),a=document.createElement(`div`);return a.contentEditable=`false`,a.appendChild(r),n.appendChild(a),n.appendChild(i),{dom:n,contentDOM:i}},toExternalHTML(e){let t=document.createElement(`li`),n=document.createElement(`input`);n.type=`checkbox`,n.checked=e.props.checked,e.props.checked&&n.setAttribute(`checked`,``);let r=document.createElement(`p`);return wS(e.props,t),t.appendChild(n),t.appendChild(r),{dom:t,contentDOM:r}},runsBefore:[`bulletListItem`]},[iv({key:`check-list-item-shortcuts`,keyboardShortcuts:{Enter:({editor:e})=>mC(e,`checkListItem`),"Mod-Shift-9":({editor:e})=>{let t=e.getTextCursorPosition();return e.schema.blockSchema[t.block.type].content===`inline`&&(e.updateBlock(t.block,{type:`checkListItem`,props:{}}),!0)}},inputRules:[{find:/^\s?\[\s*\]\s$/,replace(){return{type:`checkListItem`,props:{checked:!1}}}},{find:/^\s?\[[Xx]\]\s$/,replace(){return{type:`checkListItem`,props:{checked:!0}}}}]})]);function vC(e,t,n,r){let i=!!e.firstChild.attrs.start,a=xb({posBeforeNode:t,node:e});if(!a.isBlockContainer)throw Error(`impossible`);let o=n.doc.resolve(a.bnBlock.beforePos).nodeBefore,s=o?r.get(o):void 0;if(s!==void 0){let t=s+1;return r.set(e,t),{index:t,isFirst:!1,hasStart:i}}let c=[{node:e,pos:t}],l=o,u=a.bnBlock.beforePos;for(;l&&r.get(l)===void 0;){let e=xb({posBeforeNode:u-l.nodeSize,node:l});if(e.blockNoteType!==`numberedListItem`)break;c.push({node:l,pos:u-l.nodeSize});let t=n.doc.resolve(e.bnBlock.beforePos).nodeBefore;u=e.bnBlock.beforePos,l=t}let d,f,p=c[c.length-1],m=xb({posBeforeNode:p.pos,node:p.node});if(!m.isBlockContainer)throw Error(`impossible`);let h=n.doc.resolve(m.bnBlock.beforePos).nodeBefore,g=h?r.get(h):void 0;g===void 0?(d=(p.node.firstChild.attrs.start||1)-1,f=!0):(d=g,f=!1);for(let e=c.length-1;e>=0;e--){let t=c[e];f&&e<c.length-1&&(f=!1),d++,r.set(t.node,d)}return{index:d,isFirst:c.length===1?f||g===void 0:!1,hasStart:i}}function yC(e,t){let n=new Map,r=t.decorations.map(e.mapping,e.doc),i=e.changedRange()??{from:0,to:e.doc.nodeSize-2},a=[],o=new Set;e.doc.nodesBetween(i.from,e.doc.nodeSize-2,(t,s,c)=>{if(c&&o.has(c))return!1;if(t.type.name===`blockContainer`&&t.firstChild.type.name===`numberedListItem`){let{index:l,isFirst:u,hasStart:d}=vC(t,s,e,n),f=e.doc.nodeAt(s+1);if(r.find(s+1,s+1+f.nodeSize,e=>e.index===l&&e.isFirst===u&&e.hasStart===d).length===0)a.push(ft.node(s+1,s+1+f.nodeSize,{"data-index":l.toString()},{index:l,isFirst:u,hasStart:d}));else if(s>=i.to&&c)return o.add(c),!1}});let s=a.flatMap(e=>r.find(e.from,e.to));return{decorations:r.remove(s).add(e.doc,a)}}var bC=Sx(xx(()=>({type:`numberedListItem`,propSchema:{...SS,start:{default:void 0,type:`number`}},content:`inline`})),{meta:{isolating:!1},parse(e){if(e.tagName!==`LI`)return;let t=e.parentElement;if(t!==null&&(t.tagName===`OL`||t.tagName===`DIV`&&t.parentElement?.tagName===`OL`)){let n=parseInt(t.getAttribute(`start`)||`1`),r=CS(e);return e.previousElementSibling||n===1?r:{...r,start:n}}},parseContent:({el:e,schema:t})=>hC(e,t,`numberedListItem`),render(){let e=document.createElement(`p`);return{dom:e,contentDOM:e}},toExternalHTML(e){let t=document.createElement(`li`),n=document.createElement(`p`);return wS(e.props,t),t.appendChild(n),{dom:t,contentDOM:n}}},[iv({key:`numbered-list-item-shortcuts`,inputRules:[{find:/^\s?(\d+)\.\s$/,replace({match:e,editor:t}){if(Cb(t.prosemirrorState).blockNoteType===`heading`)return;let n=parseInt(e[1]);return{type:`numberedListItem`,props:{start:n===1?void 0:n}}}}],keyboardShortcuts:{Enter:({editor:e})=>mC(e,`numberedListItem`),"Mod-Shift-7":({editor:e})=>{let t=e.getTextCursorPosition();return e.schema.blockSchema[t.block.type].content===`inline`&&(e.updateBlock(t.block,{type:`numberedListItem`,props:{}}),!0)}},prosemirrorPlugins:[new ke({key:new Ae(`numbered-list-indexing-decorations`),state:{init(e,t){return yC(t.tr,{decorations:Ke.empty})},apply(e,t){return!e.docChanged&&t.decorations?t:yC(e,t)}},props:{decorations(e){return this.getState(e)?.decorations??Ke.empty}}})]})]),xC=Sx(xx(()=>({type:`toggleListItem`,propSchema:{...SS},content:`inline`})),{meta:{isolating:!1},parse(e){if(e.tagName===`DETAILS`)return CS(e);if(e.tagName===`LI`){let t=e.parentElement;if(t&&(t.tagName===`UL`||t.tagName===`DIV`&&t.parentElement?.tagName===`UL`)&&e.querySelector(`:scope > details`))return CS(e)}},parseContent:({el:e,schema:t})=>{let n=e.tagName===`DETAILS`?e:e.querySelector(`:scope > details`);if(!n)throw Error(`No details found in toggleListItem parseContent`);return $S(n,t,`toggleListItem`)},runsBefore:[`bulletListItem`],render(e,t){let n=document.createElement(`p`);return{...tC(e,t,n),contentDOM:n}},toExternalHTML(e){let t=document.createElement(`li`),n=document.createElement(`details`);n.setAttribute(`open`,``);let r=document.createElement(`summary`),i=document.createElement(`p`);return r.appendChild(i),n.appendChild(r),wS(e.props,t),t.appendChild(n),{dom:t,contentDOM:i,childrenDOM:n}}},[iv({key:`toggle-list-item-shortcuts`,keyboardShortcuts:{Enter:({editor:e})=>mC(e,`toggleListItem`),"Mod-Shift-6":({editor:e})=>{let t=e.getTextCursorPosition();return e.schema.blockSchema[t.block.type].content===`inline`&&(e.updateBlock(t.block,{type:`toggleListItem`,props:{}}),!0)}}})]),SC=Sx(xx(()=>({type:`paragraph`,propSchema:SS,content:`inline`})),{meta:{isolating:!1},parse:e=>{if(e.tagName===`P`&&e.textContent?.trim())return CS(e)},render:()=>{let e=document.createElement(`p`);return{dom:e,contentDOM:e}},toExternalHTML:e=>{let t=document.createElement(`p`);return wS(e.props,t),{dom:t,contentDOM:t}},runsBefore:[`default`,`heading`]},[iv({key:`paragraph-shortcuts`,keyboardShortcuts:{"Mod-Alt-0":({editor:e})=>{let t=e.getTextCursorPosition();return e.schema.blockSchema[t.block.type].content===`inline`&&(e.updateBlock(t.block,{type:`paragraph`,props:{}}),!0)}}})]),CC=Sx(xx(()=>({type:`quote`,propSchema:{backgroundColor:SS.backgroundColor,textColor:SS.textColor},content:`inline`})),{meta:{isolating:!1},parse(e){if(e.tagName===`BLOCKQUOTE`){let{backgroundColor:t,textColor:n}=CS(e);return{backgroundColor:t,textColor:n}}},render(){let e=document.createElement(`blockquote`);return{dom:e,contentDOM:e}},toExternalHTML(e){let t=document.createElement(`blockquote`);return wS(e.props,t),{dom:t,contentDOM:t}}},[iv({key:`quote-block-shortcuts`,keyboardShortcuts:{"Mod-Alt-q":({editor:e})=>{let t=e.getTextCursorPosition();return e.schema.blockSchema[t.block.type].content===`inline`&&(e.updateBlock(t.block,{type:`quote`,props:{}}),!0)}},inputRules:[{find:RegExp(`^>\\s$`),replace(){return{type:`quote`,props:{}}}},{find:RegExp(`^\\p{Quotation_Mark}\\s$`,`u`),replace(){return{type:`quote`,props:{}}}}]})]),wC=`blockLevelSuggestion`;function TC(e){return e&&e.options.extensions.some(e=>{if(e.type!==`mark`)return!1;let t=X(e,`group`);return typeof t==`string`&&t.split(` `).includes(`blockLevelSuggestion`)})?wC:``}var EC=O_.create({name:`BlockNoteTableExtension`,addProseMirrorPlugins:()=>[jy({cellMinWidth:35,defaultCellMinWidth:120,View:null}),Gy()],addKeyboardShortcuts(){return{Enter:()=>xv(this.editor.state)?this.editor.commands.command(({state:e,dispatch:t})=>{let n=Sv(e),r=n?Dv(n,`vert`,1):null;return r&&t&&t(e.tr.setSelection(H.between(r,Tv(r))).scrollIntoView()),!0}):!1,Backspace:()=>{let e=this.editor.state.selection,t=e.empty,n=e.$head.parentOffset===0,r=e.$head.node().type.name===`tableParagraph`;return t&&n&&r},Tab:()=>this.editor.commands.command(({state:e,dispatch:t,view:n})=>xv(e)?(cy(1)(e,t,n),!0):!1),"Shift-Tab":()=>this.editor.commands.command(({state:e,dispatch:t,view:n})=>xv(e)?(cy(-1)(e,t,n),!0):!1)}},extendNodeSchema(e){return{tableRole:mh(X(e,`tableRole`,{name:e.name,options:e.options,storage:e.storage}))}}}),DC={textColor:SS.textColor},OC=q_.create({name:`tableHeader`,addOptions(){return{HTMLAttributes:{}}},content:`tableContent+`,marks(){return TC(this.editor)},addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute(`colwidth`);return t?t.split(`,`).map(e=>parseInt(e,10)):null}}}},tableRole:`header_cell`,isolating:!0,parseHTML(){return[{tag:`th`,getContent:(e,t)=>NC(e,t)}]},renderHTML({HTMLAttributes:e}){return[`th`,vh(this.options.HTMLAttributes,e),0]}}),kC=q_.create({name:`tableCell`,addOptions(){return{HTMLAttributes:{}}},content:`tableContent+`,marks(){return TC(this.editor)},addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute(`colwidth`);return t?t.split(`,`).map(e=>parseInt(e,10)):null}}}},tableRole:`cell`,isolating:!0,parseHTML(){return[{tag:`td`,getContent:(e,t)=>NC(e,t)}]},renderHTML({HTMLAttributes:e}){return[`td`,vh(this.options.HTMLAttributes,e),0]}}),AC=q_.create({name:`table`,content:`tableRow+`,group:`blockContent`,tableRole:`table`,marks(){return TC(this.editor)},isolating:!0,parseHTML(){return[{tag:`table`}]},renderHTML({node:e,HTMLAttributes:t}){let n=Gb(this.name,`table`,{...this.options.domAttributes?.blockContent||{},...t},this.options.domAttributes?.inlineContent||{}),r=document.createElement(`colgroup`);for(let t of e.children[0].children)if(t.attrs.colwidth)for(let e of t.attrs.colwidth){let t=document.createElement(`col`);e&&(t.style=`width: ${e}px`),r.appendChild(t)}else r.appendChild(document.createElement(`col`));return n.dom.firstChild?.appendChild(r),n},addNodeView(){return({node:e,HTMLAttributes:t})=>{class n extends Oy{node;cellMinWidth;blockContentHTMLAttributes;constructor(e,t,n){super(e,t),this.node=e,this.cellMinWidth=t,this.blockContentHTMLAttributes=n;let r=document.createElement(`div`);r.className=Vb(`bn-block-content`,n.class),r.setAttribute(`data-content-type`,`table`);for(let[e,t]of Object.entries(n))e!==`class`&&r.setAttribute(e,t);let i=this.dom,a=document.createElement(`div`);a.className=`tableWrapper-inner`,a.appendChild(i.firstChild),i.appendChild(a),r.appendChild(i);let o=document.createElement(`div`);o.className=`table-widgets-container`,o.style.position=`relative`,i.appendChild(o),this.dom=r}ignoreMutation(e){return!e.target.closest(`.tableWrapper-inner`)||super.ignoreMutation(e)}update(e){if(!super.update(e))return!1;for(let[t,n]of Object.entries(DC)){let r=ux(t),i=e.attrs[t];i===n.default?this.dom.removeAttribute(r):this.dom.setAttribute(r,String(i))}return!0}}return new n(e,120,{...this.options.domAttributes?.blockContent||{},...t})}}}),jC=q_.create({name:`tableParagraph`,group:`tableContent`,content:`inline*`,parseHTML(){return[{tag:`p`,getAttrs:e=>{if(typeof e==`string`||!e.textContent||!e.closest(`[data-content-type]`))return!1;let t=e.parentElement;return t===null?!1:t.tagName===`TD`||t.tagName===`TH`?{}:!1},node:`tableParagraph`}]},renderHTML({HTMLAttributes:e}){return[`p`,e,0]}}),MC=q_.create({name:`tableRow`,addOptions(){return{HTMLAttributes:{}}},content:`(tableCell | tableHeader)+`,tableRole:`row`,marks(){return TC(this.editor)},parseHTML(){return[{tag:`tr`}]},renderHTML({HTMLAttributes:e}){return[`tr`,vh(this.options.HTMLAttributes,e),0]}});function NC(e,t){let n=Ee.fromSchema(t).parse(e,{topNode:t.nodes.blockGroup.create()}),r=[];return n.content.descendants(e=>{if(e.isInline)return r.push(e),!1}),U.fromArray(r)}var PC=()=>_x({node:AC,type:`table`,content:`table`},DC,[iv({key:`table-extensions`,tiptapExtensions:[EC,jC,OC,kC,MC]}),iv({key:`table-keyboard-delete`,keyboardShortcuts:{Backspace:({editor:e})=>{if(!(e.prosemirrorState.selection instanceof jv))return!1;let t=e.getTextCursorPosition().block,n=t.content,r=0;for(let e of n.rows)for(let t of e.cells){if(`type`in t&&t.content.length>0||!(`type`in t)&&t.length>0)return!1;r++}let i=0;return e.prosemirrorState.selection.forEachCell(()=>{i++}),i<r?!1:(e.transact(()=>{(e.getPrevBlock(t)||e.getNextBlock(t))&&e.setTextCursorPosition(t),e.removeBlocks([t])}),!0)}}})]),FC=e=>({url:e.src||void 0,previewWidth:e.width||void 0,name:e.getAttribute(`data-name`)||void 0}),IC=xx(e=>({type:`video`,propSchema:{textAlignment:SS.textAlignment,backgroundColor:SS.backgroundColor,name:{default:``},url:{default:``},caption:{default:``},showPreview:{default:!0},previewWidth:{default:void 0,type:`number`}},content:`none`})),LC=e=>e=>{if(e.tagName===`VIDEO`){if(e.closest(`figure`))return;let{backgroundColor:t}=CS(e);return{...FC(e),backgroundColor:t}}if(e.tagName===`FIGURE`){let t=DS(e,`video`);if(!t)return;let{targetElement:n,caption:r}=t,{backgroundColor:i}=CS(e);return{...FC(n),backgroundColor:i,caption:r}}},RC=Sx(IC,e=>({meta:{fileBlockAccept:[`video/*`]},parse:LC(e),render(t,n){let r=document.createElement(`div`);r.innerHTML=e.icon??`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M2 3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934ZM8 5V19H16V5H8ZM4 5V7H6V5H4ZM18 5V7H20V5H18ZM4 9V11H6V9H4ZM18 9V11H20V9H18ZM4 13V15H6V13H4ZM18 13V15H20V13H18ZM4 17V19H6V17H4ZM18 17V19H20V17H18Z"></path></svg>`;let i=document.createElement(`div`);i.className=`bn-visual-media-wrapper`;let a=document.createElement(`video`);return a.className=`bn-visual-media`,n.resolveFileUrl?n.resolveFileUrl(t.props.url).then(e=>{a.src=e}):a.src=t.props.url,a.controls=!0,a.contentEditable=`false`,a.draggable=!1,t.props.previewWidth&&(a.width=t.props.previewWidth),i.appendChild(a),aC(t,n,{dom:i},i,r.firstElementChild)},toExternalHTML(e){if(!e.props.url)return{dom:document.createElement(`video`)};let t;return e.props.showPreview?(t=document.createElement(`video`),t.src=e.props.url,e.props.previewWidth&&(t.width=e.props.previewWidth)):(t=document.createElement(`a`),t.href=e.props.url,t.textContent=e.props.name||e.props.url),e.props.caption?e.props.showPreview?NS(t,e.props.caption):PS(t,e.props.caption):{dom:t}},runsBefore:[`file`]}));function zC(e,t,n){if(!(t in e.schema.blockSpecs))return!1;if(!n)return!0;for(let[r,i]of Object.entries(n)){if(!(r in e.schema.blockSpecs[t].config.propSchema))return!1;if(typeof i==`string`){if(e.schema.blockSpecs[t].config.propSchema[r].default!==void 0&&typeof e.schema.blockSpecs[t].config.propSchema[r].default!==i||e.schema.blockSpecs[t].config.propSchema[r].type!==void 0&&e.schema.blockSpecs[t].config.propSchema[r].type!==i)return!1}else{if(e.schema.blockSpecs[t].config.propSchema[r].default!==i.default||e.schema.blockSpecs[t].config.propSchema[r].default===void 0&&i.default===void 0&&e.schema.blockSpecs[t].config.propSchema[r].type!==i.type||typeof e.schema.blockSpecs[t].config.propSchema[r].values!=typeof i.values)return!1;if(typeof e.schema.blockSpecs[t].config.propSchema[r].values==`object`&&typeof i.values==`object`){for(let n of i.values)if(!e.schema.blockSpecs[t].config.propSchema[r].values.includes(n))return!1}}}return!0}function BC(e,t,n,r){return zC(t,n,r)&&e.type===n}function VC(e){return e instanceof jv}function HC(e){let t=e.type.spec.tableRole;return t===`cell`||t===`header_cell`}var UC=iv(({editor:e})=>{let t=av(!1),n=()=>e.transact(e=>{if(e.selection.empty||e.selection instanceof H&&e.doc.textBetween(e.selection.from,e.selection.to).length===0)return!1;let t=!1;return e.selection.content().content.descendants(e=>(e.type.spec.content===`text*`&&(t=!0),!t)),!t});return{key:`formattingToolbar`,store:t,mount({dom:r,signal:i}){let a=!1,o=!1,s=e.onChange(()=>{a||o||t.setState(n())}),c=e.onSelectionChange(()=>{a||o||t.setState(n())}),l=e.onFocusChange((e,{focused:r})=>{r?a||o||t.setState(n()):t.setState(!1)},{includeEditorUI:!0});r.addEventListener(`pointerdown`,()=>{a=!0,t.setState(!1)},{signal:i}),e.prosemirrorView.root.addEventListener(`pointerup`,()=>{a=!1,e.isFocused()&&t.setState(n())},{signal:i,capture:!0}),r.addEventListener(`pointercancel`,()=>{a=!0},{signal:i,capture:!0}),e.prosemirrorView.root.addEventListener(`dragstart`,()=>{o=!0,t.setState(!1)},{signal:i}),e.prosemirrorView.root.addEventListener(`dragend`,()=>{o=!1},{signal:i}),i.addEventListener(`abort`,()=>{s(),c(),l()})}}});function WC(e,t,n=`left`){let r=e.getExtension(`yPositionMapping`);if(r)return r.mapPosition(t,n);let i=e.getExtension(`positionMapping`);if(i)return i.mapPosition(t,n);throw Error(`No position mapping extension found`)}var GC=eh(e=>e.type.name===`blockContainer`),KC=class{editor;state;emitUpdate;rootEl;pluginState;constructor(e,t,n){this.editor=e,this.pluginState=void 0,this.emitUpdate=e=>{if(!this.state)throw Error(`Attempting to update uninitialized suggestions menu`);t(e,{...this.state,ignoreQueryLength:this.pluginState?.ignoreQueryLength})},this.rootEl=n.root,this.rootEl?.addEventListener(`scroll`,this.handleScroll,!0)}handleScroll=()=>{if(this.state?.show){let e=this.rootEl?.querySelector(`[data-decoration-id="${this.pluginState.decorationId}"]`);if(!e)return;this.state.referencePos=e.getBoundingClientRect().toJSON(),this.emitUpdate(this.pluginState.triggerCharacter)}};update(e,t){let n=qC.getState(t),r=qC.getState(e.state),i=n===void 0&&r!==void 0,a=n!==void 0&&r===void 0;if(!i&&(n===void 0||r===void 0)&&!a)return;if(this.pluginState=a?n:r,a||!this.editor.isEditable){this.state&&(this.state.show=!1),this.emitUpdate(this.pluginState.triggerCharacter);return}let o=this.rootEl?.querySelector(`[data-decoration-id="${this.pluginState.decorationId}"]`);this.editor.isEditable&&o&&(this.state={show:!0,referencePos:o.getBoundingClientRect().toJSON(),query:this.pluginState.query},this.emitUpdate(this.pluginState.triggerCharacter))}destroy(){this.rootEl?.removeEventListener(`scroll`,this.handleScroll,!0)}closeMenu=()=>{this.editor.transact(e=>e.setMeta(qC,null))};clearQuery=()=>{this.pluginState!==void 0&&this.editor._tiptapEditor.chain().focus().deleteRange({from:this.pluginState.queryStartPos()-(this.pluginState.deleteTriggerCharacter?this.pluginState.triggerCharacter.length:0),to:this.editor.transact(e=>e.selection.from)}).run()}},qC=new Ae(`SuggestionMenuPlugin`),JC=iv(({editor:e})=>{let t=new Map,n,r=av(void 0);return{key:`suggestionMenu`,store:r,addSuggestionMenu:e=>{t.set(e.triggerCharacter,e)},removeSuggestionMenu:e=>{t.delete(e)},closeMenu:()=>{n?.closeMenu()},clearQuery:()=>{n?.clearQuery()},shown:()=>n?.state?.show||!1,openSuggestionMenu:(t,n)=>{e.headless||(e.focus(),e.transact(e=>{n?.deleteTriggerCharacter&&e.insertText(t),e.scrollIntoView().setMeta(qC,{triggerCharacter:t,deleteTriggerCharacter:n?.deleteTriggerCharacter||!1,ignoreQueryLength:n?.ignoreQueryLength||!1})}))},prosemirrorPlugins:[new ke({key:qC,view:t=>(n=new KC(e,(e,t)=>{r.setState({...t,triggerCharacter:e})},t),n),state:{init(){},apply:(t,r,i,a)=>{if(t.selection.$from.parent.type.spec.code)return r;let o=t.getMeta(qC);if(typeof o==`object`&&o){r&&n?.closeMenu();let t=WC(e,a.selection.from-o.triggerCharacter.length);return{triggerCharacter:o.triggerCharacter,deleteTriggerCharacter:o.deleteTriggerCharacter!==!1,queryStartPos:()=>t()+o.triggerCharacter.length,query:``,decorationId:`id_${Math.floor(Math.random()*4294967295)}`,ignoreQueryLength:o?.ignoreQueryLength}}if(r===void 0)return r;if(a.selection.from!==a.selection.to||o===null||t.getMeta(`focus`)||t.getMeta(`blur`)||t.getMeta(`pointer`)||r.triggerCharacter!==void 0&&a.selection.from<r.queryStartPos()||!a.selection.$from.sameParent(a.doc.resolve(r.queryStartPos())))return;let s={...r};return s.query=a.doc.textBetween(r.queryStartPos(),a.selection.from),s}},props:{handleTextInput(e,n,r,i){let a=e.state.doc,o=[...t.entries()].sort(([e],[t])=>t.length-e.length);for(let[t,r]of o){let o=a.textBetween(Math.max(0,n-(t.length-i.length)),n)+i;if(t===o){if(r.shouldOpen&&!r.shouldOpen(e.state.tr))continue;return e.dispatch(e.state.tr.insertText(i)),e.dispatch(e.state.tr.setMeta(qC,{triggerCharacter:o}).scrollIntoView()),!0}}return!1},decorations(e){let t=this.getState(e);if(t===void 0)return null;if(!t.deleteTriggerCharacter){let n=GC(e.selection);if(n)return Ke.create(e.doc,[ft.node(n.pos,n.pos+n.node.nodeSize,{nodeName:`span`,class:`bn-suggestion-decorator`,"data-decoration-id":t.decorationId})])}return Ke.create(e.doc,[ft.inline(t.queryStartPos()-t.triggerCharacter.length,t.queryStartPos(),{nodeName:`span`,class:`bn-suggestion-decorator`,"data-decoration-id":t.decorationId})])}}})]}});function YC(e){let t=e.getTextCursorPosition().block,n=e.schema.blockSchema[t.type].content;for(;n===`none`;){if(t=e.getTextCursorPosition().nextBlock,t===void 0){let t=e.document[e.document.length-1],n=e.insertBlocks([{type:`paragraph`}],t,`after`)[0];e.setTextCursorPosition(n,`end`);return}n=e.schema.blockSchema[t.type].content,e.setTextCursorPosition(t,`end`)}}function XC(e,t){let n=e.getTextCursorPosition().block;if(n.content===void 0)throw Error(`Slash Menu open in a block that doesn't contain content.`);let r;return Array.isArray(n.content)&&(n.content.length===1&&jb(n.content[0])&&n.content[0].type===`text`&&n.content[0].text===`/`||n.content.length===0)?(r=e.updateBlock(n,t),e.setTextCursorPosition(r)):(r=e.insertBlocks([t],n,`after`)[0],e.setTextCursorPosition(e.getTextCursorPosition().nextBlock)),YC(e),r}function ZC(e){let t=[];return zC(e,`heading`,{level:`number`})&&(e.schema.blockSchema.heading.propSchema.level.values||[]).filter(e=>e<=3).forEach(n=>{t.push({onItemClick:()=>{XC(e,{type:`heading`,props:{level:n}})},badge:Bb(`Mod-Alt-${n}`),key:n===1?`heading`:`heading_${n}`,...e.dictionary.slash_menu[n===1?`heading`:`heading_${n}`]})}),zC(e,`quote`)&&t.push({onItemClick:()=>{XC(e,{type:`quote`})},key:`quote`,...e.dictionary.slash_menu.quote}),zC(e,`toggleListItem`)&&t.push({onItemClick:()=>{XC(e,{type:`toggleListItem`})},badge:Bb(`Mod-Shift-6`),key:`toggle_list`,...e.dictionary.slash_menu.toggle_list}),zC(e,`numberedListItem`)&&t.push({onItemClick:()=>{XC(e,{type:`numberedListItem`})},badge:Bb(`Mod-Shift-7`),key:`numbered_list`,...e.dictionary.slash_menu.numbered_list}),zC(e,`bulletListItem`)&&t.push({onItemClick:()=>{XC(e,{type:`bulletListItem`})},badge:Bb(`Mod-Shift-8`),key:`bullet_list`,...e.dictionary.slash_menu.bullet_list}),zC(e,`checkListItem`)&&t.push({onItemClick:()=>{XC(e,{type:`checkListItem`})},badge:Bb(`Mod-Shift-9`),key:`check_list`,...e.dictionary.slash_menu.check_list}),zC(e,`paragraph`)&&t.push({onItemClick:()=>{XC(e,{type:`paragraph`})},badge:Bb(`Mod-Alt-0`),key:`paragraph`,...e.dictionary.slash_menu.paragraph}),zC(e,`codeBlock`)&&t.push({onItemClick:()=>{XC(e,{type:`codeBlock`})},badge:Bb(`Mod-Alt-c`),key:`code_block`,...e.dictionary.slash_menu.code_block}),zC(e,`divider`)&&t.push({onItemClick:()=>{XC(e,{type:`divider`})},key:`divider`,...e.dictionary.slash_menu.divider}),zC(e,`table`)&&t.push({onItemClick:()=>{XC(e,{type:`table`,content:{type:`tableContent`,rows:[{cells:[``,``,``]},{cells:[``,``,``]}]}})},badge:void 0,key:`table`,...e.dictionary.slash_menu.table}),zC(e,`image`,{url:`string`})&&t.push({onItemClick:()=>{let t=XC(e,{type:`image`});e.getExtension(OS)?.showMenu(t.id),e.getExtension(UC)?.store.setState(!1)},key:`image`,...e.dictionary.slash_menu.image}),zC(e,`video`,{url:`string`})&&t.push({onItemClick:()=>{let t=XC(e,{type:`video`});e.getExtension(OS)?.showMenu(t.id),e.getExtension(UC)?.store.setState(!1)},key:`video`,...e.dictionary.slash_menu.video}),zC(e,`audio`,{url:`string`})&&t.push({onItemClick:()=>{let t=XC(e,{type:`audio`});e.getExtension(OS)?.showMenu(t.id),e.getExtension(UC)?.store.setState(!1)},key:`audio`,...e.dictionary.slash_menu.audio}),zC(e,`file`,{url:`string`})&&t.push({onItemClick:()=>{let t=XC(e,{type:`file`});e.getExtension(OS)?.showMenu(t.id),e.getExtension(UC)?.store.setState(!1)},key:`file`,...e.dictionary.slash_menu.file}),zC(e,`heading`,{level:`number`,isToggleable:`boolean`})&&(e.schema.blockSchema.heading.propSchema.level.values||[]).filter(e=>e<=3).forEach(n=>{t.push({onItemClick:()=>{XC(e,{type:`heading`,props:{level:n,isToggleable:!0}})},key:n===1?`toggle_heading`:`toggle_heading_${n}`,...e.dictionary.slash_menu[n===1?`toggle_heading`:`toggle_heading_${n}`]})}),zC(e,`heading`,{level:`number`})&&(e.schema.blockSchema.heading.propSchema.level.values||[]).filter(e=>e>3).forEach(n=>{t.push({onItemClick:()=>{XC(e,{type:`heading`,props:{level:n}})},badge:Bb(`Mod-Alt-${n}`),key:`heading_${n}`,...e.dictionary.slash_menu[`heading_${n}`]})}),t.push({onItemClick:()=>{e.getExtension(JC)?.openSuggestionMenu(`:`,{deleteTriggerCharacter:!0,ignoreQueryLength:!0})},key:`emoji`,...e.dictionary.slash_menu.emoji}),t}function QC(e,t){return e.filter(({title:e,aliases:n})=>e.toLowerCase().includes(t.toLowerCase())||n&&n.filter(e=>e.toLowerCase().includes(t.toLowerCase())).length!==0)}var $C={audio:BS(),bulletListItem:gC(),checkListItem:_C(),codeBlock:YS(),divider:XS(),file:QS(),heading:iC(),image:dC(),numberedListItem:bC(),paragraph:SC(),quote:CC(),table:PC(),toggleListItem:xC(),video:RC()},ew=Ax({type:`textColor`,propSchema:`string`},{render:()=>{let e=document.createElement(`span`);return{dom:e,contentDOM:e}},toExternalHTML:e=>{let t=document.createElement(`span`);return e!==SS.textColor.default&&(t.style.color=e in xS?xS[e].text:e),{dom:t,contentDOM:t}},parse:e=>{if(e.tagName===`SPAN`&&e.style.color)return e.style.color}}),tw=Ax({type:`backgroundColor`,propSchema:`string`},{render:()=>{let e=document.createElement(`span`);return{dom:e,contentDOM:e}},toExternalHTML:e=>{let t=document.createElement(`span`);return e!==SS.backgroundColor.default&&(t.style.backgroundColor=e in xS?xS[e].background:e),{dom:t,contentDOM:t}},parse:e=>{if(e.tagName===`SPAN`&&e.style.backgroundColor)return e.style.backgroundColor}}),nw={bold:Dx(rb,`boolean`),italic:Dx(fb,`boolean`),underline:Dx(gb,`boolean`),strike:Dx(hb,`boolean`),code:Dx(sb.extend({addInputRules(){return[K_({find:/(^|[^`])`([^`]+)`(?!`)$/,type:this.type}),new f_({find:/(^|[^`])`([^`]+)`(?!`) $/,handler:({state:e,range:t,match:n})=>{let{tr:r,schema:i}=e,a=n[1],o=n[2];r.replaceWith(t.from+a.length,t.to,[i.text(o,[this.type.create()]),i.text(` `)])}})]}}),`boolean`),textColor:ew,backgroundColor:tw};Ox(nw);var rw={text:{config:`text`,implementation:{}},link:{config:`link`,implementation:{}}},iw=Cx(rw),aw=class e extends Bx{static create(t){return new e({blockSpecs:t?.blockSpecs??$C,inlineContentSpecs:t?.inlineContentSpecs??rw,styleSpecs:t?.styleSpecs??nw})}},ow=new Ae(`blocknote-show-selection`),sw=iv(({editor:e})=>{let t=av({enabledSet:new Set},{onUpdate(){e.transact(e=>e.setMeta(ow,{}))}});return{key:`showSelection`,store:t,prosemirrorPlugins:[new ke({key:ow,props:{decorations:e=>{let{doc:n,selection:r}=e;if(t.state.enabledSet.size===0)return Ke.empty;let i=ft.inline(r.from,r.to,{"data-show-selection":`true`});return Ke.create(n,[i])}}})],showSelection(e,n){t.setState({enabledSet:e?new Set([...t.state.enabledSet,n]):new Set([...t.state.enabledSet].filter(e=>e!==n))})}}});function cw(e){if(!e)throw Error(`resolveUsers is required to create a user store`);let t=av(new Map),n=new Set,r={store:t,async loadUsers(e){await i(e.filter(e=>!t.state.has(e)&&!n.has(e)))},async refetchUsers(e){await i(e.filter(e=>!n.has(e)))},getUser(e){return t.state.get(e)},setUser(e){let n=Array.isArray(e)?e:[e];t.setState(e=>{let t=new Map(e);for(let e of n)t.set(e.id,e);return t})}};async function i(i){if(i.length!==0){for(let e of i)n.add(e);try{let n=await e(i,r);n.length>0&&t.setState(e=>{let t=new Map(e);for(let e of n)t.set(e.id,e);return t})}finally{for(let e of i)n.delete(e)}}}return r}function lw(e){return typeof e==`function`?cw(e):e??cw(async()=>[])}var uw=n(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}})),dw=class e{constructor(e){this.cache=new Map(e)}get(e){return this.cache.get(e)}set(e,t,n){e<0||this.cache.set(e,[t,n])}replace(e,t,n,r){this.remove(e),this.set(t,n,r)}remove(e){this.cache.delete(e)}invalidate(t){let n=new e(this.cache),r=t.mapping;return this.cache.forEach(([e,i],a)=>{if(a<0)return;let o=r.mapResult(a),s=t.doc.nodeAt(o.pos);if(o.deleted||!s?.eq(e))n.remove(a);else if(a!==o.pos){let e=i.map(e=>e.map(r,0,0)).filter(e=>e!=null);n.replace(a,o.pos,s,e)}}),n}};function fw({parser:e,nodeTypes:t=[`code_block`,`codeBlock`],languageExtractor:n=e=>e.attrs.language}){let r=new Ae(`prosemirror-highlight`);return new ke({key:r,state:{init(r,i){let a=new dw,[o,s]=pw(i.doc,e,t,n,a);return{cache:a,decorations:o,promises:s}},apply:(r,i)=>{let a=i.cache.invalidate(r),o=!!r.getMeta(`prosemirror-highlight-refresh`);if(!r.docChanged&&!o)return{cache:a,decorations:i.decorations?.map(r.mapping,r.doc),promises:i.promises};let[s,c]=pw(r.doc,e,t,n,a);return{cache:a,decorations:s,promises:c}}},view:e=>{let t=new Set,n=()=>{if(t.size>0||e.isDestroyed)return;let n=e.state.tr.setMeta(`prosemirror-highlight-refresh`,!0);e.dispatch(n)},i=()=>{let i=r.getState(e.state);for(let e of i?.promises??[])t.add(e),e.then(()=>{t.delete(e),n()}).catch(n=>{console.error(`[prosemirror-highlight] Error resolving parser:`,n),t.delete(e)})};return i(),{update:()=>{i()}}},props:{decorations(e){return this.getState(e)?.decorations}}})}function pw(e,t,n,r,i){let a=[],o=[],s=mw(e,n);try{for(let[e,n]of s){let s=r(e),c=i.get(n);if(c){let[e,t]=c;t.length>0&&a.push(t)}else{let r=t({content:e.textContent,language:s||void 0,pos:n,size:e.nodeSize});r&&Array.isArray(r)?(i.set(n,e,r),r.length>0&&a.push(r)):r instanceof Promise?(i.remove(n),o.push(r)):console.error(`[prosemirror-highlight] Invalid parser result:`,r)}}}catch(e){console.error(`[prosemirror-highlight] Error parsing code blocks:`,e)}return[a.length>0?Ke.create(e,a.flat()):void 0,o]}function mw(e,t){let n=[];return e.descendants((e,r)=>{if(e.type.inlineContent&&t.includes(e.type.name))return n.push([e,r]),!1}),n}function hw(e,t){return function({content:n,language:r,pos:i,size:a}){let o=[],{tokens:s,fg:c,bg:l,rootStyle:u}=e.codeToTokens(n,{lang:r,...t??{theme:e.getLoadedThemes()[0]}}),d=u||(c&&l?`--prosemirror-highlight:${c};--prosemirror-highlight-bg:${l}`:``);if(d){let e=ft.node(i,i+a,{style:d});o.push(e)}let f=i+1;for(let e of s){for(let t of e){let e=f+t.content.length,n=ft.inline(f,e,{style:gw(t.htmlStyle??`color: ${t.color}`),class:`shiki`});o.push(n),f=e}f+=1}return o}}function gw(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}var _w=t(uw(),1);function vw(e){let t=Array.from(e.classList).filter(e=>!e.startsWith(`bn-`))||[];t.length>0?e.className=t.join(` `):e.removeAttribute(`class`)}function yw(e,t,n,r){let i;if(!t)throw Error(`blockContent is required`);if(typeof t==`string`)i=aS([t],e.pmSchema,r?.blockType);else if(Array.isArray(t))i=aS(t,e.pmSchema,r?.blockType);else if(t.type===`tableContent`)i=oS(t,e.pmSchema);else throw new Lb(t.type);let a=(r?.document??document).createDocumentFragment();for(let t of i)if(t.type.name!==`text`&&e.schema.inlineContentSchema[t.type.name]){let i=e.schema.inlineContentSpecs[t.type.name].implementation;if(i){let o=ox(t,e.schema.inlineContentSchema,e.schema.styleSchema),s=i.toExternalHTML?i.toExternalHTML(o,e):i.render.call({renderType:`dom`,props:void 0},o,()=>{},e);if(s){if(a.appendChild(s.dom),s.contentDOM){let e=n.serializeFragment(t.content,r);s.contentDOM.dataset.editable=``,s.contentDOM.appendChild(e)}continue}}}else if(t.type.name===`text`){let n=document.createTextNode(t.textContent);for(let r of t.marks.toReversed())if(r.type.name in e.schema.styleSpecs){let t=(e.schema.styleSpecs[r.type.name].implementation.toExternalHTML??e.schema.styleSpecs[r.type.name].implementation.render)(r.attrs.stringValue,e);t.contentDOM.appendChild(n),n=t.dom}else{let e=r.type.spec.toDOM(r,!0),t=Be.renderSpec(document,e);t.contentDOM.appendChild(n),n=t.dom}a.appendChild(n)}else{let e=n.serializeFragment(U.from([t]),r);a.appendChild(e)}return a.childNodes.length===1&&a.firstChild?.nodeType===1&&vw(a.firstChild),a}function bw(e,t,n,r,i,a,o,s){let c=s?.document??document,l=t.pmSchema.nodes.blockContainer,u=n.props||{};for(let[e,r]of Object.entries(t.schema.blockSchema[n.type].propSchema))!(e in u)&&r.default!==void 0&&(u[e]=r.default);let d=l.spec?.toDOM?.(l.create({id:n.id,...u})),f=Array.from(d.dom.attributes),p=t.blockImplementations[n.type].implementation,m=p.toExternalHTML?.call({},{...n,props:u},t,{nestingLevel:o})||p.render.call({},{...n,props:u},t),h=c.createDocumentFragment();if(m.dom.classList.contains(`bn-block-content`)){let e=[...f,...Array.from(m.dom.attributes)].filter(e=>e.name.startsWith(`data`)&&e.name!==`data-content-type`&&e.name!==`data-file-block`&&e.name!==`data-node-view-wrapper`&&e.name!==`data-node-type`&&e.name!==`data-id`&&e.name!==`data-editable`);for(let t of e)m.dom.firstChild.setAttribute(t.name,t.value);vw(m.dom.firstChild),o>0&&m.dom.firstChild.setAttribute(`data-nesting-level`,o.toString()),h.append(...Array.from(m.dom.childNodes))}else h.append(m.dom),o>0&&m.dom.setAttribute(`data-nesting-level`,o.toString());if(m.contentDOM){if(n.content){let e=yw(t,n.content,r,{...s,blockType:n.type});m.contentDOM.appendChild(e)}let e=t.pmSchema.nodes[n.type];e?.inlineContent&&!e.spec.code&&m.contentDOM.childNodes.length===0&&m.contentDOM.appendChild(c.createTextNode(``))}let g;if(i.has(n.type)?g=`OL`:a.has(n.type)&&(g=`UL`),g){if(e.lastChild?.nodeName!==g){let t=c.createElement(g);g===`OL`&&`start`in u&&u.start&&u?.start!==1&&t.setAttribute(`start`,String(u.start)),e.append(t)}e.lastChild.appendChild(h)}else e.append(h);if(n.children&&n.children.length>0){let l=c.createDocumentFragment();if(xw(l,t,n.children,r,i,a,o+1,s),e.lastChild?.nodeName===`UL`||e.lastChild?.nodeName===`OL`)for(;l.firstChild?.nodeName===`UL`||l.firstChild?.nodeName===`OL`;)e.lastChild.lastChild.appendChild(l.firstChild);`childrenDOM`in m&&m.childrenDOM?m.childrenDOM.append(l):t.pmSchema.nodes[n.type].isInGroup(`blockContent`)?e.append(l):m.contentDOM?.append(l)}}var xw=(e,t,n,r,i,a,o=0,s)=>{for(let c of n)bw(e,t,c,r,i,a,o,s)},Sw=(e,t,n,r,i,a)=>{let o=(a?.document??document).createDocumentFragment();return xw(o,e,t,n,r,i,0,a),o},Cw=(e,t)=>{let n=Be.fromSchema(e);return{exportBlocks:(e,r)=>{let i=Sw(t,e,n,new Set([`numberedListItem`]),new Set([`bulletListItem`,`checkListItem`,`toggleListItem`]),r),a=document.createElement(`div`);return a.append(i),a.innerHTML},exportInlineContent:(e,r)=>{let i=yw(t,e,n,r),a=document.createElement(`div`);return a.append(i.cloneNode(!0)),a.innerHTML}}};function ww(e){let{mapping:t,steps:n}=e,r=1/0,i=-1/0;for(let e=0;e<t.maps.length;e++){let a=t.maps[e];e&&(r=a.map(r,1),i=a.map(i,-1));let o=!1;if(a.forEach((e,t,n,a)=>{o=!0,r=Math.min(r,n),i=Math.max(i,a)}),!o){let t=n[e];typeof t.pos==`number`?(r=Math.min(r,t.pos),i=Math.max(i,t.pos+1)):typeof t.from==`number`&&typeof t.to==`number`&&(r=Math.min(r,t.from),i=Math.max(i,t.to))}}return r===1/0?null:{from:r,to:i}}function Tw(e,t){if(t===0)return;let n=e.resolve(t);for(let t=n.depth;t>0;t--){let r=n.node(t);if(uS(r))return vb(r,e)}}function Ew(e){return e.getMeta(`paste`)?{type:`paste`}:e.getMeta(`uiEvent`)===`drop`?{type:`drop`}:e.getMeta(`history$`)?{type:e.getMeta(`history$`).redo?`redo`:`undo`}:e.getMeta(`y-sync$`)?e.getMeta(`y-sync$`).isUndoRedoOperation?{type:`undo-redo`}:{type:`yjs-remote`}:{type:`local`}}function Dw(e,t){let n={},r={},i=Math.max(0,Math.min(t.from,e.content.size)),a=Math.max(i,Math.min(t.to,e.content.size));return e.nodesBetween(i,a,(t,i)=>{if(!uS(t))return!0;let a=Tw(e,i),o=a??`__root__`;r[o]||(r[o]=[]);let s=sx(t,e),c=vb(t,e);return n[c]={block:s,parentId:a},r[o].push(c),!0}),{byId:n,childrenByParent:r}}function Ow(e,t){let n=new Set;if(!e||!t)return n;let r=new Set(e),i=t.filter(e=>r.has(e)),a=e.filter(e=>i.includes(e));if(a.length<=1||i.length<=1)return n;let o={};for(let e=0;e<a.length;e++)o[a[e]]=e;let s=i.map(e=>o[e]),c=s.length,l=[],u=[],d=Array(c).fill(-1),f=(e,t)=>{let n=0,r=e.length;for(;n<r;){let i=n+r>>>1;e[i]<t?n=i+1:r=i}return n};for(let e=0;e<c;e++){let t=s[e],n=f(l,t);n>0&&(d[e]=u[n-1]),n===l.length?(l.push(t),u.push(e)):(l[n]=t,u[n]=e)}let p=new Set,m=u[u.length-1]??-1;for(;m!==-1;)p.add(m),m=d[m];for(let e=0;e<i.length;e++)p.has(e)||n.add(i[e]);return n}function kw(e,t=[]){let n=Ew(e),r=Zm(e.before,[e,...t]),i=ww(r);if(!i)return[];let a=r.mapping.invert(),o={from:a.map(i.from,-1),to:a.map(i.to,1)},s=Dw(r.before,o),c=Dw(r.doc,i),l=[],u=new Set;Object.keys(c.byId).filter(e=>!(e in s.byId)).forEach(e=>{l.push({type:`insert`,block:c.byId[e].block,source:n,prevBlock:void 0}),u.add(e)}),Object.keys(s.byId).filter(e=>!(e in c.byId)).forEach(e=>{l.push({type:`delete`,block:s.byId[e].block,source:n,prevBlock:void 0}),u.add(e)}),Object.keys(c.byId).filter(e=>e in s.byId).forEach(e=>{let t=s.byId[e],r=c.byId[e];t.parentId===r.parentId?(0,_w.default)({...t.block,children:void 0},{...r.block,children:void 0})||(l.push({type:`update`,block:r.block,prevBlock:t.block,source:n}),u.add(e)):(l.push({type:`move`,block:r.block,prevBlock:t.block,source:n,prevParent:t.parentId?s.byId[t.parentId]?.block:void 0,currentParent:r.parentId?c.byId[r.parentId]?.block:void 0}),u.add(e))});let d=s.childrenByParent,f=c.childrenByParent,p=new Set([...Object.keys(d),...Object.keys(f)]),m=new Set;return p.forEach(e=>{let t=Ow(d[e],f[e]);t.size!==0&&t.forEach(t=>{let r=s.byId[t],i=c.byId[t];!r||!i||r.parentId===i.parentId&&(u.has(t)||(r.parentId??`__root__`)===e&&(m.has(t)||(m.add(t),l.push({type:`move`,block:i.block,prevBlock:r.block,source:n,prevParent:r.parentId?s.byId[r.parentId]?.block:void 0,currentParent:i.parentId?c.byId[i.parentId]?.block:void 0}),u.add(t))))})}),l}var Aw=iv(()=>{let e=[];return{key:`blockChange`,prosemirrorPlugins:[new ke({key:new Ae(`blockChange`),filterTransaction:t=>{let n;return e.reduce((e,r)=>e===!1?e:r({getChanges(){return n||(n=kw(t),n)},tr:t})!==!1,!0)}})],subscribe(t){return e.push(t),()=>{e.splice(e.indexOf(t),1)}}}});function jw(e,t){return!e||!t?!1:!!e.closest(`.${t}`)}function Mw(e,t,n,r,i){let a=e.state.doc.resolve(t.pos);if(a.parent.inlineContent||t.orientation===`inline`)return null;let o=a.nodeBefore,s=a.nodeAfter;if(!o&&!s)return null;let c=t.orientation===`block-vertical-left`||t.orientation===`block-vertical-right`,l=c?t.pos:t.pos-(o?o.nodeSize:0),u=e.nodeDOM(l);if(!u)return null;let d=u.getBoundingClientRect();if(c){let e=n/2*r,i=t.orientation===`block-vertical-left`?d.left:d.right;return{left:i-e,right:i+e,top:d.top,bottom:d.bottom}}let f=o?d.bottom:d.top;o&&s&&(f=(f+e.nodeDOM(t.pos).getBoundingClientRect().top)/2);let p=n/2*i;return{left:d.left,right:d.right,top:f-p,bottom:f+p}}function Nw(e,t,n,r){let i=e.coordsAtPos(t.pos),a=n/2*r;return{left:i.left-a,right:i.left+a,top:i.top,bottom:i.bottom}}function Pw(e,t){e.classList.toggle(`prosemirror-dropcursor-inline`,t===`inline`),e.classList.toggle(`prosemirror-dropcursor-block-horizontal`,t===`block-horizontal`),e.classList.toggle(`prosemirror-dropcursor-block-vertical-left`,t===`block-vertical-left`),e.classList.toggle(`prosemirror-dropcursor-block-vertical-right`,t===`block-vertical-right`),e.classList.toggle(`prosemirror-dropcursor-block`,t===`block-horizontal`),e.classList.toggle(`prosemirror-dropcursor-vertical`,t===`block-vertical-left`||t===`block-vertical-right`)}function Fw(e){if(!e||e===document.body&&getComputedStyle(e).position===`static`)return{parentLeft:-window.pageXOffset,parentTop:-window.pageYOffset};let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth,r=t.height/e.offsetHeight;return{parentLeft:t.left-e.scrollLeft*n,parentTop:t.top-e.scrollTop*r}}var Iw=iv(({editor:e,options:t})=>{let n=null,r=null,i=-1,a=null,o={width:t.dropCursor?.width??5,color:t.dropCursor?.color??`#ddeeff`,exclude:t.dropCursor?.exclude??`bn-drag-exclude`,hooks:t.dropCursor?.hooks},s=e=>{(e?.pos!==n?.pos||e?.orientation!==n?.orientation)&&(n=e,e==null?(r&&r.parentNode&&r.parentNode.removeChild(r),r=null):c())},c=()=>{if(!n)return;let t=e.prosemirrorView,i=t.dom,a=i.getBoundingClientRect(),s=a.width/i.offsetWidth,c=a.height/i.offsetHeight,l=Mw(t,n,o.width,s,c)??Nw(t,n,o.width,s),u=t.dom.offsetParent;r||(r=u.appendChild(document.createElement(`div`)),r.style.cssText=`position: absolute; z-index: 50; pointer-events: none;`,o.color&&(r.style.backgroundColor=o.color)),Pw(r,n.orientation);let{parentLeft:d,parentTop:f}=Fw(u);r.style.left=(l.left-d)/s+`px`,r.style.top=(l.top-f)/c+`px`,r.style.width=(l.right-l.left)/s+`px`,r.style.height=(l.bottom-l.top)/c+`px`},l=e=>{clearTimeout(i),i=window.setTimeout(()=>s(null),e)},u=e=>{let t=e;a=t.target instanceof Element?t.target:null},d=t=>{let n=t;if(a&&jw(a,o.exclude)||n.target instanceof Element&&jw(n.target,o.exclude))return;let r=e.prosemirrorView;if(!r.editable)return;let i=r.posAtCoords({left:n.clientX,top:n.clientY}),c=i&&i.inside>=0&&r.state.doc.nodeAt(i.inside),u=c&&c.type.spec.disableDropCursor,d=typeof u==`function`?u(r,i,n):u;if(i&&!d){let t=i.pos;if(r.dragging&&r.dragging.slice){let e=ze(r.state.doc,t,r.dragging.slice);e!=null&&(t=e)}let a=!r.state.doc.resolve(t).parent.inlineContent,c={pos:t,orientation:a?`block-horizontal`:`inline`},u=c;if(o.hooks?.computeDropPosition){let t=o.hooks.computeDropPosition({editor:e,event:n,view:r,defaultPosition:c});if(t===null){s(null);return}u=t}s(u),l(5e3)}},f=t=>{let n=t;n.relatedTarget instanceof Node&&e.prosemirrorView.dom.contains(n.relatedTarget)||s(null)},p=()=>{l(20)},m=()=>{l(20),a=null};return{key:`dropCursor`,mount({signal:e,dom:t,root:n}){n.addEventListener(`dragstart`,u,{capture:!0,signal:e}),t.addEventListener(`dragover`,d,{signal:e}),t.addEventListener(`dragleave`,f,{signal:e}),t.addEventListener(`drop`,p,{signal:e}),t.addEventListener(`dragend`,m,{signal:e}),e.addEventListener(`abort`,()=>{clearTimeout(i),s(null)})}}}),Lw=iv(()=>({key:`history`,prosemirrorPlugins:[it()],undoCommand:Qe,redoCommand:ut})),Rw=new Ae(`inline-content-boundary-edit`);function zw(e,t,n){if(!e.empty)return e.from<=n.from&&e.to>=n.to;let r=n.to-n.from===1;return t===`Backspace`?r&&e.from===n.to:r&&e.from===n.from}var Bw=iv(()=>({key:`inlineContentBoundaryEdit`,prosemirrorPlugins:[new ke({key:Rw,props:{handleKeyDown:(e,t)=>{if(!e.editable)return!1;let n=t.key.length===1&&!t.ctrlKey&&!t.metaKey;if(!n&&t.key!==`Backspace`&&t.key!==`Delete`)return!1;let{selection:r}=e.state,i=r.$from.node();if(!i.type.spec.inline)return!1;let a=r.$from.before(),o=a+1,s=a+1+i.content.size;if(n&&i.content.size===0){let n=e.state.tr.insert(o,e.state.schema.text(t.key));return n.setSelection(H.create(n.doc,o+t.key.length)),e.dispatch(n),!0}if(i.content.size>0&&zw(r,t.key,{from:o,to:s})){let t=e.state.tr.delete(o,s);return t.setSelection(H.create(t.doc,o)),e.dispatch(t),!0}return!1}}})]})),Vw=iv(({editor:e})=>{function t(t){let n=e.prosemirrorView.nodeDOM(t);for(;n&&n.parentElement;){if(n.nodeName===`A`)return n;n=n.parentElement}return null}function n(t){let n=e.getLinkMarkAtPos(t);if(n)return{range:{from:n.from,to:n.to},mark:{attrs:{href:n.href}},get text(){return n.text},get position(){return Qh(e.prosemirrorView,n.from,n.to).toJSON()}}}function r(){return e.transact(e=>{if(e.selection.empty)return n(e.selection.anchor)})}return{key:`linkToolbar`,getLinkAtSelection:r,getLinkElementAtPos:t,getMarkAtPos(e,t){return n(e)},getLinkAtElement(t){return e.transact(()=>n(e.prosemirrorView.posAtDOM(t,0)+1))},editLink(t,n,r=e.transact(e=>e.selection.anchor)){e.editLink(t,n,r)},deleteLink(t=e.transact(e=>e.selection.anchor)){e.deleteLink(t)}}}),Hw=[`http`,`https`,`ftp`,`ftps`,`mailto`,`tel`,`callto`,`sms`,`cid`,`xmpp`],Uw=`https`,Ww=new Ae(`node-selection-keyboard`),Gw=iv(()=>({key:`nodeSelectionKeyboard`,prosemirrorPlugins:[new ke({key:Ww,props:{handleKeyDown:(e,t)=>{if(`node`in e.state.selection){if(t.ctrlKey||t.metaKey)return!1;if(t.key.length===1)return t.preventDefault(),!0;if(t.key===`Enter`&&!t.isComposing&&!t.shiftKey&&!t.altKey&&!t.ctrlKey&&!t.metaKey){let t=e.state.tr;return e.dispatch(t.insert(e.state.tr.selection.$to.after(),e.state.schema.nodes.paragraph.createChecked()).setSelection(new H(t.doc.resolve(e.state.tr.selection.$to.after()+1)))),!0}}return!1}}})]})),Kw=new Ae(`blocknote-placeholder`),qw=iv(({editor:e,options:t})=>{let n=t.placeholders;return{key:`placeholder`,prosemirrorPlugins:[new ke({key:Kw,view:t=>{let r=`placeholder-selector-${lv()}`;t.dom.classList.add(r);let i=document.createElement(`style`),a=e._tiptapEditor.options.injectNonce;a&&i.setAttribute(`nonce`,a),t.root instanceof window.ShadowRoot?t.root.append(i):t.root.head.appendChild(i);let o=i.sheet,s=(e=``)=>`.${r} .bn-block-content${e}:has(.ProseMirror-trailingBreak:only-child):after`;try{let{default:e,emptyDocument:t,...r}=n||{};for(let[e,t]of Object.entries(r)){let n=`[data-content-type="${e}"]`;o.insertRule(`${s(n)} { content: ${JSON.stringify(t)}; }`)}o.insertRule(`${s(`[data-is-only-empty-block]`)} { content: ${JSON.stringify(t)}; }`),o.insertRule(`${s(`[data-is-empty-and-focused]`)} { content: ${JSON.stringify(e)}; }`)}catch(e){console.warn(`Failed to insert placeholder CSS rule - this is likely due to the browser not supporting certain CSS pseudo-element selectors (:has, :only-child:, or :before)`,e)}return{destroy:()=>{t.root instanceof window.ShadowRoot?t.root.removeChild(i):t.root.head.removeChild(i)}}},props:{decorations:t=>{let{doc:n,selection:r}=t;if(!e.isEditable||!r.empty||r.$from.parent.type.spec.code)return;let i=[];t.doc.content.size===6&&i.push(ft.node(2,4,{"data-is-only-empty-block":`true`}));let a=r.$anchor,o=a.parent;if(o.content.size===0){let e=a.before();i.push(ft.node(e,e+o.nodeSize,{"data-is-empty-and-focused":`true`}))}return Ke.create(n,i)}}})]}}),Jw=iv(({editor:e})=>{let t=new Oe,n=0;function r(){t=new Oe,n=0}let i=typeof FinalizationRegistry<`u`?new FinalizationRegistry(()=>{n--,n===0&&r()}):null;return e.on(`create`,()=>{e._tiptapEditor.on(`transaction`,({transaction:e})=>{n!==0&&t.appendMapping(e.mapping)}),e._tiptapEditor.on(`destroy`,()=>{r()})}),{key:`positionMapping`,mapPosition:(e,r=`left`)=>{n++;let a=t.maps.length,o=()=>t.slice(a).map(e,r===`left`?-1:1);return i&&i.register(o,void 0),o}}}),Yw=new Ae(`previous-blocks`),Xw={index:`index`,level:`level`,type:`type`,depth:`depth`,"depth-change":`depth-change`},Zw=iv(()=>{let e;return{key:`previousBlockType`,prosemirrorPlugins:[new ke({key:Yw,view(t){return{update:async(t,n)=>{this.key?.getState(t.state).updatedBlocks.size>0&&(e=setTimeout(()=>{t.dispatch(t.state.tr.setMeta(Yw,{clearUpdate:!0}))},0))},destroy:()=>{e&&clearTimeout(e)}}},state:{init(){return{prevTransactionOldBlockAttrs:{},currentTransactionOldBlockAttrs:{},updatedBlocks:new Set}},apply(e,t,n,r){if(t.currentTransactionOldBlockAttrs={},t.updatedBlocks.clear(),!e.docChanged)return t;let i=ww(e);if(!i)return t;let a=e.mapping.invert(),o={from:a.map(i.from,-1),to:a.map(i.to,1)},s={},c=Qm(n.doc,o,e=>e.attrs.id),l=new Map(c.map(e=>[vb(e.node,n.doc),e])),u=Qm(r.doc,i,e=>e.attrs.id);for(let e of u){let i=vb(e.node,r.doc),a=l.get(i),o=a?.node.firstChild,c=e.node.firstChild;if(a&&o&&c){let l={index:c.attrs.index,level:c.attrs.level,type:c.type.name,depth:r.doc.resolve(e.pos).depth},u={index:o.attrs.index,level:o.attrs.level,type:o.type.name,depth:n.doc.resolve(a.pos).depth};s[i]=u,t.currentTransactionOldBlockAttrs[i]=u,(u.index!==l.index||u.level!==l.level||u.type!==l.type||u.depth!==l.depth)&&(u[`depth-change`]=u.depth-l.depth,t.updatedBlocks.add(i))}}return t.prevTransactionOldBlockAttrs=s,t}},props:{decorations(e){let t=this.getState(e);if(t.updatedBlocks.size===0)return;let n=[];return e.doc.descendants((r,i)=>{if(!r.attrs.id)return;let a=vb(r,e.doc);if(!t.updatedBlocks.has(a))return;let o=t.currentTransactionOldBlockAttrs[a],s={};for(let[e,t]of Object.entries(o))s[`data-prev-`+Xw[e]]=t||`none`;n.push(ft.node(i,i+r.nodeSize,{...s}))}),Ke.create(e.doc,n)}}})]}});function Qw(e,t){for(;e&&e.parentElement&&e.parentElement!==t.dom&&e.getAttribute?.(`data-node-type`)!==`blockContainer`;)e=e.parentElement;if(e.getAttribute?.(`data-node-type`)===`blockContainer`)return{node:e,id:e.getAttribute(`data-id`)}}function $w(e){let t=document.createElement(`div`);return t.innerHTML=e,eT(t,{indent:``,inListItem:!1}).trim()+`
147
- `}function eT(e,t){let n=``,r=Array.from(e.childNodes);for(let e=0;e<r.length;e++){let i=r[e];n+=tT(i,t)}return n}function tT(e,t){if(e.nodeType===3)return e.textContent||``;if(e.nodeType!==1)return``;let n=e;switch(n.tagName.toLowerCase()){case`p`:return nT(n,t);case`h1`:case`h2`:case`h3`:case`h4`:case`h5`:case`h6`:return rT(n,t);case`blockquote`:return iT(n,t);case`pre`:return aT(n,t);case`ul`:return uT(n,t);case`ol`:return dT(n,t);case`table`:return mT(n,t);case`hr`:return t.indent+`***
148
-
149
- `;case`math`:return sT(n,t);case`img`:return vT(n,t);case`video`:return yT(n,t);case`audio`:return bT(n,t);case`embed`:return xT(n,t);case`figure`:return ST(n,t);case`a`:return ET(n,t);case`details`:return kT(n,t);case`div`:return eT(n,t);case`br`:return``;default:return eT(n,t)}}function nT(e,t){let n=MT(AT(e));return t.inListItem?n:t.indent+n+`
150
-
151
- `}function rT(e,t){let n=parseInt(e.tagName[1],10),r=`#`.repeat(n)+` `,i=AT(e);return t.indent+r+i+`
152
-
153
- `}function iT(e,t){let n=Array.from(e.children).filter(e=>{let t=e.tagName.toLowerCase();return[`p`,`ul`,`ol`,`pre`,`blockquote`,`table`,`hr`].includes(t)}),r;if(n.length>0){let e=[];for(let t of n)t.tagName.toLowerCase()===`p`?e.push(AT(t)):e.push(tT(t,{indent:``,inListItem:!1}).trim());r=e.join(`
154
-
155
- `)}else r=AT(e);return r.split(`
156
- `).map(e=>t.indent+`> `+e).join(`
157
- `)+`
158
-
159
- `}function aT(e,t){let n=e.querySelector(`code`);if(!n)return``;let r=n.getAttribute(`data-language`)||lT(n.className)||``,i=cT(n),a=Math.max(0,...(i.match(/`+/g)??[]).map(e=>e.length)),o="`".repeat(Math.max(3,a+1));return i?[o+r,...(i.endsWith(`
160
- `)?i.slice(0,-1):i).split(`
161
- `),o].map(e=>e&&t.indent+e).join(`
162
- `)+`
163
-
164
- `:t.indent+o+r+`
165
- `+t.indent+o+`
166
-
167
- `}function oT(e){return(e.querySelector(`annotation[encoding="application/x-tex"]`)?.textContent??e.textContent??``).trim()}function sT(e,t){return[`$$`,...oT(e).split(`
168
- `),`$$`].map(e=>e&&t.indent+e).join(`
169
- `)+`
170
-
171
- `}function cT(e){let t=``;for(let n of Array.from(e.childNodes))n.nodeType===3?t+=n.textContent||``:n.nodeType===1&&(n.tagName.toLowerCase()===`br`?t+=`
172
- `:t+=cT(n));return t}function lT(e){let t=e.match(/language-(\S+)/);return t?t[1]:``}function uT(e,t){let n=``,r=Array.from(e.children).filter(e=>e.tagName.toLowerCase()===`li`);for(let e of r)n+=fT(e,`bullet`,t);return t.inListItem||(n+=`
173
- `),n}function dT(e,t){let n=``,r=Array.from(e.children).filter(e=>e.tagName.toLowerCase()===`li`),i=parseInt(e.getAttribute(`start`)||`1`,10);for(let e=0;e<r.length;e++){let a=i+e;n+=fT(r[e],`ordered`,t,a)}return t.inListItem||(n+=`
174
- `),n}function fT(e,t,n,r){let i=null,a=null;for(let t of Array.from(e.children)){let e=t.tagName.toLowerCase();e===`input`&&t.type===`checkbox`&&(i=t),e===`details`&&(a=t)}let o,s;i?(o=`* ${i.checked?`[x]`:`[ ]`} `,s=2):t===`ordered`?(o=`${r}. `,s=o.length):(o=`* `,s=2);let c,l;if(a){let e=a.querySelector(`summary`)?.querySelector(`p`);l=a,c=e?AT(e):``}else l=pT(e,i),c=l?AT(l):``;let u=n.indent+o+c+`
175
- `,d=n.indent+` `.repeat(s),f={indent:d,inListItem:!0};if(a){let e=a.querySelector(`summary`);for(let t of Array.from(a.children))if(t!==e){if(t.tagName.toLowerCase()===`p`){let e=AT(t);u+=`
176
- `+d+e+`
177
- `}else u+=tT(t,f)}}let p=Array.from(e.children);for(let e of p){let t=e.tagName.toLowerCase();if(e!==l&&e!==i&&t!==`input`){if(t===`ul`||t===`ol`)u+=tT(e,f);else if(t===`p`){let t=AT(e);u+=`
178
- `+d+t+`
179
- `}else u+=`
180
- `+tT(e,f)}}return u}function pT(e,t){for(let n of Array.from(e.children)){if(n===t||n.tagName.toLowerCase()===`input`)continue;let e=n.tagName.toLowerCase();if(e===`p`||e===`span`)return n}return null}function mT(e,t){let n=e.querySelector(`colgroup`),r=0;n&&(r=n.querySelectorAll(`col`).length);let i=[],a=!1,o=e.querySelectorAll(`tr`),s=[];o.forEach((e,t)=>{s[t]||(s[t]=[]);let n=e.querySelectorAll(`th, td`),i=0;n.forEach(e=>{for(;s[t][i]!==void 0;)i++;t===0&&e.tagName.toLowerCase()===`th`&&(a=!0);let n=hT(AT(e).trim()),r=parseInt(e.getAttribute(`colspan`)||`1`,10),o=parseInt(e.getAttribute(`rowspan`)||`1`,10);for(let e=0;e<o;e++)for(let a=0;a<r;a++){let r=t+e;s[r]||(s[r]=[]),s[r][i+a]=e===0&&a===0?n:``}i+=r}),s[t]&&(r=Math.max(r,s[t].length))});for(let e of s){let t=[];for(let n=0;n<r;n++)t.push(e&&e[n]!==void 0?e[n]??``:``);i.push(t)}if(i.length===0)return``;let c=[];for(let e=0;e<r;e++){let t=3;for(let n of i){let r=e<n.length?n[e].length:0;t=Math.max(t,r)}c.push(Math.max(t,10))}let l=``;if(a){l+=t.indent+gT(i[0],c,r)+`
181
- `,l+=t.indent+_T(c,r)+`
182
- `;for(let e=1;e<i.length;e++)l+=t.indent+gT(i[e],c,r)+`
183
- `}else{let e=Array(r).fill(``);l+=t.indent+gT(e,c,r)+`
184
- `,l+=t.indent+_T(c,r)+`
185
- `;for(let e of i)l+=t.indent+gT(e,c,r)+`
186
- `}return l+=`
187
- `,l}function hT(e){return e.replace(/\|/g,`\\|`)}function gT(e,t,n){let r=[];for(let i=0;i<n;i++){let n=i<e.length?e[i]:``;r.push(` `+n.padEnd(t[i])+` `)}return`|`+r.join(`|`)+`|`}function _T(e,t){let n=[];for(let r=0;r<t;r++)n.push(` `+`-`.repeat(e[r])+` `);return`|`+n.join(`|`)+`|`}function vT(e,t){let n=e.getAttribute(`src`)||``,r=e.getAttribute(`alt`)||``;return n?t.indent+`![${r}](${n})\n\n`:`
188
-
189
- `}function yT(e,t){let n=e.getAttribute(`src`)||e.getAttribute(`data-url`)||``,r=e.getAttribute(`data-name`)||e.getAttribute(`title`)||``;return n?t.indent+`![${r}](${n})\n\n`:`
190
-
191
- `}function bT(e,t){let n=e.getAttribute(`src`)||``;return n?t.indent+`<audio src="${wT(n)}" controls></audio>\n\n`:`
192
-
193
- `}function xT(e,t){let n=e.getAttribute(`src`)||``;return n?t.indent+`[](${n})\n\n`:`
194
-
195
- `}function ST(e,t){let n=e.querySelector(`img`),r=e.querySelector(`video`),i=e.querySelector(`audio`),a=e.querySelector(`a`),o=e.querySelector(`figcaption`)?.textContent?.trim()||``;return n?CT(`img`,n.getAttribute(`src`)||``,n.getAttribute(`alt`)||``,o,t):r?CT(`video`,r.getAttribute(`src`)||r.getAttribute(`data-url`)||``,r.getAttribute(`data-name`)||r.getAttribute(`title`)||``,o,t):i?CT(`audio`,i.getAttribute(`src`)||``,``,o,t):a?ET(a,t):``}function CT(e,t,n,r,i){if(!t)return``;if(!r&&e!==`audio`)return i.indent+`![${n}](${t})\n\n`;let a=n&&n!==r?e===`img`?` alt="${wT(n)}"`:e===`video`?` data-name="${wT(n)}"`:``:``,o=e===`img`?`<img${a} src="${wT(t)}">`:`<${e} src="${wT(t)}"${a} controls></${e}>`,s=r?`<figcaption>${TT(r)}</figcaption>`:``;return i.indent+`<figure>${o}${s}</figure>\n\n`}function wT(e){return e.replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function TT(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function ET(e,t){let n=e.getAttribute(`href`)||``,r=e.textContent?.trim()||``;return n?t.indent+DT(r,n)+`
196
-
197
- `:t.indent+r+`
198
-
199
- `}function DT(e,t){return!e||e===t?t:`[${e}](${OT(t)})`}function OT(e){return e.replace(/[\\()]/g,`\\$&`)}function kT(e,t){let n=e.querySelector(`summary`);if(!n)return eT(e,t);let r=n.querySelector(`h1, h2, h3, h4, h5, h6`);if(r){let i=rT(r,t);for(let r of Array.from(e.children))r!==n&&(i+=tT(r,t));return i}return eT(n,t)}function AT(e){let t=``;for(let n of Array.from(e.childNodes))if(n.nodeType===3)t+=n.textContent||``;else if(n.nodeType===1){let e=n;switch(e.tagName.toLowerCase()){case`strong`:case`b`:{let{content:n,trailing:r}=jT(AT(e));t+=n?`**${n}**${r}`:r;break}case`em`:case`i`:{let{content:n,trailing:r}=jT(AT(e));t+=n?`*${n}*${r}`:r;break}case`s`:case`del`:t+=`~~${AT(e)}~~`;break;case`code`:{let n=e.textContent||``,r=Math.max(0,...(n.match(/`+/g)??[]).map(e=>e.length)),i="`".repeat(r+1),a=n.startsWith("`")||n.endsWith("`");t+=i+(a?` ${n} `:n)+i;break}case`u`:t+=AT(e);break;case`a`:{let n=e.getAttribute(`href`)||``,r=AT(e);t+=DT(r,n);break}case`br`:t+=`\\
200
- `;break;case`math`:{let n=oT(e).split(`
201
- `).map(e=>e.trim()).join(` `);t+=`$${n}$`;break}case`span`:t+=AT(e);break;case`img`:{let n=e.getAttribute(`src`)||``,r=e.getAttribute(`alt`)||``;t+=`![${r}](${n})`;break}case`video`:{let n=e.getAttribute(`src`)||e.getAttribute(`data-url`)||``,r=e.getAttribute(`data-name`)||e.getAttribute(`title`)||``;t+=`![${r}](${n})`;break}case`p`:t+=AT(e);break;case`input`:break;default:t+=AT(e)}}return t}function jT(e){let t=e.match(/^(.*?)(\s*)$/);return t?{content:t[1],trailing:t[2]}:{content:e,trailing:``}}function MT(e){let t=e.replace(/^(\\\n)+/,``);return t=t.replace(/(\\\n)+$/,``),t}function NT(e){return $w(e.split(``).join(``))}function PT(e,t,n,r){return NT(Cw(t,n).exportBlocks(e,r))}function FT(e){let t=[];return e.descendants(e=>e.type.name===`blockContainer`&&e.firstChild?.type.name===`blockGroup`?!0:e.type.name===`columnList`&&e.childCount===1?(e.firstChild?.forEach(n=>{t.push(sx(n,e))}),!1):!e.type.isInGroup(`bnBlock`)||(t.push(sx(e,e)),!1)),t}var IT=class e extends Me{nodes;constructor(e,t){super(e,t);let n=e.node();this.nodes=[],e.doc.nodesBetween(e.pos,t.pos,(e,t,r)=>{if(r!==null&&r.eq(n))return this.nodes.push(e),!1})}static create(t,n,r=n){return new e(t.resolve(n),t.resolve(r))}content(){return new _e(U.from(this.nodes),0,0)}eq(t){if(!(t instanceof e)||this.nodes.length!==t.nodes.length||this.from!==t.from||this.to!==t.to)return!1;for(let e=0;e<this.nodes.length;e++)if(!this.nodes[e].eq(t.nodes[e]))return!1;return!0}map(t,n){let r=n.mapResult(this.from),i=n.mapResult(this.to);return i.deleted?Me.near(t.resolve(r.pos)):r.deleted?Me.near(t.resolve(i.pos)):new e(t.resolve(r.pos),t.resolve(i.pos))}toJSON(){return{type:`multiple-node`,anchor:this.anchor,head:this.head}}};Me.jsonID(`multiple-node`,IT);var LT;function RT(e,t){let n,r,i=t.resolve(e.from).node().type.spec.group===`blockContent`,a=t.resolve(e.to).node().type.spec.group===`blockContent`,o=Math.min(e.$anchor.depth,e.$head.depth);if(i&&a){let i=e.$from.start(o-1),a=e.$to.end(o-1);n=t.resolve(i-1).pos,r=t.resolve(a+1).pos}else n=e.from,r=e.to;return{from:n,to:r}}function zT(e,t,n=t){t===n&&(n+=e.state.doc.resolve(t+1).node().nodeSize);let r=e.domAtPos(t).node.cloneNode(!0),i=e.domAtPos(t).node,a=(e,t)=>Array.prototype.indexOf.call(e.children,t),o=a(i,e.domAtPos(t+1).node.parentElement),s=a(i,e.domAtPos(n-1).node.parentElement);for(let e=i.childElementCount-1;e>=0;e--)(e>s||e<o)&&r.removeChild(r.children[e]);BT(e.root),LT=r,LT.querySelectorAll(`iframe, embed, object`).forEach(e=>e.parentElement?.removeChild(e));let c=e.dom.className.split(` `).filter(e=>e!==`ProseMirror`&&e!==`bn-root`&&e!==`bn-editor`).join(` `);LT.className=LT.className+` bn-drag-preview `+c,e.root instanceof ShadowRoot?e.root.appendChild(LT):e.root.body.appendChild(LT)}function BT(e){LT!==void 0&&(e instanceof ShadowRoot?e.removeChild(LT):e.body.removeChild(LT),LT=void 0)}function VT(e,t,n){if(!e.dataTransfer||n.headless)return;let r=n.prosemirrorView,i=lS(t.id,r.state.doc);if(!i)throw Error(`Block with ID ${t.id} not found`);let a=i.posBeforeNode;if(a!=null){let t=r.state.selection,i=r.state.doc,{from:o,to:s}=RT(t,i),c=o<=a&&a<s,l=t.$anchor.node()!==t.$head.node()||t instanceof IT;c&&l?(r.dispatch(r.state.tr.setSelection(IT.create(i,o,s))),zT(r,o,s)):(r.dispatch(r.state.tr.setSelection(et.create(r.state.doc,a))),zT(r,a));let u=r.state.selection.content(),d=n.pmSchema,f=r.serializeForClipboard(u).dom.innerHTML,p=Cw(d,n),m=FT(u.content),h=p.exportBlocks(m,{}),g=NT(h);e.dataTransfer.clearData(),e.dataTransfer.setData(`blocknote/html`,f),e.dataTransfer.setData(`text/html`,h),e.dataTransfer.setData(`text/plain`,g),e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setDragImage(LT,0,0)}}var HT=250;function UT(e,t,n=!0){let r=e.root.elementsFromPoint(t.left,t.top);for(let i of r)if(e.dom.contains(i))return n&&i.closest(`[data-node-type=columnList]`)?UT(e,{left:t.left+50,top:t.top},!1):Qw(i,e)}function WT(e,t){if(!t.dom.firstChild)return;let n=t.dom.firstChild.getBoundingClientRect(),r=UT(t,{left:Math.min(Math.max(n.left+10,e.x),n.right-10),top:e.y});if(r)return UT(t,{left:r.node.getBoundingClientRect().right-10,top:e.y},!1)}var GT=class{editor;pmView;state;emitUpdate;mousePos;hoveredBlock;menuFrozen=!1;isDragOrigin=!1;constructor(e,t,n){this.editor=e,this.pmView=t,this.emitUpdate=()=>{if(!this.state)throw Error(`Attempting to update uninitialized side menu`);n(this.state)},this.pmView.root.addEventListener(`dragstart`,this.onDragStart),this.pmView.root.addEventListener(`dragover`,this.onDragOver),this.pmView.root.addEventListener(`drop`,this.onDrop,!0),this.pmView.root.addEventListener(`dragend`,this.onDragEnd,!0),this.pmView.root.addEventListener(`mousemove`,this.onMouseMove,!0),this.pmView.root.addEventListener(`keydown`,this.onKeyDown,!0)}updateState=e=>{this.state=e,this.emitUpdate(this.state)};updateStateFromMousePos=()=>{if(this.menuFrozen||!this.mousePos)return;let e=this.findClosestEditorElement({clientX:this.mousePos.x,clientY:this.mousePos.y});if(e?.element!==this.pmView.dom||e.distance>HT){this.state?.show&&(this.state.show=!1,this.updateState(this.state));return}let t=WT(this.mousePos,this.pmView);if(!t||!this.editor.isEditable)this.state?.show&&(this.state.show=!1,this.updateState(this.state));else if(!(this.state?.show&&this.hoveredBlock?.hasAttribute(`data-id`)&&this.hoveredBlock?.getAttribute(`data-id`)===t.id)&&(this.hoveredBlock=t.node,this.editor.isEditable)){let e=t.node.getBoundingClientRect(),n=t.node.closest(`[data-node-type=column]`),r=this.editor.getBlock(this.hoveredBlock.getAttribute(`data-id`));if(!r){this.state?.show&&(this.state.show=!1,this.hoveredBlock=void 0,this.emitUpdate(this.state));return}this.state={show:!0,referencePos:new DOMRect(n?n.firstElementChild.getBoundingClientRect().x:this.pmView.dom.firstChild.getBoundingClientRect().x,e.y,e.width,e.height),block:r},this.updateState(this.state)}};onDragStart=e=>{let t=e.dataTransfer?.getData(`blocknote/html`);if(!t||this.pmView.dragging)return;let n=document.createElement(`div`);n.innerHTML=t;let r=Ee.fromSchema(this.pmView.state.schema).parse(n,{topNode:this.pmView.state.schema.nodes.blockGroup.create()});this.pmView.dragging={slice:new _e(r.content,0,0),move:!0}};findClosestEditorElement=e=>{let t=Array.from(this.pmView.root.querySelectorAll(`.bn-editor`));if(t.length===0)return null;let n=t[0],r=Number.MAX_VALUE;return t.forEach(t=>{let i=t.querySelector(`.bn-block-group`).getBoundingClientRect(),a=e.clientX<i.left?i.left-e.clientX:e.clientX>i.right?e.clientX-i.right:0,o=e.clientY<i.top?i.top-e.clientY:e.clientY>i.bottom?e.clientY-i.bottom:0,s=Math.sqrt(a**2+o**2);s<r&&(r=s,n=t)}),{element:n,distance:r}};onDragOver=e=>{if(e.synthetic||!(this.pmView.dragging!==null||this.isDragOrigin||e.dataTransfer?.types.includes(`blocknote/html`)||e.target instanceof Node&&this.pmView.dom.contains(e.target)))return;let t=this.getDragEventContext(e);!t||!t.isDropPoint?this.closeDropCursor():t.isDropPoint&&!t.isDropWithinEditorBounds&&this.dispatchSyntheticEvent(e)};closeDropCursor=()=>{let e=new Event(`dragleave`,{bubbles:!1});e.synthetic=!0,this.pmView.dom.dispatchEvent(e)};getDragEventContext=e=>{if(!(this.pmView.dragging!==null||this.isDragOrigin||e.dataTransfer?.types.includes(`blocknote/html`)||e.target instanceof Node&&this.pmView.dom.contains(e.target)))return;let t=!e.dataTransfer?.types.includes(`blocknote/html`)&&!!this.pmView.dragging,n=!!this.isDragOrigin,r=t||n,i=this.findClosestEditorElement(e);if(!i||i.distance>HT)return;let a=i.element===this.pmView.dom,o=a&&i.distance===0;if(a||r)return{isDropPoint:a,isDropWithinEditorBounds:o,isDragOrigin:r}};onDrop=e=>{if(e.synthetic||!(this.pmView.dragging!==null||this.isDragOrigin||e.dataTransfer?.types.includes(`blocknote/html`)||e.target instanceof Node&&this.pmView.dom.contains(e.target)))return;let t=this.getDragEventContext(e);if(!t){this.closeDropCursor();return}let{isDropPoint:n,isDropWithinEditorBounds:r,isDragOrigin:i}=t;if(!r&&n&&this.dispatchSyntheticEvent(e),n){if(this.pmView.dragging)return;this.pmView.dispatch(this.pmView.state.tr.setSelection(H.create(this.pmView.state.tr.doc,this.pmView.state.tr.selection.anchor)))}else i&&setTimeout(()=>this.pmView.dispatch(this.pmView.state.tr.deleteSelection()),0)};onDragEnd=e=>{e.synthetic||(this.pmView.dragging=null)};onKeyDown=e=>{this.state?.show&&this.editor.isFocused()&&(this.state.show=!1,this.emitUpdate(this.state))};onMouseMove=e=>{if(this.menuFrozen||!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY)||e.target instanceof Node&&!this.pmView.dom.contains(e.target)&&this.editor.isWithinEditor(e.target))return;this.mousePos={x:e.clientX,y:e.clientY};let t=this.pmView.dom.getBoundingClientRect();this.mousePos.x>t.left&&this.mousePos.x<t.right&&this.mousePos.y>t.top&&this.mousePos.y<t.bottom&&e&&e.target&&!this.editor.isWithinEditor(e.target)?this.state?.show&&(this.state.show=!1,this.emitUpdate(this.state)):this.updateStateFromMousePos()};dispatchSyntheticEvent(e){let t=new Event(e.type,e),n=this.pmView.dom.firstChild.getBoundingClientRect();t.clientX=e.clientX,t.clientY=e.clientY,t.clientX=Math.min(Math.max(e.clientX,n.left),n.left+n.width),t.clientY=Math.min(Math.max(e.clientY,n.top),n.top+n.height),t.dataTransfer=e.dataTransfer,t.preventDefault=()=>e.preventDefault(),t.synthetic=!0,this.pmView.dom.dispatchEvent(t)}update(e,t){!t.doc.eq(this.pmView.state.doc)&&this.state?.show&&this.updateStateFromMousePos()}destroy(){this.state?.show&&(this.state.show=!1,this.emitUpdate(this.state)),this.pmView.root.removeEventListener(`mousemove`,this.onMouseMove,!0),this.pmView.root.removeEventListener(`dragstart`,this.onDragStart),this.pmView.root.removeEventListener(`dragover`,this.onDragOver),this.pmView.root.removeEventListener(`drop`,this.onDrop,!0),this.pmView.root.removeEventListener(`dragend`,this.onDragEnd,!0),this.pmView.root.removeEventListener(`keydown`,this.onKeyDown,!0)}},KT=new Ae(`SideMenuPlugin`),qT=iv(({editor:e})=>{let t,n=av(void 0);return{key:`sideMenu`,store:n,prosemirrorPlugins:[new ke({key:KT,view:r=>(t=new GT(e,r,e=>{n.setState({...e})}),t)})],blockDragStart(n,r){t&&(t.isDragOrigin=!0),VT(n,r,e)},blockDragEnd(){BT(e.prosemirrorView.root),t&&(t.isDragOrigin=!1),e.blur()},get menuFrozen(){return t.menuFrozen},freezeMenu(){t.menuFrozen=!0,t.state.show=!0,t.emitUpdate(t.state)},unfreezeMenu(){t.menuFrozen=!1,t.state.show=!1,t.emitUpdate(t.state)},hideMenuIfNotFrozen(){!t.menuFrozen&&t.state?.show&&(t.state.show=!1,t.emitUpdate(t.state))}}}),JT=iv(({editor:e})=>{let t=av({popupOpen:void 0,selected:void 0}),n=t=>!!e.schema.blockSpecs[t.type]?.implementation?.meta?.hasPreview,r=e=>({editor:r})=>{let{block:i,prevBlock:a,nextBlock:o}=r.getTextCursorPosition();if(!n(i)||t.state.popupOpen===i.id)return!1;let s=e===`prev`?a:o;return s?(r.setTextCursorPosition(s.id,e===`prev`?`end`:`start`),!0):!1};return{key:`sourceBlockWithPreview`,store:t,keyboardShortcuts:{Enter:({editor:e})=>{let{block:r}=e.getTextCursorPosition();if(!n(r))return!1;if(t.state.popupOpen===r.id&&e.schema.blockSpecs[r.type]?.implementation?.meta?.hardBreakShortcut===`enter`){let t=e.prosemirrorView;return t.dispatch(t.state.tr.insertText(`
202
- `)),!0}return e.setTextCursorPosition(r.id,`end`),t.setState(e=>({...e,popupOpen:t.state.popupOpen===r.id?void 0:r.id})),!0},Escape:({editor:e})=>{let{block:r}=e.getTextCursorPosition();return!n(r)||t.state.popupOpen!==r.id?!1:(e.setTextCursorPosition(r.id,`end`),t.setState(e=>({...e,popupOpen:void 0})),!0)},"Mod-a":({editor:e})=>{let{block:r}=e.getTextCursorPosition();if(!n(r)||t.state.popupOpen!==r.id)return!1;let i=e.prosemirrorView,{$from:a}=i.state.selection;return a.parent.type.name===r.type&&(i.dispatch(i.state.tr.setSelection(H.create(i.state.doc,a.start(),a.end()))),!0)},ArrowUp:r(`prev`),ArrowLeft:r(`prev`),ArrowDown:r(`next`),ArrowRight:r(`next`)},mount:({dom:r,signal:i})=>{let a=e.onSelectionChange(()=>{let{block:r}=e.getTextCursorPosition(),i=n(r)?r.id:void 0,a=t.state.popupOpen&&t.state.popupOpen!==r.id?void 0:t.state.popupOpen;(i!==t.state.selected||a!==t.state.popupOpen)&&t.setState(e=>({...e,selected:i,popupOpen:a}))});i.addEventListener(`abort`,a),r.addEventListener(`keydown`,r=>{if(!e.isEditable)return;let{block:i}=e.getTextCursorPosition();if(n(i)&&t.state.popupOpen!==i.id){if(r.key===`Backspace`||r.key===`Delete`){r.preventDefault(),r.stopImmediatePropagation(),e.removeBlocks([i.id]);return}(r.key.length===1&&!r.ctrlKey&&!r.metaKey||r.key===`Tab`)&&(r.preventDefault(),r.stopImmediatePropagation())}},{capture:!0,signal:i}),r.addEventListener(`blur`,()=>t.setState(e=>({...e,popupOpen:void 0})),{capture:!0,signal:i})}}}),YT=iv(({editor:e})=>{let t=av({selected:void 0}),n=t=>!!e.schema.inlineContentSpecs[t]?.implementation?.meta?.hasPreview,r=e=>({editor:t})=>{let{$from:r}=t.prosemirrorState.selection,i=r.node();if(!n(i.type.name))return!1;let a=t.prosemirrorView,o=Me.near(a.state.doc.resolve(e===`before`?r.before():r.after()),e===`before`?-1:1);return a.dispatch(a.state.tr.setSelection(o)),!0};return{key:`sourceInlineContentWithPreview`,store:t,keyboardShortcuts:{Enter:r(`after`),"Shift-Enter":r(`after`),Escape:r(`after`),ArrowUp:r(`before`),ArrowDown:r(`after`),"Mod-a":({editor:e})=>{let{$from:t}=e.prosemirrorState.selection;if(!n(t.node().type.name))return!1;let r=e.prosemirrorView;return r.dispatch(r.state.tr.setSelection(H.create(r.state.doc,t.start(),t.end()))),!0}},mount:({dom:r,signal:i})=>{let a=e.onSelectionChange(()=>{let{$from:r}=e.prosemirrorState.selection,i=r.node();t.setState({selected:n(i.type.name)?r.before():void 0})});i.addEventListener(`abort`,a),r.addEventListener(`keydown`,t=>{if(t.key!==`ArrowUp`&&t.key!==`ArrowDown`)return;let{$from:i}=e.prosemirrorState.selection;n(i.node().type.name)||(r.classList.add(`bn-suppress-source-popup-caret`),requestAnimationFrame(()=>r.classList.remove(`bn-suppress-source-popup-caret`)))},{capture:!0,signal:i}),r.addEventListener(`blur`,()=>t.setState({selected:void 0}),{capture:!0,signal:i})}}}),XT=Symbol.for(`blocknote.shikiParser`),ZT=Symbol.for(`blocknote.shikiHighlighterPromise`),QT=[`text`,`none`,`plaintext`,`txt`];function $T(e,t,n){let r=globalThis,i,a,o=new Set;return fw({parser:t=>{if(!e.createHighlighter)return[];if(!i)return r[ZT]=r[ZT]||e.createHighlighter(),r[ZT].then(e=>{i=e});let n=t.language;return!n||QT.includes(n)||o.has(n)?[]:i.getLoadedLanguages().includes(n)?(a||(a=r[XT]||hw(i,eE(i)),r[XT]=a),a(t)):i.loadLanguage(n).catch(()=>{o.add(n)})},languageExtractor:e=>{let t={type:e.type.name,props:e.attrs};return(n.blockSpecs[t.type]||n.inlineContentSpecs[t.type])?.implementation?.meta?.highlight?.(t)??void 0},nodeTypes:t})}function eE(e){let t=e.getLoadedThemes(),n=t.find(e=>/light/i.test(e)),r=t.find(e=>/dark/i.test(e));if(n&&r)return{themes:{light:n,dark:r},defaultColor:!1}}function tE(e){let t=Object.values(e.blockSpecs).filter(e=>typeof e?.config==`object`&&e.config.content===`plain`&&!!e.implementation?.meta?.highlight).map(e=>e.config.type),n=Object.values(e.inlineContentSpecs).filter(e=>typeof e?.config==`object`&&e.config.content===`plain`&&!!e.implementation?.meta?.highlight).map(e=>e.config.type);return[...t,...n]}iv(({editor:e,options:t})=>({key:`syntaxHighlighting`,prosemirrorPlugins:[$T(t,tE(e.schema),e.schema)]}));var nE;async function rE(){return nE||(nE=(async()=>{let[e,t]=await Promise.all([Tt(()=>import(`./module-BrWgIX20.js`),[],import.meta.url),Tt(()=>import(`./native-Cqs-2kTC.js`),[],import.meta.url)]),n=`default`in e?e.default:e,r=`default`in t?t.default:t;return await n.init({data:r}),{emojiMart:n,emojiData:r}})(),nE)}async function iE(e,t){if(!(`text`in e.schema.inlineContentSchema)||e.schema.inlineContentSchema.text!==iw.text)return[];let{emojiData:n,emojiMart:r}=await rE();return(t.trim()===``?Object.values(n.emojis):await r.SearchIndex.search(t)).map(t=>({id:t.skins[0].native,onItemClick:()=>e.insertInlineContent(t.skins[0].native+` `)}))}var aE;function oE(e){aE||(aE=document.createElement(`div`),aE.innerHTML=`_`,aE.style.opacity=`0`,aE.style.height=`1px`,aE.style.width=`1px`,e instanceof Document?e.body.appendChild(aE):e.appendChild(aE))}function sE(e){aE&&=(e instanceof Document?e.body.removeChild(aE):e.removeChild(aE),void 0)}function cE(e){return Array.prototype.indexOf.call(e.parentElement.childNodes,e)}function lE(e){let t=e;for(;t&&t.nodeName!==`TD`&&t.nodeName!==`TH`&&!t.classList.contains(`tableWrapper`);){if(t.classList.contains(`ProseMirror`))return;let e=t.parentNode;if(!e||!(e instanceof Element))return;t=e}return t.nodeName===`TD`||t.nodeName===`TH`?{type:`cell`,domNode:t,tbodyNode:t.closest(`tbody`)}:{type:`wrapper`,domNode:t,tbodyNode:t.querySelector(`tbody`)}}function uE(e,t){let n=t.querySelectorAll(e);for(let e=0;e<n.length;e++)n[e].style.visibility=`hidden`}var dE=class{editor;pmView;state;emitUpdate;tableId;tablePos;tableElement;menuFrozen=!1;mouseState=`up`;prevWasEditable=null;constructor(e,t,n){this.editor=e,this.pmView=t,this.emitUpdate=()=>{n(this.state)},t.dom.addEventListener(`mousemove`,this.mouseMoveHandler),t.dom.addEventListener(`mousedown`,this.viewMousedownHandler),window.addEventListener(`mouseup`,this.mouseUpHandler),t.root.addEventListener(`dragover`,this.dragOverHandler),t.root.addEventListener(`drop`,this.dropHandler)}viewMousedownHandler=()=>{this.mouseState=`down`};hideHandles=()=>{this.state?.show&&(this.state.show=!1,this.state.showAddOrRemoveRowsButton=!1,this.state.showAddOrRemoveColumnsButton=!1,this.emitUpdate())};mouseUpHandler=e=>{this.mouseState=`up`,this.mouseMoveHandler(e)};mouseMoveHandler=e=>{if(this.menuFrozen||this.mouseState===`selecting`||!(e.target instanceof Element)||!this.pmView.dom.contains(e.target))return;let t=lE(e.target);if(t?.type===`cell`&&this.mouseState===`down`&&!this.state?.draggingState){this.mouseState=`selecting`,this.hideHandles();return}if(!t||!this.editor.isEditable){this.hideHandles();return}if(!t.tbodyNode)return;let n=t.tbodyNode.getBoundingClientRect(),r=Qw(t.domNode,this.pmView);if(!r)return;let{pmNodeInfo:i,doc:a}=this.editor.transact(e=>({pmNodeInfo:lS(r.id,e.doc),doc:e.doc}));if(!i){this.hideHandles();return}let o=sx(i.node,a);if(!BC(o,this.editor,`table`)){this.hideHandles();return}let s=o;this.tablePos=i.posBeforeNode+1,this.tableElement=r.node,this.tableId=r.id;let c=t.domNode.closest(`.tableWrapper`)?.querySelector(`.table-widgets-container`);if(t?.type===`wrapper`){let t=e.clientY>=n.bottom-1&&e.clientY<n.bottom+20,r=e.clientX>=n.right-1&&e.clientX<n.right+20,i=this.state?.block?.id!==s.id||e.clientX>n.right||e.clientY>n.bottom;this.state={...this.state,show:!0,showAddOrRemoveRowsButton:t,showAddOrRemoveColumnsButton:r,referencePosTable:n,block:s,widgetContainer:c,colIndex:i?void 0:this.state?.colIndex,rowIndex:i?void 0:this.state?.rowIndex,referencePosCell:i?void 0:this.state?.referencePosCell}}else{let e=cE(t.domNode),i=cE(t.domNode.parentElement),a=t.domNode.getBoundingClientRect();if(this.state!==void 0&&this.state.show&&this.tableId===r.id&&this.state.rowIndex===i&&this.state.colIndex===e)return;this.state={show:!0,showAddOrRemoveColumnsButton:e===s.content.rows[0].cells.length-1,showAddOrRemoveRowsButton:i===s.content.rows.length-1,referencePosTable:n,block:s,draggingState:void 0,referencePosCell:a,colIndex:e,rowIndex:i,widgetContainer:c}}return this.emitUpdate(),!1};dragOverHandler=e=>{if(this.state?.draggingState===void 0)return;e.preventDefault(),e.dataTransfer.dropEffect=`move`,uE(`.prosemirror-dropcursor-block, .prosemirror-dropcursor-inline`,this.pmView.root);let t={left:Math.min(Math.max(e.clientX,this.state.referencePosTable.left+1),this.state.referencePosTable.right-1),top:Math.min(Math.max(e.clientY,this.state.referencePosTable.top+1),this.state.referencePosTable.bottom-1)},n=this.pmView.root.elementsFromPoint(t.left,t.top).filter(e=>e.tagName===`TD`||e.tagName===`TH`);if(n.length===0)return;let r=n[0],i=!1,a=cE(r.parentElement),o=cE(r),s=this.state.draggingState.draggedCellOrientation===`row`?this.state.rowIndex:this.state.colIndex,c=(this.state.draggingState.draggedCellOrientation===`row`?a:o)!==s;(this.state.rowIndex!==a||this.state.colIndex!==o)&&(this.state.rowIndex=a,this.state.colIndex=o,this.state.referencePosCell=r.getBoundingClientRect(),i=!0);let l=this.state.draggingState.draggedCellOrientation===`row`?t.top:t.left;this.state.draggingState.mousePos!==l&&(this.state.draggingState.mousePos=l,i=!0),i&&this.emitUpdate(),c&&this.editor.transact(e=>e.setMeta(fE,!0))};dropHandler=e=>{if(this.mouseState=`up`,this.state===void 0||this.state.draggingState===void 0)return!1;if(this.state.rowIndex===void 0||this.state.colIndex===void 0)throw Error(`Attempted to drop table row or column, but no table block was hovered prior.`);e.preventDefault();let{draggingState:t,colIndex:n,rowIndex:r}=this.state;this.state.draggingState=void 0;let i=this.state.block.content.columnWidths;if(t.draggedCellOrientation===`row`){if(!$x(this.state.block,t.originalIndex,r))return!1;let e=Yx(this.state.block,t.originalIndex,r);this.editor.updateBlock(this.state.block,{type:`table`,content:{...this.state.block.content,rows:e}})}else{if(!eS(this.state.block,t.originalIndex,n))return!1;let e=Jx(this.state.block,t.originalIndex,n),[r]=i.splice(t.originalIndex,1);i.splice(n,0,r),this.editor.updateBlock(this.state.block,{type:`table`,content:{...this.state.block.content,columnWidths:i,rows:e}})}return this.editor.setTextCursorPosition(this.state.block.id),!0};getTablePos(e){if(this.tableId===void 0)return;let t=lS(this.tableId,e);return t&&t.posBeforeNode+1}update(){if(!this.state||!this.state.show)return;let e=this.editor.getBlock(this.state.block.id);if(!e||e.type!==`table`||!this.tableElement?.isConnected){this.state=void 0,this.tableId=void 0,this.tablePos=void 0,this.tableElement=void 0,this.emitUpdate();return}this.state.block=e,this.tablePos=this.getTablePos(this.pmView.state.doc);let{height:t,width:n}=Wx(this.state.block);this.state.rowIndex!==void 0&&this.state.colIndex!==void 0&&(this.state.rowIndex>=t&&(this.state.rowIndex=t-1),this.state.colIndex>=n&&(this.state.colIndex=n-1));let r=this.tableElement.querySelector(`tbody`);if(!r)throw Error(`Table block does not contain a 'tbody' HTML element. This should never happen.`);if(this.state.rowIndex!==void 0&&this.state.colIndex!==void 0){let e=r.children[this.state.rowIndex].children[this.state.colIndex];e?this.state.referencePosCell=e.getBoundingClientRect():(this.state.rowIndex=void 0,this.state.colIndex=void 0)}this.state.referencePosTable=r.getBoundingClientRect(),this.emitUpdate()}destroy(){this.pmView.dom.removeEventListener(`mousemove`,this.mouseMoveHandler),window.removeEventListener(`mouseup`,this.mouseUpHandler),this.pmView.dom.removeEventListener(`mousedown`,this.viewMousedownHandler),this.pmView.root.removeEventListener(`dragover`,this.dragOverHandler),this.pmView.root.removeEventListener(`drop`,this.dropHandler)}},fE=new Ae(`TableHandlesPlugin`),pE=iv(({editor:e})=>{let t,n=av(void 0);return{key:`tableHandles`,store:n,prosemirrorPlugins:[new ke({key:fE,view:r=>(t=new dE(e,r,e=>{n.setState(e?.block?{...e,draggingState:e.draggingState?{...e.draggingState}:void 0}:void 0)}),t),props:{decorations:e=>{if(t===void 0||t.state===void 0||t.state.draggingState===void 0)return;let n=t.getTablePos(e.doc);if(n===void 0)return;let r=t.state.draggingState.draggedCellOrientation===`row`?t.state.rowIndex:t.state.colIndex;if(r===void 0)return;let i=[],{block:a,draggingState:o}=t.state,{originalIndex:s,draggedCellOrientation:c}=o;if(r===s||!a||c===`row`&&!$x(a,s,r)||c===`col`&&!eS(a,s,r))return Ke.create(e.doc,i);let l=e.doc.resolve(n+1);return t.state.draggingState.draggedCellOrientation===`row`?Kx(t.state.block,r).forEach(({row:t,col:n})=>{let a=e.doc.resolve(l.posAtIndex(t)+1),o=e.doc.resolve(a.posAtIndex(n)+1),c=o.node(),u=o.pos+(r>s?c.nodeSize-2:0);i.push(ft.widget(u,()=>{let e=document.createElement(`div`);return e.className=`bn-table-drop-cursor`,e.style.left=`0`,e.style.right=`0`,r>s?e.style.bottom=`-2px`:e.style.top=`-3px`,e.style.height=`4px`,e}))}):qx(t.state.block,r).forEach(({row:t,col:n})=>{let a=e.doc.resolve(l.posAtIndex(t)+1),o=e.doc.resolve(a.posAtIndex(n)+1),c=o.node(),u=o.pos+(r>s?c.nodeSize-2:0);i.push(ft.widget(u,()=>{let e=document.createElement(`div`);return e.className=`bn-table-drop-cursor`,e.style.top=`0`,e.style.bottom=`0`,r>s?e.style.right=`-2px`:e.style.left=`-3px`,e.style.width=`4px`,e}))}),Ke.create(e.doc,i)}}})],colDragStart(n){if(t===void 0||t.state===void 0||t.state.colIndex===void 0)throw Error(`Attempted to drag table column, but no table block was hovered prior.`);t.state.draggingState={draggedCellOrientation:`col`,originalIndex:t.state.colIndex,mousePos:n.clientX},t.emitUpdate(),e.transact(e=>e.setMeta(fE,{draggedCellOrientation:t.state.draggingState.draggedCellOrientation,originalIndex:t.state.colIndex,newIndex:t.state.colIndex,tablePos:t.tablePos})),!e.headless&&(oE(e.prosemirrorView.root),n.dataTransfer.setDragImage(aE,0,0),n.dataTransfer.effectAllowed=`move`)},rowDragStart(n){if(t.state===void 0||t.state.rowIndex===void 0)throw Error(`Attempted to drag table row, but no table block was hovered prior.`);t.state.draggingState={draggedCellOrientation:`row`,originalIndex:t.state.rowIndex,mousePos:n.clientY},t.emitUpdate(),e.transact(e=>e.setMeta(fE,{draggedCellOrientation:t.state.draggingState.draggedCellOrientation,originalIndex:t.state.rowIndex,newIndex:t.state.rowIndex,tablePos:t.tablePos})),!e.headless&&(oE(e.prosemirrorView.root),n.dataTransfer.setDragImage(aE,0,0),n.dataTransfer.effectAllowed=`copyMove`)},dragEnd(){if(t.state===void 0)throw Error(`Attempted to drag table row, but no table block was hovered prior.`);t.state.draggingState=void 0,t.emitUpdate(),e.transact(e=>e.setMeta(fE,null)),!e.headless&&sE(e.prosemirrorView.root)},freezeHandles(){t.menuFrozen=!0},unfreezeHandles(){t.menuFrozen=!1},hideHandlesIfNotFrozen(){t.menuFrozen||t.hideHandles()},getCellsAtRowHandle(e,t){return Kx(e,t)},getCellsAtColumnHandle(e,t){return qx(e,t)},setCellSelection(e,n,r=n){if(!t)throw Error(`Table handles view not initialized`);let i=t.getTablePos(e.doc);if(i===void 0)throw Error(`Attempted to select table cells, but the hovered table is no longer in the document.`);let a=e.doc.resolve(i+1),o=e.doc.resolve(a.posAtIndex(n.row)+1),s=e.doc.resolve(o.posAtIndex(n.col)),c=e.doc.resolve(a.posAtIndex(r.row)+1),l=e.doc.resolve(c.posAtIndex(r.col)),u=e.tr;return u.setSelection(new jv(s,l)),e.apply(u)},addRowOrColumn(t,n){e.exec((e,r)=>{let i=this.setCellSelection(e,n.orientation===`row`?{row:t,col:0}:{row:0,col:t});return n.orientation===`row`?n.side===`above`?Yv(i,r):Xv(i,r):n.side===`left`?Uv(i,r):Wv(i,r)})},removeRowOrColumn(t,n){return n===`row`?e.exec((e,n)=>Qv(this.setCellSelection(e,{row:t,col:0}),n)):e.exec((e,n)=>Kv(this.setCellSelection(e,{row:0,col:t}),n))},mergeCells(t){return e.exec((e,n)=>ty(t?this.setCellSelection(e,t.relativeStartCell,t.relativeEndCell):e,n))},splitCell(t){return e.exec((e,n)=>ny(t?this.setCellSelection(e,t):e,n))},getCellSelection(){return e.transact(e=>{let t=e.selection,n=t.$from,r=t.$to;if(VC(t)){let{ranges:e}=t;e.forEach(e=>{n=e.$from.min(n??e.$from),r=e.$to.max(r??e.$to)})}else{let i=t.$from.pos-t.$from.parentOffset-1,a=t.$to.pos-t.$to.parentOffset-1;if(i<0||a<0||(n=e.doc.resolve(i),r=e.doc.resolve(a),!HC(n.parent)||!HC(r.parent)))return}let i=e.doc.resolve(n.pos-n.parentOffset-1),a=e.doc.resolve(r.pos-r.parentOffset-1),o=e.doc.resolve(i.pos-i.parentOffset-1),s=n.index(i.depth),c=i.index(o.depth),l=r.index(a.depth),u=a.index(o.depth),d=[];for(let e=c;e<=u;e++)for(let t=s;t<=l;t++)d.push({row:e,col:t});return{from:{row:c,col:s},to:{row:u,col:l},cells:d}})},getMergeDirection(t){return e.transact(e=>{let n=VC(e.selection)?e.selection:void 0;if(!n||!t||n.ranges.length<=1)return;let r=this.getCellSelection();if(r)return tS(r.from,r.to,t)?`vertical`:`horizontal`})},cropEmptyRowsOrColumns(e,t){return Zx(e,t)},addRowsOrColumns(e,t,n){return Qx(e,t,n)}}}),mE=new Ae(`trailingNode`);function hE(e){let t=e.lastChild,n=t?.firstChild;return t?.type.name!==`blockContainer`||n?.type.name!==`paragraph`||n.content.size!==0}function gE(e){if(!e.type.schema.nodes.column){let t=e.lastChild;return t&&hE(t)?[e.content.size-1]:[]}let t=[];return e.descendants((e,n,r)=>!e.isTextblock&&((e.type.name===`column`||e.type.name===`blockGroup`&&r?.type.name===`doc`)&&hE(e)&&t.push(n+e.nodeSize-1),!0)),t}var _E=iv(({editor:e})=>{function t(t){return ft.widget(t,()=>{let t=document.createElement(`div`);return t.className=`bn-trailing-block`,t.contentEditable=`false`,t.addEventListener(`mousedown`,n=>{n.preventDefault();let r=e.prosemirrorView;if(!r)return;let i=r.state.doc.resolve(r.posAtDOM(t,0)).parent.lastChild?.attrs.id;i&&(e.transact(t=>{let[n]=e.insertBlocks([{type:`paragraph`}],i,`after`);e.setTextCursorPosition(n,`start`),t.scrollIntoView()}),r.focus())}),t},{side:1})}function n(e,n,r){let i=n.map(e.mapping,e.doc),a=new Set(r?gE(e.doc):[]),o=new Set,s=[];for(let e of i.find())a.has(e.from)&&!o.has(e.from)?o.add(e.from):s.push(e);let c=[...a].filter(e=>!o.has(e)),l=i;return s.length>0&&(l=l.remove(s)),c.length>0&&(l=l.add(e.doc,c.map(t))),l}return{key:`trailingNode`,prosemirrorPlugins:[new ke({key:mE,state:{init:(t,r)=>n(r.tr,Ke.empty,e.isEditable),apply:(t,r)=>!t.docChanged&&!t.getMeta(mE)?r:n(t,r,e.isEditable)},view(e){let t=e.editable;return{update(e){e.editable!==t&&(t=e.editable,e.dispatch(e.state.tr.setMeta(mE,!0)))}}},props:{decorations:e=>mE.getState(e),handleKeyDown:(t,n)=>{if(n.key!==`ArrowRight`&&n.key!==`ArrowDown`)return!1;let{selection:r}=t.state;if(!r.empty)return!1;let i=Me.atEnd(t.state.doc);if(r.$head.pos!==i.$head.pos)return!1;let a=t.state.doc.lastChild;return!e.isEditable||!a||!hE(a)?!1:(n.preventDefault(),!0)}}})]}}),vE=Symbol(`bn-current-version`);function yE(e){return[...e].sort((e,t)=>t.createdAt-e.createdAt)}function bE(e){let t=typeof e==`object`?e.id:e;throw Error(`Snapshot not found: ${String(t)}`)}iv(({options:e,editor:t})=>{let{endpoints:n,preview:r,getCurrentDocument:i,serializeCurrentContent:a,resolveUsers:o}=typeof e==`function`?e(t):e,s=typeof n==`function`?n(t):n,c=lw(o),l=av({snapshots:[],previewedSnapshotId:void 0,compareToSnapshotId:void 0}),u=e=>{let t=typeof e==`object`?e.id:e;return l.state.snapshots.find(e=>e.id===t)},d=async()=>{let e=yE(await s.list());return l.setState(t=>({...t,snapshots:e})),e},f=async(e,t)=>{let n=u(e);n||bE(e);let i=t?.compareTo?u(t.compareTo):void 0;l.setState(e=>({...e,previewedSnapshotId:n.id,compareToSnapshotId:i?.id}));let a,o;i&&(a=await s.getContent(i),s.getAttributions&&(o=await s.getAttributions(n,i)));let c=await s.getContent(n);r.enterPreview(c,a,o,{snapshot:n,compareTo:i})},p=async e=>{if(!a)throw Error("previewCurrentVersion requires `serializeCurrentContent` to be provided to the VersioningExtension options.");let t=e?.compareTo?u(e.compareTo):void 0;l.setState(e=>({...e,previewedSnapshotId:vE,compareToSnapshotId:t?.id}));let n={id:vE,createdAt:Date.now(),updatedAt:Date.now()},i,o;t&&(i=await s.getContent(t),s.getAttributions&&(o=await s.getAttributions(n,t)));let c=await a();r.enterPreview(c,i,o,{snapshot:n,compareTo:t})},m=()=>{l.setState(e=>({...e,previewedSnapshotId:void 0,compareToSnapshotId:void 0})),r.exitPreview()};return{key:`versioning`,store:l,userStore:c,list:async()=>await d(),get canCompare(){return r.supportsComparison!==!1},canCreate:s.create!==void 0,create:s.create?async e=>{let t=await s.create(i(),{name:e?.name,restoredFromSnapshot:u(e?.restoredFromSnapshot)});l.setState(e=>({...e,snapshots:yE([...e.snapshots,t])}));let n=await s.list();return l.setState(e=>({...e,snapshots:yE(n.some(e=>e.id===t.id)?n:[...n,t])})),t}:void 0,canRestore:s.restore!==void 0,restore:s.restore?async e=>{m();let t=u(e);t||bE(e);let n=await s.restore(i(),t);return r.applyRestore(n),await d(),n}:void 0,canRename:s.rename!==void 0,rename:s.rename?async(e,t)=>{let n=u(e);n||bE(e),await s.rename(n,t),l.setState(n=>({...n,snapshots:n.snapshots.map(n=>n.id===e?{...n,name:t,updatedAt:Date.now()}:n)}))}:void 0,canRemove:s.remove!==void 0,remove:s.remove?async e=>{let t=u(e);t||bE(e),(l.state.previewedSnapshotId===t.id||l.state.compareToSnapshotId===t.id)&&m(),await s.remove(t),l.setState(e=>({...e,snapshots:e.snapshots.filter(e=>e.id!==t.id)})),await d()}:void 0,previewSnapshot:f,canPreviewCurrent:a!==void 0,previewCurrentVersion:a?p:void 0,exitPreview:m}});var xE=class{match;handler;undoable;inCode;inCodeMark;constructor(e,t,n={}){this.match=e,this.match=e,this.handler=typeof t==`string`?SE(t):t,this.undoable=n.undoable!==!1,this.inCode=n.inCode||!1,this.inCodeMark=n.inCodeMark!==!1}};function SE(e){return function(t,n,r,i){let a=e;if(n[1]){let e=n[0].lastIndexOf(n[1]);a+=n[0].slice(e+n[1].length),r+=e;let t=r-i;t>0&&(a=n[0].slice(e-t,e)+a,r=i)}return t.tr.insertText(a,r,i)}}var CE=500;function wE({rules:e}){let t=new ke({state:{init(){return null},apply(e,t){return e.getMeta(this)||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput(n,r,i,a){return TE(n,r,i,a,e,t)},handleDOMEvents:{compositionend:n=>{setTimeout(()=>{let{$cursor:r}=n.state.selection;r&&TE(n,r.pos,r.pos,``,e,t)})}}},isInputRules:!0});return t}function TE(e,t,n,r,i,a){if(e.composing)return!1;let o=e.state.tr.insertText(r,t,n),s=o.mapping.map(t),c=o.mapping.map(n),l=null,u=o.doc.resolve(s),d=u.parent.textBetween(Math.max(0,u.parentOffset-CE),u.parentOffset,null,``);for(let t=0;t<i.length;t++){let n=i[t];if(!n.inCodeMark&&u.marks().some(e=>e.type.spec.code))continue;if(u.parent.type.spec.code){if(!n.inCode)continue}else if(n.inCode===`only`)continue;let f=n.match.exec(d);if(!f||f[0].length<r.length)continue;l??=e.state.apply(o);let p=n.handler(l,f,s-f[0].length,c);if(p)return e.dispatch(o),e.dispatch(W(e.state.tr)),n.undoable&&p.setMeta(a,{transform:p,from:s,to:c,text:r}),e.dispatch(p),!0}return!1}new xE(/--$/,`—`,{inCodeMark:!1}),new xE(/\.\.\.$/,`…`,{inCodeMark:!1}),new xE(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,`“`,{inCodeMark:!1}),new xE(/"$/,`”`,{inCodeMark:!1}),new xE(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,`‘`,{inCodeMark:!1}),new xE(/'$/,`’`,{inCodeMark:!1});var EE=q_.create({name:`text`,group:`inline`,parseMarkdown:e=>({type:`text`,text:e.text||``}),renderMarkdown:e=>e.text||``}),DE=class e extends Me{constructor(e){super(e,e)}map(t,n){let r=t.resolve(n.map(this.head));return e.valid(r)?new e(r):Me.near(r)}content(){return _e.empty}eq(t){return t instanceof e&&t.head==this.head}toJSON(){return{type:`gapcursor`,pos:this.head}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for GapCursor.fromJSON`);return new e(t.resolve(n.pos))}getBookmark(){return new OE(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!AE(e)||!jE(e))return!1;let n=t.type.spec.allowGapCursor;if(n!=null)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,n,r=!1){search:for(;;){if(!r&&e.valid(t))return t;let i=t.pos,a=null;for(let r=t.depth;;r--){let o=t.node(r);if(n>0?t.indexAfter(r)<o.childCount:t.index(r)>0){a=o.child(n>0?t.indexAfter(r):t.index(r)-1);break}if(r==0)return null;i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}for(;;){let o=n>0?a.firstChild:a.lastChild;if(!o){if(a.isAtom&&!a.isText&&!et.isSelectable(a)){t=t.doc.resolve(i+a.nodeSize*n),r=!1;continue search}break}a=o,i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}return null}}};DE.prototype.visible=!1,DE.findFrom=DE.findGapCursorFrom,Me.jsonID(`gapcursor`,DE);var OE=class e{constructor(e){this.pos=e}map(t){return new e(t.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return DE.valid(t)?new DE(t):Me.near(t)}};function kE(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function AE(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0}else for(let e=r.child(n-1);;e=e.lastChild){if(e.childCount==0&&!e.inlineContent||kE(e.type))return!0;if(e.inlineContent)return!1}}return!0}function jE(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0}else for(let e=r.child(n);;e=e.firstChild){if(e.childCount==0&&!e.inlineContent||kE(e.type))return!0;if(e.inlineContent)return!1}}return!0}function ME(){return new ke({props:{decorations:LE,createSelectionBetween(e,t,n){return t.pos==n.pos&&DE.valid(n)?new DE(n):null},handleClick:FE,handleKeyDown:NE,handleDOMEvents:{beforeinput:IE}}})}var NE=Ue({ArrowLeft:PE(`horiz`,-1),ArrowRight:PE(`horiz`,1),ArrowUp:PE(`vert`,-1),ArrowDown:PE(`vert`,1)});function PE(e,t){let n=e==`vert`?t>0?`down`:`up`:t>0?`right`:`left`;return function(e,r,i){let a=e.selection,o=t>0?a.$to:a.$from,s=a.empty;if(a instanceof H){if(!i.endOfTextblock(n)||o.depth==0)return!1;s=!1,o=e.doc.resolve(t>0?o.after():o.before())}let c=DE.findGapCursorFrom(o,t,s);return c?(r&&r(e.tr.setSelection(new DE(c))),!0):!1}}function FE(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!DE.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&et.isSelectable(e.state.doc.nodeAt(i.inside))?!1:(e.dispatch(e.state.tr.setSelection(new DE(r))),!0)}function IE(e,t){if(t.inputType!=`insertCompositionText`||!(e.state.selection instanceof DE))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=U.empty;for(let e=r.length-1;e>=0;e--)i=U.from(r[e].createAndFill(null,i));let a=e.state.tr.replace(n.pos,n.pos,new _e(i,0,0));return a.setSelection(H.near(a.doc.resolve(n.pos+1))),e.dispatch(a),!1}function LE(e){if(!(e.selection instanceof DE))return null;let t=document.createElement(`div`);return t.className=`ProseMirror-gapcursor`,Ke.create(e.doc,[ft.widget(e.selection.head,t,{key:`gapcursor`})])}var RE=O_.create({name:`gapCursor`,addProseMirrorPlugins(){return[ME()]},extendNodeSchema(e){return{allowGapCursor:mh(X(e,`allowGapCursor`,{name:e.name,options:e.options,storage:e.storage}))??null}}});function zE(e,t,n,r=`before`){let i=typeof n==`string`?n:n.id,a=Xb(e),o=t.map(e=>{let t=cS(e,a);return t.check(),t}),s=lS(i,e.doc);if(!s)throw Error(`Block with ID ${i} not found`);let c=s.posBeforeNode;return r===`after`&&(c+=s.node.nodeSize),e.step(new ye(c,c,new _e(U.from(o),0,0))),o.map(t=>sx(t,e.doc))}function BE(e){if(!e||e.type.name!==`column`)throw Error(`Invalid columnPos: does not point to column node.`);let t=e.firstChild;if(!t)throw Error(`Invalid column: does not have child node.`);let n=t.firstChild;if(!n)throw Error(`Invalid blockContainer: does not have child node.`);return e.childCount===1&&t.childCount===1&&n.type.name===`paragraph`&&n.content.content.length===0}function VE(e,t){let n=e.doc.resolve(t),r=n.nodeAfter;if(!r||r.type.name!==`columnList`)throw Error(`Invalid columnListPos: does not point to columnList node.`);for(let t=r.childCount-1;t>=0;t--){let r=e.doc.resolve(n.pos+1).posAtIndex(t),i=e.doc.resolve(r).nodeAfter;if(!i||i.type.name!==`column`)throw Error(`Invalid columnPos: does not point to column node.`);BE(i)&&e.delete(r,r+i.nodeSize)}}function HE(e,t){VE(e,t);let n=e.doc.resolve(t).nodeAfter;if(!n||n.type.name!==`columnList`)throw Error(`Invalid columnListPos: does not point to columnList node.`);if(n.childCount>2)return;if(n.childCount<2)throw Error(`Invalid columnList: contains fewer than two children.`);let r=t+1,i=e.doc.resolve(r).nodeAfter,a=t+n.nodeSize-1,o=e.doc.resolve(a).nodeBefore;if(!i||!o)throw Error(`Invalid columnList: does not contain children.`);let s=BE(i),c=BE(o);s&&c?e.delete(t,t+n.nodeSize):s?e.step(new vt(t,t+n.nodeSize,a-o.nodeSize+1,a-1,_e.empty,0,!1)):c&&e.step(new vt(t,t+n.nodeSize,r+1,r+i.nodeSize-1,_e.empty,0,!1))}function UE(e,t,n,r={}){let i=Xb(e),a=n.map(e=>{let t=cS(e,i);return t.check(),t}),o=new Set(t.map(e=>typeof e==`string`?e:e.id)),s=[],c=new Set,l=typeof t[0]==`string`?t[0]:t[0].id,u=0;if(e.doc.descendants((t,r)=>{if(o.size===0)return!1;if(!t.type.isInGroup(`bnBlock`))return!0;let i=vb(t,e.doc);if(!o.has(i))return!0;if(s.push(sx(t,e.doc)),o.delete(i),n.length>0&&i===l){let t=e.doc.nodeSize;e.insert(r,a);let n=e.doc.nodeSize;u+=t-n}let d=e.doc.nodeSize,f=e.doc.resolve(r-u);f.node().type.name===`column`?c.add(f.before(-1)):f.node().type.name===`columnList`&&c.add(f.before()),f.node().type.name===`blockGroup`&&f.node(f.depth-1).type.name!==`doc`&&f.node().childCount===1?e.delete(f.before(),f.after()):e.delete(r-u,r-u+t.nodeSize);let p=e.doc.nodeSize;return u+=d-p,!1}),o.size>0){let e=[...o].join(`
203
- `);throw Error(`Blocks with the following IDs could not be found in the editor: `+e)}return r.fixColumns!==!1&&c.forEach(t=>HE(e,t)),{insertedBlocks:a.map(t=>sx(t,e.doc)),removedBlocks:s}}function WE(e,t,n,r,i){let a;if(!t)throw Error(`blockContent is required`);if(typeof t==`string`)a=aS([t],e.pmSchema,r);else if(Array.isArray(t))a=aS(t,e.pmSchema,r);else if(t.type===`tableContent`)a=oS(t,e.pmSchema);else throw new Lb(t.type);let o=(i?.document??document).createDocumentFragment();for(let t of a)if(t.type.name!==`text`&&e.schema.inlineContentSchema[t.type.name]){let r=e.schema.inlineContentSpecs[t.type.name].implementation;if(r){let a=ox(t,e.schema.inlineContentSchema,e.schema.styleSchema),s=r.render.call({renderType:`dom`,props:void 0},a,()=>{},e);if(s){if(o.appendChild(s.dom),s.contentDOM){let e=n.serializeFragment(t.content,i);s.contentDOM.dataset.editable=``,s.contentDOM.appendChild(e)}continue}}}else if(t.type.name===`text`){let n=document.createTextNode(t.textContent);for(let r of t.marks.toReversed())if(r.type.name in e.schema.styleSpecs){let t=e.schema.styleSpecs[r.type.name].implementation.render(r.attrs.stringValue,e);t.contentDOM.appendChild(n),n=t.dom}else{let e=r.type.spec.toDOM(r,!0),t=Be.renderSpec(document,e);t.contentDOM.appendChild(n),n=t.dom}o.appendChild(n)}else{let e=n.serializeFragment(U.from([t]),i);o.appendChild(e)}return o}function GE(e,t,n,r){let i=e.pmSchema.nodes.blockContainer,a=t.props||{};for(let[n,r]of Object.entries(e.schema.blockSchema[t.type].propSchema))!(n in a)&&r.default!==void 0&&(a[n]=r.default);let o=t.children||[],s=e.blockImplementations[t.type].implementation.render.call({renderType:`dom`,props:void 0},{...t,props:a,children:o},e);if(s.contentDOM&&t.content){let i=WE(e,t.content,n,t.type,r);s.contentDOM.appendChild(i)}if(e.pmSchema.nodes[t.type].isInGroup(`bnBlock`)){if(t.children&&t.children.length>0){let i=KE(e,t.children,n,r);s.contentDOM?.append(i)}return s.dom}let c=i.spec?.toDOM?.(i.create({id:t.id,...a}));return c.contentDOM?.appendChild(s.dom),t.children&&t.children.length>0&&c.contentDOM?.appendChild(qE(e,t.children,n,r)),c.dom}function KE(e,t,n,r){let i=(r?.document??document).createDocumentFragment();for(let a of t){let t=GE(e,a,n,r);i.appendChild(t)}return i}var qE=(e,t,n,r)=>{let i=e.pmSchema.nodes.blockGroup,a=i.spec.toDOM(i.create({})),o=KE(e,t,n,r);return a.contentDOM?.appendChild(o),a.dom},JE=e=>(e.querySelectorAll(`[data-content-type="numberedListItem"]`).forEach(e=>{let t=e.closest(`.bn-block-outer`)?.previousElementSibling?.querySelector(`[data-content-type="numberedListItem"]`);if(!t)e.setAttribute(`data-index`,e.getAttribute(`data-start`)||`1`);else{let n=t.getAttribute(`data-index`);e.setAttribute(`data-index`,(parseInt(n||`0`)+1).toString())}}),e),YE=e=>(e.querySelectorAll(`[data-content-type="checkListItem"] input`).forEach(e=>{e.disabled=!0}),e),XE=e=>(e.querySelectorAll(`.bn-toggle-wrapper[data-show-children="false"]`).forEach(e=>{e.setAttribute(`data-show-children`,`true`)}),e),ZE=e=>(e.querySelectorAll(`[data-content-type="table"] table`).forEach(e=>{e.setAttribute(`style`,`--default-cell-min-width: 120px;`),e.setAttribute(`data-show-children`,`true`)}),e),QE=e=>(e.querySelectorAll(`[data-content-type="table"] table`).forEach(e=>{let t=document.createElement(`div`);t.className=`tableWrapper`;let n=document.createElement(`div`);n.className=`tableWrapper-inner`,t.appendChild(n),e.parentElement?.appendChild(t),t.appendChild(e)}),e),$E=e=>(e.querySelectorAll(`.bn-inline-content:empty`).forEach(e=>{let t=document.createElement(`span`);t.className=`ProseMirror-trailingBreak`,t.setAttribute(`style`,`display: inline-block;`),e.appendChild(t)}),e),eD=(e,t)=>{let n=Be.fromSchema(e),r=[JE,YE,XE,ZE,QE,$E];return{serializeBlocks:(e,i)=>{let a=qE(t,e,n,i);for(let e of r)a=e(a);return a.outerHTML}}},tD=class{callbacks={};on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),()=>this.off(e,t)}emit(e,...t){let n=this.callbacks[e];n&&n.forEach(e=>e.apply(this,t))}off(e,t){let n=this.callbacks[e];n&&(t?this.callbacks[e]=n.filter(e=>e!==t):delete this.callbacks[e])}removeAllListeners(){this.callbacks={}}};function nD(e){return e.transact(e=>{let t=wb(e,e.selection.anchor),n=vb(t.bnBlock.node,e.doc);if(e.selection instanceof jv)return{type:`cell`,anchorBlockId:n,anchorCellOffset:e.selection.$anchorCell.pos-t.bnBlock.beforePos,headCellOffset:e.selection.$headCell.pos-t.bnBlock.beforePos};if(e.selection instanceof et)return{type:`node`,anchorBlockId:n};{let r=wb(e,e.selection.head);return{type:`text`,anchorBlockId:n,headBlockId:vb(r.bnBlock.node,e.doc),anchorOffset:e.selection.anchor-t.bnBlock.beforePos,headOffset:e.selection.head-r.bnBlock.beforePos}}})}function rD(e,t){let n=lS(t.anchorBlockId,e.doc)?.posBeforeNode;if(n===void 0)throw Error(`Could not find block with ID ${t.anchorBlockId} to update selection`);let r;if(t.type===`cell`)r=jv.create(e.doc,n+t.anchorCellOffset,n+t.headCellOffset);else if(t.type===`node`)r=et.create(e.doc,n+1);else{let i=lS(t.headBlockId,e.doc)?.posBeforeNode;if(i===void 0)throw Error(`Could not find block with ID ${t.headBlockId} to update selection`);r=H.create(e.doc,n+t.anchorOffset,i+t.headOffset)}e.setSelection(r)}function iD(e){return e.flatMap(e=>e.type===`column`?e.children:[e])}function aD(e,t,n,r){e.transact(e=>{UE(e,t,[],{fixColumns:!1}),zE(e,iD(t),n,r)})}function oD(e,t,n){e.transact(r=>{let i=e.getSelection()?.blocks||[e.getTextCursorPosition().block],a=nD(e);aD(e,i,t,n),rD(r,a)})}function sD(e){return!e||e.type!==`columnList`}function cD(e,t,n){let r,i;if(t?t.children.length>0?(r=t.children[t.children.length-1],i=`after`):(r=t,i=`before`):n&&(r=n,i=`before`),!r||!i)return;let a=e.getParentBlock(r);return sD(a)?{referenceBlock:r,placement:i}:cD(e,i===`after`?r:e.getPrevBlock(r),a)}function lD(e,t,n){let r,i;if(t?t.children.length>0?(r=t.children[0],i=`before`):(r=t,i=`after`):n&&(r=n,i=`after`),!r||!i)return;let a=e.getParentBlock(r);return sD(a)?{referenceBlock:r,placement:i}:lD(e,i===`before`?r:e.getNextBlock(r),a)}function uD(e,t){e.transact(()=>{let n;if(t){if(n=e.getBlock(t),!n)return}else n=e.getSelection()?.blocks[0]||e.getTextCursorPosition().block;let r=cD(e,e.getPrevBlock(n),e.getParentBlock(n));r&&(t?aD(e,[n],r.referenceBlock,r.placement):oD(e,r.referenceBlock,r.placement))})}function dD(e,t){e.transact(()=>{let n;if(t){if(n=e.getBlock(t),!n)return}else{let t=e.getSelection();n=t?.blocks[t?.blocks.length-1]||e.getTextCursorPosition().block}let r=lD(e,e.getNextBlock(n),e.getParentBlock(n));r&&(t?aD(e,[n],r.referenceBlock,r.placement):oD(e,r.referenceBlock,r.placement))})}function fD(e,t,n){let{$from:r,$to:i}=e.selection,a=r.blockRange(i,e=>e.childCount>0&&(e.type.name===`blockGroup`||e.type.name===`column`));if(!a)return!1;let o=a.startIndex;if(o===0)return!1;let s=a.parent.child(o-1);if(s.type!==t)return!1;let c=s.lastChild&&s.lastChild.type===n,l=U.from(c?t.create():null),u=new _e(U.from(t.create(null,U.from(n.create(null,l)))),c?3:1,0),d=a.start,f=a.end;return e.step(new vt(d-(c?3:1),f,d,f,u,1,!0)).scrollIntoView(),!0}function pD(e){return e.transact(t=>fD(t,e.pmSchema.nodes.blockContainer,e.pmSchema.nodes.blockGroup))}function mD(e,t,n,r){let i=r.end,a=r.$to.end(r.depth);if(i<a){let o=r.parent.child(r.endIndex-1),s=o.lastChild&&o.lastChild.type===n;e.step(new vt(i-(s?2:1),a,i,a,new _e(U.from(t.create(null,n.create())),s?2:1,0),+!s,!0)),r=new Ve(e.doc.resolve(r.$from.pos),e.doc.resolve(a),r.depth)}let o=lt(r);if(o==null)return!1;e.lift(r,o);let s=e.doc.resolve(e.mapping.map(i,-1)-1);return Te(e.doc,s.pos)&&s.nodeBefore.type===s.nodeAfter.type&&e.join(s.pos),e.scrollIntoView(),!0}function hD(e,t,n){let{$from:r,$to:i}=e.selection,a=r.blockRange(i,e=>e.childCount>0&&(e.type.name===`blockGroup`||e.type.name===`column`));return a?r.node(a.depth-1).type===t&&mD(e,t,n,a):!1}function gD(e){return e.transact(t=>hD(t,e.pmSchema.nodes.blockContainer,e.pmSchema.nodes.blockGroup))}function _D(e){return e.transact(e=>{let{bnBlock:t}=Cb(e);return e.doc.resolve(t.beforePos).nodeBefore!==null})}function vD(e){return e.transact(e=>{let{bnBlock:t}=Cb(e);return e.doc.resolve(t.beforePos).depth>1})}function yD(e,t){let n=lS(typeof t==`string`?t:t.id,e);if(n)return sx(n.node,e)}function bD(e,t){let n=lS(typeof t==`string`?t:t.id,e);if(!n)return;let r=e.resolve(n.posBeforeNode).nodeBefore;if(r)return sx(r,e)}function xD(e,t){let n=lS(typeof t==`string`?t:t.id,e);if(!n)return;let r=e.resolve(n.posBeforeNode+n.node.nodeSize).nodeAfter;if(r)return sx(r,e)}function SD(e,t){let n=lS(typeof t==`string`?t:t.id,e);if(!n)return;let r=e.resolve(n.posBeforeNode),i=r.node(),a=r.node(-1),o=a.type.name===`doc`?void 0:i.type.name===`blockGroup`?a:i;if(o)return sx(o,e)}var CD=class{editor;constructor(e){this.editor=e}get document(){return this.editor.transact(e=>cx(e.doc))}getBlock(e){return this.editor.transact(t=>yD(t.doc,e))}getPrevBlock(e){return this.editor.transact(t=>bD(t.doc,e))}getNextBlock(e){return this.editor.transact(t=>xD(t.doc,e))}getParentBlock(e){return this.editor.transact(t=>SD(t.doc,e))}forEachBlock(e,t=!1){let n=this.document.slice();t&&n.reverse();function r(n){for(let i of n)if(e(i)===!1||!r(t?i.children.slice().reverse():i.children))return!1;return!0}r(n)}insertBlocks(e,t,n=`before`){return this.editor.transact(r=>zE(r,e,t,n))}updateBlock(e,t){return this.editor.transact(n=>vS(n,e,t))}removeBlocks(e){return this.editor.transact(t=>UE(t,e,[]).removedBlocks)}replaceBlocks(e,t){return this.editor.transact(n=>UE(n,e,t))}canNestBlock(){return _D(this.editor)}nestBlock(){pD(this.editor)}canUnnestBlock(){return vD(this.editor)}unnestBlock(){gD(this.editor)}moveBlocksUp(e){return uD(this.editor,e)}moveBlocksDown(e){return dD(this.editor,e)}},wD=class extends tD{editor;constructor(e){super(),this.editor=e,e.on(`create`,()=>{e._tiptapEditor.on(`update`,({transaction:t,appendedTransactions:n})=>{this.emit(`onChange`,{editor:e,transaction:t,appendedTransactions:n})}),e._tiptapEditor.on(`selectionUpdate`,({transaction:t})=>{this.emit(`onSelectionChange`,{editor:e,transaction:t})}),e._tiptapEditor.on(`focus`,({event:t})=>{this.emit(`onFocusChange`,{editor:e,focused:!0,event:t})}),e._tiptapEditor.on(`blur`,({event:t})=>{this.emit(`onFocusChange`,{editor:e,focused:!1,event:t})}),e._tiptapEditor.on(`mount`,()=>{this.emit(`onMount`,{editor:e})}),e._tiptapEditor.on(`unmount`,()=>{this.emit(`onUnmount`,{editor:e})});let t;this.onMount(()=>{t=this.attachUIFocusTracker()}),this.onUnmount(()=>{t&&t()})})}attachUIFocusTracker(){if(typeof document>`u`)return()=>{};let e=this.editor.isFocused({includeEditorUI:!0}),t,n=t=>{let n=this.editor.isFocused({includeEditorUI:!0});n!==e&&(e=n,this.emit(`onFocusChangeWithinUI`,{editor:this.editor,focused:n,event:t}))},r=e=>n(e),i=e=>{clearTimeout(t),t=setTimeout(()=>n(e))};return document.addEventListener(`focusin`,r,!0),document.addEventListener(`focusout`,i,!0),()=>{clearTimeout(t),document.removeEventListener(`focusin`,r,!0),document.removeEventListener(`focusout`,i,!0)}}onChange(e,t=!0){return this.on(`onChange`,({transaction:n,appendedTransactions:r})=>{!t&&TD(n)||e(this.editor,{getChanges(){return kw(n,r)}})})}onSelectionChange(e,t=!1){return this.on(`onSelectionChange`,({transaction:n})=>{!t&&TD(n)||e(this.editor)})}onFocusChange(e,t){return this.on(t?.includeEditorUI?`onFocusChangeWithinUI`:`onFocusChange`,({focused:t,event:n})=>e(this.editor,{focused:t,event:n}))}onMount(e){return this.on(`onMount`,e)}onUnmount(e){return this.on(`onUnmount`,e)}};function TD(e){return!!e.getMeta(`y-sync$`)}function ED(e){return Array.prototype.indexOf.call(e.parentElement.childNodes,e)}function DD(e){return e.nodeType===3&&!/\S/.test(e.nodeValue||``)}function OD(e){e.querySelectorAll(`li > ul, li > ol`).forEach(e=>{let t=ED(e),n=e.parentElement,r=Array.from(n.childNodes).slice(t+1);e.remove(),r.forEach(e=>{e.remove()}),n.insertAdjacentElement(`afterend`,e),r.reverse().forEach(t=>{if(DD(t))return;let n=document.createElement(`li`);n.append(t),e.insertAdjacentElement(`afterend`,n)}),n.childNodes.length===0&&n.remove()})}function kD(e){e.querySelectorAll(`li + ul, li + ol`).forEach(e=>{let t=e.previousElementSibling,n=document.createElement(`div`);t.insertAdjacentElement(`afterend`,n),n.append(t);let r=document.createElement(`div`);for(r.setAttribute(`data-node-type`,`blockGroup`),n.append(r);n.nextElementSibling?.nodeName===`UL`||n.nextElementSibling?.nodeName===`OL`;)r.append(n.nextElementSibling)})}var AD=null;function jD(){return AD||=document.implementation.createHTMLDocument(`title`)}function MD(e){if(typeof e==`string`){let t=jD().createElement(`div`);t.innerHTML=e,e=t}return OD(e),kD(e),e}function ND(e){let t=e.ownerDocument.createTreeWalker(e,128),n;for(;n=t.nextNode();)if(/^\s*notionvc:/.test(n.nodeValue||``))return!0;return!1}function PD(e){let t=new Set([`PRE`,`CODE`]),n=e.ownerDocument.createTreeWalker(e,4,{acceptNode(n){let r=n.parentElement;for(;r&&r!==e;){if(t.has(r.tagName))return 2;r=r.parentElement}return 1}}),r=[],i;for(;i=n.nextNode();)r.push(i);for(let e of r)e.nodeValue&&/[\r\n]/.test(e.nodeValue)&&(e.nodeValue=e.nodeValue.replace(/[ \t\r\n\f]+/g,` `))}function FD(e){ND(e)||PD(e)}function ID(e){let t=[];for(let n of e)if(n.type===`text`){let e=n.text.split(``).join(``);e.length>0&&t.push({...n,text:e})}else Array.isArray(n.content)?t.push({...n,content:ID(n.content)}):t.push(n);return t}function LD(e){for(let t of e)Array.isArray(t.content)&&(t.content=ID(t.content)),t.children.length>0&&LD(t.children)}function RD(e,t){let n=MD(e);FD(n);let r=Ee.fromSchema(t).parse(n,{topNode:t.nodes.blockGroup.create()}),i=[];for(let e=0;e<r.childCount;e++)i.push(sx(r.child(e),r));return LD(i),i}function zD(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`)}function BD(e){return e?/\w/.test(e):!1}function VD(e,t,n){let r=t>0?e[t-1]:void 0,i=t+n<e.length?e[t+n]:void 0;return BD(r)&&BD(i)}function HD(e,t){if(e[t]!==`\\`||t+1>=e.length)return null;let n=e[t+1];return n===`
204
- `?{html:`<br>
205
- `,end:t+2}:"\\`*_{}[]()#+-.!~|>".includes(n)?{html:zD(n),end:t+2}:null}function UD(e,t){return e[t]==="`"?oO(e,t):null}function WD(e,t){return e[t]!==`!`||e[t+1]!==`[`?null:sO(e,t)}function GD(e,t){return e[t]===`[`?cO(e,t):null}function KD(e,t){return e[t]!==`~`||e[t+1]!==`~`?null:fO(e,t,`~~`,`<del>`,`</del>`)}function qD(e,t){return e[t]===`*`&&e[t+1]===`*`&&e[t+2]===`*`||e[t]===`_`&&e[t+1]===`_`&&e[t+2]===`_`&&!VD(e,t,3)?fO(e,t,e.substring(t,t+3),`<strong><em>`,`</em></strong>`):null}function JD(e,t){return e[t]===`*`&&e[t+1]===`*`||e[t]===`_`&&e[t+1]===`_`&&!VD(e,t,2)?fO(e,t,e.substring(t,t+2),`<strong>`,`</strong>`):null}function YD(e,t){return e[t]===`*`||e[t]===`_`&&!VD(e,t,1)?fO(e,t,e[t],`<em>`,`</em>`):null}function XD(e,t){return e[t]===`
206
- `?{html:`<br>
207
- `,end:t+1}:null}var ZD=/^<\/?[a-zA-Z][a-zA-Z0-9-]*(?:\s+[a-zA-Z_:][a-zA-Z0-9_.:-]*(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)*\s*\/?>/,QD=/^<!--[\s\S]*?-->/,$D=/^<!\[CDATA\[[\s\S]*?\]\]>/,eO=/^<\?[\s\S]*?\?>/,tO=/^<![A-Za-z][\s\S]*?>/;function nO(e,t){if(e[t]!==`<`)return null;let n=e.substring(t);for(let e of[QD,$D,eO,tO,ZD]){let r=n.match(e);if(r)return{html:r[0],end:t+r[0].length}}return null}var rO=new Set(`\\\`![~*_
208
- <`),iO=[HD,UD,WD,GD,KD,qD,JD,YD,nO,XD];function aO(e){let t=``,n=0;for(;n<e.length;){if(e[n]===`
209
- `&&n>=2&&e[n-1]===` `&&e[n-2]===` `){t=t.replace(/ +$/,``),t+=`<br>
210
- `,n++;continue}let r=!1;if(rO.has(e[n]))for(let i of iO){let a=i(e,n);if(a){t+=a.html,n=a.end,r=!0;break}}if(!r){let r=n;for(n++;n<e.length&&!rO.has(e[n]);)n++;t+=zD(e.substring(r,n))}}return t}function oO(e,t){let n=0,r=t;for(;r<e.length&&e[r]==="`";)n++,r++;let i=r;for(;i<e.length;)if(e[i]==="`"){let t=0,a=i;for(;i<e.length&&e[i]==="`";)t++,i++;if(t===n){let t=e.substring(r,a);return t=t.replace(/\n/g,` `),t.length>=2&&t[0]===` `&&t[t.length-1]===` `&&/[^ ]/.test(t)&&(t=t.substring(1,t.length-1)),{html:`<code>${zD(t)}</code>`,end:i}}}else i++;return null}function sO(e,t){let n=lO(e,t+1);if(n===-1)return null;let r=t+2;if(e[n+1]!==`(`)return null;let i=n+2,a=uO(e,i-1);if(a===-1)return null;let o=e.substring(r,n),{url:s,title:c}=dO(e.substring(i,a));if(fx(s)){let e=o||c;return{html:`<video src="${zD(s)}"${e?` data-name="${zD(e)}"`:``} data-url="${zD(s)}" controls></video>`,end:a+1}}let l=c===void 0?``:` title="${zD(c)}"`;return{html:`<img src="${zD(s)}" alt="${zD(o)}"${l}>`,end:a+1}}function cO(e,t){let n=t+1,r=lO(e,t);if(r===-1||e[r+1]!==`(`)return null;let i=r+2,a=uO(e,r+1);if(a===-1)return null;let o=e.substring(n,r),{url:s,title:c}=dO(e.substring(i,a)),l=c===void 0?``:` title="${zD(c)}"`;return{html:`<a href="${zD(s)}"${l}>${aO(o)}</a>`,end:a+1}}function lO(e,t){let n=0;for(let r=t;r<e.length;r++)if(e[r]===`\\`&&r+1<e.length)r++;else if(e[r]===`[`&&n++,e[r]===`]`&&(n--,n===0))return r;return-1}function uO(e,t){let n=0;for(let r=t;r<e.length;r++)if(e[r]===`\\`&&r+1<e.length)r++;else if(e[r]===`(`&&n++,e[r]===`)`&&(n--,n===0))return r;return-1}function dO(e){e=e.trim();let t,n;if(e.startsWith(`<`)){let r=e.indexOf(`>`);r===-1?(t=e.substring(1),n=``):(t=e.substring(1,r),n=e.substring(r+1).trim())}else{let r=e.length;for(let t=0;t<e.length;t++)if(e[t]===`\\`&&t+1<e.length)t++;else if(e[t]===` `||e[t]===` `||e[t]===`
211
- `){r=t;break}t=e.substring(0,r),n=e.substring(r).trim()}let r;if(n.length>0){let e=n.match(/^"([^"]*)"$|^'([^']*)'$|^\(([^)]*)\)$/);e&&(r=e[1]??e[2]??e[3])}return{url:t,title:r}}function fO(e,t,n,r,i){let a=n.length,o=t+a;if(o>=e.length||e[o]===` `||e[o]===` `)return null;let s=o;for(;s<e.length;)if(e[s]===`\\`&&s+1<e.length)s+=2;else{if(e.substring(s,s+a)===n){if(e[s-1]===` `||e[s-1]===` `||a===1&&(s>0&&e[s-1]===n[0]&&!(s>=2&&e[s-2]===`\\`)||s+a<e.length&&e[s+a]===n[0])){s++;continue}let t=e.substring(o,s);if(t.length===0){s++;continue}return{html:r+aO(t)+i,end:s+a}}s++}return null}var pO=new Set(`address.article.aside.audio.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.section.source.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`));function mO(e){if(/^ {0,3}<(!--|\?|![A-Za-z]|!\[CDATA\[)/.test(e))return!0;let t=e.match(/^ {0,3}<\/?([a-zA-Z][a-zA-Z0-9-]*)(?:\s|\/?>|$)/);return t?pO.has(t[1].toLowerCase()):!1}function hO(e){let t=e.split(`
212
- `),n=[],r=0,i=!0;for(;r<t.length;){let e=t[r];if(e.trim()===``){i=!0,r++;continue}let a=e.match(/^ {0,3}(`{3,}|~{3,})(.*)$/);if(a){let e=a[1],o=e[0],s=e.length,c=a[2].trim(),l=[];for(r++;r<t.length;){if(t[r].match(RegExp(`^ {0,3}${o}{${s},}\\s*$`))){r++;break}l.push(t[r]),r++}n.push({type:`codeBlock`,language:c||``,code:l.join(`
213
- `)}),i=!1;continue}let o=e.match(/^(#{1,6})\s+(.+?)(?:\s+#+\s*|\s*)$/);if(o){n.push({type:`heading`,level:o[1].length,content:o[2]}),i=!1,r++;continue}if(/^(\s{0,3})([-*_])\s*(\2\s*){2,}$/.test(e)){let t=n[n.length-1];if(!i&&e.trim().match(/^-+$/)&&t&&t.type===`paragraph`){let e=t;n[n.length-1]={type:`heading`,level:2,content:e.content},i=!1,r++;continue}n.push({type:`hr`}),i=!1,r++;continue}if(r+1<t.length){let a=t[r+1];if(/^={1,}\s*$/.test(a)&&e.trim().length>0){n.push({type:`heading`,level:1,content:e.trim()}),i=!1,r+=2;continue}}let s=gO(t,r);if(s){n.push(s.token),r=s.nextLine,i=!1;continue}if(/^\s{0,3}>/.test(e)){let e=[];for(;r<t.length&&/^\s{0,3}>/.test(t[r]);)e.push(t[r].replace(/^\s{0,3}>\s?/,``)),r++;for(;r<t.length;){let n=t[r];if(n.trim()===``||/^\s{0,3}>/.test(n)||/^(#{1,6})\s/.test(n)||/^(`{3,}|~{3,})/.test(n)||/^(\s{0,3})([-*_])\s*(\2\s*){2,}$/.test(n)||/^\s*([-*+]|\d+[.)])\s+/.test(n)||/^\s*\|(.+\|)+\s*$/.test(n))break;e.push(n),r++}n.push({type:`blockquote`,content:e.join(`
214
- `)}),i=!1;continue}let c=e.match(/^(\s*)([-*+]|\d+[.)])(\s+)(\[[ xX]\] )?(.*)$/);if(c){let e=c[1].length,a=c[2],o=c[3],s=c[4],l=c[5],u,d,f;s?(u=`task`,f=s.trim()!==`[ ]`):/^\d+[.)]$/.test(a)?(u=`ordered`,d=parseInt(a,10)):u=`bullet`;let p=e+a.length+o.length+(s?s.length:0),m=e+1,h=e=>{if(e.trim()===``)return!0;let t=e.match(/^\s*/)[0].length;return!!(t>=p||t>=m&&e.match(/^\s*([-*+]|\d+[.)])\s+/))};r++;let g=[];for(;r<t.length;){let e=t[r];if(e.trim()===``){let e=r+1;for(;e<t.length&&t[e].trim()===``;)e++;if(e<t.length&&h(t[e])){g.push(``),r++;continue}break}if(!h(e))break;e.match(/^\s*/)[0].length>=p?g.push(e.substring(p)):g.push(e.substring(m)),r++}let _=g.join(`
215
- `).replace(/^\n+|\n+$/g,``);n.push({type:`listItem`,listType:u,indent:e,content:l.trim(),start:d,checked:f,childContent:_||void 0}),i=!1;continue}if(mO(e)){let e=[];for(;r<t.length&&t[r].trim()!==``;)e.push(t[r]),r++;n.push({type:`rawHtml`,content:e.join(`
216
- `)}),i=!1;continue}let l=[e];for(r++;r<t.length;){let e=t[r];if(e.trim()===``||/^(#{1,6})\s/.test(e)||/^(`{3,}|~{3,})/.test(e)||/^\s{0,3}>/.test(e)||/^(\s{0,3})([-*_])\s*(\2\s*){2,}$/.test(e)||/^\s*([-*+]|\d+[.)])\s+/.test(e)||/^\s*\|(.+\|)+\s*$/.test(e)||mO(e)||r+1<t.length&&/^[=-]+\s*$/.test(t[r+1])&&e.trim().length>0)break;l.push(e),r++}n.push({type:`paragraph`,content:l.map(e=>e.replace(/^ {1,3}/,``)).join(`
217
- `).replace(/[ \t]+$/,``)}),i=!1}return n}function gO(e,t){if(t+1>=e.length)return null;let n=e[t],r=e[t+1];if(!r.includes(`|`)||!/^\s*\|?\s*:?-+:?\s*(\|\s*:?-+:?\s*)*\|?\s*$/.test(r)||!n.includes(`|`))return null;let i=_O(n),a=vO(r),o=[],s=t+2;for(;s<e.length;){let t=e[s];if(!t.includes(`|`))break;o.push(_O(t)),s++}return{token:{type:`table`,headers:i,rows:o,alignments:a},nextLine:s}}function _O(e){let t=e.trim(),n=t.startsWith(`|`)?t.substring(1):t,r=n.endsWith(`|`)?n.substring(0,n.length-1):n,i=[],a=``;for(let e=0;e<r.length;e++)r[e]===`\\`&&e+1<r.length&&r[e+1]===`|`?(a+=`|`,e++):r[e]===`|`?(i.push(a.trim()),a=``):a+=r[e];return i.push(a.trim()),i}function vO(e){return _O(e).map(e=>{let t=e.trim(),n=t.startsWith(`:`),r=t.endsWith(`:`);return n&&r?`center`:r?`right`:n?`left`:null})}function yO(e){let t=``,n=0;for(;n<e.length;){let r=e[n];switch(r.type){case`heading`:{let e=r;t+=`<h${e.level}>${aO(e.content)}</h${e.level}>`,n++;break}case`paragraph`:t+=`<p>${aO(r.content)}</p>`,n++;break;case`codeBlock`:{let e=r,i=e.language?` data-language="${zD(e.language)}"`:``;t+=`<pre><code${i}>${zD(e.code)}</code></pre>`,n++;break}case`blockquote`:{let e=yO(hO(r.content));t+=`<blockquote>${e}</blockquote>`,n++;break}case`hr`:t+=`<hr>`,n++;break;case`listItem`:{let r=bO(e,n);t+=r.html,n=r.nextIndex;break}case`table`:t+=SO(r),n++;break;case`rawHtml`:t+=r.content,n++;break;default:n++}}return t}function bO(e,t){let n=``,r=t,i=null;for(;r<e.length&&e[r].type===`listItem`;){let t=e[r],a=xO(t.listType);if(i!==null&&i!==a&&(n+=`</${i===`ordered`?`ol`:`ul`}>`,i=null),i===null){if(a===`ordered`){let e=t.start!==void 0&&t.start!==1?` start="${t.start}"`:``;n+=`<ol${e}>`}else n+=`<ul>`;i=a}if(t.listType===`task`){let e=t.checked?` checked`:``;n+=`<li><input type="checkbox" disabled${e}><p>${aO(t.content)}</p>`}else n+=`<li><p>${aO(t.content)}</p>`;if(t.childContent){let e=hO(t.childContent);n+=yO(e)}n+=`</li>`,r++}return i!==null&&(n+=`</${i===`ordered`?`ol`:`ul`}>`),{html:n,nextIndex:r}}function xO(e){return e===`ordered`?`ordered`:`bullet`}function SO(e){let t=`<table>`,n=e.headers.every(e=>e.trim()===``),r=e.headers.length;if(!n){t+=`<thead><tr>`;for(let n=0;n<r;n++){let r=e.alignments[n],i=r?` align="${r}"`:``;t+=`<th${i}>${aO(e.headers[n])}</th>`}t+=`</tr></thead>`}if(e.rows.length>0){t+=`<tbody>`;for(let n of e.rows){t+=`<tr>`;for(let i=0;i<r;i++){let r=i<n.length?n[i]:``,a=e.alignments[i],o=a?` align="${a}"`:``;t+=`<td${o}>${aO(r)}</td>`}t+=`</tr>`}t+=`</tbody>`}return t+=`</table>`,t}function CO(e){return yO(hO(e))}function wO(e){return CO(e)}function TO(e,t){return RD(wO(e),t)}var EO=class{editor;constructor(e){this.editor=e}blocksToHTMLLossy(e=this.editor.document){return Cw(this.editor.pmSchema,this.editor).exportBlocks(e,{})}blocksToFullHTML(e=this.editor.document){return eD(this.editor.pmSchema,this.editor).serializeBlocks(e,{})}tryParseHTMLToBlocks(e){return RD(e,this.editor.pmSchema)}blocksToMarkdownLossy(e=this.editor.document){return PT(e,this.editor.pmSchema,this.editor,{})}tryParseMarkdownToBlocks(e){return TO(e,this.editor.pmSchema)}pasteHTML(e,t=!1){let n=e;if(!t){let t=this.tryParseHTMLToBlocks(e);n=this.blocksToFullHTML(t)}n&&this.editor.prosemirrorView?.pasteHTML(n)}pasteText(e){return this.editor.prosemirrorView?.pasteText(e)}pasteMarkdown(e){let t=wO(e);return this.pasteHTML(t)}};function DO(e){let{bnBlock:t}=Cb(e),n=e.doc.resolve(t.beforePos),r=n.nodeBefore,i=e.doc.resolve(t.afterPos).nodeAfter,a;return n.depth>1&&(a=n.node(),a.type.isInGroup(`bnBlock`)||(a=n.node(n.depth-1))),{block:sx(t.node,e.doc),prevBlock:r===null?void 0:sx(r,e.doc),nextBlock:i===null?void 0:sx(i,e.doc),parentBlock:a===void 0?void 0:sx(a,e.doc)}}function OO(e,t,n=`start`){let r=typeof t==`string`?t:t.id,i=Qb(Xb(e.doc)),a=lS(r,e.doc);if(!a)throw Error(`Block with ID ${r} not found`);let o=xb(a),s=i.blockSchema[o.blockNoteType].content;if(o.isBlockContainer){let t=o.blockContent;if(s===`none`){e.setSelection(et.create(e.doc,t.beforePos));return}if(s===`inline`||s===`plain`)n===`start`?e.setSelection(H.create(e.doc,t.beforePos+1)):e.setSelection(H.create(e.doc,t.afterPos-1));else if(s===`table`)n===`start`?e.setSelection(H.create(e.doc,t.beforePos+4)):e.setSelection(H.create(e.doc,t.afterPos-4));else throw new Lb(s)}else OO(e,vb(n===`start`?o.childContainer.node.firstChild:o.childContainer.node.lastChild,e.doc),n)}var kO=[`vscode-editor-data`,`blocknote/html`,`text/markdown`,`text/html`,`text/plain`,`Files`];function AO(e,t){if(!e.startsWith(`.`)||!t.startsWith(`.`))throw Error(`The strings provided are not valid file extensions.`);return e===t}function jO(e,t){let n=e.split(`/`),r=t.split(`/`);if(n.length!==2)throw Error(`The string ${e} is not a valid MIME type.`);if(r.length!==2)throw Error(`The string ${t} is not a valid MIME type.`);return n[1]===`*`||r[1]===`*`?n[0]===r[0]:(n[0]===`*`||r[0]===`*`||n[0]===r[0])&&n[1]===r[1]}function MO(e,t,n,r=`after`){let i;return i=Array.isArray(t.content)&&t.content.length===0?e.updateBlock(t,n).id:e.insertBlocks([n],t,r)[0].id,i}async function NO(e,t){if(!t.uploadFile){console.warn(`Attempted ot insert file, but uploadFile is not set in the BlockNote editor options`);return}let n=`dataTransfer`in e?e.dataTransfer:e.clipboardData;if(n===null)return;let r=null;for(let e of kO)if(n.types.includes(e)){r=e;break}if(r!==`Files`)return;let i=n.items;if(i){e.preventDefault();for(let n=0;n<i.length;n++){let r=`file`;for(let e of Object.values(t.schema.blockSpecs))for(let t of e.implementation.meta?.fileBlockAccept||[]){let a=t.startsWith(`.`),o=i[n].getAsFile();if(o&&(!a&&o.type&&jO(i[n].type,t)||a&&AO(`.`+o.name.split(`.`).pop(),t))){r=e.config.type;break}}let a=i[n].getAsFile();if(a){let n={type:r,props:{name:a.name}},i;if(e.type===`paste`){let e=t.getTextCursorPosition().block;i=MO(t,e,n)}else if(e.type===`drop`){let r={left:e.clientX,top:e.clientY},a=t.prosemirrorView.posAtCoords(r);if(!a)return;i=t.transact(e=>{let i=vb(wb(e,a.pos).bnBlock.node,e.doc),o=(t.domElement?.querySelector(`[data-id="${i}"]`))?.getBoundingClientRect(),s=t.getBlock(i);if(s)return MO(t,s,n,o&&(o.top+o.bottom)/2>r.top?`before`:`after`)})}else return;if(!i)return;let o=await t.uploadFile(a,i),s=typeof o==`string`?{props:{url:o}}:{...o};t.updateBlock(i,s)}}}}var PO=e=>O_.create({name:`dropFile`,addProseMirrorPlugins(){return[new ke({props:{handleDOMEvents:{drop(t,n){if(!e.isEditable)return;let r=null;for(let e of kO)if(n.dataTransfer.types.includes(e)){r=e;break}return r===null||r===`Files`&&(NO(n,e),!0)}}}})]}}),FO=/(^|\n) {0,3}#{1,6} {1,8}[^\n]{1,64}\r?\n\r?\n\s{0,32}\S/,IO=/(_|__|\*|\*\*|~~|==|\+\+)(?!\s)(?:[^\s](?:.{0,62}[^\s])?|\S)(?=\1)/,LO=/\[[^\]]{1,128}\]\(https?:\/\/\S{1,999}\)/,RO=/(?:\s|^)`(?!\s)(?:[^\s`](?:[^`]{0,46}[^\s`])?|[^\s`])`([^\w]|$)/,zO=/(?:^|\n)\s{0,5}-\s{1}[^\n]+\n\s{0,15}-\s/,BO=/(?:^|\n)\s{0,5}\d+\.\s{1}[^\n]+\n\s{0,15}\d+\.\s/,VO=/\n{2} {0,3}-{2,48}\n{2}/,HO=/(?:\n|^)(```|~~~|\$\$)(?!`|~)[^\s]{0,64} {0,64}[^\n]{0,64}\n[\s\S]{0,9999}?\s*\1 {0,64}(?:\n+|$)/,UO=/(?:\n|^)(?!\s)\w[^\n]{0,64}\r?\n(-|=)\1{0,64}\n\n\s{0,64}(\w|$)/,WO=/(?:^|(\r?\n\r?\n))( {0,3}>[^\n]{1,333}\n){1,999}($|(\r?\n))/,GO=/^\s*\|(.+\|)+\s*$/m,KO=/^\s*\|(\s*[-:]+[-:]\s*\|)+\s*$/m,qO=/^\s*\|(.+\|)+\s*$/m,JO=e=>FO.test(e)||IO.test(e)||LO.test(e)||RO.test(e)||zO.test(e)||BO.test(e)||VO.test(e)||HO.test(e)||UO.test(e)||WO.test(e)||GO.test(e)||KO.test(e)||qO.test(e);function YO(e,t){let{schema:n}=t.state;if(!e.clipboardData)return!1;let r=e.clipboardData.getData(`text/plain`);if(!r||!n.nodes.codeBlock)return!1;let i=e.clipboardData.getData(`vscode-editor-data`),a=(i?JSON.parse(i):void 0)?.mode;return a?(t.pasteHTML(`<pre><code class="language-${a}">${r.replace(/\r\n?/g,`
218
- `)}</code></pre>`),!0):!1}function XO({event:e,editor:t,prioritizeMarkdownOverHTML:n,plainTextAsMarkdown:r}){if(t.transact(e=>e.selection.$from.parent.type.spec.code&&e.selection.$to.parent.type.spec.code)){let n=e.clipboardData?.getData(`text/plain`);if(n)return t.pasteText(n),!0}let i;for(let t of kO)if(e.clipboardData.types.includes(t)){i=t;break}if(!i)return!0;if(i===`vscode-editor-data`){if(YO(e,t.prosemirrorView))return!0;i=`text/plain`}if(i===`Files`)return NO(e,t),!0;let a=e.clipboardData.getData(i);if(i===`blocknote/html`)return t.pasteHTML(a,!0),!0;if(i===`text/markdown`)return t.pasteMarkdown(a),!0;if(n){let n=e.clipboardData.getData(`text/plain`);if(JO(n))return t.pasteMarkdown(n),!0}return i===`text/html`?(t.pasteHTML(a),!0):r?(t.pasteMarkdown(a),!0):(t.pasteText(a),!0)}var ZO=(e,t)=>O_.create({name:`pasteFromClipboard`,addProseMirrorPlugins(){return[new ke({props:{handleDOMEvents:{paste(n,r){if(r.preventDefault(),e.isEditable)return t({event:r,editor:e,defaultPasteHandler:({prioritizeMarkdownOverHTML:t=!0,plainTextAsMarkdown:n=!0}={})=>XO({event:r,editor:e,prioritizeMarkdownOverHTML:t,plainTextAsMarkdown:n})})}}}})]}});function QO(e,t,n){let r=!1,i=e.state.selection instanceof jv;if(!i){let n=e.state.doc.slice(e.state.selection.from,e.state.selection.to,!1).content,i=[];for(let e=0;e<n.childCount;e++)i.push(n.child(e));r=i.find(e=>e.type.isInGroup(`bnBlock`)||e.type.name===`blockGroup`||e.type.spec.group===`blockContent`)===void 0,r&&(t=n)}let a,o=Cw(e.state.schema,n);if(i){t.firstChild?.type.name===`table`&&(t=t.firstChild.content);let e=ix(t,n.schema.inlineContentSchema,n.schema.styleSchema);a=`<table>${o.exportInlineContent(e,{})}</table>`}else if(r){let e=ax(t,n.schema.inlineContentSchema,n.schema.styleSchema);a=o.exportInlineContent(e,{})}else{let e=FT(t);a=o.exportBlocks(e,{})}return a}function $O(e,t){`node`in e.state.selection&&e.state.selection.node.type.spec.group===`blockContent`&&t.transact(t=>t.setSelection(new et(t.doc.resolve(e.state.selection.from-1))));let n=e.serializeForClipboard(e.state.selection.content()).dom.innerHTML,r=e.state.selection.content().content,i=QO(e,r,t),{$from:a,$to:o}=e.state.selection,s=a.parent.type.name,c=t.blockImplementations[s];return{clipboardHTML:n,externalHTML:i,markdown:a.sameParent(o)&&c?.implementation.meta?.code===!0?e.state.doc.textBetween(a.pos,o.pos):NT(i)}}var ek=e=>{if(e.state.selection.empty)return!0;let t=window.getSelection();if(t&&!t.isCollapsed){let e=t.focusNode;for(;e;){if(e instanceof HTMLElement&&e.getAttribute(`contenteditable`)===`false`)return!0;e=e.parentElement}}return!1},tk=(e,t,n)=>{n.preventDefault(),n.clipboardData.clearData();let{clipboardHTML:r,externalHTML:i,markdown:a}=$O(t,e);n.clipboardData.setData(`blocknote/html`,r),n.clipboardData.setData(`text/html`,i),n.clipboardData.setData(`text/plain`,a)},nk=e=>O_.create({name:`copyToClipboard`,addProseMirrorPlugins(){return[new ke({props:{handleDOMEvents:{copy(t,n){return ek(t)||tk(e,t,n),!0},cut(t,n){return ek(t)||(tk(e,t,n),t.editable&&t.dispatch(t.state.tr.deleteSelection())),!0},dragstart(t,n){if(!(`node`in t.state.selection)||t.state.selection.node.type.spec.group!==`blockContent`)return;e.transact(e=>e.setSelection(new et(e.doc.resolve(t.state.selection.from-1)))),n.preventDefault(),n.dataTransfer.clearData();let{clipboardHTML:r,externalHTML:i,markdown:a}=$O(t,e);return n.dataTransfer.setData(`blocknote/html`,r),n.dataTransfer.setData(`text/html`,i),n.dataTransfer.setData(`text/plain`,a),!0}}}})]}}),rk=O_.create({name:`blockBackgroundColor`,addGlobalAttributes(){return[{types:[`tableCell`,`tableHeader`],attributes:{backgroundColor:TS()}}]}}),ik=q_.create({name:`hardBreak`,inline:!0,group:`inline`,selectable:!1,linebreakReplacement:!0,priority:10,parseHTML(){return[{tag:`br`}]},renderHTML({HTMLAttributes:e}){return[`br`,vh(this.options.HTMLAttributes,e)]},renderText(){return`
219
- `}}),ak=(e,t)=>{let n=e.resolve(t),r=n.depth-1;if(r<1)return;let i=n.before(r),a=e.resolve(i).nodeAfter;if(a)return a.type.spec.group?.includes(`bnBlock`)?Sb(e.resolve(i)):ak(e,i)},ok=(e,t)=>{let n=e.resolve(t),r=n.index();if(r===0)return;let i=n.posAtIndex(r-1);return Sb(e.resolve(i))},sk=(e,t)=>{let n=e.resolve(t),r=n.index();if(r===n.node().childCount-1)return;let i=n.posAtIndex(r+1);return Sb(e.resolve(i))},ck=(e,t)=>{for(;t.childContainer;){let n=t.childContainer.node,r=e.resolve(t.childContainer.beforePos+1).posAtIndex(n.childCount-1);t=Sb(e.resolve(r))}return t},lk=(e,t)=>e.isBlockContainer&&e.blockContent.node.type.spec.content===`inline*`&&e.blockContent.node.childCount>0&&t.isBlockContainer&&t.blockContent.node.type.spec.content===`inline*`,uk=(e,t,n,r)=>{if(!r.isBlockContainer)throw Error(`Attempted to merge block at position ${r.bnBlock.beforePos} into previous block at position ${n.bnBlock.beforePos}, but next block is not a block container`);if(r.childContainer){let n=e.doc.resolve(r.childContainer.beforePos+1),i=e.doc.resolve(r.childContainer.afterPos-1),a=n.blockRange(i);if(t){let t=e.doc.resolve(r.bnBlock.beforePos);e.tr.lift(a,t.depth)}}if(t){if(!n.isBlockContainer)throw Error(`Attempted to merge block at position ${r.bnBlock.beforePos} into previous block at position ${n.bnBlock.beforePos}, but previous block is not a block container`);t(e.tr.delete(n.blockContent.afterPos-1,r.blockContent.beforePos+1))}return!0},dk=e=>({state:t,dispatch:n})=>{let r=Sb(t.doc.resolve(e)),i=ok(t.doc,r.bnBlock.beforePos);if(!i)return!1;let a=ck(t.doc,i);return lk(a,r)?uk(t,n,a,r):!1},fk=O_.create({priority:50,addKeyboardShortcuts(){let e=()=>this.editor.commands.first(({chain:e,commands:t})=>[()=>t.deleteSelection(),()=>t.undoInputRule(),()=>t.command(({state:e})=>{let n=Cb(e);if(!n.isBlockContainer)return!1;let r=e.selection.from===n.blockContent.beforePos+1,i=n.blockContent.node.type.name===`paragraph`;return r&&!i?t.command(dS(n.bnBlock.beforePos,{type:`paragraph`,props:{}})):!1}),()=>t.command(({state:e,tr:t})=>{let n=Cb(e);if(!n.isBlockContainer)return!1;let{blockContent:r}=n;return e.selection.from===r.beforePos+1&&hD(t,t.doc.type.schema.nodes.blockContainer,t.doc.type.schema.nodes.blockGroup)}),()=>t.command(({state:t})=>{let n=Cb(t);if(!n.isBlockContainer)return!1;let{bnBlock:r,blockContent:i}=n,a=ok(t.doc,n.bnBlock.beforePos);if(!a||!a.isBlockContainer||a.blockContent.node.type.spec.content!==`inline*`)return!1;let o=t.selection.from===i.beforePos+1,s=t.selection.empty,c=r.beforePos;return o&&s?e().command(dk(c)).scrollIntoView().run():!1}),()=>t.command(({state:e,tr:t,dispatch:n})=>{let r=Cb(e);if(!r.isBlockContainer||e.selection.from!==r.blockContent.beforePos+1)return!1;let i=ok(e.doc,r.bnBlock.beforePos);if(!i||i.isBlockContainer)return!1;if(n){let e=i.bnBlock.afterPos-1,n=t.doc.resolve(e-1);return t.delete(r.bnBlock.beforePos,r.bnBlock.afterPos),t.insert(n.pos,r.bnBlock.node),t.setSelection(H.near(t.doc.resolve(n.pos+1))),!0}return!1}),()=>t.command(({state:e,tr:t,dispatch:n})=>{let r=Cb(e);if(!r.isBlockContainer||t.selection.from!==r.blockContent.beforePos+1)return!1;let i=t.doc.resolve(r.bnBlock.beforePos);if(i.nodeBefore||i.node().type.name!==`column`)return!1;let a=t.doc.resolve(r.bnBlock.beforePos),o=t.doc.resolve(a.before()),s=o.before();return n&&(t.delete(r.bnBlock.beforePos,r.bnBlock.afterPos),HE(t,s),o.pos===s+1?(t.insert(s,r.bnBlock.node),t.setSelection(H.near(t.doc.resolve(s)))):(t.insert(o.pos-1,r.bnBlock.node),t.setSelection(H.near(t.doc.resolve(o.pos))))),!0}),()=>t.command(({state:t})=>{let n=Cb(t);if(!n.isBlockContainer)return!1;if(n.blockContent.node.childCount===0&&n.blockContent.node.type.spec.content===`inline*`){let r=ok(t.doc,n.bnBlock.beforePos);if(!r)return!1;let i=ck(t.doc,r);if(!i.isBlockContainer||!i||!i.isBlockContainer)return!1;let a=e();if(n.childContainer&&a.insertContentAt(n.bnBlock.afterPos,n.childContainer?.node.content),i.blockContent.node.type.spec.content===`tableRow+`){let e=n.bnBlock.beforePos-1-1-1-1-1;a=a.setTextSelection(e)}else if(i.blockContent.node.type.spec.content===``)a=a.setNodeSelection(i.blockContent.beforePos);else{let e=i.blockContent.afterPos-1;a=a.setTextSelection(e)}return a.deleteRange({from:n.bnBlock.beforePos,to:n.bnBlock.afterPos}).scrollIntoView().run()}return!1}),()=>t.command(({state:t})=>{let n=Cb(t);if(!n.isBlockContainer)return!1;let r=t.selection.from===n.blockContent.beforePos+1,i=t.selection.empty,a=ok(t.doc,n.bnBlock.beforePos);if(a&&r&&i){let r=ck(t.doc,a);if(!r.isBlockContainer)return!1;if(r.blockContent.node.type.spec.content===``||r.blockContent.node.type.spec.content===`inline*`&&r.blockContent.node.childCount===0)return e().cut({from:n.bnBlock.beforePos,to:n.bnBlock.afterPos},r.bnBlock.afterPos).deleteRange({from:r.bnBlock.beforePos,to:r.bnBlock.afterPos}).run()}return!1})]),t=()=>this.editor.commands.first(({chain:e,commands:t})=>[()=>t.deleteSelection(),()=>t.command(({state:t})=>{let n=Cb(t);if(!n.isBlockContainer||!n.childContainer)return!1;let{blockContent:r,childContainer:i}=n,a=t.selection.from===r.afterPos-1,o=t.selection.empty,s=Sb(t.doc.resolve(i.beforePos+1));if(!s.isBlockContainer)return!1;if(a&&o){let n=s.blockContent.node,a=n.type.spec.content===`inline*`,o=r.node.type.spec.content===`inline*`;return e().insertContentAt(s.bnBlock.afterPos,s.childContainer?.node.content||U.empty).deleteRange(i.node.childCount===1?{from:i.beforePos,to:i.afterPos}:{from:s.bnBlock.beforePos,to:s.bnBlock.afterPos}).insertContentAt(t.selection.from,a&&o?n.content:null).setTextSelection(t.selection.from).scrollIntoView().run()}return!1}),()=>t.command(({state:t})=>{let n=Cb(t);if(!n.isBlockContainer)return!1;let{bnBlock:r,blockContent:i}=n,a=sk(t.doc,n.bnBlock.beforePos);if(!a||!a.isBlockContainer)return!1;let o=t.selection.from===i.afterPos-1,s=t.selection.empty,c=r.afterPos;return o&&s?e().command(dk(c)).scrollIntoView().run():!1}),()=>t.command(({state:e,tr:t,dispatch:n})=>{let r=Cb(e);if(!r.isBlockContainer||e.selection.from!==r.blockContent.afterPos-1)return!1;let i=sk(e.doc,r.bnBlock.beforePos);if(!i||i.isBlockContainer)return!1;if(n){let e=i.bnBlock.beforePos+1,n=t.doc.resolve(e+1);return t.delete(n.pos,n.pos+n.nodeAfter.nodeSize),HE(t,i.bnBlock.beforePos),t.insert(r.bnBlock.afterPos,n.nodeAfter),t.setSelection(H.near(t.doc.resolve(n.pos))),!0}return!1}),()=>t.command(({state:e,tr:t,dispatch:n})=>{let r=Cb(e);if(!r.isBlockContainer||t.selection.from!==r.blockContent.afterPos-1)return!1;let i=t.doc.resolve(r.bnBlock.afterPos);if(i.nodeAfter||i.node().type.name!==`column`)return!1;let a=t.doc.resolve(r.bnBlock.afterPos),o=t.doc.resolve(a.after()),s=o.after();if(n){let e=o.pos===s-1?s:o.pos+1,n=Sb(t.doc.resolve(e));t.delete(n.bnBlock.beforePos,n.bnBlock.afterPos),HE(t,s-o.node().nodeSize),t.insert(a.pos,n.bnBlock.node),t.setSelection(H.near(t.doc.resolve(e)))}return!0}),()=>t.command(({state:t})=>{let n=Cb(t);if(!n.isBlockContainer)return!1;let{blockContent:r}=n,i=t.selection.from===r.afterPos-1,a=t.selection.empty;if(i&&a){let i=(e,t)=>{let n=sk(e,t);if(n)return n;let r=ak(e,t);if(r)return i(e,r.bnBlock.beforePos)},a=i(t.doc,n.bnBlock.beforePos);if(!a||!a.isBlockContainer)return!1;let o=a.blockContent.node,s=o.type.spec.content===`inline*`,c=r.node.type.spec.content===`inline*`;return e().insertContentAt(a.bnBlock.afterPos,a.childContainer?.node.content||U.empty).deleteRange({from:a.bnBlock.beforePos,to:a.bnBlock.afterPos}).insertContentAt(t.selection.from,s&&c?o.content:null).setTextSelection(t.selection.from).scrollIntoView().run()}return!1}),()=>t.command(({state:t})=>{let n=Cb(t);if(!n.isBlockContainer)return!1;if(n.blockContent.node.childCount===0&&n.blockContent.node.type.spec.content===`inline*`){let r=sk(t.doc,n.bnBlock.beforePos);if(!r||!r.isBlockContainer)return!1;let i=e();if(r.blockContent.node.type.spec.content===`tableRow+`){let e=n.bnBlock.afterPos+1+1+1+1+1;i=i.setTextSelection(e)}else i=r.blockContent.node.type.spec.content===``?i.setNodeSelection(r.blockContent.beforePos):i.setTextSelection(r.blockContent.beforePos+1);return i.deleteRange({from:n.bnBlock.beforePos,to:n.bnBlock.afterPos}).scrollIntoView().run()}return!1}),()=>t.command(({state:t})=>{let n=Cb(t);if(!n.isBlockContainer)return!1;let r=t.selection.from===n.blockContent.afterPos-1,i=t.selection.empty,a=sk(t.doc,n.bnBlock.beforePos);if(!a||!a.isBlockContainer)return!1;if(a&&r&&i&&(a.blockContent.node.type.spec.content===``||a.blockContent.node.type.spec.content===`inline*`&&a.blockContent.node.childCount===0)){let t=a.bnBlock.node.lastChild.content;return e().deleteRange({from:a.bnBlock.beforePos,to:a.bnBlock.afterPos}).insertContentAt(n.bnBlock.afterPos,a.bnBlock.node.childCount===2?t:null).run()}return!1})]),n=(e=!1)=>this.editor.commands.first(({commands:t,tr:n})=>[()=>t.command(({state:e,tr:t})=>{let n=Cb(e);if(!n.isBlockContainer)return!1;let{bnBlock:r,blockContent:i}=n,{depth:a}=e.doc.resolve(r.beforePos),o=e.selection.$anchor.parentOffset===0,s=e.selection.anchor===e.selection.head,c=i.node.childCount===0;return o&&s&&c&&a>1?hD(t,t.doc.type.schema.nodes.blockContainer,t.doc.type.schema.nodes.blockGroup):!1}),()=>t.command(({state:t})=>{let r=Cb(t),i=this.options.editor.schema.blockSpecs[r.blockNoteType],a=i?.implementation?.meta?.hardBreakShortcut??`shift+enter`;if(a===`none`)return!1;if(a===`shift+enter`&&e||a===`enter`){if(i?.config?.content===`plain`)return n.insertText(`
220
- `,n.selection.head),!0;let e=n.storedMarks||n.selection.$head.marks().filter(e=>this.editor.extensionManager.splittableMarks.includes(e.type.name));return n.insert(n.selection.head,n.doc.type.schema.nodes.hardBreak.create()).ensureMarks(e),!0}return!1}),()=>t.command(({state:e,dispatch:t,tr:n})=>{let r=Cb(e);if(!r.isBlockContainer)return!1;let{bnBlock:i,blockContent:a}=r,o=e.selection.$anchor.parentOffset===0,s=e.selection.anchor===e.selection.head,c=a.node.childCount===0;if(o&&s&&c){let a=i.afterPos,o=a+2;if(t){let t=e.schema.nodes.blockContainer.createAndFill(void 0,[e.schema.nodes.paragraph.createAndFill()||void 0,r.childContainer?.node].filter(e=>e!==void 0));n.insert(a,t).setSelection(new H(n.doc.resolve(o))).scrollIntoView(),r.childContainer&&n.delete(r.childContainer.beforePos,r.childContainer.afterPos)}return!0}return!1}),()=>t.command(({state:e,chain:t})=>{let n=Cb(e);if(!n.isBlockContainer)return!1;let{blockContent:r}=n,i=e.selection.$anchor.parentOffset===0;return r.node.childCount!==0&&(t().deleteSelection().command(fC(e.selection.from,i,i)).scrollIntoView().run(),!0)})]);return{Backspace:e,Delete:t,Enter:()=>n(),"Shift-Enter":()=>n(!0),Tab:()=>this.options.tabBehavior!==`prefer-indent`&&(this.options.editor.getExtension(UC)?.store.state||this.options.editor.getExtension(OS)?.store.state!==void 0)?!1:pD(this.options.editor),"Shift-Tab":()=>this.options.tabBehavior!==`prefer-indent`&&(this.options.editor.getExtension(UC)?.store.state||this.options.editor.getExtension(OS)?.store.state!==void 0)?!1:gD(this.options.editor),"Shift-Mod-ArrowUp":()=>(this.options.editor.moveBlocksUp(),!0),"Shift-Mod-ArrowDown":()=>(this.options.editor.moveBlocksDown(),!0),"Mod-z":()=>this.options.editor.undo(),"Mod-y":()=>this.options.editor.redo(),"Shift-Mod-z":()=>this.options.editor.redo()}}}),pk=O_.create({name:`textAlignment`,addGlobalAttributes(){return[{types:[`tableCell`,`tableHeader`],attributes:{textAlignment:{default:`left`,parseHTML:e=>e.getAttribute(`data-text-alignment`),renderHTML:e=>e.textAlignment===`left`?{}:{"data-text-alignment":e.textAlignment}}}}]}}),mk=O_.create({name:`blockTextColor`,addGlobalAttributes(){return[{types:[`table`,`tableCell`,`tableHeader`],attributes:{textColor:ES()}}]}}),hk=`aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2`;function gk(e){let t=[],n=[],r=0;for(;r<e.length;){let i=0;for(;r+i<e.length&&e.charCodeAt(r+i)>=48&&e.charCodeAt(r+i)<=57;)i++;if(i>0){t.push(n.join(``));let a=parseInt(e.substring(r,r+i),10);for(;a-->0;)n.pop();r+=i}else n.push(e[r]),r++}return t}var _k=new Set(gk(hk)),vk=new Set([`localhost`]),yk=/[.,;:!?"']+$/,bk=/(?:https?|ftp|ftps):\/\/[^\s]+/g,xk=/mailto:[^\s]+/g,Sk=/[a-zA-Z0-9._%+-]+@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}/g,Ck=/(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}(?::\d{1,5})?(?:[/?#][^\s]*)?/g;function wk(e){let t=e,n=!0;for(;n;){n=!1;let e=t;t=t.replace(yk,``),t!==e&&(n=!0);for(let[e,r]of[[`(`,`)`],[`[`,`]`]])for(;t.endsWith(r);){let i=Tk(t,e);if(Tk(t,r)>i)t=t.slice(0,-1),n=!0;else break}}return t}function Tk(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}function Ek(e){let t=e.split(`.`);return t[t.length-1].toLowerCase()}function Dk(e){let t=Ek(e);return _k.has(t)}function Ok(e,t,n){return t===`email`?`mailto:`+e:/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\//.test(e)||/^mailto:/i.test(e)?e:n+`://`+e}function kk(e,t){if(!e)return[];let n=t?.defaultProtocol||`http`,r=[];for(let t of e.matchAll(bk))r.push({type:`url`,value:t[0],start:t.index,end:t.index+t[0].length});for(let t of e.matchAll(xk))r.push({type:`url`,value:t[0],start:t.index,end:t.index+t[0].length});for(let t of e.matchAll(Sk))r.push({type:`email`,value:t[0],start:t.index,end:t.index+t[0].length});for(let t of e.matchAll(Ck))r.push({type:`url`,value:t[0],start:t.index,end:t.index+t[0].length});r.sort((e,t)=>e.start-t.start||t.end-e.end);let i=[],a=-1;for(let e of r)e.start>=a&&(i.push(e),a=e.end);let o=[];for(let e of i){let t=wk(e.value);if(!t)continue;let r=e.start,i=r+t.length;if(e.type===`url`&&!/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(t)){let e=new URL(`http://`+t).hostname;if(!Dk(e))continue}if(e.type===`email`){let e=t.split(`@`)[1];if(!Dk(e))continue}let a=Ok(t,e.type,n);o.push({type:e.type,value:t,isLink:!0,href:a,start:r,end:i})}return o}function Ak(e,t=`http`){if(!e)return[Nk(e,0,0)];for(let[n,r]of[[`(`,`)`],[`[`,`]`],[`{`,`}`]])if(e.startsWith(n)&&e.endsWith(r)&&e.length>2){let i=e.slice(1,-1);if(jk(i))return[Nk(n,0,1),Mk(i,1,1+i.length,t),Nk(r,1+i.length,e.length)]}if(e.endsWith(`.`)&&e.length>1){let n=e.slice(0,-1);if(jk(n))return[Mk(n,0,n.length,t),Nk(`.`,n.length,e.length)]}return jk(e)?[Mk(e,0,e.length,t)]:[Nk(e,0,e.length)]}function jk(e){if(/^(?:https?|ftp|ftps):\/\/[^\s]+$/.test(e)||/^mailto:[^\s]+$/.test(e)||vk.has(e.toLowerCase()))return!0;let t=e.match(/^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+([a-zA-Z]{2,})(?::\d{1,5})?(?:[/?#][^\s]*)?$/);if(t){let e=t[1].toLowerCase();if(_k.has(e))return!0}return!1}function Mk(e,t,n,r){let i=e.includes(`@`)&&!e.includes(`://`)&&!e.startsWith(`mailto:`)?`email`:`url`;return{type:i,value:e,isLink:!0,href:Ok(e,i,r),start:t,end:n}}function Nk(e,t,n){return{type:`text`,value:e,isLink:!1,href:e,start:t,end:n}}var Pk=`[\0- \xA0 ᠎ -\u2029  ]`,Fk=new RegExp(Pk),Ik=RegExp(`${Pk}$`),Lk=new RegExp(Pk,`g`);function Rk(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?[`()`,`[]`].includes(e[0].value+e[2].value):!1}function zk(e){return new ke({key:new Ae(`autolink`),appendTransaction:(t,n,r)=>{let i=t.some(e=>e.docChanged)&&!n.doc.eq(r.doc),a=t.some(e=>e.getMeta(`preventAutolink`));if(!i||a)return;let{tr:o}=r;if(Ih(Zm(n.doc,[...t])).forEach(({newRange:t})=>{let n=Qm(r.doc,t,e=>e.isTextblock),i,a;if(n.length>1)i=n[0],a=r.doc.textBetween(i.pos,i.pos+i.node.nodeSize,void 0,` `);else if(n.length){let e=r.doc.textBetween(t.from,t.to,` `,` `);if(!Ik.test(e))return;i=n[0],a=r.doc.textBetween(i.pos,t.to,void 0,` `)}if(i&&a){let t=a.split(Fk).filter(Boolean);if(t.length<=0)return;let n=t[t.length-1],s=i.pos+a.lastIndexOf(n);if(!n)return;let c=Ak(n,e.defaultProtocol);if(!Rk(c))return;c.filter(e=>e.isLink).map(e=>({...e,from:s+e.start+1,to:s+e.end+1})).filter(e=>!r.schema.marks.code||!r.doc.rangeHasMark(e.from,e.to,r.schema.marks.code)).filter(t=>e.validate(t.value)).filter(t=>e.shouldAutoLink(t.value)).forEach(t=>{Lh(t.from,t.to,r.doc).some(t=>t.mark.type===e.type)||o.addMark(t.from,t.to,e.type.create({href:t.href}))})}}),o.steps.length)return o}})}function Bk(e){return new ke({key:new Ae(`handleClickLink`),props:{handleClick:(t,n,r)=>{if(r.button!==0||!t.editable)return!1;let i=null;if(r.target instanceof HTMLAnchorElement&&r.target.getAttribute(`data-inline-content-type`)===`link`)i=r.target;else{let t=r.target;if(!t)return!1;let n=e.tiptapEditor.view.dom;i=t.closest(`a[data-inline-content-type="link"]`),i&&!n.contains(i)&&(i=null)}if(!i)return!1;if(e.onClick){if(!e.editor)throw Error(`BlockNoteEditor not found in Link click handler`);return e.onClick(r,e.editor)??!0}let a=Nh(t.state,e.type.name),o=i.href??a.href,s=i.target??a.target;return o?(window.open(o,s),!0):!1}}})}function Vk(e){return new ke({key:new Ae(`handlePasteLink`),props:{handlePaste:(t,n,r)=>{let{shouldAutoLink:i,isValidLink:a}=e,{state:o}=t,{selection:s}=o,{empty:c}=s;if(c)return!1;let l=``;r.content.forEach(e=>{l+=e.textContent});let u=kk(l,{defaultProtocol:e.defaultProtocol}).find(e=>e.isLink&&e.value===l);return!l||!u||!a(u.value)||i!==void 0&&!i(u.value)?!1:e.editor.commands.setMark(e.type,{href:u.href})}}})}var Hk=`https`,Uk=/^(?:(?:http|https|ftp|ftps|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z0-9+.\-]+(?:[^a-z+.\-:]|$))/i;function Wk(e){if(!e)return!0;let t=e.replace(Lk,``);return Uk.test(t)}function Gk(e){let t=/^[a-z][a-z0-9+.-]*:\/\//i.test(e),n=/^[a-z][a-z0-9+.-]*:/i.test(e);if(t||n&&!e.includes(`@`))return!0;let r=(e.includes(`@`)?e.split(`@`).pop():e).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(r)||!/\./.test(r))}var Kk=b_.create({name:`link`,keepOnSplit:!1,exitable:!0,inclusive:!1,addOptions(){return{HTMLAttributes:{target:`_blank`,rel:`noopener noreferrer nofollow`,className:`bn-inline-content-section`,"data-inline-content-type":`link`},editor:void 0,onClick:void 0,isValidLink:Wk}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute(`href`)}}}},parseHTML(){let e=this.options.isValidLink;return[{tag:`a[href]`,getAttrs:t=>{let n=t.getAttribute(`href`);return!n||!e(n)?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isValidLink(e.href)?[`a`,vh(e,this.options.HTMLAttributes),0]:[`a`,vh({...e,href:``},this.options.HTMLAttributes),0]},addPasteRules(){let e=this.options.isValidLink;return[Y_({find:t=>{let n=[];if(t){let r=kk(t,{defaultProtocol:Hk}).filter(t=>t.isLink&&e(t.value));for(let e of r)Gk(e.value)&&n.push({text:e.value,data:{href:e.href},index:e.start})}return n},type:this.type,getAttributes:e=>({href:e.data?.href})})]},addProseMirrorPlugins(){let e=[];return e.push(zk({type:this.type,defaultProtocol:Hk,validate:this.options.isValidLink,shouldAutoLink:Gk})),e.push(Bk({type:this.type,tiptapEditor:this.editor,editor:this.options.editor,onClick:this.options.onClick})),e.push(Vk({editor:this.editor,defaultProtocol:Hk,type:this.type,shouldAutoLink:Gk,isValidLink:this.options.isValidLink})),e}}),qk=iv(({editor:e,options:t})=>({key:`link`,tiptapExtensions:[Kk.configure({HTMLAttributes:t.HTMLAttributes??{},editor:e,onClick:t.onClick,...t.isValidLink?{isValidLink:t.isValidLink}:{}})]})),Jk={blockColor:`data-block-color`,blockStyle:`data-block-style`,id:`data-id`,depth:`data-depth`,depthChange:`data-depth-change`},Yk=q_.create({name:`blockContainer`,group:`blockGroupChild bnBlock`,content:`blockContent blockGroup?`,priority:50,defining:!0,marks(){return TC(this.editor)},parseHTML(){return[{tag:`div[data-node-type=`+this.name+`]`,getAttrs:e=>{if(typeof e==`string`)return!1;let t={};for(let[n,r]of Object.entries(Jk))e.getAttribute(r)&&(t[n]=e.getAttribute(r));return t}},{tag:`div[data-node-type="blockOuter"]`,skip:!0}]},renderHTML({HTMLAttributes:e}){let t=document.createElement(`div`);t.className=`bn-block-outer`,t.setAttribute(`data-node-type`,`blockOuter`);for(let[n,r]of Object.entries(e))n!==`class`&&t.setAttribute(n,r);let n={...this.options.domAttributes?.block||{},...e},r=document.createElement(`div`);r.className=Vb(`bn-block`,n.class),r.setAttribute(`data-node-type`,this.name);for(let[e,t]of Object.entries(n))e!==`class`&&r.setAttribute(e,t);return t.appendChild(r),{dom:t,contentDOM:r}}}),Xk=q_.create({name:`blockGroup`,group:`childContainer`,content:`blockGroupChild+`,marks(){return TC(this.editor)},parseHTML(){return[{tag:`div`,getAttrs:e=>typeof e!=`string`&&e.getAttribute(`data-node-type`)===`blockGroup`&&null}]},renderHTML({HTMLAttributes:e}){let t={...this.options.domAttributes?.blockGroup||{},...e},n=document.createElement(`div`);n.className=Vb(`bn-block-group`,t.class),n.setAttribute(`data-node-type`,`blockGroup`);for(let[e,r]of Object.entries(t))e!==`class`&&n.setAttribute(e,r);return{dom:n,contentDOM:n}}}),Zk=q_.create({name:`doc`,topNode:!0,content:`blockGroup`,marks(){return TC(this.editor)}});function Qk(e,t){return[B_.ClipboardTextSerializer,B_.Commands,B_.Editable,B_.FocusEvents,B_.Tabindex,RE,Ob.configure({types:[`blockContainer`,`columnList`,`column`],setIdAttribute:t.setIdAttribute,isWithinEditor:e.isWithinEditor}),ik,EE,...Object.values(e.schema.styleSpecs).map(t=>t.implementation.mark.configure({editor:e})),mk,rk,pk,O_.create({name:`OverrideEscape`,addKeyboardShortcuts:()=>({Escape:()=>!e.getExtension(JC)?.shown()&&(e.blur(),!0)})}),Zk,Yk.configure({editor:e,domAttributes:t.domAttributes}),fk.configure({editor:e,tabBehavior:t.tabBehavior}),Xk.configure({domAttributes:t.domAttributes}),...Object.values(e.schema.inlineContentSpecs).filter(e=>e.config!==`link`&&e.config!==`text`).map(t=>t.implementation.node.configure({editor:e})),...Object.values(e.schema.blockSpecs).flatMap(n=>[...`node`in n.implementation?[n.implementation.node.configure({editor:e,domAttributes:t.domAttributes})]:[]]),nk(e),ZO(e,t.pasteHandler||(e=>e.defaultPasteHandler())),PO(e)]}function $k(e,t){let n=[Aw(),Iw(t),OS(t),UC(t),qk({HTMLAttributes:t.links?.HTMLAttributes??{},onClick:t.links?.onClick,...t.links?.isValidLink?{isValidLink:t.links.isValidLink}:{}}),Vw(t),Gw(),qw(t),sw(t),qT(t),JT(),YT(),JC(t),Lw(),Bw(),Jw(),...t.trailingBlock===!1?[]:[_E()]];return`table`in e.schema.blockSpecs&&n.push(pE(t)),t.animations!==!1&&n.push(Zw()),n}var eA=class{editor;options;disabledExtensions=new Set;extensions=[];abortMap=new Map;extensionFactories=new Map;extensionPlugins=new Map;blockNoteExtensionDependents=new Map;constructor(e,t){this.editor=e,this.options=t,e.onMount(()=>{for(let t of this.extensions)if(t.mount){let n=new window.AbortController,r=t.mount({dom:e.prosemirrorView.dom,root:e.prosemirrorView.root,signal:n.signal});r&&n.signal.addEventListener(`abort`,()=>{r()}),this.abortMap.set(t,n)}}),e.onUnmount(()=>{for(let[e,t]of this.abortMap.entries())this.abortMap.delete(e),t.abort()}),this.disabledExtensions=new Set(t.disableExtensions||[]);for(let e of $k(this.editor,this.options))this.addExtension(e);for(let e of this.options.extensions??[])this.addExtension(e);for(let e of Object.values(this.editor.schema.blockSpecs))for(let t of e.extensions??[])this.addExtension(t)}registerExtension(e){this.replaceExtension(void 0,e)}addExtension(e,t){let n;if(n=typeof e==`function`?e({editor:this.editor}):e,n&&!this.disabledExtensions.has(n.key)){if(t){let e=this.blockNoteExtensionDependents.get(n.key);e||(e=new Set,this.blockNoteExtensionDependents.set(n.key,e)),e.add(t)}if(!this.extensions.some(e=>e.key===n.key)){if(typeof e==`function`){let e=n[rv];typeof e==`function`&&this.extensionFactories.set(e,n)}if(this.extensions.push(n),n.blockNoteExtensions)for(let e of n.blockNoteExtensions)this.addExtension(e,n.key);return n}}}resolveExtensions(e){let t=[];if(typeof e==`function`){let n=this.extensionFactories.get(e);n&&t.push(n)}else if(Array.isArray(e))for(let n of e)t.push(...this.resolveExtensions(n));else if(typeof e==`object`&&`key`in e)t.push(e);else if(typeof e==`string`){let n=this.extensions.find(t=>t.key===e);n&&t.push(n)}return t}unregisterExtension(e){this.replaceExtension(e,[])}replaceExtension(e,t){let n=this.resolveExtensions(e);e&&!n.length&&console.warn(`No extensions found to unregister`,e);let r=!1,i=new Set,a=new Set;for(let t of n)this.extensions=this.extensions.filter(e=>e!==t),this.extensionFactories.forEach((e,n)=>{e===t&&this.extensionFactories.delete(n)}),this.abortMap.get(t)?.abort(),this.abortMap.delete(t),this.extensionPlugins.get(t)?.forEach(e=>{i.add(e);let t=e.spec?.key,n=typeof t==`object`&&t?t.key:t;typeof n==`string`&&a.add(n)}),this.extensionPlugins.delete(t),t.tiptapExtensions&&!r&&(r=!0,console.warn(`Extension ${t.key} has tiptap extensions, but they will not be removed. Please separate the extension into multiple extensions if you want to remove them, or re-initialize the editor.`,e));let o=[].concat(t).filter(Boolean).map(e=>this.addExtension(e)).filter(Boolean),s=[];for(let e of o)e?.tiptapExtensions&&console.warn(`Extension ${e.key} has tiptap extensions, but these cannot be changed after initializing the editor. Please separate the extension into multiple extensions if you want to add them, or re-initialize the editor.`,e),e?.inputRules?.length&&console.warn(`Extension ${e.key} has input rules, but these cannot be changed after initializing the editor. Please separate the extension into multiple extensions if you want to add them, or re-initialize the editor.`,e),this.getProsemirrorPluginsFromExtension(e).plugins.forEach(e=>{s.push(e)});!i.size&&!a.size&&!s.length||this.updatePlugins(e=>[...e.filter(e=>{if(i.has(e))return!1;if(a.size){let t=e.spec?.key,n=typeof t==`object`&&t?t.key:t;if(typeof n==`string`&&a.has(n))return!1}return!0}),...s])}updatePlugins(e){let t=this.editor.prosemirrorState,n=t.reconfigure({plugins:e(t.plugins.slice())});this.editor.prosemirrorView.updateState(n)}getTiptapExtensions(){let e=Qk(this.editor,this.options).filter(e=>!this.disabledExtensions.has(e.name)),t=Rx(this.extensions.map(e=>{let t=this.blockNoteExtensionDependents.get(e.key);return t?.size?{key:e.key,runsBefore:[...e.runsBefore??[],...t]}:e})),n=new Map;for(let r of this.extensions){r.tiptapExtensions&&e.push(...r.tiptapExtensions);let i=t(r.key),{plugins:a,inputRules:o}=this.getProsemirrorPluginsFromExtension(r);a.length&&e.push(O_.create({name:r.key,priority:i,addProseMirrorPlugins:()=>a})),o.length&&(n.has(i)||n.set(i,[]),n.get(i).push(...o))}e.push(O_.create({name:`blocknote-input-rules`,addProseMirrorPlugins(){let e=[];Array.from(n.keys()).sort((e,t)=>e-t).reverse().forEach(t=>{e.push(...n.get(t))});let t=wE({rules:e});return[t,new ke({props:{handleKeyDown(e,n){if(n.key!==`Enter`||n.shiftKey||n.ctrlKey||n.metaKey||n.altKey)return!1;let{$cursor:r}=e.state.selection;return r?!!t.props.handleTextInput?.call(t,e,r.pos,r.pos,`
221
- `,()=>e.state.tr.insertText(`
222
- `,r.pos,r.pos)):!1}}})]}}));for(let t of this.options._tiptapOptions?.extensions??[])e.push(t);return e}getProsemirrorPluginsFromExtension(e){let t=[...e.prosemirrorPlugins??[]],n=[];if(!e.prosemirrorPlugins?.length&&!Object.keys(e.keyboardShortcuts||{}).length&&!e.inputRules?.length)return{plugins:t,inputRules:n};if(this.extensionPlugins.set(e,t),e.inputRules?.length&&n.push(...e.inputRules.map(e=>new xE(e.find,(t,n,r,i)=>{let a=e.replace({match:n,range:{from:r,to:i},editor:this.editor});if(a){let e=t.tr,n=Cb(e);return!n.isBlockContainer||this.editor.schema.blockSchema[n.blockNoteType]?.content!==`inline`?null:(e.deleteRange(r,i),fS(e,n.bnBlock.beforePos,a),OO(e,vb(n.bnBlock.node,e.doc),`start`),e)}return null},{undoable:!0}))),Object.keys(e.keyboardShortcuts||{}).length){let n,r=Ue(Object.fromEntries(Object.entries(e.keyboardShortcuts).map(([e,t])=>[e,()=>{if(!n)throw Error(`Keyboard shortcut called outside handleKeyDown`);return t({editor:this.editor,event:n})}])));t.push(new ke({props:{handleKeyDown:(e,t)=>{let i=n;n=t;try{return r(e,t)}finally{n=i}}}}))}return{plugins:t,inputRules:n}}getExtensions(){return new Map(this.extensions.map(e=>[e.key,e]))}getExtension(e){if(typeof e==`string`)return this.extensions.find(t=>t.key===e)||void 0;if(typeof e==`function`)return this.extensionFactories.get(e)||void 0;throw Error(`Invalid extension type: ${typeof e}`)}hasExtension(e){return typeof e==`string`?this.extensions.some(t=>t.key===e):typeof e==`object`&&`key`in e?this.extensions.some(t=>t.key===e.key):typeof e==`function`&&this.extensionFactories.has(e)}};function tA(e,t){let{$from:n,$to:r}=t;if(n.pos>n.start()&&n.pos<e.content.size){let t=e.textBetween(n.pos,n.pos+1);if(/^[\w\p{P}]$/u.test(t)){let t=e.textBetween(n.start(),n.pos).match(/[\w\p{P}]+$/u);t&&(n=e.resolve(n.pos-t[0].length))}}if(r.pos<r.end()&&r.pos>0){let t=e.textBetween(r.pos-1,r.pos);if(/^[\w\p{P}]$/u.test(t)){let t=e.textBetween(r.pos,r.end()).match(/^[\w\p{P}]+/u);t&&(r=e.resolve(r.pos+t[0].length))}}return{$from:n,$to:r,from:n.pos,to:r.pos}}function nA(e){if(e.selection.empty||`node`in e.selection)return;let t=e.doc.resolve(yb(e.doc,e.selection.from).posBeforeNode),n=e.doc.resolve(yb(e.doc,e.selection.to).posBeforeNode),r=(n,r)=>{let i=t.posAtIndex(n,r),a=e.doc.resolve(i).nodeAfter;if(!a)throw Error(`Error getting selection - node not found at position ${i}`);return sx(a,e.doc)},i=[],a=t.sharedDepth(n.pos),o=t.index(a),s=n.index(a);if(t.depth>a){i.push(sx(t.nodeAfter,e.doc));for(let e=t.depth;e>a;e--)if(t.node(e).type.isInGroup(`childContainer`)){let n=t.index(e)+1,a=t.node(e).childCount;for(let t=n;t<a;t++)i.push(r(t,e))}}else i.push(r(o,a));for(let e=o+1;e<=s;e++)i.push(r(e,a));if(i.length===0)throw Error(`Error getting selection - selection doesn't span any blocks (${e.selection})`);return{blocks:i}}function rA(e,t,n){let r=typeof t==`string`?t:t.id,i=typeof n==`string`?n:n.id,a=Qb(Xb(e));if(r===i)throw Error(`Attempting to set selection with the same anchor and head blocks (id ${r})`);let o=lS(r,e.doc);if(!o)throw Error(`Block with ID ${r} not found`);let s=lS(i,e.doc);if(!s)throw Error(`Block with ID ${i} not found`);let c=xb(o),l=xb(s),u=a.blockSchema[c.blockNoteType],d=a.blockSchema[l.blockNoteType];if(!c.isBlockContainer||u.content===`none`)throw Error(`Attempting to set selection anchor in block without content (id ${r})`);if(!l.isBlockContainer||d.content===`none`)throw Error(`Attempting to set selection anchor in block without content (id ${i})`);let f,p;if(u.content===`table`){let e=fv.get(c.blockContent.node);f=c.blockContent.beforePos+e.positionAt(0,0,c.blockContent.node)+1+2}else f=c.blockContent.beforePos+1;if(d.content===`table`){let t=fv.get(l.blockContent.node),n=l.blockContent.beforePos+t.positionAt(t.height-1,t.width-1,l.blockContent.node)+1;p=n+e.doc.resolve(n).nodeAfter.nodeSize-2}else p=l.blockContent.afterPos-1;e.setSelection(H.create(e.doc,f,p))}function iA(e,t=!1){let n=t?tA(e.doc,e.selection):e.selection,r=n.$from,i=n.$to;for(;i.parentOffset>=i.parent.nodeSize-2&&i.depth>0;)i=e.doc.resolve(i.pos+1);for(;i.parentOffset===0&&i.depth>0;)i=e.doc.resolve(i.pos-1);for(;r.parentOffset===0&&r.depth>0;)r=e.doc.resolve(r.pos-1);for(;r.parentOffset>=r.parent.nodeSize-2&&r.depth>0;)r=e.doc.resolve(r.pos+1);let a=lx(e.doc.slice(r.pos,i.pos,!0));return{_meta:{startPos:r.pos,endPos:i.pos},...a}}var aA=class{editor;constructor(e){this.editor=e}getSelection(){return this.editor.transact(e=>nA(e))}getSelectionCutBlocks(e=!1){return this.editor.transact(t=>iA(t,e))}setSelection(e,t){return this.editor.transact(n=>rA(n,e,t))}getTextCursorPosition(){return this.editor.transact(e=>DO(e))}setTextCursorPosition(e,t=`start`){return this.editor.transact(n=>OO(n,e,t))}getSelectionBoundingBox(){if(!this.editor.prosemirrorView)return;let{selection:e}=this.editor.prosemirrorState,{ranges:t}=e,n=Math.min(...t.map(e=>e.$from.pos)),r=Math.max(...t.map(e=>e.$to.pos));if(Kh(e)){let e=this.editor.prosemirrorView.nodeDOM(n);if(e)return e.getBoundingClientRect()}return Qh(this.editor.prosemirrorView,n,r).toJSON()}},oA=class{editor;constructor(e){this.editor=e}activeTransaction=null;can(e){try{return this.isInCan=!0,e()}finally{this.isInCan=!1}}isInCan=!1;exec(e){if(this.activeTransaction)throw Error("`exec` should not be called within a `transact` call, move the `exec` call outside of the `transact` call");if(this.isInCan)return this.canExec(e);let t=this.prosemirrorState,n=this.prosemirrorView;return e(t,e=>this.prosemirrorView.dispatch(e),n)}canExec(e){if(this.activeTransaction)throw Error("`canExec` should not be called within a `transact` call, move the `canExec` call outside of the `transact` call");let t=this.prosemirrorState,n=this.prosemirrorView;return e(t,void 0,n)}transact(e){if(this.activeTransaction)return e(this.activeTransaction);try{this.activeTransaction=this.editor._tiptapEditor.state.tr;let t=e(this.activeTransaction),n=this.activeTransaction;return this.activeTransaction=null,n&&(n.docChanged||n.selectionSet||n.scrolledIntoView||n.storedMarksSet||!n.isGeneric)&&this.prosemirrorView.dispatch(n),t}finally{this.activeTransaction=null}}get prosemirrorState(){if(this.activeTransaction)throw Error("`prosemirrorState` should not be called within a `transact` call, move the `prosemirrorState` call outside of the `transact` call or use `editor.transact` to read the current editor state");return this.editor._tiptapEditor.state}get prosemirrorView(){return this.editor._tiptapEditor.view}isFocused(){return this.prosemirrorView?.hasFocus()||!1}focus(){this.prosemirrorView?.focus()}get isEditable(){if(!this.editor._tiptapEditor){if(!this.editor.headless)throw Error(`no editor, but also not headless?`);return!1}return this.editor._tiptapEditor.isEditable===void 0||this.editor._tiptapEditor.isEditable}set isEditable(e){if(this.editor._tiptapEditor)this.editor._tiptapEditor.options.editable!==e&&this.editor._tiptapEditor.setEditable(e);else if(!this.editor.headless)throw Error(`no editor, but also not headless?`)}undo(){let e=this.editor.getExtension(`yUndo`);if(e)return this.exec(e.undoCommand);let t=this.editor.getExtension(`history`);if(t)return this.exec(t.undoCommand);throw Error(`No undo plugin found`)}redo(){let e=this.editor.getExtension(`yUndo`);if(e)return this.exec(e.redoCommand);let t=this.editor.getExtension(`history`);if(t)return this.exec(t.redoCommand);throw Error(`No redo plugin found`)}};function sA(e,t,n,r={updateSelection:!0}){let{from:i,to:a}=typeof t==`number`?{from:t,to:t}:{from:t.from,to:t.to},o=!0,s=!0,c=``;if(n.forEach(e=>{e.check(),o&&e.isText&&e.marks.length===0?c+=e.text:o=!1,s=s?e.isBlock:!1}),i===a&&s){let{parent:t}=e.doc.resolve(i);t.isTextblock&&!t.type.spec.code&&!t.childCount&&(--i,a+=1)}return o?e.insertText(c,i,a):e.replaceWith(i,a,n),r.updateSelection&&_m(e,e.steps.length-1,-1),!0}var cA=class{editor;constructor(e){this.editor=e}insertInlineContent(e,{updateSelection:t=!1}={}){let n=aS(e,this.editor.pmSchema);this.editor.transact(e=>{sA(e,{from:e.selection.from,to:e.selection.to},n,{updateSelection:t})})}getActiveStyles(){return this.editor.transact(e=>{let t={},n=e.selection.empty&&e.storedMarks||e.selection.$to.marks();for(let e of n){let n=this.editor.schema.styleSchema[e.type.name];n?n.propSchema===`boolean`?t[n.type]=!0:t[n.type]=e.attrs.stringValue:e.type.name!==`link`&&!e.type.spec.blocknoteIgnore&&console.warn(`mark not found in styleschema`,e.type.name)}return t})}addStyles(e){for(let[t,n]of Object.entries(e)){let e=this.editor.schema.styleSchema[t];if(!e)throw Error(`style ${t} not found in styleSchema`);if(e.propSchema===`boolean`)this.editor._tiptapEditor.commands.setMark(t);else if(e.propSchema===`string`)this.editor._tiptapEditor.commands.setMark(t,{stringValue:n});else throw new Lb(e.propSchema)}}removeStyles(e){for(let t of Object.keys(e))this.editor._tiptapEditor.commands.unsetMark(t)}toggleStyles(e){for(let[t,n]of Object.entries(e)){let e=this.editor.schema.styleSchema[t];if(!e)throw Error(`style ${t} not found in styleSchema`);if(e.propSchema===`boolean`)this.editor._tiptapEditor.commands.toggleMark(t);else if(e.propSchema===`string`)this.editor._tiptapEditor.commands.toggleMark(t,{stringValue:n});else throw new Lb(e.propSchema)}}getSelectedText(){return this.editor.transact(e=>e.doc.textBetween(e.selection.from,e.selection.to))}getLinkMarkAtPos(e){return this.editor.transact(t=>{let n=this.editor.pmSchema.marks.link,r=$p(t.doc.resolve(e),n);if(!r)return;let i=t.doc.nodeAt(r.from)?.marks.find(e=>e.type===n);if(i)return{href:i.attrs.href,from:r.from,to:r.to,text:t.doc.textBetween(r.from,r.to)}})}getSelectedLinkUrl(){return this.editor.transact(e=>(e.doc.nodeAt(e.selection.from)?.marks.find(e=>e.type.name===`link`))?.attrs.href)}createLink(e,t){e!==``&&this.editor.transact(n=>{let{from:r,to:i}=n.selection,a=this.editor.pmSchema.mark(`link`,{href:e});t?n.insertText(t,r,i).addMark(r,r+t.length,a):n.addMark(r,i,a)})}editLink(e,t,n=this.editor.transact(e=>e.selection.anchor)){this.editor.transact(r=>{let{from:i,to:a}=this.getLinkMarkAtPos(n)||{from:r.selection.from,to:r.selection.to},o=this.editor.pmSchema.mark(`link`,{href:e});t!==r.doc.textBetween(i,a)&&r.insertText(t,i,a),r.addMark(i,i+t.length,o)}),this.editor.prosemirrorView.focus()}deleteLink(e=this.editor.transact(e=>e.selection.anchor)){this.editor.transact(t=>{let{from:n,to:r}=this.getLinkMarkAtPos(e)||{from:t.selection.from,to:t.selection.to};t.removeMark(n,r,this.editor.pmSchema.marks.link).setMeta(`preventAutolink`,!0)}),this.editor.prosemirrorView.focus()}};function lA(e){return $m(e.state.selection.$from,e=>e.type.name===`tableCell`||e.type.name===`tableHeader`)!==void 0}function uA(e,t){let n=t.nodes.hardBreak,r=U.empty;return e.forEach(e=>{e.isTextblock&&e.childCount>0?(r=r.append(e.content),r=r.addToEnd(n.create())):e.isText?r=r.addToEnd(e):e.isBlock&&e.childCount>0&&(r=r.append(uA(e.content,t)),r=r.addToEnd(n.create()))}),r.lastChild?.type===n&&(r=r.cut(0,r.size-1)),r}function dA(e,t){let n=[];return e.forEach((e,r,i)=>{i!==t&&n.push(e)}),U.from(n)}function fA(e,t){let n=[];for(let r=0;r<e.childCount;r++)if(e.child(r).type.name===`tableRow`){if(n.length>0&&n[n.length-1].type.name===`table`){let t=n[n.length-1],i=t.copy(t.content.addToEnd(e.child(r)));n[n.length-1]=i}else{let i=t.nodes.table.createChecked(void 0,e.child(r));n.push(i)}}else n.push(e.child(r));return e=U.from(n),e}function pA(e,t){let n=U.from(e.content);n=fA(n,t.state.schema);let r=mA(n,t,e);if(r)return r;if(lA(t)){let e=!1;if(n.descendants(t=>{t.type.isInGroup(`tableContent`)&&(e=!0)}),!e&&!t.state.schema.nodes.tableParagraph.validContent(n))return new _e(uA(n,t.state.schema),0,0)}if(!hA(n,t))return new _e(n,e.openStart,e.openEnd);for(let e=0;e<n.childCount;e++)if(n.child(e).type.spec.group===`blockContent`){let r=[n.child(e)];if(e+1<n.childCount&&n.child(e+1).type.name===`blockGroup`){let t=n.child(e+1).child(0).child(0);(t.type.name===`bulletListItem`||t.type.name===`numberedListItem`||t.type.name===`checkListItem`)&&(r.push(n.child(e+1)),n=dA(n,e+1))}let i=t.state.schema.nodes.blockContainer.createChecked(void 0,r);n=n.replaceChild(e,i)}return new _e(n,e.openStart,e.openEnd)}function mA(e,t,n){if(lA(t)||t.dragging)return null;let r=Cb(t.state),i=r.isBlockContainer?r.blockContent.node:null;if(!i||i.type.name===`paragraph`||i.type.spec.content!==`inline*`||i.childCount>0)return null;let a=e.firstChild,o=a?.firstChild,s=o?.firstChild;if(a?.type.name!==`blockGroup`||o?.type.name!==`blockContainer`||s?.type.name!==`paragraph`)return null;let c=i.type.create(i.attrs,s.content),l=o.copy(o.content.replaceChild(0,c)),u=a.copy(a.content.replaceChild(0,l));return new _e(e.replaceChild(0,u),n.openStart,n.openEnd)}function hA(e,t){let n=e.childCount===1,r=e.firstChild?.type.spec.content===`inline*`,i=e.firstChild?.type.spec.content===`tableRow+`;if(n){if(r)return!1;if(i){let e=Cb(t.state);if(e.isBlockContainer)return e.blockContent.node.type.spec.content!==`tableRow+`}}return!0}var gA={enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!1},_A=class e extends tD{options;pmSchema;_tiptapEditor;elementRenderer=null;blockCache=new WeakMap;dictionary;schema;blockImplementations;inlineContentImplementations;styleImplementations;uploadFile;onUploadStartCallbacks=[];onUploadEndCallbacks=[];resolveFileUrl;settings;static create(t){return new e(t??{})}constructor(e){super(),this.options=e,this.dictionary=e.dictionary||Cu,this.settings={tables:{splitCells:e?.tables?.splitCells??!1,cellBackgroundColor:e?.tables?.cellBackgroundColor??!1,cellTextColor:e?.tables?.cellTextColor??!1,headers:e?.tables?.headers??!1}};let t={defaultStyles:!0,schema:e.schema||aw.create(),...e,placeholders:{...this.dictionary.placeholders,...e.placeholders}};if(this.schema=t.schema,this.blockImplementations=t.schema.blockSpecs,this.inlineContentImplementations=t.schema.inlineContentSpecs,this.styleImplementations=t.schema.styleSpecs,t.uploadFile){let e=t.uploadFile;this.uploadFile=async(t,n)=>{this.onUploadStartCallbacks.forEach(e=>e.apply(this,[n]));try{return await e(t,n)}finally{this.onUploadEndCallbacks.forEach(e=>e.apply(this,[n]))}}}this.resolveFileUrl=t.resolveFileUrl,this._eventManager=new wD(this),this._extensionManager=new eA(this,t);let n=this._extensionManager.getTiptapExtensions(),r={...gA,...t._tiptapOptions,element:null,autofocus:t.autofocus??!1,extensions:n,editorProps:{scrollMargin:{top:72,bottom:72,left:0,right:0},...t._tiptapOptions?.editorProps,attributes:{tabIndex:`0`,...t._tiptapOptions?.editorProps?.attributes,...t.domAttributes?.editor,class:Vb(`bn-editor`,t.defaultStyles?`bn-default-styles`:``,t.domAttributes?.editor?.class||``)},transformPasted:pA}};try{let e=t.initialContent||[{type:`paragraph`,id:Ob.options.generateID()}];if(!Array.isArray(e)||e.length===0)throw Error(`initialContent must be a non-empty array of blocks, received: `+JSON.stringify(e));let n=Oh(r.extensions);n.cached.blockNoteEditor=this;let i=Jm({type:`doc`,content:[{type:`blockGroup`,content:e.map(e=>cS(e,n,this.schema.styleSchema).toJSON())}]},n,r.parseOptions);this._tiptapEditor=new G_({...r,content:i.toJSON()}),this.pmSchema=this._tiptapEditor.schema}catch(e){throw Error("Error creating document from blocks passed as `initialContent`",{cause:e})}this.pmSchema.cached.blockNoteEditor=this,this._tiptapEditor.on(`mount`,()=>{this.headless=!1}),this._tiptapEditor.on(`unmount`,()=>{this.headless=!0}),this._blockManager=new CD(this),this._exportManager=new EO(this),this._selectionManager=new aA(this),this._stateManager=new oA(this),this._styleManager=new cA(this),this.emit(`create`)}_blockManager;_eventManager;_exportManager;_extensionManager;_selectionManager;_stateManager;_styleManager;get extensions(){return this._extensionManager.getExtensions()}exec(e){return this._stateManager.exec(e)}canExec(e){return this._stateManager.canExec(e)}transact(e){return this._stateManager.transact(e)}unregisterExtension=(...e)=>this._extensionManager.unregisterExtension(...e);registerExtension=(...e)=>this._extensionManager.registerExtension(...e);replaceExtension=(...e)=>this._extensionManager.replaceExtension(...e);getExtension=(e=>this._extensionManager.getExtension(e));mount=e=>{this._tiptapEditor.mount({mount:e})};unmount=()=>{this._tiptapEditor.unmount()};get prosemirrorState(){return this._stateManager.prosemirrorState}get prosemirrorView(){return this._stateManager.prosemirrorView}get domElement(){if(!this.headless)return this.prosemirrorView?.dom}_portalElements=new Map;registerPortalElement=e=>{this._portalElements.set(e,(this._portalElements.get(e)??0)+1)};unregisterPortalElement=e=>{let t=this._portalElements.get(e);t!==void 0&&(t<=1?this._portalElements.delete(e):this._portalElements.set(e,t-1))};isWithinEditor=e=>{if(this.domElement?.parentElement?.contains(e))return!0;for(let t of this._portalElements.keys())if(t.contains(e))return!0;return!1};isFocused(e){if(this.headless)return!1;let t=this.prosemirrorView?.hasFocus()||!1;if(!e?.includeEditorUI)return t;let n=typeof document<`u`?document.activeElement:null;return t||!!n&&this.isWithinEditor(n)}headless=!0;focus(){this.headless||this.prosemirrorView.focus()}blur(){this.headless||this.domElement?.blur()}onUploadStart(e){return this.onUploadStartCallbacks.push(e),()=>{let t=this.onUploadStartCallbacks.indexOf(e);t>-1&&this.onUploadStartCallbacks.splice(t,1)}}onUploadEnd(e){return this.onUploadEndCallbacks.push(e),()=>{let t=this.onUploadEndCallbacks.indexOf(e);t>-1&&this.onUploadEndCallbacks.splice(t,1)}}get topLevelBlocks(){return this.document}get document(){return this._blockManager.document}getBlock(e){return this._blockManager.getBlock(e)}getPrevBlock(e){return this._blockManager.getPrevBlock(e)}getNextBlock(e){return this._blockManager.getNextBlock(e)}getParentBlock(e){return this._blockManager.getParentBlock(e)}forEachBlock(e,t=!1){this._blockManager.forEachBlock(e,t)}onEditorContentChange(e){this._tiptapEditor.on(`update`,e)}onEditorSelectionChange(e){this._tiptapEditor.on(`selectionUpdate`,e)}onBeforeChange(e){return this._extensionManager.getExtension(Aw).subscribe(e)}getTextCursorPosition(){return this._selectionManager.getTextCursorPosition()}setTextCursorPosition(e,t=`start`){return this._selectionManager.setTextCursorPosition(e,t)}getSelection(){return this._selectionManager.getSelection()}getSelectionCutBlocks(e=!1){return this._selectionManager.getSelectionCutBlocks(e)}setSelection(e,t){return this._selectionManager.setSelection(e,t)}get isEditable(){return this._stateManager.isEditable}set isEditable(e){this._stateManager.isEditable=e}insertBlocks(e,t,n=`before`){return this._blockManager.insertBlocks(e,t,n)}updateBlock(e,t){return this._blockManager.updateBlock(e,t)}removeBlocks(e){return this._blockManager.removeBlocks(e)}replaceBlocks(e,t){return this._blockManager.replaceBlocks(e,t)}undo(){return this._stateManager.undo()}redo(){return this._stateManager.redo()}insertInlineContent(e,{updateSelection:t=!1}={}){this._styleManager.insertInlineContent(e,{updateSelection:t})}getActiveStyles(){return this._styleManager.getActiveStyles()}addStyles(e){this._styleManager.addStyles(e)}removeStyles(e){this._styleManager.removeStyles(e)}toggleStyles(e){this._styleManager.toggleStyles(e)}getSelectedText(){return this._styleManager.getSelectedText()}getSelectedLinkUrl(){return this._styleManager.getSelectedLinkUrl()}createLink(e,t){this._styleManager.createLink(e,t)}getLinkMarkAtPos(e){return this._styleManager.getLinkMarkAtPos(e)}editLink(e,t,n){this._styleManager.editLink(e,t,n)}deleteLink(e){this._styleManager.deleteLink(e)}canNestBlock(){return this._blockManager.canNestBlock()}nestBlock(){this._blockManager.nestBlock()}canUnnestBlock(){return this._blockManager.canUnnestBlock()}unnestBlock(){this._blockManager.unnestBlock()}moveBlocksUp(e){return this._blockManager.moveBlocksUp(e)}moveBlocksDown(e){return this._blockManager.moveBlocksDown(e)}blocksToHTMLLossy(e=this.document){return this._exportManager.blocksToHTMLLossy(e)}blocksToFullHTML(e=this.document){return this._exportManager.blocksToFullHTML(e)}tryParseHTMLToBlocks(e){return this._exportManager.tryParseHTMLToBlocks(e)}blocksToMarkdownLossy(e=this.document){return this._exportManager.blocksToMarkdownLossy(e)}tryParseMarkdownToBlocks(e){return this._exportManager.tryParseMarkdownToBlocks(e)}onChange(e,t){return this._eventManager.onChange(e,t)}onSelectionChange(e,t){return this._eventManager.onSelectionChange(e,t)}onFocusChange(e,t){return this._eventManager.onFocusChange(e,t)}onMount(e){return this._eventManager.onMount(e)}onUnmount(e){return this._eventManager.onUnmount(e)}getSelectionBoundingBox(){return this._selectionManager.getSelectionBoundingBox()}get isEmpty(){let e=this.document;return e.length===0||e.length===1&&e[0].type===`paragraph`&&e[0].content.length===0}pasteHTML(e,t=!1){this._exportManager.pasteHTML(e,t)}pasteText(e){return this._exportManager.pasteText(e)}pasteMarkdown(e){return this._exportManager.pasteMarkdown(e)}},vA=(0,J.createContext)(void 0);function yA(e){return(0,J.useContext)(vA)}function bA(e){let t=yA(e);if(!t?.editor)throw Error(`useBlockNoteEditor was called outside of a BlockNoteContext provider or BlockNoteView component`);return t.editor}function xA(e,t=e=>e){return(0,bp.useSyncExternalStoreWithSelector)(e.subscribe,()=>e.state,()=>e.state,t,SA)}function SA(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!t.has(n)||!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();let n=CA(e);return n.length===CA(t).length&&n.every(n=>Object.prototype.hasOwnProperty.call(t,n)&&Object.is(e[n],t[n]))}function CA(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}function wA(e,t){let n=(t?.editor??bA()).getExtension(e);if(!n)throw Error(`Extension not found`,{cause:{plugin:e}});return n}function TA(e,t){let{store:n}=wA(e,t);if(!n)throw Error(`Store not found on plugin`,{cause:{plugin:e}});return xA(n,t?.selector)}var EA=typeof window<`u`?J.useLayoutEffect:J.useEffect,DA=class{transactionNumber=0;lastTransactionNumber=0;lastSnapshot;editor;subscribers=new Set;constructor(e){this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber||(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber}),this.lastSnapshot}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e,t){if(this.editor=e,this.editor){let e=()=>{this.transactionNumber+=1,this.subscribers.forEach(e=>e())},n=this.editor._tiptapEditor,r={all:[`transaction`,`create`,`mount`,`unmount`],mount:[`create`,`mount`,`unmount`],selection:[`selectionUpdate`],change:[`update`]};for(let i of r[t])n.on(i,e);return()=>{for(let i of r[t])n.off(i,e)}}}};function OA(e){let t=yA(),n=e.editor||t?.editor||null,r=e.on||`all`,[i]=(0,J.useState)(()=>new DA(n)),a=(0,bp.useSyncExternalStoreWithSelector)(i.subscribe,i.getSnapshot,i.getServerSnapshot,e.selector,e.equalityFn??xp.default);return EA(()=>i.watch(n,r),[n,i,r]),(0,J.useDebugValue)(a),a}function kA(e){let t=yA();if(e||=t?.editor,!e)throw Error("'editor' is required in `useEditorDOMElement`, either from BlockNoteContext or as a function argument");return OA({editor:e,selector:e=>e.editor.domElement,equalityFn:(e,t)=>e===t,on:`mount`})}var AA=(0,J.createContext)(void 0);function jA(){return(0,J.useContext)(AA)}var MA=typeof window<`u`?J.useInsertionEffect:J.useEffect,NA=(0,J.createContext)(null);function PA(){let e=(0,J.useContext)(NA),t=kA();return e||(t?.parentElement??null)}function FA(e){return(0,Y.jsx)(NA.Provider,{value:null,children:e.children})}function IA(e){let{target:t,children:n}=e,r=bA(),i=jA()?.applyThemedRoot,[a]=(0,J.useState)(()=>typeof document>`u`?null:document.createElement(`div`));return MA(()=>{if(a&&t)return t.appendChild(a),()=>a.remove()},[a,t]),MA(()=>{!a||!t||i?.(a)},[a,t,i]),MA(()=>{if(a&&t)return r.registerPortalElement(a),()=>r.unregisterPortalElement(a)},[r,a,t]),t===void 0?n:(0,Y.jsx)(NA.Provider,{value:a,children:n})}function LA(){let[e]=(0,J.useState)(()=>{if(typeof document>`u`)return null;let e=document.createElement(`span`);return e.className=`bn-portal-anchor`,e}),t=(0,J.useCallback)(t=>{t&&e&&e.parentElement!==t&&t.appendChild(e)},[e]);return{anchor:e,holder:(0,Y.jsx)(`span`,{ref:t,className:RA,style:{position:`absolute`,width:0,height:0,overflow:`visible`}})}}var RA=`bn-portal-anchor-holder`;function zA(e){return Array.from(e.childNodes).some(e=>!(e instanceof Element&&e.classList.contains(RA)))}function BA(e){let{anchor:t,holder:n}=LA(),r=PA(),i=t??r,a=typeof e.children==`function`?e.children(i):e.children;return(0,Y.jsxs)(Y.Fragment,{children:[n,(0,Y.jsx)(NA.Provider,{value:i,children:a})]})}function VA(e){let t=new DOMRect,n=`getBoundingClientRect`in e?()=>e.getBoundingClientRect():()=>e.element.getBoundingClientRect();return()=>e.element&&(e.cacheMountedBoundingClientRect??!0)?(e.element.isConnected&&(t=n()),t):n()}function HA(e,t){return e?t?(n,r,i)=>{let a=e(n,r,i),o=t(n,r,i);return()=>{a?.(),o?.()}}:e:t}var UA=e=>{let t=bA(),n=PA(),{whileElementsMounted:r,middleware:i,...a}=e.useFloatingOptions??{},{refs:o,floatingStyles:c,context:l,middlewareData:u}=rp({whileElementsMounted:HA(_,e.useFloatingOptions?.whileElementsMounted),middleware:[...i??[],s()],...a}),{isMounted:d,styles:f}=up(l,e.useTransitionStylesProps),{status:p}=lp(l,e.useTransitionStatusProps),{getFloatingProps:m}=ap([tp(l,e.useDismissProps),vf(l,{enabled:!1,...e.useHoverProps})]),h=(0,J.useRef)(``),g=(0,J.useRef)(null),v=Gd([g,o.setFloating]);if((0,J.useEffect)(()=>{if(e.reference){let n=`element`in e.reference?e.reference.element:void 0;n!==void 0&&(e.focusManagerProps?.disabled||!t.isWithinEditor(n))&&o.setReference(n);let r=`getClientRects`in e.reference?e.reference.getClientRects:void 0;o.setPositionReference({getBoundingClientRect:VA(e.reference),...r?{getClientRects:r}:{},contextElement:n})}},[e.reference,o,e.focusManagerProps?.disabled,t]),(0,J.useEffect)(()=>{(p===`initial`||p===`open`)&&g.current&&zA(g.current)&&(h.current=g.current.innerHTML)},[p,e.reference,e.children]),!d||!n)return!1;let y={...e.elementProps,style:{display:`flex`,...e.elementProps?.style,zIndex:`calc(var(--bn-ui-base-z-index, 0) + ${e.elementProps?.style?.zIndex||0})`,...c,...f,...u.hide?.referenceHidden?{visibility:`hidden`}:{}},...m()};return p===`close`?(0,Y.jsx)(Bf,{root:n,children:(0,Y.jsx)(`div`,{ref:v,...y,dangerouslySetInnerHTML:{__html:h.current}})}):e.focusManagerProps?.disabled?(0,Y.jsx)(Bf,{root:n,children:(0,Y.jsx)(`div`,{ref:v,...y,children:(0,Y.jsx)(BA,{children:e.children})})}):(0,Y.jsx)(Bf,{root:n,children:(0,Y.jsx)(Zf,{...e.focusManagerProps,context:l,children:(0,Y.jsx)(`div`,{ref:v,...y,children:(0,Y.jsx)(BA,{children:e.children})})})})},WA=(0,J.createContext)(void 0);function GA(){return(0,J.useContext)(WA)}function KA(){return yA().editor.dictionary}var qA=e=>{let{position:t,children:n,...r}=e,{from:i,to:a}=t||{},o=bA(),s=kA(),c=(0,J.useMemo)(()=>{if(i!==void 0&&a!==void 0)return{element:s?.firstElementChild||void 0,getBoundingClientRect:()=>Qh(o.prosemirrorView,i,a??i)}},[o,s,i,a]);return(0,Y.jsx)(UA,{reference:c,...r,children:t!==void 0&&n})},JA=(e={},t=[])=>(0,J.useMemo)(()=>{let t=_A.create(e);return window&&(window.ProseMirror=t._tiptapEditor),t},t),YA=e=>{let[t,n]=(0,J.useState)(!1),r=OA({editor:e.editor,selector:({editor:e})=>e.isEmpty}),i=GA(),a=(0,J.useCallback)(()=>{n(!0)},[]),o=(0,J.useCallback)(()=>{n(!1)},[]);return(0,J.useEffect)(()=>{e.editable&&e.autoFocus&&e.editor.focus()},[e.autoFocus,e.editable,e.editor]),(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(i.Comments.Editor,{autoFocus:e.autoFocus,className:`bn-comment-editor`,editor:e.editor,onFocus:a,onBlur:o,editable:e.editable}),e.actions&&(0,Y.jsx)(`div`,{className:`bn-comment-actions-wrapper`,children:e.actions({isFocused:t,isEmpty:r})})]})},{textColor:XA,backgroundColor:ZA,...QA}=nw,$A=aw.create({blockSpecs:{paragraph:SC()},styleSpecs:QA});function ej(e){return!e.hasUnsavedContent||!e.confirmBeforeDiscard||(e.confirm??(e=>window.confirm(e)))(e.message)}var tj=iv(({editor:e,options:{submitOnEnter:t=!0,onSubmit:n}})=>{let r=!1;async function i(){if(!(!e.isEditable||e.isEmpty||r)){r=!0;try{await n(e)}finally{r=!1}}}function a({event:t}){let n=e.prosemirrorView;return!n.editable||n.composing||t.isComposing||t.keyCode===229?!1:(t.repeat||i(),!0)}return{key:`commentEditorSubmit`,submit:i,runsBefore:[`default`],keyboardShortcuts:{"Mod-Enter":a,...t?{Enter:a}:{}}}}),nj=b_.create({name:`comment`,excludes:``,inclusive:!1,keepOnSplit:!0,group:X_,addAttributes(){return{orphan:{parseHTML:e=>!!e.getAttribute(`data-orphan`),renderHTML:e=>e.orphan?{"data-orphan":`true`}:{},default:!1},threadId:{parseHTML:e=>e.getAttribute(`data-bn-thread-id`),renderHTML:e=>({"data-bn-thread-id":e.threadId}),default:``}}},renderHTML({HTMLAttributes:e}){return[`span`,vh(e,{class:`bn-thread-mark`})]},parseHTML(){return[{tag:`span.bn-thread-mark`}]},extendMarkSchema(e){return e.name===`comment`?{blocknoteIgnore:!0}:{}}}),rj=new Ae(`blocknote-comments`);function ij(e,t){let n=new Map;return e.descendants((e,r)=>{e.marks.forEach(i=>{if(i.type.name===t){let t=i.attrs.threadId;if(!t)return;let a=r,o=a+e.nodeSize,s=n.get(t)??{from:1/0,to:0};n.set(t,{from:Math.min(a,s.from),to:Math.max(o,s.to)})}})}),n}var aj=iv(({editor:e,options:{schema:t,threadStore:n,resolveUsers:r,confirmBeforeDiscard:i=!0,submitOnEnter:a=!0}})=>{if(!r)throw Error(`resolveUsers is required to be defined when using comments`);if(!n)throw Error(`threadStore is required to be defined when using comments`);let o=lw(r),s=nj.name,c=av({pendingComment:!1,selectedThreadId:void 0,threadPositions:new Map},{onUpdate(t,n){t.selectedThreadId!==n.selectedThreadId&&e.transact(e=>e.setMeta(rj,!0))}}),l=t=>{e.transact(e=>{e.doc.descendants((n,r)=>{n.marks.forEach(i=>{if(i.type.name===s){let a=i.type,o=i.attrs.threadId,s=t.get(o),l=!!(!s||s.resolved||s.deletedAt);if(l!==i.attrs.orphan){let t=Math.max(r,0),s=Math.min(r+n.nodeSize,e.doc.content.size-1,e.doc.content.size-1);e.removeMark(t,s,i),e.addMark(t,s,a.create({...i.attrs,orphan:l})),l&&c.state.selectedThreadId===o&&c.setState(e=>({...e,selectedThreadId:void 0}))}}})})})};return{key:`comments`,store:c,userStore:o,runsBefore:[`link`],tiptapExtensions:[nj],prosemirrorPlugins:[new ke({key:rj,state:{init(){return{decorations:Ke.empty}},apply(e,t){let n=e.getMeta(rj);if(!e.docChanged&&!n)return t;let r=e.docChanged?ij(e.doc,s):c.state.threadPositions;(r.size>0||c.state.threadPositions.size>0)&&c.setState(e=>({...e,threadPositions:r}));let i=[];if(c.state.selectedThreadId){let e=r.get(c.state.selectedThreadId);e&&i.push(ft.inline(e.from,e.to,{class:`bn-thread-mark-selected`}))}return{decorations:Ke.create(e.doc,i)}}},props:{decorations(e){return rj.getState(e)?.decorations??Ke.empty},handleClick:(e,t,n)=>{if(n.button!==0)return!1;let r=e.state.doc.nodeAt(t);if(!r)return c.setState(e=>({...e,selectedThreadId:void 0})),!1;let i=r.marks.find(e=>e.type.name===s&&e.attrs.orphan!==!0);if(!i)return c.state.selectedThreadId!==void 0&&c.setState(e=>({...e,selectedThreadId:void 0})),!1;let a=i.attrs.threadId;return a!==c.state.selectedThreadId&&(c.setState(e=>({...e,selectedThreadId:a})),!0)}}})],threadStore:n,mount(){let t=n.subscribe(l);l(n.getThreads());let r=e.onSelectionChange(()=>{c.state.pendingComment&&c.setState(e=>({...e,pendingComment:!1}))});return()=>{t(),r()}},selectThread(t,n=!0){if(c.state.selectedThreadId!==t&&(c.setState(e=>({...e,pendingComment:!1,selectedThreadId:t})),t&&n)){let n=c.state.threadPositions.get(t);if(!n)return;(e.prosemirrorView?.domAtPos(n.from).node)?.scrollIntoView({behavior:`smooth`,block:`center`})}},startPendingComment(){c.setState(e=>({...e,selectedThreadId:void 0,pendingComment:!0})),e.domElement?.focus(),e.getExtension(sw)?.showSelection(!0,`comments`)},stopPendingComment(){c.setState(e=>({...e,selectedThreadId:void 0,pendingComment:!1})),e.getExtension(sw)?.showSelection(!1,`comments`)},async createThread(t){let r=await n.createThread(t);n.addThreadToDocument?await n.addThreadToDocument({threadId:r.id,selection:e.transact(e=>e.selection),editor:e}):e._tiptapEditor.commands.setMark(s,{orphan:!1,threadId:r.id})},commentEditorSchema:t,confirmBeforeDiscard:i,submitOnEnter:a}}),oj=gp();function sj(e,t){if(e.isDestroyed||t.defaultPrevented||!t.cancelable||!e.isEditable||t.inputType!==`insertParagraph`&&t.inputType!==`insertLineBreak`||!sm()&&!om())return;let n=e.view,r=n.root,i=(r.getSelection?.call(r)??n.dom.ownerDocument.getSelection())?.anchorNode,a=(i?.nodeType===1?i:i?.parentElement)?.closest(`[data-node-view-content-react]`);if(!a||!n.dom.contains(a))return;let o=n.input.lastKeyCode;o===13&&(n.input.lastKeyCode=null),n.domObserver.forceFlush(),n.domObserver.flush();let s=new KeyboardEvent(`keydown`,{key:`Enter`,code:`Enter`,keyCode:13,shiftKey:t.inputType===`insertLineBreak`,bubbles:!0,cancelable:!0});n.someProp(`handleKeyDown`,e=>e(n,s))?(t.preventDefault(),n.input.lastIOSEnter=0,clearTimeout(n.input.lastIOSEnterFallbackTimeout)):o===13&&(n.input.lastKeyCode=o)}var cj=new Ae(`reactMobileEnter`),lj=(...e)=>t=>{e.forEach(e=>{typeof e==`function`?e(t):e&&(e.current=t)})},uj=({contentComponent:e})=>{let t=(0,oj.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,Y.jsx)(Y.Fragment,{children:Object.values(t)})};function dj(){let e=new Set,t={},n=!1,r=()=>{!n&&e.size&&(n=!0,queueMicrotask(()=>{n=!1,e.forEach(e=>e())}))};return{subscribe(t){return e.add(t),()=>{e.delete(t)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(e,n){t={...t,[e]:Wd.createPortal(n.reactElement,n.element,e)},r()},removeRenderer(e){let n={...t};delete n[e],t=n,r()}}}var fj=class extends J.Component{constructor(e){super(e),this.editorContentRef=J.createRef()}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){let e=this.props.editor;if(e&&!e.isDestroyed&&e.view.dom?.parentNode){if(e.contentComponent)return;let t=this.editorContentRef.current;t.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:t}),e.contentComponent=dj(),e.createNodeViews(),e.registerPlugin(new ke({key:cj,props:{handleDOMEvents:{beforeinput:(t,n)=>sj(e,n)}}})),e.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){let e=this.props.editor;if(e){e.isEditorContentInitialized=!1,e.isDestroyed||(e.unregisterPlugin(cj),e.view.setProps({nodeViews:{}})),e.contentComponent=null;try{if(!e.view.dom?.parentNode)return;let t=document.createElement(`div`);t.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:t})}catch{}}}render(){let{editor:e,innerRef:t,...n}=this.props;return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`div`,{ref:lj(t,this.editorContentRef),...n}),e?.contentComponent&&(0,Y.jsx)(uj,{contentComponent:e.contentComponent})]})}},pj=(0,J.forwardRef)((e,t)=>{let n=J.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return J.createElement(fj,{key:n,innerRef:t,...e})}),mj=J.memo(pj);typeof window>`u`||typeof window<`u`&&window.next;var hj=(0,J.createContext)({editor:null});hj.Consumer;var gj=(0,J.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),_j=()=>(0,J.useContext)(gj),vj=J.forwardRef((e,t)=>{let{onDragStart:n}=_j(),r=e.as||`div`;return(0,Y.jsx)(r,{...e,ref:t,"data-node-view-wrapper":``,onDragStart:n,style:{whiteSpace:`normal`,...e.style}})});function yj(e){return!!(typeof e==`function`&&e.prototype&&e.prototype.isReactComponent)}function bj(e){return!(typeof e!=`object`||!e.$$typeof||e.$$typeof.toString()!==`Symbol(react.forward_ref)`&&e.$$typeof.description!==`react.forward_ref`)}function xj(e){return!(typeof e!=`object`||!e.$$typeof||e.$$typeof.toString()!==`Symbol(react.memo)`&&e.$$typeof.description!==`react.memo`)}function Sj(e){if(yj(e)||bj(e))return!0;if(xj(e)){let t=e.type;if(t)return yj(t)||bj(t)}return!1}function Cj(){try{if(J.version)return parseInt(J.version.split(`.`)[0],10)>=19}catch{}return!1}var wj=class{constructor(e,{editor:t,props:n={},as:r=`div`,className:i=``}){this.ref=null,this.destroyed=!1,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=e,this.editor=t,this.props=n,this.element=document.createElement(r),this.element.classList.add(`react-renderer`),i&&this.element.classList.add(...i.split(` `)),this.editor.isEditorContentInitialized?(0,Wd.flushSync)(()=>{this.render()}):queueMicrotask(()=>{this.destroyed||this.render()})}render(){var e;if(this.destroyed)return;let t=this.component,n=this.props,r=this.editor,i=Cj(),a=Sj(t),o={...n};o.ref&&!(i||a)&&delete o.ref,!o.ref&&(i||a)&&(o.ref=e=>{this.ref=e}),this.reactElement=(0,Y.jsx)(t,{...o}),r==null||(e=r.contentComponent)==null||e.setRenderer(this.id,this)}updateProps(e={}){if(this.destroyed)return;let t=!1,n=Object.keys(e);for(let r=0;r<n.length;r+=1){let i=n[r];if(e[i]!==this.props[i]){t=!0;break}}t&&(this.props={...this.props,...e},this.render())}destroy(){var e;this.destroyed=!0;let t=this.editor;t==null||(e=t.contentComponent)==null||e.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(e){Object.keys(e).forEach(t=>{this.element.setAttribute(t,e[t])})}};J.createContext({markViewContentRef:()=>{}});function Tj(e){var t;let n=e.getRootNode(),r=typeof n.getSelection==`function`?n.getSelection():(t=e.ownerDocument)==null||(t=t.defaultView)==null?void 0:t.getSelection();if(!r||r.rangeCount===0)return null;let{anchorNode:i,anchorOffset:a,focusNode:o,focusOffset:s}=r;return!i||!o||!e.contains(i)||!e.contains(o)?null:()=>{try{r.setBaseAndExtent(i,a,o,s)}catch{}}}function Ej(e,t,n){return e.node(n)===t.node(n)&&e.before(n)===t.before(n)}function Dj(e){if(!rm(e))return[];let{$from:t,$to:n}=e,r=[],i=Math.min(t.depth,n.depth);for(let e=1;e<=i&&Ej(t,n,e);e+=1)r.push(t.before(e));return r}var Oj=class{constructor(e){this.views=new WeakMap,this.viewCount=0,this.insideViews=new Set,this.syncQueued=!1,this.scheduleSync=()=>{this.syncQueued||(this.syncQueued=!0,queueMicrotask(()=>{this.syncQueued=!1,this.sync()}))},this.handleTransaction=()=>this.scheduleSync(),this.editor=e}register(e){this.viewCount===0&&this.editor.on(`transaction`,this.handleTransaction),this.views.set(e.dom,e),this.viewCount+=1,this.scheduleSync()}unregister(e){this.views.delete(e.dom),--this.viewCount,this.insideViews.delete(e),this.viewCount===0&&this.editor.off(`transaction`,this.handleTransaction)}sync(){if(this.viewCount===0||this.editor.isDestroyed)return;let e=this.findInsideViews();this.updateViews(this.insideViews,e,!1),this.updateViews(e,this.insideViews,!0),this.insideViews=e}updateViews(e,t,n){for(let r of e)t.has(r)||r.setSelectionInside(n)}findInsideViews(){let e=new Set;for(let t of Dj(this.editor.state.selection)){let n=this.editor.view.nodeDOM(t),r=n?this.views.get(n):void 0;r&&e.add(r)}return e}},kj=new WeakMap;function Aj(e){let t=kj.get(e);return t||(t=new Oj(e),kj.set(e,t)),t}var jj=class extends J_{constructor(e,t,n){if(super(e,t,n),this.nodeSelected=!1,this.handlePositionUpdate=()=>{let e=this.getPos();typeof e==`number`&&e!==this.currentPos&&(this.currentPos=e,this.renderer.updateProps({getPos:()=>this.getPos()}),typeof this.options.attrs==`function`&&this.updateElementAttributes())},this.cachedExtensionWithSyncedStorage=null,!this.node.isLeaf){this.contentDOMElement=this.options.contentDOMElementTag?document.createElement(this.options.contentDOMElementTag):document.createElement(this.node.isInline?`span`:`div`),this.contentDOMElement.dataset.nodeViewContentReact=``,this.contentDOMElement.dataset.nodeViewWrapper=``,this.contentDOMElement.style.whiteSpace=`inherit`;let e=this.dom.querySelector(`[data-node-view-content]`);e?e.appendChild(this.contentDOMElement):this.dom.appendChild(this.contentDOMElement)}this.options.trackNodeViewPosition&&this.editor.on(`update`,this.handlePositionUpdate)}get extensionWithSyncedStorage(){if(!this.cachedExtensionWithSyncedStorage){let e=this.editor,t=this.extension;this.cachedExtensionWithSyncedStorage=new Proxy(t,{get(n,r,i){return r===`storage`?e.storage[t.name]??{}:Reflect.get(n,r,i)}})}return this.cachedExtensionWithSyncedStorage}mount(){let e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,selectionInside:!1,extension:this.extensionWithSyncedStorage,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(e={})=>this.updateAttributes(e),deleteNode:()=>this.deleteNode(),ref:(0,J.createRef)()};if(!this.component.displayName){let e=e=>e.charAt(0).toUpperCase()+e.substring(1);this.component.displayName=e(this.extension.name)}let t={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:e=>{if(e&&this.contentDOMElement&&e.firstChild!==this.contentDOMElement){e.hasAttribute(`data-node-view-wrapper`)&&e.removeAttribute(`data-node-view-wrapper`);let t=Tj(this.contentDOMElement);e.appendChild(this.contentDOMElement),t?.()}}},n=this.component,r=(0,J.memo)(e=>(0,Y.jsx)(gj.Provider,{value:t,children:(0,J.createElement)(n,e)}));r.displayName=`ReactNodeView`;let i=this.node.isInline?`span`:`div`;this.options.as&&(i=this.options.as);let{className:a=``}=this.options;this.renderer=new wj(r,{editor:this.editor,props:e,as:i,className:`node-${this.node.type.name} ${a}`.trim()}),Aj(this.editor).register(this),this.updateElementAttributes(),this.currentPos=this.getPos()}get dom(){if(this.renderer.element.firstElementChild&&!this.renderer.element.firstElementChild?.hasAttribute(`data-node-view-wrapper`))throw Error(`Please use the NodeViewWrapper component for your node view.`);return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}update(e,t,n){let r=e=>{this.renderer.updateProps(e),typeof this.options.attrs==`function`&&this.updateElementAttributes()};if(e.type!==this.node.type)return!1;if(typeof this.options.update==`function`){let i=this.node,a=this.decorations,o=this.innerDecorations;return this.node=e,this.decorations=t,this.innerDecorations=n,this.currentPos=this.getPos(),this.options.update({oldNode:i,oldDecorations:a,newNode:e,newDecorations:t,oldInnerDecorations:o,innerDecorations:n,updateProps:()=>r({node:e,decorations:t,innerDecorations:n,extension:this.extensionWithSyncedStorage})})}if(e===this.node)return this.node=e,this.decorations=t,this.innerDecorations=n,!0;let i=this.getPos();this.node=e,this.decorations=t,this.innerDecorations=n,this.currentPos=i;let a={node:e,decorations:t,innerDecorations:n,extension:this.extensionWithSyncedStorage};return this.options.trackNodeViewPosition&&(a.getPos=()=>this.getPos()),r(a),!0}selectNode(){this.nodeSelected=!0,this.updateSelectedState(!0)}deselectNode(){this.nodeSelected=!1,this.updateSelectedState(this.options.selectedOnTextSelection===!0&&this.isTextSelectionInside())}setSelectionInside(e){let t=this.nodeSelected||this.options.selectedOnTextSelection===!0&&e;this.renderer.updateProps({selectionInside:e,selected:t}),this.renderer.element.classList.toggle(`ProseMirror-selectednode`,t)}updateSelectedState(e){this.renderer.updateProps({selected:e}),this.renderer.element.classList.toggle(`ProseMirror-selectednode`,e)}isTextSelectionInside(){let e=this.getPos();return typeof e==`number`&&Dj(this.editor.state.selection).includes(e)}destroy(){this.renderer.destroy(),Aj(this.editor).unregister(this),this.options.trackNodeViewPosition&&this.editor.off(`update`,this.handlePositionUpdate),this.contentDOMElement=null}updateElementAttributes(){if(this.options.attrs){let e={};if(typeof this.options.attrs==`function`){let t=this.editor.extensionManager.attributes,n=yh(this.node,t);e=this.options.attrs({node:this.node,HTMLAttributes:n})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}};function Mj(e,t){return n=>n.editor.contentComponent?new jj(e,n,t):{dom:document.createElement(`span`),contentDOM:null,update:()=>!1,destroy:()=>{},selectNode:()=>{},deselectNode:()=>{},stopEvent:()=>!1,ignoreMutation:()=>!0}}var Nj=(0,J.createContext)({get editor(){throw Error(`useTiptap must be used within a <Tiptap> provider`)}});Nj.displayName=`TiptapContext`;var Pj=()=>(0,J.useContext)(Nj);function Fj({children:e,...t}){let n=`editor`in t?t.editor:t.instance;if(!n)throw Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");let r=(0,J.useMemo)(()=>({editor:n}),[n]),i=(0,J.useMemo)(()=>({editor:n}),[n]);return(0,Y.jsx)(hj.Provider,{value:i,children:(0,Y.jsx)(Nj.Provider,{value:r,children:e})})}Fj.displayName=`Tiptap`;function Ij({...e}){let{editor:t}=Pj();return(0,Y.jsx)(mj,{editor:t,...e})}Ij.displayName=`Tiptap.Content`,Object.assign(Fj,{Content:Ij});var Lj=St(),Rj=Object.defineProperty,zj=(e,t)=>{let n={};for(var r in e)Rj(n,r,{get:e[r],enumerable:!0});return t||Rj(n,Symbol.toStringTag,{value:`Module`}),n},Bj=e=>{let{blockId:t,children:n,...r}=e,i=bA(),a=(0,J.useMemo)(()=>i.transact(e=>{if(!t)return;let n=lS(t,e.doc);if(!n)return;let{node:r}=i.prosemirrorView.domAtPos(n.posBeforeNode+1);if(r instanceof Element)return{element:r}}),[i,t]);return(0,Y.jsx)(UA,{reference:a,...r,children:t!==void 0&&n})},Vj=e=>{let t=GA(),n=KA(),r=bA(),i=r.getBlock(e.blockId),[a,o]=(0,J.useState)(``),s=(0,J.useCallback)(e=>{o(e.currentTarget.value)},[]),c=(0,J.useCallback)(()=>{r.getBlock(e.blockId)&&r.updateBlock(e.blockId,{props:{name:dx(a),url:a}})},[r,e.blockId,a]);return i?(0,Y.jsx)(t.FilePanel.TabPanel,{className:`bn-tab-panel`,children:(0,Y.jsx)(t.Generic.Form.Root,{onSubmit:c,submitButton:(0,Y.jsx)(t.FilePanel.Button,{className:`bn-button`,type:`submit`,"data-test":`embed-input-button`,children:n.file_panel.embed.embed_button[i.type]||n.file_panel.embed.embed_button.file}),children:(0,Y.jsx)(t.FilePanel.TextInput,{className:`bn-text-input`,placeholder:n.file_panel.embed.url_placeholder,value:a,onChange:s,"data-test":`embed-input`})})}):null},Hj=e=>{let t=GA(),n=KA(),{setLoading:r}=e,i=bA(),a=i.getBlock(e.blockId),[o,s]=(0,J.useState)(!1);(0,J.useEffect)(()=>{o&&setTimeout(()=>{s(!1)},3e3)},[o]);let c=(0,J.useCallback)(t=>{if(t===null)return;async function n(t){if(r(!0),i.uploadFile!==void 0)try{let n=await i.uploadFile(t,e.blockId);if(!i.getBlock(e.blockId))return;typeof n==`string`&&(n={props:{name:t.name,url:n}}),i.updateBlock(e.blockId,n)}catch{s(!0)}finally{r(!1)}}n(t)},[e.blockId,i,r]);if(!a)return null;let l=i.schema.blockSpecs[a.type],u=l.implementation.meta?.fileBlockAccept?.length?l.implementation.meta.fileBlockAccept.join(`,`):`*/*`;return(0,Y.jsxs)(t.FilePanel.TabPanel,{className:`bn-tab-panel`,children:[(0,Y.jsx)(t.FilePanel.FileInput,{className:`bn-file-input`,"data-test":`upload-input`,accept:u,placeholder:n.file_panel.upload.file_placeholder[a.type]||n.file_panel.upload.file_placeholder.file,value:null,onChange:c}),o&&(0,Y.jsx)(`div`,{className:`bn-error-text`,children:n.file_panel.upload.upload_error})]})},Uj=e=>{let t=GA(),n=KA(),r=bA(),[i,a]=(0,J.useState)(!1),o=e.tabs??[...r.uploadFile===void 0?[]:[{name:n.file_panel.upload.title,tabPanel:(0,Y.jsx)(Hj,{blockId:e.blockId,setLoading:a})}],{name:n.file_panel.embed.title,tabPanel:(0,Y.jsx)(Vj,{blockId:e.blockId})}],[s,c]=(0,J.useState)(e.defaultOpenTab||o[0].name);return(0,Y.jsx)(t.FilePanel.Root,{className:`bn-panel`,defaultOpenTab:s,openTab:s,setOpenTab:c,tabs:o,loading:i})},Wj=e=>{let t=bA(),n=wA(OS),r=TA(OS),i=(0,J.useMemo)(()=>({...e.floatingUIOptions,useFloatingOptions:{open:!!r,onOpenChange:(e,r,i)=>{e||n.closeMenu(),i===`escape-key`&&t.focus()},middleware:[o(10),m()],...e.floatingUIOptions?.useFloatingOptions},focusManagerProps:{disabled:!0,...e.floatingUIOptions?.focusManagerProps},elementProps:{style:{zIndex:90},...e.floatingUIOptions?.elementProps}}),[r,t,n,e.floatingUIOptions]),a=e.filePanel||Uj;return(0,Y.jsx)(IA,{target:e.portalElement,children:(0,Y.jsx)(Bj,{blockId:r,...i,children:r&&(0,Y.jsx)(a,{blockId:r})})})},Gj={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Kj=J.createContext&&J.createContext(Gj),qj=[`attr`,`size`,`title`];function Jj(e,t){if(e==null)return{};var n,r,i=Yj(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Yj(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Xj(){return Xj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xj.apply(null,arguments)}function Zj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Zj(Object(n),!0).forEach(function(t){$j(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $j(e,t,n){return(t=eM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eM(e){var t=tM(e,`string`);return typeof t==`symbol`?t:t+``}function tM(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function nM(e){return e&&e.map((e,t)=>J.createElement(e.tag,Qj({key:t},e.attr),nM(e.child)))}function rM(e){return t=>J.createElement(iM,Xj({attr:Qj({},e.attr)},t),nM(e.child))}function iM(e){var t=t=>{var{attr:n,size:r,title:i}=e,a=Jj(e,qj),o=r||t.size||`1em`,s;return t.className&&(s=t.className),e.className&&(s=(s?s+` `:``)+e.className),J.createElement(`svg`,Xj({stroke:`currentColor`,fill:`currentColor`,strokeWidth:`0`},t.attr,n,a,{className:s,style:Qj(Qj({color:e.color||t.color},t.style),e.style),height:o,width:o,xmlns:`http://www.w3.org/2000/svg`}),i&&J.createElement(`title`,null,i),e.children)};return Kj===void 0?t(Gj):J.createElement(Kj.Consumer,null,e=>t(e))}function aM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM8 13H16C16 15.2091 14.2091 17 12 17C9.79086 17 8 15.2091 8 13ZM8 11C7.17157 11 6.5 10.3284 6.5 9.5C6.5 8.67157 7.17157 8 8 8C8.82843 8 9.5 8.67157 9.5 9.5C9.5 10.3284 8.82843 11 8 11ZM16 11C15.1716 11 14.5 10.3284 14.5 9.5C14.5 8.67157 15.1716 8 16 8C16.8284 8 17.5 8.67157 17.5 9.5C17.5 10.3284 16.8284 11 16 11Z`},child:[]}]})(e)}function oM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM8 13C8 15.2091 9.79086 17 12 17C14.2091 17 16 15.2091 16 13H8ZM8 11C8.82843 11 9.5 10.3284 9.5 9.5C9.5 8.67157 8.82843 8 8 8C7.17157 8 6.5 8.67157 6.5 9.5C6.5 10.3284 7.17157 11 8 11ZM16 11C16.8284 11 17.5 10.3284 17.5 9.5C17.5 8.67157 16.8284 8 16 8C15.1716 8 14.5 8.67157 14.5 9.5C14.5 10.3284 15.1716 11 16 11Z`},child:[]}]})(e)}function sM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M5 11V13H19V11H5Z`},child:[]}]})(e)}function cM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M5 10C3.9 10 3 10.9 3 12C3 13.1 3.9 14 5 14C6.1 14 7 13.1 7 12C7 10.9 6.1 10 5 10ZM19 10C17.9 10 17 10.9 17 12C17 13.1 17.9 14 19 14C20.1 14 21 13.1 21 12C21 10.9 20.1 10 19 10ZM12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12C14 10.9 13.1 10 12 10Z`},child:[]}]})(e)}function lM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M10 6V8H5V19H16V14H18V20C18 20.5523 17.5523 21 17 21H4C3.44772 21 3 20.5523 3 20V7C3 6.44772 3.44772 6 4 6H10ZM21 3V12L17.206 8.207L11.2071 14.2071L9.79289 12.7929L15.792 6.793L12 3H21Z`},child:[]}]})(e)}function uM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M4 19H20V12H22V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V12H4V19ZM14 9H19L12 16L5 9H10V3H14V9Z`},child:[]}]})(e)}function dM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M17 6H22V8H20V21C20 21.5523 19.5523 22 19 22H5C4.44772 22 4 21.5523 4 21V8H2V6H7V3C7 2.44772 7.44772 2 8 2H16C16.5523 2 17 2.44772 17 3V6ZM9 11V17H11V11H9ZM13 11V17H15V11H13ZM9 4V6H15V4H9Z`},child:[]}]})(e)}function fM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M17 6H22V8H20V21C20 21.5523 19.5523 22 19 22H5C4.44772 22 4 21.5523 4 21V8H2V6H7V3C7 2.44772 7.44772 2 8 2H16C16.5523 2 17 2.44772 17 3V6ZM18 8H6V20H18V8ZM9 4V6H15V4H9Z`},child:[]}]})(e)}function pM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z`},child:[]}]})(e)}function mM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M11 11V5H13V11H19V13H13V19H11V13H5V11H11Z`},child:[]}]})(e)}function hM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z`},child:[]}]})(e)}function gM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M22 18V20H2V18H22ZM2 3.5L10 8.5L2 13.5V3.5ZM22 11V13H12V11H22ZM22 4V6H12V4H22Z`},child:[]}]})(e)}function _M(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M20 3C20.5523 3 21 3.44772 21 4V5.757L19 7.757V5H5V13.1L9 9.1005L13.328 13.429L12.0012 14.7562L11.995 18.995L16.2414 19.0012L17.571 17.671L18.8995 19H19V16.242L21 14.242V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3H20ZM21.7782 7.80761L23.1924 9.22183L15.4142 17L13.9979 16.9979L14 15.5858L21.7782 7.80761ZM15.5 7C16.3284 7 17 7.67157 17 8.5C17 9.32843 16.3284 10 15.5 10C14.6716 10 14 9.32843 14 8.5C14 7.67157 14.6716 7 15.5 7Z`},child:[]}]})(e)}function vM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M21 15V18H24V20H21V23H19V20H16V18H19V15H21ZM21.0082 3C21.556 3 22 3.44495 22 3.9934L22.0007 13.3417C21.3749 13.1204 20.7015 13 20 13V5H4L4.001 19L13.2929 9.70715C13.6528 9.34604 14.22 9.31823 14.6123 9.62322L14.7065 9.70772L18.2521 13.2586C15.791 14.0069 14 16.2943 14 19C14 19.7015 14.1204 20.3749 14.3417 21.0007L2.9918 21C2.44405 21 2 20.5551 2 20.0066V3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082ZM8 7C9.10457 7 10 7.89543 10 9C10 10.1046 9.10457 11 8 11C6.89543 11 6 10.1046 6 9C6 7.89543 6.89543 7 8 7Z`},child:[]}]})(e)}function yM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M5 11.1005L7 9.1005L12.5 14.6005L16 11.1005L19 14.1005V5H5V11.1005ZM4 3H20C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3ZM15.5 10C14.6716 10 14 9.32843 14 8.5C14 7.67157 14.6716 7 15.5 7C16.3284 7 17 7.67157 17 8.5C17 9.32843 16.3284 10 15.5 10Z`},child:[]}]})(e)}function bM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M2 3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934ZM8 5V19H16V5H8ZM4 5V7H6V5H4ZM18 5V7H20V5H18ZM4 9V11H6V9H4ZM18 9V11H20V9H18ZM4 13V15H6V13H4ZM18 13V15H20V13H18ZM4 17V19H6V17H4ZM18 17V19H20V17H18Z`},child:[]}]})(e)}function xM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M8 3V12C8 14.2091 9.79086 16 12 16C14.2091 16 16 14.2091 16 12V3H18V12C18 15.3137 15.3137 18 12 18C8.68629 18 6 15.3137 6 12V3H8ZM4 20H20V22H4V20Z`},child:[]}]})(e)}function SM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M13 6V21H11V6H5V4H19V6H13Z`},child:[]}]})(e)}function CM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M13 10V14H19V10H13ZM11 10H5V14H11V10ZM13 19H19V16H13V19ZM11 19V16H5V19H11ZM13 5V8H19V5H13ZM11 5H5V8H11V5ZM4 3H20C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3Z`},child:[]}]})(e)}function wM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M17.1538 14C17.3846 14.5161 17.5 15.0893 17.5 15.7196C17.5 17.0625 16.9762 18.1116 15.9286 18.867C14.8809 19.6223 13.4335 20 11.5862 20C9.94674 20 8.32335 19.6185 6.71592 18.8555V16.6009C8.23538 17.4783 9.7908 17.917 11.3822 17.917C13.9333 17.917 15.2128 17.1846 15.2208 15.7196C15.2208 15.0939 15.0049 14.5598 14.5731 14.1173C14.5339 14.0772 14.4939 14.0381 14.4531 14H3V12H21V14H17.1538ZM13.076 11H7.62908C7.4566 10.8433 7.29616 10.6692 7.14776 10.4778C6.71592 9.92084 6.5 9.24559 6.5 8.45207C6.5 7.21602 6.96583 6.165 7.89749 5.299C8.82916 4.43299 10.2706 4 12.2219 4C13.6934 4 15.1009 4.32808 16.4444 4.98426V7.13591C15.2448 6.44921 13.9293 6.10587 12.4978 6.10587C10.0187 6.10587 8.77917 6.88793 8.77917 8.45207C8.77917 8.87172 8.99709 9.23796 9.43293 9.55079C9.86878 9.86362 10.4066 10.1135 11.0463 10.3004C11.6665 10.4816 12.3431 10.7148 13.076 11H13.076Z`},child:[]}]})(e)}function TM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M21 4H3V6H21V4ZM21 11H8V13H21V11ZM21 18H8V20H21V18ZM5 11H3V20H5V11Z`},child:[]}]})(e)}function EM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M21 20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3H20C20.5523 3 21 3.44772 21 4V20ZM19 11V5H13.001V7H15L12 10L9 7H11V5H5V11H7V13H5V19H11V17H9L12 14L15 17H13.001V19H19V13H17V11H19ZM11 13H9V11H11V13ZM15 13H13V11H15V13Z`},child:[]}]})(e)}function DM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M20 3C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3H20ZM11 5H5V10.999H7V9L10 12L7 15V13H5V19H11V17H13V19H19V13H17V15L14 12L17 9V10.999H19V5H13V7H11V5ZM13 13V15H11V13H13ZM13 9V11H11V9H13Z`},child:[]}]})(e)}function OM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M8 4H21V6H8V4ZM4.5 6.5C3.67157 6.5 3 5.82843 3 5C3 4.17157 3.67157 3.5 4.5 3.5C5.32843 3.5 6 4.17157 6 5C6 5.82843 5.32843 6.5 4.5 6.5ZM4.5 13.5C3.67157 13.5 3 12.8284 3 12C3 11.1716 3.67157 10.5 4.5 10.5C5.32843 10.5 6 11.1716 6 12C6 12.8284 5.32843 13.5 4.5 13.5ZM4.5 20.4C3.67157 20.4 3 19.7284 3 18.9C3 18.0716 3.67157 17.4 4.5 17.4C5.32843 17.4 6 18.0716 6 18.9C6 19.7284 5.32843 20.4 4.5 20.4ZM8 11H21V13H8V11ZM8 18H21V20H8V18Z`},child:[]}]})(e)}function kM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M8 4H21V6H8V4ZM5 3V6H6V7H3V6H4V4H3V3H5ZM3 14V11.5H5V11H3V10H6V12.5H4V13H6V14H3ZM5 19.5H3V18.5H5V18H3V17H6V21H3V20H5V19.5ZM8 11H21V13H8V11ZM8 18H21V20H8V18Z`},child:[]}]})(e)}function AM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M8.00008 6V9H5.00008V6H8.00008ZM3.00008 4V11H10.0001V4H3.00008ZM13.0001 4H21.0001V6H13.0001V4ZM13.0001 11H21.0001V13H13.0001V11ZM13.0001 18H21.0001V20H13.0001V18ZM10.7072 16.2071L9.29297 14.7929L6.00008 18.0858L4.20718 16.2929L2.79297 17.7071L6.00008 20.9142L10.7072 16.2071Z`},child:[]}]})(e)}function jM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M18.3638 15.5355L16.9496 14.1213L18.3638 12.7071C20.3164 10.7545 20.3164 7.58866 18.3638 5.63604C16.4112 3.68341 13.2453 3.68341 11.2927 5.63604L9.87849 7.05025L8.46428 5.63604L9.87849 4.22182C12.6122 1.48815 17.0443 1.48815 19.778 4.22182C22.5117 6.95549 22.5117 11.3876 19.778 14.1213L18.3638 15.5355ZM15.5353 18.364L14.1211 19.7782C11.3875 22.5118 6.95531 22.5118 4.22164 19.7782C1.48797 17.0445 1.48797 12.6123 4.22164 9.87868L5.63585 8.46446L7.05007 9.87868L5.63585 11.2929C3.68323 13.2455 3.68323 16.4113 5.63585 18.364C7.58847 20.3166 10.7543 20.3166 12.7069 18.364L14.1211 16.9497L15.5353 18.364ZM14.8282 7.75736L16.2425 9.17157L9.17139 16.2426L7.75717 14.8284L14.8282 7.75736Z`},child:[]}]})(e)}function MM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M17 17H22V19H19V22H17V17ZM7 7H2V5H5V2H7V7ZM18.364 15.5355L16.9497 14.1213L18.364 12.7071C20.3166 10.7545 20.3166 7.58866 18.364 5.63604C16.4113 3.68342 13.2455 3.68342 11.2929 5.63604L9.87868 7.05025L8.46447 5.63604L9.87868 4.22183C12.6123 1.48816 17.0445 1.48816 19.7782 4.22183C22.5118 6.9555 22.5118 11.3877 19.7782 14.1213L18.364 15.5355ZM15.5355 18.364L14.1213 19.7782C11.3877 22.5118 6.9555 22.5118 4.22183 19.7782C1.48816 17.0445 1.48816 12.6123 4.22183 9.87868L5.63604 8.46447L7.05025 9.87868L5.63604 11.2929C3.68342 13.2455 3.68342 16.4113 5.63604 18.364C7.58866 20.3166 10.7545 20.3166 12.7071 18.364L14.1213 16.9497L15.5355 18.364ZM14.8284 7.75736L16.2426 9.17157L9.17157 16.2426L7.75736 14.8284L14.8284 7.75736Z`},child:[]}]})(e)}function NM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M15 20H7V18H9.92661L12.0425 6H9V4H17V6H14.0734L11.9575 18H15V20Z`},child:[]}]})(e)}function PM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M8 5H11V19H8V21H16V19H13V5H16V3H8V5ZM2 7C1.44772 7 1 7.44772 1 8V16C1 16.5523 1.44772 17 2 17H8V15H3V9H8V7H2ZM16 9H21V15H16V17H22C22.5523 17 23 16.5523 23 16V8C23 7.44772 22.5523 7 22 7H16V9Z`},child:[]}]})(e)}function FM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M3 4H21V6H3V4ZM3 19H21V21H3V19ZM11 14H21V16H11V14ZM11 9H21V11H11V9ZM7 12.5L3 16V9L7 12.5Z`},child:[]}]})(e)}function IM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M3 4H21V6H3V4ZM3 19H21V21H3V19ZM11 14H21V16H11V14ZM11 9H21V11H11V9ZM3 12.5L7 9V16L3 12.5Z`},child:[]}]})(e)}function LM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M21.097 8L18.499 12.5C20.7091 12.5 22.5 14.2909 22.5 16.5C22.5 18.7091 20.7091 20.5 18.5 20.5C16.2909 20.5 14.5 18.7091 14.5 16.5C14.5 15.7636 14.699 15.0737 15.0461 14.4811L18.788 8H21.097ZM4 4V11H11V4H13V20H11V13H4V20H2V4H4ZM18.5 14.5C17.3954 14.5 16.5 15.3954 16.5 16.5C16.5 17.6046 17.3954 18.5 18.5 18.5C19.6046 18.5 20.5 17.6046 20.5 16.5C20.5 15.3954 19.6046 14.5 18.5 14.5Z`},child:[]}]})(e)}function RM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M22 8V10H17.6769L17.2126 12.6358C17.5435 12.5472 17.8912 12.5 18.25 12.5C20.4591 12.5 22.25 14.2909 22.25 16.5C22.25 18.7091 20.4591 20.5 18.25 20.5C16.4233 20.5 14.8827 19.2756 14.4039 17.6027L16.3271 17.0519C16.5667 17.8881 17.3369 18.5 18.25 18.5C19.3546 18.5 20.25 17.6046 20.25 16.5C20.25 15.3954 19.3546 14.5 18.25 14.5C17.6194 14.5 17.057 14.7918 16.6904 15.2478L14.8803 14.3439L16 8H22ZM4 4V11H11V4H13V20H11V13H4V20H2V4H4Z`},child:[]}]})(e)}function zM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M13 20H11V13H4V20H2V4H4V11H11V4H13V20ZM22 8V16H23.5V18H22V20H20V18H14.5V16.66L19.5 8H22ZM20 11.133L17.19 16H20V11.133Z`},child:[]}]})(e)}function BM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M22 8L21.9984 10L19.4934 12.883C21.0823 13.3184 22.25 14.7728 22.25 16.5C22.25 18.5711 20.5711 20.25 18.5 20.25C16.674 20.25 15.1528 18.9449 14.8184 17.2166L16.7821 16.8352C16.9384 17.6413 17.6481 18.25 18.5 18.25C19.4665 18.25 20.25 17.4665 20.25 16.5C20.25 15.5335 19.4665 14.75 18.5 14.75C18.214 14.75 17.944 14.8186 17.7056 14.9403L16.3992 13.3932L19.3484 10H15V8H22ZM4 4V11H11V4H13V20H11V13H4V20H2V4H4Z`},child:[]}]})(e)}function VM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M4 4V11H11V4H13V20H11V13H4V20H2V4H4ZM18.5 8C20.5711 8 22.25 9.67893 22.25 11.75C22.25 12.6074 21.9623 13.3976 21.4781 14.0292L21.3302 14.2102L18.0343 18H22V20H15L14.9993 18.444L19.8207 12.8981C20.0881 12.5908 20.25 12.1893 20.25 11.75C20.25 10.7835 19.4665 10 18.5 10C17.5818 10 16.8288 10.7071 16.7558 11.6065L16.75 11.75H14.75C14.75 9.67893 16.4289 8 18.5 8Z`},child:[]}]})(e)}function HM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M13 20H11V13H4V20H2V4H4V11H11V4H13V20ZM21.0005 8V20H19.0005L19 10.204L17 10.74V8.67L19.5005 8H21.0005Z`},child:[]}]})(e)}function UM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M5.55397 22H3.3999L10.9999 3H12.9999L20.5999 22H18.4458L16.0458 16H7.95397L5.55397 22ZM8.75397 14H15.2458L11.9999 5.88517L8.75397 14Z`},child:[]}]})(e)}function WM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M3.41436 5.99995L5.70726 3.70706L4.29304 2.29285L0.585938 5.99995L4.29304 9.70706L5.70726 8.29285L3.41436 5.99995ZM9.58594 5.99995L7.29304 3.70706L8.70726 2.29285L12.4144 5.99995L8.70726 9.70706L7.29304 8.29285L9.58594 5.99995ZM14.0002 2.99995H21.0002C21.5524 2.99995 22.0002 3.44767 22.0002 3.99995V20C22.0002 20.5522 21.5524 21 21.0002 21H3.00015C2.44787 21 2.00015 20.5522 2.00015 20V12H4.00015V19H20.0002V4.99995H14.0002V2.99995Z`},child:[]}]})(e)}function GM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M8 11H12.5C13.8807 11 15 9.88071 15 8.5C15 7.11929 13.8807 6 12.5 6H8V11ZM18 15.5C18 17.9853 15.9853 20 13.5 20H6V4H12.5C14.9853 4 17 6.01472 17 8.5C17 9.70431 16.5269 10.7981 15.7564 11.6058C17.0979 12.3847 18 13.837 18 15.5ZM8 13V18H13.5C14.8807 18 16 16.8807 16 15.5C16 14.1193 14.8807 13 13.5 13H8Z`},child:[]}]})(e)}function KM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M3 4H21V6H3V4ZM7 19H21V21H7V19ZM3 14H21V16H3V14ZM7 9H21V11H7V9Z`},child:[]}]})(e)}function qM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M3 4H21V6H3V4ZM3 19H17V21H3V19ZM3 14H21V16H3V14ZM3 9H17V11H3V9Z`},child:[]}]})(e)}function JM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M3 4H21V6H3V4ZM3 19H21V21H3V19ZM3 14H21V16H3V14ZM3 9H21V11H3V9Z`},child:[]}]})(e)}function YM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M3 4H21V6H3V4ZM5 19H19V21H5V19ZM3 14H21V16H3V14ZM5 9H19V11H5V9Z`},child:[]}]})(e)}function XM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M23 12L15.9289 19.0711L14.5147 17.6569L20.1716 12L14.5147 6.34317L15.9289 4.92896L23 12ZM3.82843 12L9.48528 17.6569L8.07107 19.0711L1 12L8.07107 4.92896L9.48528 6.34317L3.82843 12Z`},child:[]}]})(e)}function ZM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z`},child:[]}]})(e)}function QM(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M7.29117 20.8242L2 22L3.17581 16.7088C2.42544 15.3056 2 13.7025 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C10.2975 22 8.6944 21.5746 7.29117 20.8242ZM7.58075 18.711L8.23428 19.0605C9.38248 19.6745 10.6655 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 13.3345 4.32549 14.6175 4.93949 15.7657L5.28896 16.4192L4.63416 19.3658L7.58075 18.711Z`},child:[]}]})(e)}function $M(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M7.24264 17.9967H3V13.754L14.435 2.319C14.8256 1.92848 15.4587 1.92848 15.8492 2.319L18.6777 5.14743C19.0682 5.53795 19.0682 6.17112 18.6777 6.56164L7.24264 17.9967ZM3 19.9967H21V21.9967H3V19.9967Z`},child:[]}]})(e)}function eN(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M8 7V11L2 6L8 1V5H13C17.4183 5 21 8.58172 21 13C21 17.4183 17.4183 21 13 21H4V19H13C16.3137 19 19 16.3137 19 13C19 9.68629 16.3137 7 13 7H8Z`},child:[]}]})(e)}var tN={bold:GM,italic:NM,underline:xM,strike:wM,code:XM};function nN(e,t){return e in t.schema.styleSchema&&t.schema.styleSchema[e].type===e&&t.schema.styleSchema[e].propSchema===`boolean`}var rN=e=>{let t=KA(),n=GA(),r=bA(),i=OA({editor:r,selector:({editor:t})=>{if(t.isEditable&&nN(e.basicTextStyle,t)&&(t.getSelection()?.blocks||[t.getTextCursorPosition().block]).find(e=>e.content!==void 0))return e.basicTextStyle in t.getActiveStyles()?{active:!0}:{active:!1}}}),a=(0,J.useCallback)(e=>{r.focus(),r.toggleStyles({[e]:!0})},[r]);if(i===void 0)return null;let o=tN[e.basicTextStyle];return(0,Y.jsx)(n.FormattingToolbar.Button,{className:`bn-button`,"data-test":e.basicTextStyle,onClick:()=>a(e.basicTextStyle),isSelected:i.active,label:t.formatting_toolbar[e.basicTextStyle].tooltip,mainTooltip:t.formatting_toolbar[e.basicTextStyle].tooltip,secondaryTooltip:Bb(t.formatting_toolbar[e.basicTextStyle].secondary_tooltip,t.generic.ctrl_shortcut),icon:(0,Y.jsx)(o,{})})},iN=(0,J.createContext)(`desktop`);function aN(){return(0,J.useContext)(iN)}var oN=e=>{let t=e.textColor||`default`,n=e.backgroundColor||`default`,r=e.size||16,i=(0,J.useMemo)(()=>({pointerEvents:`none`,fontSize:(r*.75).toString()+`px`,height:r.toString()+`px`,lineHeight:r.toString()+`px`,textAlign:`center`,width:r.toString()+`px`}),[r]);return(0,Y.jsx)(`div`,{className:`bn-color-icon`,"data-background-color":n,"data-text-color":t,style:i,children:`A`})},sN=[`default`,`gray`,`brown`,`red`,`orange`,`yellow`,`green`,`blue`,`purple`,`pink`],cN=e=>{let t=GA(),n=KA();return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(()=>e.text?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(t.Generic.Menu.Label,{children:n.color_picker.text_title}),sN.map(r=>(0,Y.jsx)(t.Generic.Menu.Item,{onClick:()=>{e.onClick?.(),e.text.setColor(r)},"data-test":`text-color-`+r,icon:(0,Y.jsx)(oN,{textColor:r,size:e.iconSize}),checked:e.text.color===r,children:n.color_picker.colors[r]},`text-color-`+r))]}):null,{}),(0,Y.jsx)(()=>e.background?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(t.Generic.Menu.Label,{children:n.color_picker.background_title}),sN.map(r=>(0,Y.jsx)(t.Generic.Menu.Item,{onClick:()=>{e.onClick?.(),e.background.setColor(r)},"data-test":`background-color-`+r,icon:(0,Y.jsx)(oN,{backgroundColor:r,size:e.iconSize}),checked:e.background.color===r,children:n.color_picker.colors[r]},`background-color-`+r))]}):null,{})]})};function lN(e,t){return`${e}Color`in t.schema.styleSchema&&t.schema.styleSchema[`${e}Color`].type===`${e}Color`&&t.schema.styleSchema[`${e}Color`].propSchema===`string`}var uN=()=>{let e=GA(),t=KA(),n=aN(),r=PA(),i=bA(),a=lN(`text`,i),o=lN(`background`,i),s=OA({editor:i,selector:({editor:e})=>{if(!e.isEditable||!(e.getSelection()?.blocks||[e.getTextCursorPosition().block]).find(e=>e.content!==void 0))return;let t=lN(`text`,e),n=lN(`background`,e);if(t||n)return{textColor:t?e.getActiveStyles().textColor||`default`:void 0,backgroundColor:n?e.getActiveStyles().backgroundColor||`default`:void 0}}}),c=(0,J.useCallback)(e=>{if(!a)throw Error(`Tried to set text color, but style does not exist in editor schema.`);e==="default"?i.removeStyles({textColor:e}):i.addStyles({textColor:e}),i.focus()},[i,a]),l=(0,J.useCallback)(e=>{if(!o)throw Error(`Tried to set background color, but style does not exist in editor schema.`);e==="default"?i.removeStyles({backgroundColor:e}):i.addStyles({backgroundColor:e}),i.focus()},[o,i]);return s===void 0?null:(0,Y.jsxs)(e.Generic.Menu.Root,{portalElement:r,preventFocusOnOpen:n===`mobile`,children:[(0,Y.jsx)(e.Generic.Menu.Trigger,{children:(0,Y.jsx)(e.FormattingToolbar.Button,{className:`bn-button`,"data-test":`colors`,label:t.formatting_toolbar.colors.tooltip,mainTooltip:t.formatting_toolbar.colors.tooltip,icon:(0,Y.jsx)(oN,{textColor:s.textColor,backgroundColor:s.backgroundColor,size:20})})}),(0,Y.jsx)(e.Generic.Menu.Dropdown,{className:`bn-menu-dropdown bn-color-picker-dropdown`,children:(0,Y.jsx)(cN,{text:s.textColor?{color:s.textColor,setColor:c}:void 0,background:s.backgroundColor?{color:s.backgroundColor,setColor:l}:void 0})})]})};function dN(){let e=KA();return(0,Y.jsx)(`button`,{className:`bn-screen-reader-only-submit`,tabIndex:-1,type:`submit`,children:e.generic.form_submit})}var fN=e=>{for(let t of Hw)if(e.startsWith(t))return e;return`${Uw}://${e}`},pN=e=>{let t=GA(),n=KA(),{editLink:r}=wA(Vw),{url:i,text:a,showTextField:o}=e,[s,c]=(0,J.useState)(i),[l,u]=(0,J.useState)(a);(0,J.useEffect)(()=>{c(i),u(a)},[a,i]);let d=(0,J.useCallback)(e=>c(e.currentTarget.value),[]),f=(0,J.useCallback)(e=>u(e.currentTarget.value),[]),p=(0,J.useCallback)(()=>{r(fN(s),l,e.range.from),e.setToolbarOpen?.(!1),e.setToolbarPositionFrozen?.(!1)},[r,s,l,e]);return(0,Y.jsxs)(t.Generic.Form.Root,{onSubmit:p,submitButton:(0,Y.jsx)(dN,{}),children:[(0,Y.jsx)(t.Generic.Form.TextInput,{className:`bn-text-input`,name:`url`,icon:(0,Y.jsx)(jM,{}),autoFocus:!0,placeholder:n.link_toolbar.form.url_placeholder,value:s,onChange:d}),o!==!1&&(0,Y.jsx)(t.Generic.Form.TextInput,{className:`bn-text-input`,name:`title`,icon:(0,Y.jsx)(SM,{}),placeholder:n.link_toolbar.form.title_placeholder,value:l,onChange:f})]})};function mN(e){return`link`in e.schema.inlineContentSchema&&e.schema.inlineContentSchema.link===`link`}var hN=()=>{let e=bA(),t=kA(),n=GA(),r=KA(),i=PA(),a=wA(UC),{showSelection:o}=wA(sw),[s,c]=(0,J.useState)(!1);(0,J.useEffect)(()=>(o(s,`createLinkButton`),()=>o(!1,`createLinkButton`)),[s,o]);let l=(0,J.useCallback)(t=>{t||e.focus(),c(t)},[e]),u=OA({editor:e,selector:({editor:e})=>{if(e.isEditable&&!e.prosemirrorState.selection.empty&&mN(e)&&!VC(e.prosemirrorState.selection)&&(e.getSelection()?.blocks||[e.getTextCursorPosition().block]).find(e=>e.content!==void 0))return{url:e.getSelectedLinkUrl(),text:e.getSelectedText(),range:{from:e.prosemirrorState.selection.from,to:e.prosemirrorState.selection.to}}}});return(0,J.useEffect)(()=>{c(!1)},[u]),(0,J.useEffect)(()=>{let e=e=>{(e.ctrlKey||e.metaKey)&&e.key===`k`&&(c(!0),e.preventDefault())};return t?.addEventListener(`keydown`,e),()=>{t?.removeEventListener(`keydown`,e)}},[t]),u===void 0?null:(0,Y.jsxs)(n.Generic.Popover.Root,{open:s,onOpenChange:l,portalElement:i,children:[(0,Y.jsx)(n.Generic.Popover.Trigger,{children:(0,Y.jsx)(n.FormattingToolbar.Button,{className:`bn-button`,"data-test":`createLink`,label:r.formatting_toolbar.link.tooltip,mainTooltip:r.formatting_toolbar.link.tooltip,secondaryTooltip:Bb(r.formatting_toolbar.link.secondary_tooltip,r.generic.ctrl_shortcut),icon:(0,Y.jsx)(jM,{}),onClick:()=>l(!s)})}),(0,Y.jsx)(n.Generic.Popover.Content,{className:`bn-popover-content bn-form-popover`,variant:`form-popover`,children:(0,Y.jsx)(pN,{url:u.url||``,text:u.text,range:u.range,showTextField:!1,setToolbarOpen:e=>a.store.setState(e)})})]})},gN=()=>{let e=KA(),t=GA(),n=PA(),r=bA(),i=OA({editor:r,selector:({editor:e})=>{if(!e.isEditable)return;let t=e.getSelection()?.blocks||[e.getTextCursorPosition().block];if(t.length!==1)return;let n=t[0];if(BC(n,e,n.type,{url:`string`,caption:`string`}))return n}}),[a,o]=(0,J.useState)(!1),s=(0,J.useCallback)(e=>{e||r.focus(),o(e)},[r]),c=(0,J.useCallback)(e=>{i!==void 0&&zC(r,i.type,{caption:`string`})&&r.updateBlock(i.id,{props:{caption:e.currentTarget.value}})},[i,r]);return i===void 0?null:(0,Y.jsxs)(t.Generic.Popover.Root,{open:a,onOpenChange:s,portalElement:n,children:[(0,Y.jsx)(t.Generic.Popover.Trigger,{children:(0,Y.jsx)(t.FormattingToolbar.Button,{className:`bn-button`,label:e.formatting_toolbar.file_caption.tooltip,mainTooltip:e.formatting_toolbar.file_caption.tooltip,icon:(0,Y.jsx)(PM,{}),onClick:()=>s(!a)})}),(0,Y.jsx)(t.Generic.Popover.Content,{className:`bn-popover-content bn-form-popover`,variant:`form-popover`,children:(0,Y.jsx)(t.Generic.Form.Root,{onSubmit:()=>s(!1),submitButton:(0,Y.jsx)(dN,{}),children:(0,Y.jsx)(t.Generic.Form.TextInput,{name:`file-caption`,icon:(0,Y.jsx)(PM,{}),value:i.props.caption,autoFocus:!0,placeholder:e.formatting_toolbar.file_caption.input_placeholder,onChange:c})})})]})},_N=()=>{let e=KA(),t=GA(),n=bA(),r=OA({editor:n,selector:({editor:e})=>{if(!e.isEditable)return;let t=e.getSelection()?.blocks||[e.getTextCursorPosition().block];if(t.length!==1)return;let n=t[0];if(BC(n,e,n.type,{url:`string`}))return n}}),i=(0,J.useCallback)(()=>{r!==void 0&&(n.focus(),n.removeBlocks([r.id]))},[r,n]);return r===void 0?null:(0,Y.jsx)(t.FormattingToolbar.Button,{className:`bn-button`,label:e.formatting_toolbar.file_delete.tooltip[r.type]||e.formatting_toolbar.file_delete.tooltip.file,mainTooltip:e.formatting_toolbar.file_delete.tooltip[r.type]||e.formatting_toolbar.file_delete.tooltip.file,icon:(0,Y.jsx)(fM,{}),onClick:i})},vN=()=>{let e=KA(),t=GA(),n=PA(),r=bA(),i=OA({editor:r,selector:({editor:e})=>{if(!e.isEditable)return;let t=e.getSelection()?.blocks||[e.getTextCursorPosition().block];if(t.length!==1)return;let n=t[0];if(BC(n,e,n.type,{url:`string`,name:`string`}))return n}}),[a,o]=(0,J.useState)(!1),s=(0,J.useCallback)(e=>{e||r.focus(),o(e)},[r]),c=(0,J.useCallback)(e=>{i!==void 0&&zC(r,i.type,{name:`string`})&&r.updateBlock(i.id,{props:{name:e.currentTarget.value}})},[i,r]);return i===void 0?null:(0,Y.jsxs)(t.Generic.Popover.Root,{open:a,onOpenChange:s,portalElement:n,children:[(0,Y.jsx)(t.Generic.Popover.Trigger,{children:(0,Y.jsx)(t.FormattingToolbar.Button,{className:`bn-button`,label:e.formatting_toolbar.file_rename.tooltip[i.type]||e.formatting_toolbar.file_rename.tooltip.file,mainTooltip:e.formatting_toolbar.file_rename.tooltip[i.type]||e.formatting_toolbar.file_rename.tooltip.file,icon:(0,Y.jsx)(UM,{}),onClick:()=>s(!a)})}),(0,Y.jsx)(t.Generic.Popover.Content,{className:`bn-popover-content bn-form-popover`,variant:`form-popover`,children:(0,Y.jsx)(t.Generic.Form.Root,{onSubmit:()=>s(!1),submitButton:(0,Y.jsx)(dN,{}),children:(0,Y.jsx)(t.Generic.Form.TextInput,{name:`file-name`,icon:(0,Y.jsx)(UM,{}),value:i.props.name,autoFocus:!0,placeholder:e.formatting_toolbar.file_rename.input_placeholder[i.type]||e.formatting_toolbar.file_rename.input_placeholder.file,onChange:c})})})]})},yN=()=>{let e=KA(),t=GA(),n=PA(),r=bA(),i=OA({editor:r,selector:({editor:e})=>{if(!e.isEditable)return;let t=e.getSelection()?.blocks||[e.getTextCursorPosition().block];if(t.length!==1)return;let n=t[0];if(BC(n,e,n.type,{url:`string`}))return n}});return i===void 0?null:(0,Y.jsxs)(t.Generic.Popover.Root,{onOpenChange:e=>{e||r.focus()},portalElement:n,children:[(0,Y.jsx)(t.Generic.Popover.Trigger,{children:(0,Y.jsx)(t.FormattingToolbar.Button,{className:`bn-button`,mainTooltip:e.formatting_toolbar.file_replace.tooltip[i.type]||e.formatting_toolbar.file_replace.tooltip.file,label:e.formatting_toolbar.file_replace.tooltip[i.type]||e.formatting_toolbar.file_replace.tooltip.file,icon:(0,Y.jsx)(_M,{})})}),(0,Y.jsx)(t.Generic.Popover.Content,{className:`bn-popover-content bn-panel-popover`,variant:`panel-popover`,children:(0,Y.jsx)(Uj,{blockId:i.id})})]})},bN=()=>{let e=KA(),t=GA(),n=bA(),r=OA({editor:n,selector:({editor:e})=>{if(e.isEditable&&(e.getSelection()?.blocks||[e.getTextCursorPosition().block]).find(e=>e.content!==void 0))return{canNestBlock:e.canNestBlock()}}}),i=(0,J.useCallback)(()=>{r!==void 0&&r.canNestBlock&&(n.focus(),n.nestBlock())},[n,r]);return r===void 0?null:(0,Y.jsx)(t.FormattingToolbar.Button,{className:`bn-button`,"data-test":`nestBlock`,onClick:i,isDisabled:!r.canNestBlock,label:e.formatting_toolbar.nest.tooltip,mainTooltip:e.formatting_toolbar.nest.tooltip,secondaryTooltip:Bb(e.formatting_toolbar.nest.secondary_tooltip,e.generic.ctrl_shortcut),icon:(0,Y.jsx)(FM,{})})},xN=()=>{let e=KA(),t=GA(),n=bA(),r=OA({editor:n,selector:({editor:e})=>{if(e.isEditable&&(e.getSelection()?.blocks||[e.getTextCursorPosition().block]).find(e=>e.content!==void 0))return{canUnnestBlock:e.canUnnestBlock()}}}),i=(0,J.useCallback)(()=>{r!==void 0&&r.canUnnestBlock&&(n.focus(),n.unnestBlock())},[n,r]);return r===void 0?null:(0,Y.jsx)(t.FormattingToolbar.Button,{className:`bn-button`,"data-test":`unnestBlock`,onClick:i,isDisabled:!r.canUnnestBlock,label:e.formatting_toolbar.unnest.tooltip,mainTooltip:e.formatting_toolbar.unnest.tooltip,secondaryTooltip:Bb(e.formatting_toolbar.unnest.secondary_tooltip,e.generic.ctrl_shortcut),icon:(0,Y.jsx)(IM,{})})},SN=e=>[{name:e.slash_menu.paragraph.title,type:`paragraph`,icon:SM},{name:e.slash_menu.heading.title,type:`heading`,props:{level:1,isToggleable:!1},icon:HM},{name:e.slash_menu.heading_2.title,type:`heading`,props:{level:2,isToggleable:!1},icon:VM},{name:e.slash_menu.heading_3.title,type:`heading`,props:{level:3,isToggleable:!1},icon:BM},{name:e.slash_menu.heading_4.title,type:`heading`,props:{level:4,isToggleable:!1},icon:zM},{name:e.slash_menu.heading_5.title,type:`heading`,props:{level:5,isToggleable:!1},icon:RM},{name:e.slash_menu.heading_6.title,type:`heading`,props:{level:6,isToggleable:!1},icon:LM},{name:e.slash_menu.toggle_heading.title,type:`heading`,props:{level:1,isToggleable:!0},icon:HM},{name:e.slash_menu.toggle_heading_2.title,type:`heading`,props:{level:2,isToggleable:!0},icon:VM},{name:e.slash_menu.toggle_heading_3.title,type:`heading`,props:{level:3,isToggleable:!0},icon:BM},{name:e.slash_menu.quote.title,type:`quote`,icon:TM},{name:e.slash_menu.toggle_list.title,type:`toggleListItem`,icon:gM},{name:e.slash_menu.bullet_list.title,type:`bulletListItem`,icon:OM},{name:e.slash_menu.numbered_list.title,type:`numberedListItem`,icon:kM},{name:e.slash_menu.check_list.title,type:`checkListItem`,icon:AM}],CN=e=>{let t=GA(),n=aN(),r=PA(),i=bA(),a=OA({editor:i,selector:({editor:e})=>e.getSelection()?.blocks||[e.getTextCursorPosition().block]}),o=a[0],s=(0,J.useMemo)(()=>(e.items||SN(i.dictionary)).filter(e=>zC(i,e.type,Object.fromEntries(Object.entries(e.props||{}).map(([e,t])=>[e,typeof t])))),[i,e.items]),c=(0,J.useMemo)(()=>s.map(e=>{let t=e.icon,n=e.type===o.type,r=Object.entries(e.props||{}).filter(([e,t])=>t!==o.props[e]).length===0;return{text:e.name,icon:(0,Y.jsx)(t,{size:16}),onClick:()=>{i.focus(),i.transact(()=>{for(let t of a)i.updateBlock(t,{type:e.type,props:e.props})})},isSelected:n&&r}}),[i,s,o.props,o.type,a]);return!(0,J.useMemo)(()=>c.find(e=>e.isSelected)!==void 0,[c])||!i.isEditable?null:(0,Y.jsx)(t.FormattingToolbar.Select,{className:`bn-select`,items:c,portalElement:r,preventFocusOnOpen:n===`mobile`})},wN=()=>{let e=KA(),t=GA(),n=bA(),r=wA(`comments`),{store:i}=wA(UC),a=OA({editor:n,selector:({editor:e})=>e.prosemirrorState.selection.empty}),o=(0,J.useCallback)(()=>{r.startPendingComment(),i.setState(!1)},[r,i]);return a?null:(0,Y.jsx)(t.FormattingToolbar.Button,{className:`bn-button`,label:e.formatting_toolbar.comment.tooltip,mainTooltip:e.formatting_toolbar.comment.tooltip,icon:(0,Y.jsx)(QM,{}),onClick:o})},TN=()=>bA().getExtension(`comments`)?(0,Y.jsx)(wN,{}):null,EN=()=>{let e=KA(),t=GA(),n=bA(),r=OA({editor:n,selector:({editor:e})=>e.prosemirrorState.selection.empty}),i=(0,J.useCallback)(()=>{n._tiptapEditor.chain().focus().addPendingComment().run()},[n]);return!n._tiptapEditor.commands.addPendingComment||!n.isEditable||r?null:(0,Y.jsx)(t.FormattingToolbar.Button,{className:`bn-button`,label:e.formatting_toolbar.comment.tooltip,mainTooltip:e.formatting_toolbar.comment.tooltip,icon:(0,Y.jsx)(QM,{}),onClick:i})};function DN(e,t){try{let n=new URL(e,t);if(n.protocol!==`javascript:`)return n.href}catch{}return`#`}var ON=()=>{let e=KA(),t=GA(),n=bA(),r=OA({editor:n,selector:({editor:e})=>{let t=e.getSelection()?.blocks||[e.getTextCursorPosition().block];if(t.length!==1)return;let n=t[0];if(BC(n,e,n.type,{url:`string`}))return n}}),i=(0,J.useCallback)(()=>{r!==void 0&&(n.focus(),n.resolveFileUrl?n.resolveFileUrl(r.props.url).then(e=>window.open(DN(e,window.location.href))):window.open(DN(r.props.url,window.location.href)))},[r,n]);return r===void 0?null:(0,Y.jsx)(t.FormattingToolbar.Button,{className:`bn-button`,label:e.formatting_toolbar.file_download.tooltip[r.type]||e.formatting_toolbar.file_download.tooltip.file,mainTooltip:e.formatting_toolbar.file_download.tooltip[r.type]||e.formatting_toolbar.file_download.tooltip.file,icon:(0,Y.jsx)(uM,{}),onClick:i})},kN=()=>{let e=KA(),t=GA(),n=bA(),r=OA({editor:n,selector:({editor:e})=>{if(!e.isEditable)return;let t=e.getSelection()?.blocks||[e.getTextCursorPosition().block];if(t.length!==1)return;let n=t[0];if(BC(n,e,n.type,{url:`string`,showPreview:`boolean`}))return n}}),i=(0,J.useCallback)(()=>{r!==void 0&&zC(n,r.type,{showPreview:`boolean`})&&n.updateBlock(r.id,{props:{showPreview:!r.props.showPreview}})},[r,n]);return r===void 0?null:(0,Y.jsx)(t.FormattingToolbar.Button,{className:`bn-button`,label:`Toggle preview`,mainTooltip:e.formatting_toolbar.file_preview_toggle.tooltip,icon:(0,Y.jsx)(vM,{}),isSelected:r.props.showPreview,onClick:i})},AN=()=>{let e=KA(),t=GA(),n=bA(),r=wA(pE),i=OA({editor:n,selector:({editor:e})=>{if(!e.isEditable||!e.settings.tables.splitCells)return;let t=e.getSelection()?.blocks||[e.getTextCursorPosition().block];if(t.length!==1)return;let n=t[0];if(n.type===`table`)return{mergeDirection:r.getMergeDirection(n)}}}),a=(0,J.useCallback)(()=>{r?.mergeCells()},[r]);return i===void 0?null:(0,Y.jsx)(t.FormattingToolbar.Button,{className:`bn-button`,label:e.formatting_toolbar.table_cell_merge.tooltip,mainTooltip:e.formatting_toolbar.table_cell_merge.tooltip,icon:i.mergeDirection===`horizontal`?(0,Y.jsx)(DM,{}):(0,Y.jsx)(EM,{}),onClick:a})},jN=()=>bA().getExtension(pE)?(0,Y.jsx)(AN,{}):null,MN={left:qM,center:YM,right:KM,justify:JM},NN=e=>{let t=GA(),n=KA(),r=bA(),i=OA({editor:r,selector:({editor:e})=>{if(!e.isEditable)return;let t=e.getSelection()?.blocks||[e.getTextCursorPosition().block],n=t[0];if(BC(n,e,n.type,{textAlignment:SS.textAlignment}))return{textAlignment:n.props.textAlignment,blocks:t};if(t.length===1&&BC(n,e,`table`))return e.getExtension(pE)?.getCellSelection()?{textAlignment:Mb(n.content.rows[0].cells[0]).props.textAlignment,blocks:[n]}:void 0}}),a=(0,J.useCallback)(e=>{if(i!==void 0){r.focus();for(let t of i.blocks)if(BC(t,r,t.type,{textAlignment:SS.textAlignment})&&zC(r,t.type,{textAlignment:SS.textAlignment}))r.updateBlock(t,{props:{textAlignment:e}});else if(t.type===`table`){let n=r.getExtension(pE)?.getCellSelection();if(!n)continue;let i=t.content.rows.map(e=>({...e,cells:e.cells.map(e=>Mb(e))}));n.cells.forEach(({row:t,col:n})=>{i[t].cells[n].props.textAlignment=e}),r.updateBlock(t,{type:`table`,content:{...t.content,type:`tableContent`,rows:i}}),r.setTextCursorPosition(t)}}},[r,i]);if(i===void 0)return null;let o=MN[e.textAlignment];return(0,Y.jsx)(t.FormattingToolbar.Button,{className:`bn-button`,"data-test":`alignText${e.textAlignment.slice(0,1).toUpperCase()+e.textAlignment.slice(1)}`,onClick:()=>a(e.textAlignment),isSelected:i.textAlignment===e.textAlignment,label:n.formatting_toolbar[`align_${e.textAlignment}`].tooltip,mainTooltip:n.formatting_toolbar[`align_${e.textAlignment}`].tooltip,icon:(0,Y.jsx)(o,{})})},PN=e=>[(0,Y.jsx)(CN,{items:e},`blockTypeSelect`),(0,Y.jsx)(jN,{},`tableCellMergeButton`),(0,Y.jsx)(gN,{},`fileCaptionButton`),(0,Y.jsx)(yN,{},`replaceFileButton`),(0,Y.jsx)(vN,{},`fileRenameButton`),(0,Y.jsx)(_N,{},`fileDeleteButton`),(0,Y.jsx)(ON,{},`fileDownloadButton`),(0,Y.jsx)(kN,{},`filePreviewButton`),(0,Y.jsx)(rN,{basicTextStyle:`bold`},`boldStyleButton`),(0,Y.jsx)(rN,{basicTextStyle:`italic`},`italicStyleButton`),(0,Y.jsx)(rN,{basicTextStyle:`underline`},`underlineStyleButton`),(0,Y.jsx)(rN,{basicTextStyle:`strike`},`strikeStyleButton`),(0,Y.jsx)(NN,{textAlignment:`left`},`textAlignLeftButton`),(0,Y.jsx)(NN,{textAlignment:`center`},`textAlignCenterButton`),(0,Y.jsx)(NN,{textAlignment:`right`},`textAlignRightButton`),(0,Y.jsx)(uN,{},`colorStyleButton`),(0,Y.jsx)(bN,{},`nestBlockButton`),(0,Y.jsx)(xN,{},`unnestBlockButton`),(0,Y.jsx)(hN,{},`createLinkButton`),(0,Y.jsx)(TN,{},`addCommentButton`),(0,Y.jsx)(EN,{},`addTiptapCommentButton`)],FN=e=>{let t=GA();return(0,Y.jsx)(t.FormattingToolbar.Root,{className:`bn-toolbar bn-formatting-toolbar`,children:e.children||PN(e.blockTypeSelectItems)})},IN=e=>{switch(e){case`left`:return`top-start`;case`center`:return`top`;case`right`:return`top-end`;default:return`top-start`}},LN=e=>{let t=bA(),n=wA(UC,{editor:t}),r=TA(UC,{editor:t}),i=OA({editor:t,selector:({editor:e})=>n.store.state?{from:e.prosemirrorState.selection.from,to:e.prosemirrorState.selection.to}:void 0}),a=OA({editor:t,selector:({editor:e})=>{let t=e.getTextCursorPosition().block;return BC(t,e,t.type,{textAlignment:SS.textAlignment})?IN(t.props.textAlignment):`top-start`}}),s=(0,J.useMemo)(()=>({...e.floatingUIOptions,useFloatingOptions:{open:r,onOpenChange:(e,r,i)=>{n.store.setState(e),i===`escape-key`&&t.focus()},placement:a,middleware:[o(10),u(),m()],...e.floatingUIOptions?.useFloatingOptions},focusManagerProps:{disabled:!0,...e.floatingUIOptions?.focusManagerProps},elementProps:{style:{zIndex:40},...e.floatingUIOptions?.elementProps}}),[r,a,e.floatingUIOptions,n.store,t]),c=e.formattingToolbar||FN;return(0,Y.jsx)(IA,{target:e.portalElement,children:(0,Y.jsx)(qA,{position:i,...s,children:r&&(0,Y.jsx)(c,{})})})};function RN(e,t){let n=yA(),r=t??n?.editor;if(!r)throw Error(`'editor' is required, either from BlockNoteContext or as a function argument`);let i=e?.includeEditorUI??!1,a=(0,J.useRef)(void 0);(a.current===void 0||a.current.editor!==r||a.current.includeEditorUI!==i)&&(a.current={editor:r,includeEditorUI:i,value:r.isFocused({includeEditorUI:i})});let o=(0,J.useCallback)(e=>(a.current={editor:r,includeEditorUI:i,value:r.isFocused({includeEditorUI:i})},e(),r.onFocusChange((t,n)=>{a.current={editor:r,includeEditorUI:i,value:n.focused},e()},{includeEditorUI:i})),[r,i]),s=(0,J.useCallback)(()=>a.current.value,[]);return(0,J.useSyncExternalStore)(o,s,s)}var zN=0,BN=0;function VN(){if(typeof window>`u`)return!1;let e=window.visualViewport,t=e?.scale??1,n=(e?.height??window.innerHeight)*t,r=document.documentElement.clientWidth;return Math.abs(r-BN)>BN*.2&&(BN=r,zN=0),zN=Math.max(zN,n),zN-n>150}var HN=[`--bn-vv-top`,`--bn-vv-left`,`--bn-vv-width`,`--bn-vv-height`,`--bn-vv-scale`],UN=0;function WN(){let[e,t]=(0,J.useState)(VN);return(0,J.useLayoutEffect)(()=>{let e=document.documentElement,n=window.visualViewport,r=()=>document.querySelectorAll(`.bn-scroll-container`),i=()=>{e.style.setProperty(`--bn-vv-top`,`${n?.offsetTop??0}px`),e.style.setProperty(`--bn-vv-left`,`${n?.offsetLeft??0}px`),e.style.setProperty(`--bn-vv-width`,`${n?.width??window.innerWidth}px`),e.style.setProperty(`--bn-vv-height`,`${n?.height??window.innerHeight}px`),e.style.setProperty(`--bn-vv-scale`,`${n?.scale??1}`)},a=(e,t)=>e.toggleAttribute(`data-bn-allow-pull-to-refresh`,!t&&e.scrollTop<=0),o=()=>{let e=VN();t(e),i();for(let t of r())a(t,e)};UN++,o(),n?.addEventListener(`resize`,o),n?.addEventListener(`scroll`,o),window.addEventListener(`resize`,o);let s=e=>{e.target instanceof HTMLElement&&e.target.classList.contains(`bn-scroll-container`)&&a(e.target,VN())};return document.addEventListener(`scroll`,s,{capture:!0,passive:!0}),()=>{if(n?.removeEventListener(`resize`,o),n?.removeEventListener(`scroll`,o),window.removeEventListener(`resize`,o),document.removeEventListener(`scroll`,s,{capture:!0}),UN--,UN===0){for(let t of HN)e.style.removeProperty(t);for(let e of r())e.removeAttribute(`data-bn-allow-pull-to-refresh`);zN=0,BN=0}}},[]),e}var GN=e=>{let t=WN(),n=RN({includeEditorUI:!0});return!t||!n?null:(0,Y.jsx)(IA,{target:document.body,children:(0,Y.jsx)(iN.Provider,{value:`mobile`,children:(0,Y.jsx)(KN,{formattingToolbar:e.formattingToolbar||FN})})})};function KN(e){let t=PA(),n=e.formattingToolbar;return t?(0,Wd.createPortal)((0,Y.jsx)(BA,{children:(0,Y.jsx)(`div`,{className:`bn-mobile-formatting-toolbar`,children:(0,Y.jsx)(n,{})})}),t):null}var qN=e=>{let t=WN();return Wb()&&t?(0,Y.jsx)(GN,{formattingToolbar:e.formattingToolbar}):(0,Y.jsx)(LN,{...e})},JN=e=>{let t=GA(),n=KA(),{deleteLink:r}=wA(Vw);return(0,Y.jsx)(t.LinkToolbar.Button,{className:`bn-button`,label:n.link_toolbar.delete.tooltip,mainTooltip:n.link_toolbar.delete.tooltip,isSelected:!1,onClick:()=>{r(e.range.from),e.setToolbarOpen?.(!1)},icon:(0,Y.jsx)(MM,{})})},YN=e=>{let t=GA(),n=PA(),r=KA();return(0,Y.jsxs)(t.Generic.Popover.Root,{onOpenChange:e.setToolbarPositionFrozen,portalElement:n,children:[(0,Y.jsx)(t.Generic.Popover.Trigger,{children:(0,Y.jsx)(t.LinkToolbar.Button,{className:`bn-button`,mainTooltip:r.link_toolbar.edit.tooltip,isSelected:!1,children:r.link_toolbar.edit.text})}),(0,Y.jsx)(t.Generic.Popover.Content,{className:`bn-popover-content bn-form-popover`,variant:`form-popover`,children:(0,Y.jsx)(pN,{url:e.url,text:e.text,range:e.range,setToolbarOpen:e.setToolbarOpen,setToolbarPositionFrozen:e.setToolbarPositionFrozen})})]})},XN=e=>{let t=GA(),n=KA();return(0,Y.jsx)(t.LinkToolbar.Button,{className:`bn-button`,mainTooltip:n.link_toolbar.open.tooltip,label:n.link_toolbar.open.tooltip,isSelected:!1,onClick:()=>{window.open(DN(e.url,window.location.href),`_blank`)},icon:(0,Y.jsx)(lM,{})})},ZN=e=>{let t=GA();return(0,Y.jsx)(t.LinkToolbar.Root,{className:`bn-toolbar bn-link-toolbar`,children:e.children||(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(YN,{url:e.url,text:e.text,range:e.range,setToolbarOpen:e.setToolbarOpen,setToolbarPositionFrozen:e.setToolbarPositionFrozen}),(0,Y.jsx)(XN,{url:e.url}),(0,Y.jsx)(JN,{range:e.range,setToolbarOpen:e.setToolbarOpen})]})})},QN=e=>{let t=bA(),[n,r]=(0,J.useState)(!1),[i,a]=(0,J.useState)(!1),s=kA(),c=wA(Vw),[l,u]=(0,J.useState)(void 0);(0,J.useEffect)(()=>{let e=()=>{let e=c.getLinkAtSelection();e?(u({cursorType:`text`,url:e.mark.attrs.href,text:e.text,range:e.range,element:c.getLinkElementAtPos(e.range.from)}),i||r(!0)):(u(void 0),i||r(!1))},n=e=>{if(l!==void 0&&l.cursorType===`text`||!(e.target instanceof HTMLElement))return;let t=c.getLinkAtElement(e.target);t&&u({cursorType:`mouse`,url:t.mark.attrs.href,text:t.text,range:t.range,element:c.getLinkElementAtPos(t.range.from)})},a=t.onChange(e),o=t.onSelectionChange(e);return s?.addEventListener(`mouseover`,n),()=>{a(),o(),s?.removeEventListener(`mouseover`,n)}},[t,s,c,l,i]);let d=(0,J.useMemo)(()=>({...e.floatingUIOptions,useFloatingOptions:{open:n,onOpenChange:(e,n,a)=>{i||(l===void 0||l.cursorType!==`text`||a!==`hover`)&&(a===`escape-key`&&t.focus(),r(e))},placement:`top-start`,middleware:[o(10),m()],...e.floatingUIOptions?.useFloatingOptions},useHoverProps:{enabled:l!==void 0&&l.cursorType===`mouse`,delay:{open:250,close:250},handleClose:mp(),...e.floatingUIOptions?.useHoverProps},focusManagerProps:{disabled:!0,...e.floatingUIOptions?.focusManagerProps},elementProps:{style:{zIndex:50},...e.floatingUIOptions?.elementProps}}),[t,l,e.floatingUIOptions,n,i]),f=(0,J.useMemo)(()=>l?.element?{element:l.element}:void 0,[l?.element]);if(!t.isEditable)return null;let p=e.linkToolbar||ZN;return(0,Y.jsx)(IA,{target:e.portalElement,children:(0,Y.jsx)(UA,{reference:f,...d,children:l&&(0,Y.jsx)(p,{url:l.url,text:l.text,range:l.range,setToolbarOpen:r,setToolbarPositionFrozen:a})})})};function $N(e){return rM({tag:`svg`,attr:{viewBox:`0 0 1024 1024`},child:[{tag:`path`,attr:{d:`M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8Z`},child:[]},{tag:`path`,attr:{d:`M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8Z`},child:[]}]})(e)}var eP=()=>{let e=GA(),t=KA(),n=bA(),r=wA(JC),i=TA(qT,{editor:n,selector:e=>e?.block}),a=(0,J.useCallback)(()=>{if(i===void 0)return;let e=i.content;if(e!==void 0&&Array.isArray(e)&&e.length===0)n.setTextCursorPosition(i),r.openSuggestionMenu(`/`);else{let e=n.insertBlocks([{type:`paragraph`}],i,`after`)[0];n.setTextCursorPosition(e),r.openSuggestionMenu(`/`)}},[i,n,r]);return i===void 0?null:(0,Y.jsx)(e.SideMenu.Button,{className:`bn-button`,label:t.side_menu.add_block_label,icon:(0,Y.jsx)($N,{size:24,onClick:a,"data-test":`dragHandleAdd`})})};function tP(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{fill:`none`,d:`M0 0h24v24H0z`},child:[]},{tag:`path`,attr:{d:`m7 10 5 5 5-5z`},child:[]}]})(e)}function nP(e){return rM({tag:`svg`,attr:{viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{fill:`none`,d:`M0 0h24v24H0V0z`},child:[]},{tag:`path`,attr:{d:`M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z`},child:[]}]})(e)}var rP=e=>{let t=GA(),n=PA(),r=bA(),i=TA(qT,{editor:r,selector:e=>e?.block});return i===void 0||!BC(i,r,i.type,{textColor:`string`})&&!BC(i,r,i.type,{backgroundColor:`string`})?null:(0,Y.jsxs)(t.Generic.Menu.Root,{position:`right`,sub:!0,portalElement:n,children:[(0,Y.jsx)(t.Generic.Menu.Trigger,{sub:!0,children:(0,Y.jsx)(t.Generic.Menu.Item,{className:`bn-menu-item`,subTrigger:!0,children:e.children})}),(0,Y.jsx)(t.Generic.Menu.Dropdown,{sub:!0,className:`bn-menu-dropdown bn-color-picker-dropdown`,children:(0,Y.jsx)(cN,{iconSize:18,text:BC(i,r,i.type,{textColor:`string`})&&zC(r,i.type,{textColor:`string`})?{color:i.props.textColor,setColor:e=>r.updateBlock(i,{type:i.type,props:{textColor:e}})}:void 0,background:BC(i,r,i.type,{backgroundColor:`string`})&&zC(r,i.type,{backgroundColor:`string`})?{color:i.props.backgroundColor,setColor:e=>r.updateBlock(i,{props:{backgroundColor:e}})}:void 0})})]})},iP=e=>{let t=GA(),n=bA(),r=TA(qT,{editor:n,selector:e=>e?.block});return r===void 0?null:(0,Y.jsx)(t.Generic.Menu.Item,{className:`bn-menu-item`,onClick:()=>{let e=n.getSelection()?.blocks,t=e&&e.some(e=>e.id===r.id)?e:[r];n.removeBlocks(t)},children:e.children})},aP=e=>{let t=GA(),n=bA(),r=TA(qT,{editor:n,selector:e=>e?.block});if(r===void 0||r.type!==`table`||!n.settings.tables.headers)return null;let i=!!r.content.headerRows;return(0,Y.jsx)(t.Generic.Menu.Item,{className:`bn-menu-item`,checked:i,onClick:()=>{n.updateBlock(r,{content:{...r.content,headerRows:i?void 0:1}})},children:e.children})},oP=e=>{let t=GA(),n=bA(),r=TA(qT,{editor:n,selector:e=>e?.block});if(r===void 0||r.type!==`table`||!n.settings.tables.headers)return null;let i=!!r.content.headerCols;return(0,Y.jsx)(t.Generic.Menu.Item,{className:`bn-menu-item`,checked:i,onClick:()=>{n.updateBlock(r,{content:{...r.content,headerCols:i?void 0:1}})},children:e.children})},sP=e=>{let t=GA(),n=KA();return(0,Y.jsx)(t.Generic.Menu.Dropdown,{className:`bn-menu-dropdown bn-drag-handle-menu`,children:e.children||(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(iP,{children:n.drag_handle.delete_menuitem}),(0,Y.jsx)(rP,{children:n.drag_handle.colors_menuitem}),(0,Y.jsx)(aP,{children:n.drag_handle.header_row_menuitem}),(0,Y.jsx)(oP,{children:n.drag_handle.header_column_menuitem})]})})},cP=e=>{let t=GA(),n=PA(),r=KA(),i=wA(qT),a=TA(qT,{selector:e=>e?.block});if(a===void 0)return null;let o=e.dragHandleMenu||sP;return(0,Y.jsxs)(t.Generic.Menu.Root,{onOpenChange:e=>{e?i.freezeMenu():i.unfreezeMenu()},position:`left`,portalElement:n,children:[(0,Y.jsx)(t.Generic.Menu.Trigger,{children:(0,Y.jsx)(t.SideMenu.Button,{label:r.side_menu.drag_handle_label,draggable:!0,onDragStart:e=>i.blockDragStart(e,a),onDragEnd:i.blockDragEnd,className:`bn-button`,icon:(0,Y.jsx)(nP,{size:24,"data-test":`dragHandle`})})}),(0,Y.jsx)(o,{children:e.children})]})},lP=e=>{let t=GA();return(0,Y.jsx)(t.SideMenu.Root,{className:`bn-side-menu`,children:e.children||(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(eP,{}),(0,Y.jsx)(cP,{dragHandleMenu:e.dragHandleMenu})]})})};function uP(e,t){if(t.type===`heading`)switch(t.props.level){case 1:return 39;case 2:return 27;case 3:return 18.5;default:return 0}return e.schema.blockSpecs[t.type]?.implementation.meta?.fileBlockAccept&&!t.props.url?12:t.type===`file`?4:t.type===`audio`||t.type===`table`?15:0}var dP=e=>{let t=bA(),{show:n,block:r}=TA(qT,{selector:e=>e===void 0?void 0:{show:e.show,block:e.block}})||{},i=(0,J.useCallback)((e,n,r)=>{let i=!1;return _(e,n,()=>{i?t.getExtension(qT)?.hideMenuIfNotFrozen():i=!0},{ancestorScroll:!0,ancestorResize:!1,elementResize:!1,layoutShift:!1})},[t]),a=(0,J.useMemo)(()=>({...e.floatingUIOptions,useFloatingOptions:{open:n,placement:`left-start`,middleware:[o({crossAxis:r?uP(t,r):0})],whileElementsMounted:i,...e.floatingUIOptions?.useFloatingOptions},useDismissProps:{enabled:!1,...e.floatingUIOptions?.useDismissProps},focusManagerProps:{disabled:!0,...e.floatingUIOptions?.focusManagerProps},elementProps:{style:{zIndex:20},...e.floatingUIOptions?.elementProps}}),[e.floatingUIOptions,n,r,t,i]),s=e.sideMenu||lP;return(0,Y.jsx)(IA,{target:e.portalElement,children:(0,Y.jsx)(Bj,{blockId:n?r?.id:void 0,...a,children:r?.id&&(0,Y.jsx)(s,{})})})},fP=({format:e,dictionary:t})=>{let n=t.suggestion_changes.formatting_change;if(e.length===0)return n;let r=t.formatting_toolbar,i=[];for(let t of e){let e=r[t],a=e&&typeof e==`object`&&`tooltip`in e?e.tooltip:void 0;if(typeof a!=`string`)return n;i.push(a)}return i.join(`, `)},pP=e=>{let t=GA(),n=KA(),r=(0,J.useMemo)(()=>{let t=n.suggestion_changes,r=e.formatChangeLabel??fP,i=e.users.join(`, `);if(e.modificationType===`insert`)return t.inserted_by(i);if(e.modificationType===`delete`)return t.deleted_by(i);let a=e.format?r({format:e.format,dictionary:n}):``;return t.formatting_change_by(a,i)},[n,e.formatChangeLabel,e.users,e.modificationType,e.format]);return(0,Y.jsx)(t.AttributionTooltip.Root,{className:`bn-suggestion-tooltip`,markClassName:e.className,backgroundColor:e.className?void 0:e.color,children:r})},mP=e=>{let t=TA(`attribution`,{selector:e=>e}),n=(0,J.useMemo)(()=>t?{element:t.anchor,getBoundingClientRect:()=>{let e=t.anchor.firstElementChild??t.anchor,n=e.getBoundingClientRect();return(n.width||n.height?e:e.firstElementChild??e).getBoundingClientRect()},getClientRects:()=>{let e=t.anchor.firstElementChild??t.anchor,n=e.getBoundingClientRect();return(n.width||n.height?e:e.firstElementChild??e).getClientRects()}}:void 0,[t]),r=(0,J.useMemo)(()=>({...e.floatingUIOptions,useFloatingOptions:{open:!!t,placement:`top-start`,middleware:[p(),o(4),m(),u({padding:4})],...e.floatingUIOptions?.useFloatingOptions},focusManagerProps:{disabled:!0,...e.floatingUIOptions?.focusManagerProps},elementProps:{style:{zIndex:1e4,pointerEvents:`none`},...e.floatingUIOptions?.elementProps}}),[e.floatingUIOptions,t]),i=e.attributionTooltip||pP,a=(0,J.useMemo)(()=>t?{color:t.color,className:t.className,modificationType:t.modificationType,contentType:t.contentType,users:t.users,format:t.format,formatChangeLabel:e.formatChangeLabel}:void 0,[t,e.formatChangeLabel]);return(0,Y.jsx)(IA,{target:e.portalElement,children:(0,Y.jsx)(UA,{reference:n,...r,children:a&&(0,Y.jsx)(i,{...a})})})};async function hP(e,t){return(await iE(e,t)).map(({id:e,onItemClick:t})=>({id:e,onItemClick:t,icon:e}))}function gP(e){let t=GA(),n=KA(),{items:r,loadingState:i,selectedIndex:a,onItemClick:o,columns:s}=e,c=i===`loading-initial`||i===`loading`?(0,Y.jsx)(t.GridSuggestionMenu.Loader,{className:`bn-grid-suggestion-menu-loader`,columns:s}):null,l=(0,J.useMemo)(()=>{let e=[];for(let n=0;n<r.length;n++){let i=r[n];e.push((0,Y.jsx)(t.GridSuggestionMenu.Item,{className:`bn-grid-suggestion-menu-item`,item:i,id:`bn-grid-suggestion-menu-item-${n}`,isSelected:n===a,onClick:()=>o?.(i)},i.id))}return e},[t,r,o,a]);return(0,Y.jsxs)(t.GridSuggestionMenu.Root,{id:`bn-grid-suggestion-menu`,columns:s,className:`bn-grid-suggestion-menu`,children:[c,l,l.length===0&&e.loadingState===`loaded`&&(0,Y.jsx)(t.GridSuggestionMenu.EmptyItem,{className:`bn-grid-suggestion-menu-empty-item`,columns:s,children:n.suggestion_menu.no_items_title})]})}function _P(e){return e===void 0?void 0:`bn-suggestion-menu-item-`+e}function vP(e,t,n,r=3){let i=(0,J.useRef)(0);(0,J.useEffect)(()=>{t!==void 0&&(e.length>0?i.current=t.length:t.length-i.current>r&&n())},[n,r,e.length,t])}function yP(e,t){let[n,r]=(0,J.useState)([]),[i,a]=(0,J.useState)(!1),o=(0,J.useRef)(void 0),s=(0,J.useRef)(void 0);return(0,J.useEffect)(()=>{let n=e;o.current=e,a(!0),t(e).then(e=>{o.current===n&&(r(e),a(!1),s.current=n)})},[e,t]),{items:n||[],usedQuery:s.current,loadingState:s.current===void 0?`loading-initial`:i?`loading`:`loaded`}}function bP(e,t,n,r,i){let a=kA(e),[o,s]=(0,J.useState)(0);return(0,J.useEffect)(()=>{let e=e=>(e.key===`ArrowLeft`&&(e.preventDefault(),n.length&&s((o-1+n.length)%n.length)),e.key===`ArrowRight`&&(e.preventDefault(),n.length&&s((o+1+n.length)%n.length)),e.key===`ArrowUp`?(e.preventDefault(),n.length&&s((o-r+n.length)%n.length),!0):e.key===`ArrowDown`?(e.preventDefault(),n.length&&s((o+r)%n.length),!0):e.key===`Enter`&&!e.isComposing&&(e.stopPropagation(),e.preventDefault(),n.length&&i?.(n[o]),!0));return a?.addEventListener(`keydown`,e,!0),()=>{a?.removeEventListener(`keydown`,e,!0)}},[a,n,o,i,r,r!==void 0&&r>1]),(0,J.useEffect)(()=>{s(0)},[t]),{selectedIndex:n.length===0?void 0:o}}function xP(e){let t=yA().setContentEditableProps,n=bA(),{getItems:r,gridSuggestionMenuComponent:i,query:a,clearQuery:o,closeMenu:s,onItemClick:c,columns:l}=e,u=(0,J.useCallback)(e=>{s(),o(),c?.(e)},[c,s,o]),{items:d,usedQuery:f,loadingState:p}=yP(a,r);vP(d,f,s);let{selectedIndex:m}=bP(n,a,d,l,u);return(0,J.useEffect)(()=>(t(e=>({...e,"aria-expanded":!0,"aria-controls":`bn-suggestion-menu`})),()=>{t(e=>({...e,"aria-expanded":!1,"aria-controls":void 0}))}),[t]),(0,J.useEffect)(()=>(t(e=>({...e,"aria-activedescendant":_P(m)})),()=>{t(e=>({...e,"aria-activedescendant":void 0}))}),[t,m]),(0,Y.jsx)(i,{items:d,onItemClick:u,loadingState:p,selectedIndex:m,columns:l})}function SP(e){let t=bA(),n=kA(),{triggerCharacter:r,gridSuggestionMenuComponent:i,columns:s,shouldOpen:c,minQueryLength:l,onItemClick:d,getItems:f}=e,p=(0,J.useMemo)(()=>d||(e=>{e.onItemClick(t)}),[t,d]),m=(0,J.useMemo)(()=>f||(async e=>await hP(t,e)),[t,f]),h=wA(JC);(0,J.useEffect)(()=>{h.addSuggestionMenu({triggerCharacter:r,shouldOpen:c})},[h,r,c]);let g=TA(JC),_=TA(JC,{selector:e=>({element:n?.firstChild||void 0,getBoundingClientRect:()=>e?.referencePos||new DOMRect})}),v=(0,J.useMemo)(()=>({...e.floatingUIOptions,useFloatingOptions:{open:g?.show&&g?.triggerCharacter===r,onOpenChange:e=>{e||h.closeMenu()},placement:`bottom-start`,middleware:[o(10),a({allowedPlacements:[`bottom-start`,`top-start`],padding:10}),u(),ne({apply({elements:e,availableHeight:t}){e.floating.style.maxHeight=`${Math.max(0,t)}px`},padding:10})],...e.floatingUIOptions?.useFloatingOptions},focusManagerProps:{disabled:!0,...e.floatingUIOptions?.focusManagerProps},elementProps:{onMouseDownCapture:e=>e.preventDefault(),style:{zIndex:70},...e.floatingUIOptions?.elementProps}}),[e.floatingUIOptions,g?.show,g?.triggerCharacter,h,r]);return!g||!g.ignoreQueryLength&&l&&(g.query.startsWith(` `)||g.query.length<l)?null:(0,Y.jsx)(IA,{target:e.portalElement,children:(0,Y.jsx)(UA,{reference:_,...v,children:r&&(0,Y.jsx)(xP,{query:g.query,closeMenu:h.closeMenu,clearQuery:h.clearQuery,getItems:m,columns:s,gridSuggestionMenuComponent:i||gP,onItemClick:p})})})}function CP(e){let t=GA(),n=KA(),{items:r,loadingState:i,selectedIndex:a,onItemClick:o}=e,s=i===`loading-initial`||i===`loading`?(0,Y.jsx)(t.SuggestionMenu.Loader,{className:`bn-suggestion-menu-loader`}):null,c=(0,J.useMemo)(()=>{let e,n=[];for(let i=0;i<r.length;i++){let s=r[i];s.group!==e&&(e=s.group,n.push((0,Y.jsx)(t.SuggestionMenu.Label,{className:`bn-suggestion-menu-label`,children:e},e))),n.push((0,Y.jsx)(t.SuggestionMenu.Item,{className:Vb(`bn-suggestion-menu-item`,s.size===`small`?`bn-suggestion-menu-item-small`:``),item:s,id:`bn-suggestion-menu-item-${i}`,isSelected:i===a,onClick:()=>o?.(s)},s.title))}return n},[t,r,o,a]);return(0,Y.jsxs)(t.SuggestionMenu.Root,{id:`bn-suggestion-menu`,className:`bn-suggestion-menu`,children:[c,c.length===0&&(e.loadingState===`loading`||e.loadingState===`loaded`)&&(0,Y.jsx)(t.SuggestionMenu.EmptyItem,{className:`bn-suggestion-menu-item`,children:n.suggestion_menu.no_items_title}),s]})}function wP(e,t){let[n,r]=(0,J.useState)(0);return{selectedIndex:n,setSelectedIndex:r,handler:i=>{if(i.key===`ArrowUp`)return i.preventDefault(),e.length&&r((n-1+e.length)%e.length),!0;if(i.key===`ArrowDown`)return i.preventDefault(),e.length&&r((n+1)%e.length),!0;if(i.key===`PageUp`)return i.preventDefault(),e.length&&r(0),!0;if(i.key===`PageDown`)return i.preventDefault(),e.length&&r(e.length-1),!0;let a=TP(i)?i.nativeEvent.isComposing:i.isComposing;return i.key===`Enter`&&!a&&(i.preventDefault(),i.stopPropagation(),e.length&&t?.(e[n]),!0)}}}function TP(e){return e.nativeEvent!==void 0}function EP(e,t,n,r,i){let a=kA(),{selectedIndex:o,setSelectedIndex:s,handler:c}=wP(n,r);return(0,J.useEffect)(()=>{let e=i||a;return e?.addEventListener(`keydown`,c,!0),()=>{e?.removeEventListener(`keydown`,c,!0)}},[a,n,o,r,i,c]),(0,J.useEffect)(()=>{s(0)},[t,s]),{selectedIndex:n.length===0?void 0:o}}function DP(e){let t=yA().setContentEditableProps,n=bA(),{getItems:r,suggestionMenuComponent:i,query:a,clearQuery:o,closeMenu:s,onItemClick:c}=e,l=(0,J.useCallback)(e=>{s(),o(),c?.(e)},[c,s,o]),{items:u,usedQuery:d,loadingState:f}=yP(a,r);vP(u,d,s);let{selectedIndex:p}=EP(n,a,u,l);return(0,J.useEffect)(()=>(t(e=>({...e,"aria-expanded":!0,"aria-controls":`bn-suggestion-menu`})),()=>{t(e=>({...e,"aria-expanded":!1,"aria-controls":void 0}))}),[t]),(0,J.useEffect)(()=>(t(e=>({...e,"aria-activedescendant":_P(p)})),()=>{t(e=>({...e,"aria-activedescendant":void 0}))}),[t,p]),(0,Y.jsx)(i,{items:u,onItemClick:l,loadingState:f,selectedIndex:p})}var OP={heading:HM,heading_2:VM,heading_3:BM,heading_4:zM,heading_5:RM,heading_6:LM,toggle_heading:HM,toggle_heading_2:VM,toggle_heading_3:BM,quote:TM,toggle_list:gM,numbered_list:kM,bullet_list:OM,check_list:AM,paragraph:SM,table:CM,image:yM,video:bM,audio:hM,file:ZM,emoji:oM,code_block:WM,divider:sM};function kP(e){return ZC(e).map(e=>{let t=OP[e.key];return{...e,icon:(0,Y.jsx)(t,{size:18})}})}function AP(e){let t=bA(),n=kA(),{triggerCharacter:r,suggestionMenuComponent:i,shouldOpen:s,minQueryLength:c,onItemClick:l,getItems:d}=e,f=(0,J.useMemo)(()=>l||(e=>{e.onItemClick(t)}),[t,l]),p=(0,J.useMemo)(()=>d||(async e=>QC(kP(t),e)),[t,d]),m=wA(JC);(0,J.useEffect)(()=>{m.addSuggestionMenu({triggerCharacter:r,shouldOpen:s})},[m,r,s]);let h=TA(JC),g=TA(JC,{selector:e=>({element:n?.firstChild||void 0,getBoundingClientRect:()=>e?.referencePos||new DOMRect})}),_=(0,J.useMemo)(()=>({...e.floatingUIOptions,useFloatingOptions:{open:h?.show&&h?.triggerCharacter===r,onOpenChange:e=>{e||m.closeMenu()},placement:`bottom-start`,middleware:[o(10),a({allowedPlacements:[`bottom-start`,`top-start`],padding:10}),u(),ne({apply({elements:e,availableHeight:t}){e.floating.style.maxHeight=`${Math.max(0,t)}px`},padding:10})],...e.floatingUIOptions?.useFloatingOptions},focusManagerProps:{disabled:!0,...e.floatingUIOptions?.focusManagerProps},elementProps:{onMouseDownCapture:e=>e.preventDefault(),style:{zIndex:80},...e.floatingUIOptions?.elementProps}}),[e.floatingUIOptions,h?.show,h?.triggerCharacter,m,r]);return!h||!h.ignoreQueryLength&&c&&(h.query.startsWith(` `)||h.query.length<c)?null:(0,Y.jsx)(IA,{target:e.portalElement,children:(0,Y.jsx)(UA,{reference:g,..._,children:r&&(0,Y.jsx)(DP,{query:h.query,closeMenu:m.closeMenu,clearQuery:m.clearQuery,getItems:p,suggestionMenuComponent:i||CP,onItemClick:f})})})}var jP=(e,t=.3)=>{let n=Math.floor(e)+t,r=Math.ceil(e)-t;return e>=n&&e<=r?Math.round(e):e<n?Math.floor(e):Math.ceil(e)},MP=e=>{let t=GA(),n=bA(),r=wA(pE),i=TA(pE,{selector:e=>e?.block}),a=(0,J.useRef)(!1),[o,s]=(0,J.useState)(),c=(0,J.useCallback)(t=>{r.freezeHandles(),e.hideOtherElements(!0),i&&(s({originalContent:i.content,originalCroppedContent:{rows:r.cropEmptyRowsOrColumns(i,e.orientation===`addOrRemoveColumns`?`columns`:`rows`)},startPos:e.orientation===`addOrRemoveColumns`?t.clientX:t.clientY}),a.current=!1,t.preventDefault())},[i,e,r]),l=(0,J.useCallback)(()=>{!i||a.current||n.updateBlock(i,{type:`table`,content:{...i.content,rows:e.orientation===`addOrRemoveColumns`?r.addRowsOrColumns(i,`columns`,1):r.addRowsOrColumns(i,`rows`,1)}})},[i,n,e.orientation,r]);return(0,J.useEffect)(()=>{let t=t=>{if(!i)return;if(!o)throw Error(`editingState is undefined`);a.current=!0;let s=(e.orientation===`addOrRemoveColumns`?t.clientX:t.clientY)-o.startPos,c=e.orientation===`addOrRemoveColumns`?o.originalCroppedContent.rows[0]?.cells.length??0:o.originalCroppedContent.rows.length,l=e.orientation===`addOrRemoveColumns`?o.originalContent.rows[0]?.cells.length??0:o.originalContent.rows.length,u=e.orientation===`addOrRemoveColumns`?i.content.rows[0].cells.length:i.content.rows.length,d=l+jP(s/(e.orientation===`addOrRemoveColumns`?120:31),.3);d>=c&&d>0&&d!==u&&(n.updateBlock(i,{type:`table`,content:{...i.content,rows:e.orientation===`addOrRemoveColumns`?r.addRowsOrColumns({type:`table`,content:o.originalCroppedContent},`columns`,d-c):r.addRowsOrColumns({type:`table`,content:o.originalCroppedContent},`rows`,d-c)}}),i.content&&n.setTextCursorPosition(i))};return o&&window.addEventListener(`mousemove`,t),()=>{window.removeEventListener(`mousemove`,t)}},[i,o,n,e.orientation,r]),(0,J.useEffect)(()=>{let t=()=>{e.hideOtherElements(!1),r.unfreezeHandles(),s(void 0)};return o&&window.addEventListener(`mouseup`,t),()=>{window.removeEventListener(`mouseup`,t)}},[o,e,r]),n.isEditable?(0,Y.jsx)(t.TableHandle.ExtendButton,{className:Vb(`bn-extend-button`,e.orientation===`addOrRemoveColumns`?`bn-extend-button-add-remove-columns`:`bn-extend-button-add-remove-rows`,o===null?``:`bn-extend-button-editing`),onClick:l,onMouseDown:c,children:e.children||(0,Y.jsx)(mM,{size:18,"data-test":`extendButton`})}):null},NP=e=>{let t=GA(),n=PA(),r=KA(),i=bA(),{block:a,colIndex:o,rowIndex:s}=TA(pE,{selector:e=>({block:e?.block,colIndex:e?.colIndex,rowIndex:e?.rowIndex})}),c=(e,t)=>{if(a===void 0||o===void 0||s===void 0)return;let n=a.content.rows.map(e=>({...e,cells:e.cells.map(e=>Mb(e))}));t===`text`?n[s].cells[o].props.textColor=e:n[s].cells[o].props.backgroundColor=e,i.updateBlock(a,{type:`table`,content:{...a.content,rows:n}}),i.setTextCursorPosition(a)};if(a===void 0||o===void 0||s===void 0)return null;let l=a.content.rows[s]?.cells?.[o];return!l||i.settings.tables.cellTextColor===!1&&i.settings.tables.cellBackgroundColor===!1?null:(0,Y.jsxs)(t.Generic.Menu.Root,{position:`right`,sub:!0,portalElement:n,children:[(0,Y.jsx)(t.Generic.Menu.Trigger,{sub:!0,children:(0,Y.jsx)(t.Generic.Menu.Item,{className:`bn-menu-item`,subTrigger:!0,children:e.children||r.drag_handle.colors_menuitem})}),(0,Y.jsx)(t.Generic.Menu.Dropdown,{sub:!0,className:`bn-menu-dropdown bn-color-picker-dropdown`,children:(0,Y.jsx)(cN,{iconSize:18,text:i.settings.tables.cellTextColor?{color:Pb(l)?l.props.textColor:`default`,setColor:e=>c(e,`text`)}:void 0,background:i.settings.tables.cellBackgroundColor?{color:Pb(l)?l.props.backgroundColor:`default`,setColor:e=>c(e,`background`)}:void 0})})]})},PP=()=>{let e=GA(),t=KA(),n=bA(),r=wA(pE),{block:i,colIndex:a,rowIndex:o}=TA(pE,{selector:e=>({block:e?.block,colIndex:e?.colIndex,rowIndex:e?.rowIndex})});if(i===void 0||a===void 0||o===void 0)return null;let s=i.content.rows[o]?.cells?.[a];return!s||!Pb(s)||Ib(s)===1&&Fb(s)===1||!n.settings.tables.splitCells?null:(0,Y.jsx)(e.Generic.Menu.Item,{onClick:()=>{r.splitCell({row:o,col:a})},children:t.table_handle.split_cell_menuitem})},FP=e=>{let t=GA();return(0,Y.jsx)(t.Generic.Menu.Dropdown,{className:`bn-menu-dropdown bn-table-handle-menu`,children:e.children||(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(PP,{}),(0,Y.jsx)(NP,{})]})})},IP=e=>{let t=GA(),n=PA(),r=bA(),i=wA(pE),a=e.tableCellMenu||FP;return!r.settings.tables.splitCells&&!r.settings.tables.cellBackgroundColor&&!r.settings.tables.cellTextColor?null:(0,Y.jsxs)(t.Generic.Menu.Root,{onOpenChange:t=>{t?(i.freezeHandles(),e.hideOtherElements(!0)):(i.unfreezeHandles(),e.hideOtherElements(!1),r.focus())},position:`right`,portalElement:n,children:[(0,Y.jsx)(t.Generic.Menu.Trigger,{children:(0,Y.jsx)(t.Generic.Menu.Button,{className:`bn-table-cell-handle`,children:e.children||(0,Y.jsx)(tP,{size:12,"data-test":`tableCellHandle`})})}),(0,Y.jsx)(a,{})]})},LP=e=>{let t=GA(),n=KA(),r=wA(pE),i=TA(pE,{selector:t=>e.orientation===`column`?t?.colIndex:t?.rowIndex});return r===void 0||i===void 0?null:(0,Y.jsx)(t.Generic.Menu.Item,{onClick:()=>{r.addRowOrColumn(i,e.orientation===`row`?{orientation:`row`,side:e.side}:{orientation:`column`,side:e.side})},children:n.table_handle[`add_${e.side}_menuitem`]})},RP=e=>{let t=GA(),n=KA(),r=wA(pE),i=TA(pE,{selector:t=>e.orientation===`column`?t?.colIndex:t?.rowIndex});return r===void 0||i===void 0?null:(0,Y.jsx)(t.Generic.Menu.Item,{onClick:()=>r.removeRowOrColumn(i,e.orientation),children:e.orientation===`row`?n.table_handle.delete_row_menuitem:n.table_handle.delete_column_menuitem})},zP=e=>{let t=GA(),n=PA(),r=KA(),i=bA(),a=wA(pE),{block:o,index:s}=TA(pE,{selector:t=>({block:t?.block,index:e.orientation===`column`?t?.colIndex:t?.rowIndex})}),c=(0,J.useMemo)(()=>a===void 0||o===void 0||s===void 0?[]:e.orientation===`row`?a.getCellsAtRowHandle(o,s):a.getCellsAtColumnHandle(o,s),[o,s,e.orientation,a]),l=(e,t)=>{if(o===void 0)return;let n=o.content.rows.map(e=>({...e,cells:e.cells.map(e=>Mb(e))}));c.forEach(({row:r,col:i})=>{t===`text`?n[r].cells[i].props.textColor=e:n[r].cells[i].props.backgroundColor=e}),i.updateBlock(o,{type:`table`,content:{...o.content,rows:n}}),i.setTextCursorPosition(o)};if(!c||!c[0]||!a||i.settings.tables.cellTextColor===!1&&i.settings.tables.cellBackgroundColor===!1)return null;let u=Mb(c[0].cell);return(0,Y.jsxs)(t.Generic.Menu.Root,{position:`right`,sub:!0,portalElement:n,children:[(0,Y.jsx)(t.Generic.Menu.Trigger,{sub:!0,children:(0,Y.jsx)(t.Generic.Menu.Item,{className:`bn-menu-item`,subTrigger:!0,children:e.children||r.drag_handle.colors_menuitem})}),(0,Y.jsx)(t.Generic.Menu.Dropdown,{sub:!0,className:`bn-menu-dropdown bn-color-picker-dropdown`,children:(0,Y.jsx)(cN,{iconSize:18,text:i.settings.tables.cellTextColor?{color:c.every(({cell:e})=>Pb(e)&&e.props.textColor===u.props.textColor)?u.props.textColor:`default`,setColor:e=>{l(e,`text`)}}:void 0,background:i.settings.tables.cellBackgroundColor?{color:c.every(({cell:e})=>Pb(e)&&e.props.backgroundColor===u.props.backgroundColor)?u.props.backgroundColor:`default`,setColor:e=>l(e,`background`)}:void 0})})]})},BP=e=>{let t=GA(),n=KA(),r=bA(),i=wA(pE),{block:a,index:o}=TA(pE,{selector:t=>({block:t?.block,index:e.orientation===`column`?t?.colIndex:t?.rowIndex})});if(i===void 0||a===void 0||o!==0||e.orientation!==`row`||!r.settings.tables.headers)return null;let s=!!a.content.headerRows;return(0,Y.jsx)(t.Generic.Menu.Item,{className:`bn-menu-item`,checked:s,onClick:()=>{r.updateBlock(a,{...a,content:{...a.content,headerRows:s?void 0:1}})},children:n.drag_handle.header_row_menuitem})},VP=e=>{let t=GA(),n=KA(),r=bA(),i=wA(pE),a=TA(pE,{selector:e=>e?.block}),o=TA(pE,{selector:t=>e.orientation===`column`?t?.colIndex:t?.rowIndex});if(!i||o!==0||!a||e.orientation!==`column`||!r.settings.tables.headers)return null;let s=!!a.content.headerCols;return(0,Y.jsx)(t.Generic.Menu.Item,{className:`bn-menu-item`,checked:s,onClick:()=>{r.updateBlock(a,{...a,content:{...a.content,headerCols:s?void 0:1}})},children:n.drag_handle.header_column_menuitem})},HP=e=>{let t=GA();return(0,Y.jsx)(t.Generic.Menu.Dropdown,{className:`bn-table-handle-menu`,children:e.children||(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(RP,{orientation:e.orientation}),(0,Y.jsx)(LP,{orientation:e.orientation,side:e.orientation===`row`?`above`:`left`}),(0,Y.jsx)(LP,{orientation:e.orientation,side:e.orientation===`row`?`below`:`right`}),(0,Y.jsx)(BP,{orientation:e.orientation}),(0,Y.jsx)(VP,{orientation:e.orientation}),(0,Y.jsx)(zP,{orientation:e.orientation})]})})},UP=e=>{let t=bA(),n=GA(),r=PA(),[i,a]=(0,J.useState)(!1),o=e.tableHandleMenu||HP,s=wA(pE),c=TA(pE),l=(0,J.useMemo)(()=>!s||!c||!c.block||c.block.type!==`table`?!1:e.orientation===`column`?s.getCellsAtColumnHandle(c.block,c.colIndex).every(({cell:e})=>Fb(e)===1):s.getCellsAtRowHandle(c.block,c.rowIndex).every(({cell:e})=>Ib(e)===1),[e.orientation,c,s]);return c?(0,Y.jsxs)(n.Generic.Menu.Root,{onOpenChange:n=>{n?(s.freezeHandles(),e.hideOtherElements(!0)):(s.unfreezeHandles(),e.hideOtherElements(!1),t.focus())},position:`right`,portalElement:r,children:[(0,Y.jsx)(n.Generic.Menu.Trigger,{children:(0,Y.jsx)(n.TableHandle.Root,{className:Vb(`bn-table-handle`,i?`bn-table-handle-dragging`:``,l?``:`bn-table-handle-not-draggable`),draggable:l,onDragStart:t=>{a(!0),e.hideOtherElements(!0),e.orientation===`column`?s.colDragStart(t):s.rowDragStart(t)},onDragEnd:()=>{s.dragEnd(),e.hideOtherElements(!1),a(!1)},style:e.orientation===`column`?{transform:`rotate(0.25turn)`}:void 0,children:e.children||(0,Y.jsx)(nP,{size:24,"data-test":`tableHandle`})})}),(0,Y.jsx)(o,{orientation:e.orientation})]}):null},WP=e=>{let t=bA(),[n,r]=(0,J.useState)(),i=TA(pE),a=(0,J.useMemo)(()=>{let e={};if(i===void 0)return{};let n=lS(i.block.id,t.prosemirrorState.doc);if(!n)return{};let r=n.posBeforeNode+1,a=t.prosemirrorView.domAtPos(r+1).node;if(!(a instanceof Element))return{};if(e.tableReference={element:a},i.rowIndex===void 0||i.colIndex===void 0)return e;let o=t.prosemirrorState.doc.resolve(r+1).posAtIndex(i.rowIndex),s=t.prosemirrorState.doc.resolve(o+1).posAtIndex(i.colIndex),c=t.prosemirrorView.domAtPos(s+1).node;return c instanceof Element?(e.cellReference={element:c},e.rowReference={element:a,getBoundingClientRect:()=>{let e=a.getBoundingClientRect(),t=c.getBoundingClientRect();return new DOMRect(e.x,i.draggingState&&i.draggingState.draggedCellOrientation===`row`?i.draggingState.mousePos-t.height/2:t.y,e.width,t.height)}},e.columnReference={element:a,getBoundingClientRect:()=>{let e=a.getBoundingClientRect(),t=c.getBoundingClientRect();return new DOMRect(i.draggingState&&i.draggingState.draggedCellOrientation===`col`?i.draggingState.mousePos-t.width/2:t.x,e.y,t.width,e.height)}},e):{}},[t,i]),s=(0,J.useCallback)((e,n,r)=>{let i=!1;return _(e,n,()=>{i?t.getExtension(pE)?.hideHandlesIfNotFrozen():i=!0},{ancestorScroll:!0,ancestorResize:!1,elementResize:!1,layoutShift:!1})},[t]),c=(0,J.useMemo)(()=>i===void 0?void 0:{rowTableHandle:{useFloatingOptions:{open:i.show&&i.rowIndex!==void 0&&(!n||n===`rowTableHandle`),placement:`left`,middleware:[o(-10)],whileElementsMounted:s},focusManagerProps:{disabled:!0},elementProps:{style:{zIndex:10}}},columnTableHandle:{useFloatingOptions:{open:i.show&&i.colIndex!==void 0&&(!n||n===`columnTableHandle`),placement:`top`,middleware:[o(-12)],whileElementsMounted:s},focusManagerProps:{disabled:!0},elementProps:{style:{zIndex:10}}},tableCellHandle:{useFloatingOptions:{open:i.show&&i.rowIndex!==void 0&&i.colIndex!==void 0&&(!n||n===`tableCellHandle`),placement:`top-end`,middleware:[o({mainAxis:-15,crossAxis:-1})],whileElementsMounted:s},focusManagerProps:{disabled:!0},elementProps:{style:{zIndex:10}}},extendRowsButton:{useFloatingOptions:{open:i.show&&i.showAddOrRemoveRowsButton&&(!n||n===`extendRowsButton`),placement:`bottom`,whileElementsMounted:s,middleware:[ne({apply({rects:e,elements:t}){Object.assign(t.floating.style,{width:`${e.reference.width}px`})}})]},focusManagerProps:{disabled:!0},elementProps:{style:{zIndex:10}}},extendColumnsButton:{useFloatingOptions:{open:i.show&&i.showAddOrRemoveColumnsButton&&(!n||n===`extendColumnsButton`),placement:`right`,whileElementsMounted:s,middleware:[ne({apply({rects:e,elements:t}){Object.assign(t.floating.style,{height:`${e.reference.height}px`})}})]},focusManagerProps:{disabled:!0},elementProps:{style:{zIndex:10}}}},[n,i,s]);if(!i)return null;let l=e.tableHandle||UP,u=e.extendButton||MP,d=e.tableCellHandle||IP;return(0,Y.jsxs)(IA,{target:e.portalElement,children:[(0,Y.jsx)(UA,{reference:a?.rowReference,...c?.rowTableHandle,children:i.show&&i.rowIndex!==void 0&&(!n||n===`rowTableHandle`)&&(0,Y.jsx)(l,{orientation:`row`,hideOtherElements:e=>r(e?`rowTableHandle`:void 0)})}),(0,Y.jsx)(UA,{reference:a?.columnReference,...c?.columnTableHandle,children:i.show&&i.colIndex!==void 0&&(!n||n===`columnTableHandle`)&&(0,Y.jsx)(l,{orientation:`column`,hideOtherElements:e=>r(e?`columnTableHandle`:void 0)})}),(0,Y.jsx)(UA,{reference:a?.cellReference,...c?.tableCellHandle,children:i.show&&i.rowIndex!==void 0&&i.colIndex!==void 0&&(!n||n===`tableCellHandle`)&&(0,Y.jsx)(d,{hideOtherElements:e=>r(e?`tableCellHandle`:void 0)})}),(0,Y.jsx)(UA,{reference:a?.tableReference,...c?.extendRowsButton,children:i.show&&i.showAddOrRemoveRowsButton&&(!n||n===`extendRowsButton`)&&(0,Y.jsx)(u,{orientation:`addOrRemoveRows`,hideOtherElements:e=>r(e?`extendRowsButton`:void 0)})}),(0,Y.jsx)(UA,{reference:a?.tableReference,...c?.extendColumnsButton,children:i.show&&i.showAddOrRemoveColumnsButton&&(!n||n===`extendColumnsButton`)&&(0,Y.jsx)(u,{orientation:`addOrRemoveColumns`,hideOtherElements:e=>r(e?`extendColumnsButton`:void 0)})})]})};function GP(e){if(e!==void 0){if(typeof e==`string`){if(typeof document>`u`)return;let t=document.querySelector(e);if(!t){console.warn(`[BlockNote] portalElements selector "${e}" did not match any element`);return}return t}return e}}var KP=(0,J.lazy)(()=>Promise.resolve().then(()=>TF)),qP=(0,J.lazy)(()=>Promise.resolve().then(()=>AF));function JP(e){let t=bA();if(!t)throw Error(`BlockNoteDefaultUI must be used within a BlockNoteContext.Provider`);let n=e.portalElements,r=GP(n?.formattingToolbar),i=GP(n?.linkToolbar),a=GP(n?.slashMenu),o=GP(n?.emojiPicker),s=GP(n?.sideMenu),c=GP(n?.filePanel),l=GP(n?.tableHandles),u=GP(n?.comments),d=GP(n?.attributionTooltip);return(0,Y.jsxs)(Y.Fragment,{children:[t.getExtension(UC)&&e.formattingToolbar!==!1&&(0,Y.jsx)(qN,{portalElement:r}),t.getExtension(Vw)&&e.linkToolbar!==!1&&(0,Y.jsx)(QN,{portalElement:i}),t.getExtension(JC)&&e.slashMenu!==!1&&(0,Y.jsx)(AP,{triggerCharacter:`/`,shouldOpen:e=>!e.selection.$from.parent.type.isInGroup(`tableContent`),portalElement:a}),t.getExtension(JC)&&e.emojiPicker!==!1&&(0,Y.jsx)(SP,{triggerCharacter:`:`,columns:10,minQueryLength:2,portalElement:o}),t.getExtension(qT)&&e.sideMenu!==!1&&(0,Y.jsx)(dP,{portalElement:s}),t.getExtension(OS)&&e.filePanel!==!1&&(0,Y.jsx)(Wj,{portalElement:c}),t.getExtension(pE)&&e.tableHandles!==!1&&(0,Y.jsx)(WP,{portalElement:l}),t.getExtension(aj)&&e.comments!==!1&&(0,Y.jsxs)(J.Suspense,{children:[(0,Y.jsx)(KP,{portalElement:u}),(0,Y.jsx)(qP,{portalElement:u})]}),t.getExtension(`attribution`)&&e.attributionTooltip!==!1&&(0,Y.jsx)(mP,{portalElement:d})]})}var YP=!1;function XP(){typeof process<`u`||YP||typeof document>`u`||(YP=!0,(document.querySelector(`meta[name="viewport"]`)?.getAttribute(`content`)??``).replace(/\s/g,``).includes(`interactive-widget=resizes-content`)||console.warn(`[BlockNote] This page's viewport meta tag is missing "interactive-widget=resizes-content" in its content attribute. Add it to ensure proper mobile functionality, e.g. <meta name="viewport" content="width=device-width, initial-scale=1, interactive-widget=resizes-content">. See https://www.blocknotejs.org/docs/getting-started#mobile-compatibility for more information`))}function ZP(e,t){let n=yA();t||=n?.editor;let r=(0,J.useRef)(e);EA(()=>{r.current=e}),(0,J.useEffect)(()=>{if(!t)throw Error(`'editor' is required, either from BlockNoteContext or as a function argument`);return t.onChange((...e)=>r.current(...e))},[t])}function QP(e,t,n){let r=yA();t||=r?.editor;let i=(0,J.useRef)(e);EA(()=>{i.current=e}),(0,J.useEffect)(()=>{if(!t)throw Error(`'editor' is required, either from BlockNoteContext or as a function argument`);return t.onSelectionChange(e=>i.current(e),n)},[t,n])}var $P=()=>{let e=(0,J.useMemo)(()=>window.matchMedia?.(`(prefers-color-scheme: dark)`),[]),t=(0,J.useMemo)(()=>window.matchMedia?.(`(prefers-color-scheme: light)`),[]),n=e?.matches,r=t?.matches,[i,a]=(0,J.useState)(n?`dark`:r?`light`:`no-preference`);return(0,J.useEffect)(()=>{a(n?`dark`:r?`light`:`no-preference`)},[n,r]),(0,J.useEffect)(()=>{if(typeof e?.addEventListener==`function`){let n=({matches:e})=>e&&a(`dark`),r=({matches:e})=>e&&a(`light`);return e?.addEventListener(`change`,n),t?.addEventListener(`change`,r),()=>{e?.removeEventListener(`change`,n),t?.removeEventListener(`change`,r)}}{let n=()=>a(e.matches?`dark`:t.matches?`light`:`no-preference`);return e?.addEventListener(`change`,n),t?.addEventListener(`change`,n),()=>{e?.removeEventListener(`change`,n),t?.removeEventListener(`change`,n)}}},[e,t]),window.matchMedia,i};function eF(){let e=new Set,t={};return{subscribe(t){return e.add(t),()=>{e.delete(t)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(n,r){t={...t,[n]:(0,Wd.createPortal)(r.reactElement,r.element,n)},e.forEach(e=>e())},removeRenderer(n){let r={...t};delete r[n],t=r,e.forEach(e=>e())}}}var tF=({contentComponent:e})=>{let t=(0,J.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,Y.jsx)(Y.Fragment,{children:Object.values(t)})},nF=(0,J.forwardRef)((e,t)=>{let[n,r]=(0,J.useState)();return(0,J.useImperativeHandle)(t,()=>(e,t)=>{(0,Wd.flushSync)(()=>{r({node:e,container:t})}),r(void 0)},[]),(0,Y.jsx)(Y.Fragment,{children:n&&(0,Wd.createPortal)(n.node,n.container)})}),rF=()=>{};function iF(e,t){let{editor:n,className:r,theme:i,children:a,editable:o,onSelectionChange:s,onChange:c,formattingToolbar:l,linkToolbar:u,slashMenu:d,emojiPicker:f,sideMenu:p,filePanel:m,tableHandles:h,comments:g,portalElements:_,applyThemedRoot:v,autoFocus:y,renderEditor:b=!0,...x}=e,S=(0,J.useMemo)(()=>GP(_?.default),[_?.default]),[C,w]=(0,J.useState)(),T=yA(),E=$P(),D=T?.colorSchemePreference||E,O=i||(D===`dark`?`dark`:`light`),k=GA(),A=(0,J.useMemo)(()=>({formattingToolbar:k?l:!1,linkToolbar:k?u:!1,sideMenu:k?p:!1,slashMenu:k?d:!1,filePanel:k?m:!1,tableHandles:k?h:!1,emojiPicker:k?f:!1,comments:k?g:!1,portalElements:_}),[g,k,f,m,l,u,p,d,h,_]);ZP(c||rF,n),QP(s||rF,n);let j=(0,J.useCallback)(e=>{n.elementRenderer=e},[n]),M=(0,J.useCallback)(e=>{e.className=Vb(`bn-root`,O,r||``),e.setAttribute(`data-color-scheme`,O),v?.(e)},[O,r,v]),N=(0,J.useMemo)(()=>({...T,editor:n,setContentEditableProps:w,colorSchemePreference:O}),[T,n,O]),P=(0,J.useMemo)(()=>({editorProps:{autoFocus:y,contentEditableProps:C,editable:o},defaultUIProps:A,applyThemedRoot:M}),[y,C,o,A,M]);return(0,Y.jsx)(vA.Provider,{value:N,children:(0,Y.jsxs)(AA.Provider,{value:P,children:[(0,Y.jsx)(nF,{ref:j}),(0,Y.jsx)(aF,{className:r,renderEditor:b,editorColorScheme:O,defaultPortalElement:S,ref:t,...x,children:a})]})})}var aF=J.forwardRef(({className:e,renderEditor:t,editorColorScheme:n,defaultPortalElement:r,children:i,...a},o)=>(0,Y.jsx)(`div`,{className:Vb(`bn-root`,`bn-container`,n,e),"data-color-scheme":n,...a,ref:o,children:(0,Y.jsx)(FA,{children:(0,Y.jsx)(IA,{target:r,children:t?(0,Y.jsx)(sF,{children:i}):i})})})),oF=J.forwardRef(iF),sF=e=>{let t=jA(),n=bA(),r=(0,J.useMemo)(()=>eF(),[]);(0,J.useEffect)(()=>{XP()},[]);let i=(0,J.useCallback)(e=>{n.isEditable=t.editorProps.editable!==!1,n._tiptapEditor.contentComponent=r,e?n.mount(e):n.unmount()},[t.editorProps.editable,n,r]);return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(tF,{contentComponent:r}),(0,Y.jsx)(cF,{...t.editorProps,...e,mount:i}),(0,Y.jsx)(JP,{...t.defaultUIProps}),e.children]})},cF=e=>{let{autoFocus:t,mount:n,contentEditableProps:r}=e;return(0,Y.jsx)(`div`,{"aria-autocomplete":`list`,"aria-haspopup":`listbox`,"data-bn-autofocus":t,ref:n,...r})};function lF(e,t){let n,r=document.createElement(`div`),i;if(t?.elementRenderer)t.elementRenderer(e(e=>n=e||void 0),r);else{if(!t?.headless)throw Error(`elementRenderer not available, expected headless editor`);i=(0,Lj.createRoot)(r),(0,Wd.flushSync)(()=>{i.render(e(e=>n=e||void 0))})}if(!r.childElementCount)return console.warn(`ReactInlineContentSpec: renderHTML() failed`),{dom:document.createElement(`span`)};n?.setAttribute(`data-tmp-find`,`true`);let a=r.cloneNode(!0),o=a.firstElementChild,s=a.querySelector(`[data-tmp-find]`);return s?.removeAttribute(`data-tmp-find`),i?.unmount(),{dom:o,contentDOM:s||void 0}}function uF(e,t){let n=(0,J.useRef)(t),r=e.view.state.doc;try{n.current=mx(e.getPos,r)}catch{}return n.current}function dF(e){return(0,Y.jsx)(vj,{onDragOver:e=>e.preventDefault(),...Object.fromEntries(Object.entries(e.domAttributes||{}).filter(([e])=>e!==`class`)),className:Vb(`bn-block-content`,e.domAttributes?.class||``),"data-content-type":e.blockType,...Object.fromEntries(Object.entries(e.blockProps).filter(([t,n])=>n!==e.propSchema[t].default).map(([e,t])=>[ux(e),t])),"data-file-block":e.isFileBlock===!0||void 0,children:e.children})}function fF(e,t,n){return(r={})=>{let i=typeof e==`function`?e(r):e,a=typeof t==`function`?t(r):t,o=n?typeof n==`function`?n(r):n:void 0;return{config:i,implementation:{...a,toExternalHTML(e,t,n){let r=a.toExternalHTML||a.render;return lF(o=>(0,Y.jsx)(dF,{blockType:e.type,blockProps:e.props,propSchema:i.propSchema,domAttributes:this.blockContentDOMAttributes,isFileBlock:a.meta?.fileBlockAccept!==void 0,children:(0,Y.jsx)(r,{block:e,editor:t,contentRef:e=>{o(e),e&&(e.className=Vb(`bn-inline-content`,e.className))},context:n})}),t)},render(e,t){if(this.renderType===`nodeView`){let n=e;return Mj(e=>{let r=uF(e,n),o=_j().nodeViewContentRef;if(!o)throw Error(`nodeViewContentRef is not set`);let s=a.render;return(0,Y.jsx)(dF,{blockType:r.type,blockProps:r.props,propSchema:i.propSchema,isFileBlock:!!a.meta?.fileBlockAccept,domAttributes:this.blockContentDOMAttributes,children:(0,Y.jsx)(s,{block:r,editor:t,contentRef:e=>{o(e),e&&(e.className=Vb(`bn-inline-content`,e.className),e.dataset.nodeViewContent=``)}})})},{className:`bn-react-node-view-renderer`})(this.props)}{let n=a.render;return lF(r=>(0,Y.jsx)(dF,{blockType:e.type,blockProps:e.props,propSchema:i.propSchema,domAttributes:this.blockContentDOMAttributes,children:(0,Y.jsx)(n,{block:e,editor:t,contentRef:e=>{r(e),e&&(e.className=Vb(`bn-inline-content`,e.className))}})}),t)}}},extensions:o}}}var pF;async function mF(){return pF||(pF=(async()=>{let[e,t]=await Promise.all([Tt(()=>import(`./module-BrWgIX20.js`),[],import.meta.url),Tt(()=>import(`./native-Cqs-2kTC.js`),[],import.meta.url)]),n=`default`in e?e.default:e,r=`default`in t?t.default:t;return await n.init({data:r}),{emojiMart:n,emojiData:r}})(),pF)}function hF(e){let t=(0,J.useRef)(null),n=(0,J.useRef)(null);return n.current&&n.current.update(e),(0,J.useEffect)(()=>((async()=>{let{emojiMart:r}=await mF();n.current=new r.Picker({...e,ref:t})})(),()=>{n.current=null}),[]),J.createElement(`div`,{ref:t})}var gF=e=>{let[t,n]=(0,J.useState)(!1),r=GA(),i=yA(),a=PA();return(0,Y.jsxs)(r.Generic.Popover.Root,{open:t,portalElement:a,children:[(0,Y.jsx)(r.Generic.Popover.Trigger,{children:(0,Y.jsx)(`div`,{onClick:r=>{r.preventDefault(),r.stopPropagation(),n(!t),e.onOpenChange?.(!t)},style:{display:`flex`,justifyContent:`center`,alignItems:`center`},children:e.children})}),(0,Y.jsx)(r.Generic.Popover.Content,{className:`bn-emoji-picker-popover`,variant:`panel-popover`,children:(0,Y.jsx)(hF,{perLine:7,onClickOutside:()=>{n(!1),e.onOpenChange?.(!1)},onEmojiSelect:t=>{e.onEmojiSelect(t),n(!1),e.onOpenChange?.(!1)},theme:i?.colorSchemePreference})})]})};function _F(e){let{userStore:t}=wA(aj),n=e.join(`,`);return(0,J.useEffect)(()=>{t.loadUsers(e)},[t,n]),xA(t.store,t=>{let n=new Map;for(let r of e){let e=t.get(r);e&&n.set(r,e)}return n})}function vF(e){return _F([e]).get(e)}var yF=e=>{let t=GA(),n=KA(),r=wA(aj),i=e.comment.reactions.find(t=>t.emoji===e.emoji);if(!i)throw Error(`Trying to render reaction badge for non-existing reaction`);let[a,o]=(0,J.useState)([]),s=_F(a);return(0,Y.jsx)(t.Generic.Badge.Root,{className:Vb(`bn-badge`,`bn-comment-reaction`),text:i.userIds.length.toString(),icon:i.emoji,isSelected:r.threadStore.auth.canDeleteReaction(e.comment,i.emoji),onClick:()=>e.onReactionSelect(i.emoji),onMouseEnter:()=>o(i.userIds),mainTooltip:n.comments.reactions.reacted_by,secondaryTooltip:`${Array.from(s.values()).map(e=>e.username).join(`
223
- `)}`},i.emoji)},bF=(0,J.memo)(({isEmpty:e,comment:t,isEditing:n,threadStore:r,onReactionSelect:i,onEditSubmit:a,onEditCancel:o,onEmojiPickerOpenChange:s,Components:c,dict:l})=>{let u=r.auth.canAddReaction(t);return(0,Y.jsxs)(Y.Fragment,{children:[t.reactions.length>0&&!n&&(0,Y.jsxs)(c.Generic.Badge.Group,{className:Vb(`bn-badge-group`,`bn-comment-reactions`),children:[t.reactions.map(e=>(0,Y.jsx)(yF,{comment:t,emoji:e.emoji,onReactionSelect:i},e.emoji)),u&&(0,Y.jsx)(gF,{onEmojiSelect:e=>i(e.native),onOpenChange:s,children:(0,Y.jsx)(c.Generic.Badge.Root,{className:Vb(`bn-badge`,`bn-comment-add-reaction`),text:`+`,icon:(0,Y.jsx)(aM,{size:16}),mainTooltip:l.comments.actions.add_reaction})})]}),n&&(0,Y.jsxs)(c.Generic.Toolbar.Root,{variant:`action-toolbar`,className:Vb(`bn-action-toolbar`,`bn-comment-actions`),children:[(0,Y.jsx)(c.Generic.Toolbar.Button,{mainTooltip:l.comments.save_button_text,variant:`compact`,onClick:a,isDisabled:e,children:l.comments.save_button_text}),(0,Y.jsx)(c.Generic.Toolbar.Button,{className:`bn-button`,mainTooltip:l.comments.cancel_button_text,variant:`compact`,onClick:o,children:l.comments.cancel_button_text})]})]})}),xF=({comment:e,thread:t,showResolveButton:n})=>{let r=wA(aj),i=KA(),[a,o]=(0,J.useState)(!1),s=JA({initialContent:e.body,trailingBlock:!1,dictionary:{...i,placeholders:{emptyDocument:i.placeholders.edit_comment}},schema:r.commentEditorSchema||$A,extensions:[tj({submitOnEnter:r.submitOnEnter,onSubmit:async n=>{await r.threadStore.updateComment({commentId:e.id,comment:{body:n.document},threadId:t.id}),o(!1)}})]}),c=GA(),l=PA(),[u,d]=(0,J.useState)(!1),[f,p]=(0,J.useState)(!1),m=r.threadStore,h=(0,J.useCallback)(()=>{o(!0)},[]),g=(0,J.useCallback)(()=>{s.replaceBlocks(s.document,e.body),o(!1)},[s,e.body]),_=s.getExtension(tj).submit,v=(0,J.useCallback)(async()=>{await m.deleteComment({commentId:e.id,threadId:t.id})},[e,t.id,m]),y=(0,J.useCallback)(async n=>{m.auth.canAddReaction(e,n)?await m.addReaction({threadId:t.id,commentId:e.id,emoji:n}):m.auth.canDeleteReaction(e,n)&&await m.deleteReaction({threadId:t.id,commentId:e.id,emoji:n})},[m,e,t.id]),b=(0,J.useCallback)(async()=>{await m.resolveThread({threadId:t.id})},[t.id,m]),x=(0,J.useCallback)(async()=>{await m.unresolveThread({threadId:t.id})},[t.id,m]),S=vF(e.userId);if(!e.body)return null;let C,w=m.auth.canAddReaction(e),T=m.auth.canDeleteComment(e),E=m.auth.canUpdateComment(e),D=n&&(t.resolved?m.auth.canUnresolveThread(t):m.auth.canResolveThread(t));a||(C=(0,Y.jsxs)(c.Generic.Toolbar.Root,{className:Vb(`bn-action-toolbar`,`bn-comment-actions`),variant:`action-toolbar`,children:[w&&(0,Y.jsx)(gF,{onEmojiSelect:e=>y(e.native),onOpenChange:d,children:(0,Y.jsx)(c.Generic.Toolbar.Button,{mainTooltip:i.comments.actions.add_reaction,variant:`compact`,children:(0,Y.jsx)(aM,{size:16})},`add-reaction`)}),D&&(t.resolved?(0,Y.jsx)(c.Generic.Toolbar.Button,{mainTooltip:i.comments.actions.reopen,variant:`compact`,onClick:x,children:(0,Y.jsx)(eN,{size:16})},`reopen`):(0,Y.jsx)(c.Generic.Toolbar.Button,{mainTooltip:i.comments.actions.resolve,variant:`compact`,onClick:b,children:(0,Y.jsx)(pM,{size:16})},`resolve`)),(T||E)&&(0,Y.jsxs)(c.Generic.Menu.Root,{position:`bottom-start`,onOpenChange:p,portalElement:l,children:[(0,Y.jsx)(c.Generic.Menu.Trigger,{children:(0,Y.jsx)(c.Generic.Toolbar.Button,{mainTooltip:i.comments.actions.more_actions,variant:`compact`,children:(0,Y.jsx)(cM,{size:16})},`more-actions`)}),(0,Y.jsxs)(c.Generic.Menu.Dropdown,{className:`bn-menu-dropdown`,children:[E&&(0,Y.jsx)(c.Generic.Menu.Item,{icon:(0,Y.jsx)($M,{}),onClick:h,children:i.comments.actions.edit_comment},`edit-comment`),T&&(0,Y.jsx)(c.Generic.Menu.Item,{icon:(0,Y.jsx)(dM,{}),onClick:v,children:i.comments.actions.delete_comment},`delete-comment`)]})]})]}));let O=e.createdAt.toLocaleDateString(void 0,{month:`short`,day:`numeric`});if(!e.body)throw Error(`soft deletes are not yet supported`);return(0,Y.jsx)(c.Comments.Comment,{authorInfo:S??`loading`,timeString:O,edited:e.updatedAt.getTime()!==e.createdAt.getTime(),showActions:f||`hover`,actions:C,className:`bn-thread-comment`,emojiPickerOpen:u,children:(0,Y.jsx)(YA,{autoFocus:a,editor:s,editable:a,actions:e.reactions.length>0||a?({isFocused:t,isEmpty:n})=>(0,Y.jsx)(bF,{isFocused:t,isEmpty:n,comment:e,isEditing:a,threadStore:m,onReactionSelect:y,onEditSubmit:_,onEditCancel:g,onEmojiPickerOpenChange:d,Components:c,dict:i}):void 0})})},SF=({thread:e,maxCommentsBeforeCollapse:t})=>{let n=GA(),r=KA(),i=_F(e.resolvedBy?[e.resolvedBy]:[]),a=e.comments.map((t,n)=>(0,Y.jsx)(xF,{thread:e,comment:t,showResolveButton:n===0},t.id+JSON.stringify(t.body||`{}`)));if(e.resolved&&e.resolvedUpdatedAt&&e.resolvedBy){if(!i.get(e.resolvedBy))throw Error(`User ${e.resolvedBy} resolved thread ${e.id}, but their data could not be found.`);let t=e.comments.findLastIndex(t=>e.resolvedUpdatedAt.getTime()>t.createdAt.getTime())+1;a.splice(t,0,(0,Y.jsx)(n.Comments.Comment,{className:`bn-thread-comment`,authorInfo:e.resolvedBy&&i.get(e.resolvedBy)||`loading`,timeString:e.resolvedUpdatedAt.toLocaleDateString(void 0,{month:`short`,day:`numeric`}),edited:!1,showActions:!1,children:(0,Y.jsx)(`div`,{className:`bn-resolved-text`,children:r.comments.sidebar.marked_as_resolved})},`resolved-comment`))}return t&&a.length>t&&a.splice(1,a.length-2,(0,Y.jsx)(n.Comments.ExpandSectionsPrompt,{className:`bn-thread-expand-prompt`,children:r.comments.sidebar.more_replies(e.comments.length-2)},`expand-prompt`)),a},CF=(0,J.memo)(({isEmpty:e,onSave:t,Components:n,dict:r})=>(0,Y.jsx)(n.Generic.Toolbar.Root,{className:Vb(`bn-action-toolbar`,`bn-comment-actions`),variant:`action-toolbar`,children:(0,Y.jsx)(n.Generic.Toolbar.Button,{className:`bn-button`,mainTooltip:r.comments.save_button_text,variant:`compact`,isDisabled:e,onClick:t,children:r.comments.save_button_text})}));function wF(e){let t=e.newCommentEditor,n=GA(),r=KA(),i=t.getExtension(tj);if(!i)throw Error(`FloatingComposer's newCommentEditor must include CommentEditorSubmitExtension.`);let a=i.submit;return(0,Y.jsx)(n.Comments.Card,{className:`bn-thread`,children:(0,Y.jsx)(YA,{autoFocus:!0,editable:!0,editor:t,actions:({isFocused:e,isEmpty:t})=>(0,Y.jsx)(CF,{isFocused:e,isEmpty:t,onSave:a,Components:n,dict:r})})})}var TF=zj({default:()=>EF});function EF(e){let t=bA(),n=KA(),r=wA(aj),i=TA(aj,{editor:t,selector:e=>e.pendingComment}),a=JA({trailingBlock:!1,dictionary:{...n,placeholders:{emptyDocument:n.placeholders.new_comment}},schema:r.commentEditorSchema||$A,extensions:[tj({submitOnEnter:r.submitOnEnter,onSubmit:async e=>{await r.createThread({initialComment:{body:e.document}}),r.stopPendingComment(),t.transact(e=>{e.setSelection(H.create(e.doc,e.selection.to))}),t.focus()}})]},[i]),s=OA({editor:t,selector:({editor:e})=>i?{from:e.prosemirrorState.selection.from,to:e.prosemirrorState.selection.to}:void 0}),c=(0,J.useMemo)(()=>({...e.floatingUIOptions,useFloatingOptions:{open:!!i,onOpenChange:e=>{if(!e){if(!ej({hasUnsavedContent:!a.isEmpty,confirmBeforeDiscard:r.confirmBeforeDiscard,message:n.comments.discard_pending_comment}))return;r.stopPendingComment(),t.focus()}},placement:`bottom`,middleware:[o(10),u(),m()],...e.floatingUIOptions?.useFloatingOptions},focusManagerProps:{disabled:!1},elementProps:{style:{zIndex:60},...e.floatingUIOptions?.elementProps}}),[r,n,t,a,i,e.floatingUIOptions]),l=e.floatingComposer||wF;return(0,Y.jsx)(IA,{target:e.portalElement,children:(0,Y.jsx)(qA,{position:s,...c,children:(0,Y.jsx)(l,{newCommentEditor:a})})})}var DF=(0,J.memo)(({isEmpty:e,onNewCommentSave:t,Components:n,dict:r})=>e?null:(0,Y.jsx)(n.Generic.Toolbar.Root,{variant:`action-toolbar`,className:Vb(`bn-action-toolbar`,`bn-comment-actions`),children:(0,Y.jsx)(n.Generic.Toolbar.Button,{mainTooltip:r.comments.save_button_text,variant:`compact`,isDisabled:e,onClick:t,children:r.comments.save_button_text})})),OF=({thread:e,selected:t,orphaned:n,referenceText:r,maxCommentsBeforeCollapse:i,onFocus:a,onBlur:o,tabIndex:s,newCommentEditor:c})=>{let l=GA(),u=KA(),d=wA(aj),f=(0,J.useRef)(e.id);f.current=e.id;let p=JA({trailingBlock:!1,dictionary:{...u,placeholders:{emptyDocument:u.placeholders.comment_reply}},schema:d.commentEditorSchema||$A,extensions:[tj({submitOnEnter:d.submitOnEnter,onSubmit:async e=>{await d.threadStore.addComment({comment:{body:e.document},threadId:f.current}),e.removeBlocks(e.document)}})]}),m=c??p,h=m.getExtension(tj);if(!h)throw Error(`Thread's newCommentEditor must include CommentEditorSubmitExtension.`);let g=h.submit;return(0,Y.jsxs)(l.Comments.Card,{className:Vb(`bn-thread`,n&&`bn-thread-orphaned`),headerText:r,onFocus:a,onBlur:o,selected:t,tabIndex:s,children:[(0,Y.jsx)(l.Comments.CardSection,{className:`bn-thread-comments`,children:(0,Y.jsx)(SF,{thread:e,maxCommentsBeforeCollapse:t?void 0:i||5})}),t&&(0,Y.jsx)(l.Comments.CardSection,{className:`bn-thread-composer`,children:(0,Y.jsx)(YA,{autoFocus:!1,editable:!0,editor:m,actions:({isFocused:e,isEmpty:t})=>(0,Y.jsx)(DF,{isFocused:e,isEmpty:t,onNewCommentSave:g,Components:l,dict:u})})})]})};function kF(){let e=wA(aj).threadStore,t=(0,J.useRef)(void 0);t.current||=e.getThreads();let n=(0,J.useCallback)(n=>e.subscribe(e=>{t.current=e,n()}),[e]);return(0,J.useSyncExternalStore)(n,()=>t.current)}var AF=zj({default:()=>jF});function jF(e){let t=bA(),n=KA(),r=wA(aj),i=TA(aj,{editor:t,selector:e=>e.selectedThreadId?{id:e.selectedThreadId,position:e.threadPositions.get(e.selectedThreadId)}:void 0}),a=JA({trailingBlock:!1,dictionary:{...n,placeholders:{emptyDocument:n.placeholders.comment_reply}},schema:r.commentEditorSchema||$A,extensions:[tj({submitOnEnter:r.submitOnEnter,onSubmit:async e=>{i&&(await r.threadStore.addComment({comment:{body:e.document},threadId:i.id}),e.removeBlocks(e.document))}})]},[i?.id]),s=kF(),c=(0,J.useMemo)(()=>i?s.get(i.id):void 0,[i,s]),l=(0,J.useMemo)(()=>({...e.floatingUIOptions,useFloatingOptions:{open:!!i,onOpenChange:(e,i,o)=>{if(!e){if(!ej({hasUnsavedContent:!a.isEmpty,confirmBeforeDiscard:r.confirmBeforeDiscard,message:n.comments.discard_pending_comment}))return;o===`escape-key`&&t.focus(),r.selectThread(void 0)}},placement:`bottom`,middleware:[o(10),u(),m()],...e.floatingUIOptions?.useFloatingOptions},focusManagerProps:{disabled:!0,...e.floatingUIOptions?.focusManagerProps},elementProps:{style:{zIndex:30},...e.floatingUIOptions?.elementProps}}),[r,n,t,a,e.floatingUIOptions,i]),d=e.floatingThread||OF;return(0,Y.jsx)(IA,{target:e.portalElement,children:(0,Y.jsx)(qA,{position:i?.position,...l,children:c&&(0,Y.jsx)(d,{thread:c,selected:!0,newCommentEditor:a})})})}J.memo(({thread:e,selectedThreadId:t,maxCommentsBeforeCollapse:n,referenceText:r,orphaned:i})=>{let a=wA(aj),o=(0,J.useCallback)(t=>{t.target.closest(`.bn-action-toolbar`)||a.selectThread(e.id)},[a,e.id]),s=(0,J.useCallback)(e=>{if(!e.relatedTarget||e.relatedTarget.closest(`.bn-action-toolbar`))return;let t=e.target instanceof Node?e.target:null,n=e.relatedTarget instanceof Node?e.relatedTarget.closest(`.bn-thread`):null;t&&n&&n.contains(t)||a.selectThread(void 0)},[a]);return(0,Y.jsx)(OF,{thread:e,selected:e.id===t,orphaned:i,referenceText:r,maxCommentsBeforeCollapse:n,onFocus:o,onBlur:s,tabIndex:0})}),(0,J.createContext)(void 0);function MF(e){let t=(0,J.useRef)(null);return(0,J.useEffect)(()=>{e&&t.current?.focus({preventScroll:!0})},[e]),t}function NF(e){return e.currentTarget instanceof HTMLElement&&e.relatedTarget instanceof HTMLElement&&e.currentTarget.contains(e.relatedTarget)}function PF({onBlur:e,onFocus:t}={}){let n=(0,J.useRef)(null),[r,i]=(0,J.useState)(!1),a=(0,J.useRef)(!1),o=e=>{i(e),a.current=e},s=(0,J.useCallback)(e=>{a.current||(o(!0),t?.(e))},[t]),c=(0,J.useCallback)(t=>{a.current&&!NF(t)&&(o(!1),e?.(t))},[e]);return(0,J.useEffect)(()=>{let e=n.current;if(e)return e.addEventListener(`focusin`,s),e.addEventListener(`focusout`,c),()=>{e?.removeEventListener(`focusin`,s),e?.removeEventListener(`focusout`,c)}},[s,c]),{ref:n,focused:r}}function FF(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.top<r.top,a=n.bottom>r.bottom;return i&&a?`both`:i?`top`:a?`bottom`:`none`}function IF(e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}function LF(e){return(0,J.useMemo)(()=>IF(e),e)}function RF(e){Wb()?e.preventDefault():Hb()&&e.currentTarget.focus()}var zF={};function BF(e,t){let n=J.useRef(zF);return n.current===zF&&(n.current=e(t)),n}function VF(e,t,n,r){let i=BF(UF).current;return WF(i,e,t,n,r)&&KF(i,[e,t,n,r]),i.callback}function HF(e){let t=BF(UF).current;return GF(t,e)&&KF(t,e),t.callback}function UF(){return{callback:null,cleanup:null,refs:[]}}function WF(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function GF(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function KF(e,t){e.refs=t,e.callback=t.every(e=>e==null)?null:n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null}}}}}}var qF=19;function JF(e){return qF>=e}function YF(e){if(!J.isValidElement(e))return null;let t=e,n=t.props;return(JF(19)?n?.ref:t.ref)??null}function XF(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function ZF(){}var QF=Object.freeze([]),$F=Object.freeze({});function eI(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e)}else i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function tI(e,t){return typeof e==`function`?e(t):e}function nI(e,t){return typeof e==`function`?e(t):e}var rI={};function iI(e,t,n,r,i){if(!n&&!r&&!i&&!e)return oI(t);let a=oI(e);return t&&(a=sI(a,t)),n&&(a=sI(a,n)),r&&(a=sI(a,r)),i&&(a=sI(a,i)),a}function aI(e){if(e.length===0)return rI;if(e.length===1)return oI(e[0]);let t=oI(e[0]);for(let n=1;n<e.length;n+=1)t=sI(t,e[n]);return t}function oI(e){return dI(e)?{...e(rI)}:cI(e)}function sI(e,t){return dI(t)?t(e):lI(e,t)}function cI(e){let t={...e};for(let e in t){let n=t[e];uI(e,n)&&(t[e]=pI(n))}return t}function lI(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=XF(e.style,r);break;case`className`:e[n]=hI(e.className,r);break;default:e[n]=uI(n,r)?fI(e[n],r):r}}return e}function uI(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function dI(e){return typeof e==`function`}function fI(e,t){return t?e?(...n)=>{let r=n[0];if(gI(r)){let i=r;mI(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:pI(t):e}function pI(e){return e&&((...t)=>{let n=t[0];return gI(n)&&mI(n),e(...t)})}function mI(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function hI(e,t){return t?e?t+` `+e:t:e}function gI(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function _I(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=xI(r));let i=vI(t,n,r);if(n.enabled===!1)return null;let a=n.state??$F;return SI(e,r,i,a)}function vI(e,t,n){let{className:r,style:i}=e,{state:a=$F,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?tI(r,a):void 0,d=l?nI(i,a):void 0,f=l?eI(a,c):$F,p=l&&s?yI(s):void 0,m=l?XF(f,p)??{}:$F;return typeof document<`u`&&(l?m.ref=Array.isArray(o)?HF([m.ref,YF(n),...o]):VF(m.ref,YF(n),o):VF(null,null)),l?(u!==void 0&&(m.className=hI(m.className,u)),d!==void 0&&(m.style=XF(m.style,d)),m):$F}function yI(e){return Array.isArray(e)?aI(e):iI(void 0,e)}var bI=Symbol.for(`react.lazy`);function xI(e){if(e?.$$typeof!==bI)return e;let t=J.Children.toArray(e)[0];return J.isValidElement(t)?t:e}function SI(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=iI(n,t.props);return e.ref=n.ref,J.cloneElement(t,e)}return CI(e,n)}function CI(e,t){return e===`button`?(0,J.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,J.createElement)(`img`,{alt:``,...t,key:t.key}):J.createElement(e,t)}function wI(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var TI=wI(`https://base-ui.com/production-error`,`Base UI`),EI=J.createContext(void 0);function DI(){let e=J.useContext(EI);if(e===void 0)throw Error(TI(13));return e}var OI={imageLoadingStatus:()=>null},kI=J.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,[o,s]=J.useState(`idle`),c={imageLoadingStatus:o},l=J.useMemo(()=>({imageLoadingStatus:o,setImageLoadingStatus:s}),[o,s]),u=_I(`span`,e,{state:c,ref:t,props:a,stateAttributesMapping:OI});return(0,Y.jsx)(EI.Provider,{value:l,children:u})}),AI={...J},jI=AI.useInsertionEffect,MI=jI&&jI!==AI.useLayoutEffect?jI:e=>e();function Z(e){let t=BF(NI).current;return t.next=e,MI(t.effect),t.trampoline}function NI(){let e={next:void 0,callback:PI,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function PI(){}var Q=typeof document<`u`?J.useLayoutEffect:()=>{};function FI(e){J.useEffect(e,QF)}var II=null;globalThis.requestAnimationFrame;var LI=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},RI=class e{static create(){return new e}static request(e){return LI.request(e)}static cancel(e){return LI.cancel(e)}currentId=II;request(e){this.cancel(),this.currentId=LI.request(()=>{this.currentId=II,e()})}cancel=()=>{this.currentId!==II&&(LI.cancel(this.currentId),this.currentId=II)};disposeEffect=()=>this.cancel};function zI(){let e=BF(RI.create).current;return FI(e.disposeEffect),e}function BI(e){return e==null?e:`current`in e?e.current:e}function VI(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}var HI=`data-starting-style`,UI=`data-ending-style`,WI=null;function GI(e){if(!WI){let e=[];WI=e,queueMicrotask(()=>{WI=null,Wd.flushSync(()=>{for(let t of e)t()})})}WI.push(e)}function KI(e,t=!1,n=!1){let r=zI();return Z((i,a=null)=>{r.cancel();let o=BI(e);if(o==null)return;let s=o,c=()=>{n?GI(()=>{a?.aborted||i()}):Wd.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(VI(s).map(e=>e.finished.then(ZF))).then(()=>{a?.aborted||c()},()=>{a?.aborted||(VI(s).some(e=>e.pending||e.playState!==`finished`)?l():c())})}if(t){let e=HI;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0})}else r.request(l)})}function qI(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=Z(a),s=KI(r,n,i);J.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}var JI={[HI]:``},YI={[UI]:``},XI={transitionStatus(e){return e===`starting`?JI:e===`ending`?YI:null}};function ZI(e,t=!1,n=!1,r=!1){let[i,a]=J.useState(e&&t?`idle`:void 0),[o,s]=J.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),Q(()=>{if(!e&&o&&i!==`ending`&&n){let e=RI.request(()=>{a(`ending`)});return()=>{RI.cancel(e)}}},[e,o,i,n]),Q(()=>{if(!e||t||i===void 0)return;let n=RI.request(()=>{a(void 0)});return()=>{RI.cancel(n)}},[t,e,i]),Q(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=RI.request(()=>{a(`idle`)});return()=>{RI.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function QI(e,{referrerPolicy:t,crossOrigin:n,sizes:r,srcSet:i},a){let o=J.useState(`idle`),s=o[1];return Q(()=>{if(!a)return ZF;if(!e&&!i)return s(`error`),ZF;let o=!0,c=new window.Image,l=e=>()=>{o&&s(e)};return s(`loading`),c.onload=l(`loaded`),c.onerror=l(`error`),t&&(c.referrerPolicy=t),c.crossOrigin=n??null,r&&(c.sizes=r),i&&(c.srcset=i),e&&(c.src=e),c.complete&&s(c.naturalWidth>0?`loaded`:`error`),()=>{o=!1}},[a,e,i,r,n,t,s]),o}var $I={...OI,...XI},eL=J.forwardRef(function(e,t){let{className:n,render:r,onLoadingStatusChange:i,keepMounted:a=!1,style:o,sizes:s,srcSet:c,src:l,...u}=e,{setImageLoadingStatus:d}=DI(),[f,p]=QI(l,e,!a),m=f===`loaded`,{mounted:h,transitionStatus:g,setMounted:_}=ZI(m),v=J.useRef(null),y=J.useRef(!0);Q(()=>{if(!a)return;let e=y.current;y.current=!1;let t=v.current;if(!t)return;if(!t.complete){p(`loading`);return}let n=t.naturalWidth>0?`loaded`:`error`;p(n),n===`loaded`&&e&&_(!0)},[a,l,c,s,u.crossOrigin,u.referrerPolicy,r,p,_]);let b=a?{"data-loading":f===`loading`?``:void 0,"data-error":f===`error`?``:void 0,"aria-hidden":f!==`loaded`||void 0,onLoad(){p(`loaded`)},onError(){p(`error`)}}:void 0,x=Z(e=>{i?.(e),d(e)});Q(()=>{f!==`idle`&&x(f)},[f,x]),Q(()=>()=>d(`idle`),[d]),qI({enabled:!m,open:m,ref:v,onComplete(){m||_(!1)}});let S={imageLoadingStatus:f,transitionStatus:a&&g===`ending`?void 0:g},C=a||h,w={};s!==void 0&&(w.sizes=s),c!==void 0&&(w.srcSet=c),l!==void 0&&(w.src=l);let T=_I(`img`,e,{state:S,ref:[t,v],props:[b,u,w],stateAttributesMapping:$I,enabled:C});return C?T:null}),tL=0,nL=class e{static create(){return new e}currentId=tL;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=tL,t()},e)}isStarted(){return this.currentId!==tL}clear=()=>{this.currentId!==tL&&(clearTimeout(this.currentId),this.currentId=tL)};disposeEffect=()=>this.clear};function rL(){let e=BF(nL.create).current;return FI(e.disposeEffect),e}var iL=J.forwardRef(function(e,t){let{className:n,render:r,delay:i=0,style:a,...o}=e,{imageLoadingStatus:s}=DI(),[c,l]=J.useState(i===0),u=rL();return J.useEffect(()=>(i>0?u.start(i,()=>l(!0)):l(!0),u.clear),[u,i]),_I(`span`,e,{state:{imageLoadingStatus:s},ref:t,props:o,stateAttributesMapping:OI,enabled:s!==`loaded`&&(i===0||c)})}),aL=`-`,oL=e=>{let t=uL(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{let n=e.split(aL);return n[0]===``&&n.length!==1&&n.shift(),sL(n,t)||lL(e)},getConflictingClassGroupIds:(e,t)=>{let i=n[e]||[];return t&&r[e]?[...i,...r[e]]:i}}},sL=(e,t)=>{if(e.length===0)return t.classGroupId;let n=e[0],r=t.nextPart.get(n),i=r?sL(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;let a=e.join(aL);return t.validators.find(({validator:e})=>e(a))?.classGroupId},cL=/^\[(.+)\]$/,lL=e=>{if(cL.test(e)){let t=cL.exec(e)[1],n=t?.substring(0,t.indexOf(`:`));if(n)return`arbitrary..`+n}},uL=e=>{let{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return mL(Object.entries(e.classGroups),n).forEach(([e,n])=>{dL(n,r,e,t)}),r},dL=(e,t,n,r)=>{e.forEach(e=>{if(typeof e==`string`){let r=e===``?t:fL(t,e);r.classGroupId=n}else if(typeof e==`function`){if(pL(e)){dL(e(r),t,n,r);return}t.validators.push({validator:e,classGroupId:n})}else Object.entries(e).forEach(([e,i])=>{dL(i,fL(t,e),n,r)})})},fL=(e,t)=>{let n=e;return t.split(aL).forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},pL=e=>e.isThemeGetter,mL=(e,t)=>t?e.map(([e,n])=>[e,n.map(e=>typeof e==`string`?t+e:typeof e==`object`?Object.fromEntries(Object.entries(e).map(([e,n])=>[t+e,n])):e)]):e,hL=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=new Map,r=new Map,i=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);if(t!==void 0)return t;if((t=r.get(e))!==void 0)return i(e,t),t},set(e,t){n.has(e)?n.set(e,t):i(e,t)}}},gL=`!`,_L=e=>{let{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],a=t.length,o=e=>{let n=[],o=0,s=0,c;for(let l=0;l<e.length;l++){let u=e[l];if(o===0){if(u===i&&(r||e.slice(l,l+a)===t)){n.push(e.slice(s,l)),s=l+a;continue}if(u===`/`){c=l;continue}}u===`[`?o++:u===`]`&&o--}let l=n.length===0?e:e.substring(s),u=l.startsWith(gL);return{modifiers:n,hasImportantModifier:u,baseClassName:u?l.substring(1):l,maybePostfixModifierPosition:c&&c>s?c-s:void 0}};return n?e=>n({className:e,parseClassName:o}):o},vL=e=>{if(e.length<=1)return e;let t=[],n=[];return e.forEach(e=>{e[0]===`[`?(t.push(...n.sort(),e),n=[]):n.push(e)}),t.push(...n.sort()),t},yL=e=>({cache:hL(e.cacheSize),parseClassName:_L(e),...oL(e)}),bL=/\s+/,xL=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(bL),s=``;for(let e=o.length-1;e>=0;--e){let t=o[e],{modifiers:c,hasImportantModifier:l,baseClassName:u,maybePostfixModifierPosition:d}=n(t),f=!!d,p=r(f?u.substring(0,d):u);if(!p){if(!f||(p=r(u),!p)){s=t+(s.length>0?` `+s:s);continue}f=!1}let m=vL(c).join(`:`),h=l?m+gL:m,g=h+p;if(a.includes(g))continue;a.push(g);let _=i(p,f);for(let e=0;e<_.length;++e){let t=_[e];a.push(h+t)}s=t+(s.length>0?` `+s:s)}return s};function SL(){let e=0,t,n,r=``;for(;e<arguments.length;)(t=arguments[e++])&&(n=CL(t))&&(r&&(r+=` `),r+=n);return r}var CL=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=CL(e[r]))&&(n&&(n+=` `),n+=t);return n};function wL(e,...t){let n,r,i,a=o;function o(o){return n=yL(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)}function s(e){let t=r(e);if(t)return t;let a=xL(e,n);return i(e,a),a}return function(){return a(SL.apply(null,arguments))}}var TL=e=>{let t=t=>t[e]||[];return t.isThemeGetter=!0,t},EL=/^\[(?:([a-z-]+):)?(.+)\]$/i,DL=/^\d+\/\d+$/,OL=new Set([`px`,`full`,`screen`]),kL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,AL=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,jL=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ML=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,NL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,PL=e=>IL(e)||OL.has(e)||DL.test(e),FL=e=>YL(e,`length`,XL),IL=e=>!!e&&!Number.isNaN(Number(e)),LL=e=>YL(e,`number`,IL),RL=e=>!!e&&Number.isInteger(Number(e)),zL=e=>e.endsWith(`%`)&&IL(e.slice(0,-1)),BL=e=>EL.test(e),VL=e=>kL.test(e),HL=new Set([`length`,`size`,`percentage`]),UL=e=>YL(e,HL,ZL),WL=e=>YL(e,`position`,ZL),GL=new Set([`image`,`url`]),KL=e=>YL(e,GL,$L),qL=e=>YL(e,``,QL),JL=()=>!0,YL=(e,t,n)=>{let r=EL.exec(e);return r?r[1]?typeof t==`string`?r[1]===t:t.has(r[1]):n(r[2]):!1},XL=e=>AL.test(e)&&!jL.test(e),ZL=()=>!1,QL=e=>ML.test(e),$L=e=>NL.test(e),eR=wL(()=>{let e=TL(`colors`),t=TL(`spacing`),n=TL(`blur`),r=TL(`brightness`),i=TL(`borderColor`),a=TL(`borderRadius`),o=TL(`borderSpacing`),s=TL(`borderWidth`),c=TL(`contrast`),l=TL(`grayscale`),u=TL(`hueRotate`),d=TL(`invert`),f=TL(`gap`),p=TL(`gradientColorStops`),m=TL(`gradientColorStopPositions`),h=TL(`inset`),g=TL(`margin`),_=TL(`opacity`),v=TL(`padding`),y=TL(`saturate`),b=TL(`scale`),x=TL(`sepia`),S=TL(`skew`),C=TL(`space`),w=TL(`translate`),T=()=>[`auto`,`contain`,`none`],E=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],D=()=>[`auto`,BL,t],O=()=>[BL,t],k=()=>[``,PL,FL],A=()=>[`auto`,IL,BL],j=()=>[`bottom`,`center`,`left`,`left-bottom`,`left-top`,`right`,`right-bottom`,`right-top`,`top`],M=()=>[`solid`,`dashed`,`dotted`,`double`,`none`],N=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],P=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`],F=()=>[``,`0`,BL],I=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],L=()=>[IL,BL];return{cacheSize:500,separator:`:`,theme:{colors:[JL],spacing:[PL,FL],blur:[`none`,``,VL,BL],brightness:L(),borderColor:[e],borderRadius:[`none`,``,`full`,VL,BL],borderSpacing:O(),borderWidth:k(),contrast:L(),grayscale:F(),hueRotate:L(),invert:F(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[zL,FL],inset:D(),margin:D(),opacity:L(),padding:O(),saturate:L(),scale:L(),sepia:F(),skew:L(),space:O(),translate:O()},classGroups:{aspect:[{aspect:[`auto`,`square`,`video`,BL]}],container:[`container`],columns:[{columns:[VL]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:[...j(),BL]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[`auto`,RL,BL]}],basis:[{basis:D()}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`wrap`,`wrap-reverse`,`nowrap`]}],flex:[{flex:[`1`,`auto`,`initial`,`none`,BL]}],grow:[{grow:F()}],shrink:[{shrink:F()}],order:[{order:[`first`,`last`,`none`,RL,BL]}],"grid-cols":[{"grid-cols":[JL]}],"col-start-end":[{col:[`auto`,{span:[`full`,RL,BL]},BL]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[JL]}],"row-start-end":[{row:[`auto`,{span:[RL,BL]},BL]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":[`auto`,`min`,`max`,`fr`,BL]}],"auto-rows":[{"auto-rows":[`auto`,`min`,`max`,`fr`,BL]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:[`normal`,...P()]}],"justify-items":[{"justify-items":[`start`,`end`,`center`,`stretch`]}],"justify-self":[{"justify-self":[`auto`,`start`,`end`,`center`,`stretch`]}],"align-content":[{content:[`normal`,...P(),`baseline`]}],"align-items":[{items:[`start`,`end`,`center`,`baseline`,`stretch`]}],"align-self":[{self:[`auto`,`start`,`end`,`center`,`stretch`,`baseline`]}],"place-content":[{"place-content":[...P(),`baseline`]}],"place-items":[{"place-items":[`start`,`end`,`center`,`baseline`,`stretch`]}],"place-self":[{"place-self":[`auto`,`start`,`end`,`center`,`stretch`]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[C]}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":[C]}],"space-y-reverse":[`space-y-reverse`],w:[{w:[`auto`,`min`,`max`,`fit`,`svw`,`lvw`,`dvw`,BL,t]}],"min-w":[{"min-w":[BL,t,`min`,`max`,`fit`]}],"max-w":[{"max-w":[BL,t,`none`,`full`,`min`,`max`,`fit`,`prose`,{screen:[VL]},VL]}],h:[{h:[BL,t,`auto`,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],"min-h":[{"min-h":[BL,t,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],"max-h":[{"max-h":[BL,t,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],size:[{size:[BL,t,`auto`,`min`,`max`,`fit`]}],"font-size":[{text:[`base`,VL,FL]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`,LL]}],"font-family":[{font:[JL]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`,BL]}],"line-clamp":[{"line-clamp":[`none`,IL,LL]}],leading:[{leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`,PL,BL]}],"list-image":[{"list-image":[`none`,BL]}],"list-style-type":[{list:[`none`,`disc`,`decimal`,BL]}],"list-style-position":[{list:[`inside`,`outside`]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[_]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...M(),`wavy`]}],"text-decoration-thickness":[{decoration:[`auto`,`from-font`,PL,FL]}],"underline-offset":[{"underline-offset":[`auto`,PL,BL]}],"text-decoration-color":[{decoration:[e]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:O()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,BL]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,BL]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-opacity":[{"bg-opacity":[_]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:[...j(),WL]}],"bg-repeat":[{bg:[`no-repeat`,{repeat:[``,`x`,`y`,`round`,`space`]}]}],"bg-size":[{bg:[`auto`,`cover`,`contain`,UL]}],"bg-image":[{bg:[`none`,{"gradient-to":[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},KL]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[_]}],"border-style":[{border:[...M(),`hidden`]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":[`divide-y-reverse`],"divide-opacity":[{"divide-opacity":[_]}],"divide-style":[{divide:M()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:[``,...M()]}],"outline-offset":[{"outline-offset":[PL,BL]}],"outline-w":[{outline:[PL,FL]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:k()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[PL,FL]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:[``,`inner`,`none`,VL,qL]}],"shadow-color":[{shadow:[JL]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":[...N(),`plus-lighter`,`plus-darker`]}],"bg-blend":[{"bg-blend":N()}],filter:[{filter:[``,`none`]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":[``,`none`,VL,BL]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":[``,`none`]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[_]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[`none`,`all`,``,`colors`,`opacity`,`shadow`,`transform`,BL]}],duration:[{duration:L()}],ease:[{ease:[`linear`,`in`,`out`,`in-out`,BL]}],delay:[{delay:L()}],animate:[{animate:[`none`,`spin`,`ping`,`pulse`,`bounce`,BL]}],transform:[{transform:[``,`gpu`,`none`]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[RL,BL]}],"translate-x":[{"translate-x":[w]}],"translate-y":[{"translate-y":[w]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:[`center`,`top`,`top-right`,`right`,`bottom-right`,`bottom`,`bottom-left`,`left`,`top-left`,BL]}],accent:[{accent:[`auto`,e]}],appearance:[{appearance:[`none`,`auto`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,BL]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":[`none`,`auto`]}],resize:[{resize:[`none`,`y`,`x`,``]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,BL]}],fill:[{fill:[e,`none`]}],"stroke-w":[{stroke:[PL,FL,LL]}],stroke:[{stroke:[e,`none`]}],sr:[`sr-only`,`not-sr-only`],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-s`,`border-w-e`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-s`,`border-color-e`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]}}});function tR(e){return _I(e.defaultTagName??`div`,e,e)}var nR=J.createContext(void 0);function rR(e=!1){let t=J.useContext(nR);if(t===void 0&&!e)throw Error(TI(16));return t}function iR(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:J.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function aR(e){return e?.ownerDocument||document}function oR(e,t,{detail:n=0,pointerType:r=``}={}){e.dispatchEvent(new(se(e)).PointerEvent(`click`,{bubbles:!0,cancelable:!0,composed:!0,detail:n,pointerType:r,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function sR(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=J.useRef(null),s=rR(!0),c=a??s!==void 0,{props:l}=iR({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=J.useCallback(()=>{let e=o.current;cR(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return Q(u,[u]),{getButtonProps:J.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return iI({onClick(e){t?e.preventDefault():n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(mI(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=cR(r),s=!i&&lR(r),l=n&&(i?a:!s),u=e.key===`Enter`,d=e.key===` `,f=r.getAttribute(`role`),p=f?.startsWith(`menuitem`)||f===`option`||f===`gridcell`;if(n&&c&&d){if(e.defaultPrevented&&p)return;e.preventDefault(),(!i||a)&&(e.preventBaseUIHandler(),oR(r,e))}else!l||i||!d&&!u?n&&s&&d&&e.preventDefault():e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),oR(r,e)))},onKeyUp(e){t||(mI(e),a?.(e),e.target===e.currentTarget&&i&&c&&cR(e.currentTarget)&&e.key===` `?e.preventDefault():e.baseUIHandlerPrevented||e.target!==e.currentTarget||i||c||e.defaultPrevented||e.key!==` `||(e.preventBaseUIHandler(),oR(e.currentTarget,e)))},onPointerDown(e){t?e.preventDefault():s?.(e)}},i?{type:`button`}:{role:`button`},l,u)},[t,l,c,i]),buttonRef:Z(e=>{o.current=e,u()})}}function cR(e){return ae(e)&&e.tagName===`BUTTON`}function lR(e){return ae(e)&&e.tagName===`A`&&!!e.href}var uR=J.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{getButtonProps:l,buttonRef:u}=sR({disabled:i,focusableWhenDisabled:a,native:o});return _I(`button`,e,{state:{disabled:i},ref:[t,u],props:[c,l]})}),dR=J.createContext(void 0);function fR(e){let t=J.useContext(dR);if(t===void 0&&!e)throw Error(TI(33));return t}var pR=J.createContext(void 0);function mR(e){let t=J.useContext(pR);if(t===void 0&&!e)throw Error(TI(36));return t}var hR=`data-open`,gR=`data-closed`,_R=`data-anchor-hidden`,vR=`data-popup-open`,yR=`data-pressed`,bR={[vR]:``},xR={[vR]:``,[yR]:``},SR={[hR]:``},CR={[gR]:``},wR={[_R]:``},TR={open(e){return e?bR:null}},ER={open(e){return e?xR:null}},DR={open(e){return e?SR:CR},anchorHidden(e){return e?wR:null}},OR={...DR,...XI},kR=J.createContext(void 0);function AR(e=!0){let t=J.useContext(kR);if(t===void 0&&!e)throw Error(TI(25));return t}var jR=`none`,MR=`trigger-press`,NR=`trigger-hover`,PR=`trigger-focus`,FR=`outside-press`,IR=`item-press`,LR=`focus-out`,RR=`escape-key`,zR=`list-navigation`,BR=`keyboard`,VR=`pointer`,HR=`cancel-open`,UR=`sibling-open`,WR=`disabled`,GR=`missing`,KR=`initial`,qR=`imperative-action`,JR=`window-resize`;function YR({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=J.useRef(e!==void 0),[a,o]=J.useState(()=>t);return[i&&e!==void 0?e:a,J.useCallback(e=>{i||o(e)},[])]}var XR=J.createContext(null);function ZR(e=`root`){let t=J.useContext(XR),n=J.useContext(pR);return t===null||n===void 0?null:(e===`submenu-trigger`?n.virtualFocus||n.parentVirtualFocus:n.virtualFocus)?t:null}var QR={visible:!0,ref:null};function $R(){return QR}function ez(e,t,n=`root`){let r=ZR(n),i=((n===`submenu-trigger`?r?.useSubmenuTrigger:r?.useItem)??$R)({label:e.label,children:e.children,render:e.render}),a=VF(t,i.ref);return{visible:i.visible,ref:a,props:i.props}}var tz=J.createContext(void 0);function nz(){let e=J.useContext(tz);if(e===void 0)throw Error(TI(30));return e}function rz(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:iz,platform:az,maxTouchPoints:oz}=rz(),sz=iz.toLowerCase(),cz=az.toLowerCase(),lz=/^i(os$|p)/.test(cz)||cz===`macintel`&&oz>1,uz=`android`,dz=cz===uz||sz.includes(uz),fz=!lz&&cz.startsWith(`mac`);cz.startsWith(`win`),!dz&&/^(linux|chrome os)/.test(cz);var pz=fz||lz,mz=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!mz&&sz.includes(`firefox`),!mz&&sz.includes(`chrom`);var hz=pz,gz=/jsdom|happydom/.test(sz);function _z(e){e.preventDefault()}function vz(e){let{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:a,typingRef:o,itemRef:s,itemMetadata:c}=e,l=mR(),u=AR(!0),d=c.type===`submenu-trigger`,f=d?l.parentVirtualFocus:l.virtualFocus,p=(d&&l.parent.type===`menu`?l.parent.store:l.store).useState(`webkitAriaSelected`,n),{events:m}=a.useState(`floatingTreeRoot`),h=a.useState(`open`),g=u!==void 0,_=!f&&h&&n?0:-1;return J.useMemo(()=>({id:r,role:`menuitem`,tabIndex:_,"aria-selected":p,onMouseDown:f?_z:void 0,onKeyDown(e){e.key===` `&&o?.current&&e.preventDefault()},onMouseMove(e){i&&m.emit(`itemhover`,{nodeId:i,target:e.currentTarget})},onClick(e){t&&m.emit(`close`,{domEvent:e.nativeEvent,reason:IR})},onMouseUp(e){if(u){let t=u.initialCursorPointRef.current;if(u.initialCursorPointRef.current=null,g&&t&&Math.abs(e.clientX-t.x)<=1&&Math.abs(e.clientY-t.y)<=1||g&&!fz&&e.button===2)return}s.current&&a.context.allowMouseUpTriggerRef.current&&(!g||e.button===2)&&c.type===`regular-item`&&oR(s.current,e,{detail:1,pointerType:`mouse`})}}),[t,_,r,m,i,a.context.allowMouseUpTriggerRef,o,s,u,g,c.type,p,f])}var yz={type:`regular-item`};function bz(e){let{closeOnClick:t,disabled:n,highlighted:r,id:i,store:a,typingRef:o=a.context.typingRef,nativeButton:s,itemMetadata:c,nodeId:l}=e,u=J.useRef(null),{getButtonProps:d,buttonRef:f}=sR({disabled:n,focusableWhenDisabled:!0,native:s,composite:!0}),p=vz({closeOnClick:t,highlighted:r,id:i,nodeId:l,store:a,typingRef:o,itemRef:u,itemMetadata:c}),m=J.useCallback(e=>iI(p,{onMouseEnter(e){c.type===`submenu-trigger`&&c.setActive(e.nativeEvent)}},e,d),[p,d,c]),h=VF(u,f);return J.useMemo(()=>({getItemProps:m,itemRef:h}),[m,h])}var xz=J.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function Sz(){return J.useContext(xz)}function Cz(e={}){let{guess:t,label:n,metadata:r,textRef:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,nextIndexRef:l}=Sz(),u=J.useRef(-1),[d,f]=J.useState(a==null&&t?()=>{if(u.current===-1){let e=l.current;l.current+=1,u.current=e}return u.current}:-1),p=a??d,m=J.useRef(null),h=J.useCallback(e=>{let t=m.current;t&&s(t),m.current=e,e&&o(e,{metadata:r??null,index:a??null,label:n,textRef:i})},[a,o,s,r,n,i]);return Q(()=>{if(a==null)return c(e=>{let t=m.current?e.get(m.current)?.index:null;t!=null&&f(t)})},[a,c]),{ref:h,index:p}}function wz(){let[,e]=J.useState({});return J.useCallback(()=>{e({})},[])}var Tz=0;function Ez(e,t=`mui`){let n=J.useRef(void 0),r=wz(),i=e??n.current;return J.useEffect(()=>{n.current??(Tz+=1,n.current=`${t}-${Tz}`,e??r())},[e,t,r]),i}var Dz=AI.useId;function Oz(e,t){if(Dz!==void 0){let n=Dz();return e??(t?`${t}-${n}`:n)}return Ez(e,t)}function kz(e){return Oz(e,`base-ui`)}var Az=`data-checked`,jz=`data-unchecked`,Mz={checked(e){return e?{[Az]:``}:{[jz]:``}},...XI};function Nz(e,t,n,r){let i=!1,a=!1,o=r??$F;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}function Pz(e,t,n){let r=n??$F;return{reason:e,event:t??new Event(`base-ui`),...r}}var Fz=J.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!1,checked:l=!1,onCheckedChange:u,style:d,...f}=e,{store:p}=mR(),m=Cz({guess:!0,label:a}),h=kz(i),g=p.useState(`disabled`),_=p.useState(`isActive`,m.index),v=p.useState(`floatingNodeId`),y=p.useState(`itemProps`),b=s||g,{getItemProps:x,itemRef:S}=bz({closeOnClick:c,disabled:b,highlighted:_,id:h,store:p,nativeButton:o,nodeId:v,itemMetadata:yz}),C=J.useMemo(()=>({disabled:b,highlighted:_,checked:l}),[b,_,l]);function w(e){let t=Nz(IR,e.nativeEvent,void 0,{preventUnmountOnClose:ZF});u?.(!l,t)}let T=_I(`div`,e,{state:C,stateAttributesMapping:Mz,props:[y,{role:`menuitemcheckbox`,"aria-checked":l,onClick:w},f,x],ref:[S,t,m.ref]});return(0,Y.jsx)(tz.Provider,{value:C,children:T})}),Iz=J.forwardRef(function(e,t){let{checked:n,defaultChecked:r,onCheckedChange:i,...a}=e,[o,s]=YR({controlled:n,default:r??!1,name:`MenuCheckboxItem`,state:`checked`}),c=ez(e,t);function l(e,t){i?.(e,t),t.isCanceled||s(e)}return c.visible?(0,Y.jsx)(Fz,{...a,checked:o,onCheckedChange:l,ref:c.ref}):null}),Lz=J.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=nz(),c=J.useRef(null),{transitionStatus:l,mounted:u,setMounted:d}=ZI(s.checked);return qI({batch:!0,enabled:!s.checked,open:s.checked,ref:c,onComplete(){s.checked||d(!1)}}),_I(`span`,e,{state:{checked:s.checked,disabled:s.disabled,highlighted:s.highlighted,transitionStatus:l},ref:[t,c],stateAttributesMapping:Mz,props:{"aria-hidden":!0,...o},enabled:a||u})}),Rz=J.createContext(void 0);function zz(){let e=J.useContext(Rz);if(e===void 0)throw Error(TI(31));return e}var Bz=J.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,[o,s]=J.useState(void 0),c=_I(`div`,e,{ref:t,props:{role:`group`,"aria-labelledby":o,...a}});return(0,Y.jsx)(Rz.Provider,{value:s,children:c})}),Vz=J.forwardRef(function(e,t){let n=ZR()?.Group??Bz;return(0,Y.jsx)(n,{...e,ref:t})}),Hz=J.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=kz(a),c=zz();return Q(()=>(c(s),()=>{c(e=>e===s?void 0:e)}),[c,s]),_I(`div`,e,{ref:t,props:{id:s,"aria-hidden":!0,...o}})}),Uz=J.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!0,style:l,...u}=e,{store:d}=mR(),f=Cz({guess:!0,label:a}),p=kz(i),m=d.useState(`disabled`),h=d.useState(`isActive`,f.index),g=d.useState(`floatingNodeId`),_=d.useState(`itemProps`),v=s||m,{getItemProps:y,itemRef:b}=bz({closeOnClick:c,disabled:v,highlighted:h,id:p,store:d,nativeButton:o,nodeId:g,itemMetadata:yz});return _I(`div`,e,{state:{disabled:v,highlighted:h},props:[_,u,y],ref:[b,t,f.ref]})}),Wz=J.forwardRef(function(e,t){let n=ez(e,t);return n.visible?(0,Y.jsx)(Uz,{...e,ref:n.ref}):null});function Gz(e){e.preventDefault(),e.stopPropagation()}function Kz(e){return`nativeEvent`in e}function qz(e){return e.pointerType===``&&e.isTrusted?!0:dz&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function Jz(e){return gz?!1:!dz&&e.width===0&&e.height===0||e.type===`pointerdown`&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`&&(dz||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function Yz(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function Xz(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function Zz(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Qz(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&oe(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function $z(e,t){let n=e;for(;n;){if(R(n)&&n.matches(t))return n;n=n.assignedSlot??n.parentNode??(oe(n)?n.host:null)}return null}function eB(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var tB=`data-base-ui-focusable`,nB=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,rB=`ArrowLeft`,iB=`ArrowRight`,aB=`ArrowUp`,oB=`ArrowDown`,sB=`data-trigger-disabled`;function cB(e,t){if(!R(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(sB);for(let[,e]of t.entries())if(Qz(e,n))return!e.hasAttribute(sB);return!1}function lB(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function uB(e){return e.matches(`html,body`)}function dB(e){return ae(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function fB(e){return $z(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${nB}`)!=null}function pB(e){return e?e.getAttribute(`role`)===`combobox`&&dB(e):!1}function mB(e){if(!e||gz)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function hB(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function gB(e,t){return t!=null&&!Yz(t)?0:typeof e==`function`?e():e}function _B(e,t,n){let r=gB(e,n);return typeof r==`number`?r:r?.[t]}function vB(e){return typeof e==`function`?e():e}function yB(e,t){return t||e===`click`||e===`mousedown`}function bB(e){return e?.includes(`mouse`)&&e!==`mousedown`}var xB=J.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new nL,currentIdRef:{current:null},currentContextRef:{current:null}});function SB(e,t){e.current=t.current}function CB(e){let{children:t,delay:n,timeoutMs:r=0}=e,i=J.useRef(n),a=J.useRef(n),o=J.useRef(null),s=J.useRef(null),c=rL();return Q(()=>{a.current=n,o.current?i.current={open:_B(i.current,`open`),close:_B(n,`close`)}:i.current=n},[n,o,i,a]),(0,Y.jsx)(xB.Provider,{value:J.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:o,timeoutMs:r,currentContextRef:s,timeout:c}),[r,c]),children:t})}function wB(e,t={open:!1}){let{open:n}=t,r=e.useState(`floatingId`),{currentIdRef:i,delayRef:a,timeoutMs:o,initialDelayRef:s,currentContextRef:c,hasProvider:l,timeout:u}=J.useContext(xB),[d,f]=J.useState(!1),p=J.useRef(n);return Q(()=>{p.current=n},[n]),Q(()=>{function t(){c.current?.setIsInstantPhase(!1),i.current=null,c.current=null,a.current=s.current,u.clear()}if(i.current&&!n&&i.current===r){if(f(!1),o){let n=r;return u.start(o,()=>{e.select(`open`)||i.current&&i.current!==n||t()}),()=>{(p.current||i.current!==n)&&u.clear()}}t()}},[n,r,i,a,o,s,c,u,e]),Q(()=>{if(!n)return;let t=c.current,o=i.current;u.clear(),c.current={onOpenChange:e.setOpen,setIsInstantPhase:f},i.current=r,a.current={open:0,close:_B(s.current,`close`)},o!==null&&o!==r?(f(!0),t?.setIsInstantPhase(!0),t?.onOpenChange(!1,Nz(jR))):(f(!1),t?.setIsInstantPhase(!1))},[n,r,e,i,a,s,c,u]),Q(()=>()=>{if(i.current===r){if(c.current=null,!p.current)return;i.current=null,SB(a,s),u.clear()}},[c,i,a,r,s,u]),J.useMemo(()=>({activeIdRef:i,hasProvider:l,delayRef:a,isInstantPhase:d}),[i,l,a,d])}function TB(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function EB(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function DB(e){let t=BF(OB,e).current;return t.next=e,Q(t.effect),t}function OB(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var kB={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},AB={...kB,position:`fixed`,margin:0,top:0,left:0},jB={...kB,position:`absolute`},MB=J.forwardRef(function(e,t){let[n,r]=J.useState();Q(()=>{hz&&mz&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,Y.jsx)(`span`,{...e,ref:t,style:AB,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})});function NB(e,t){return t<0||t>=e.length}function PB(e,t){return LB(e.current,{disabledIndices:t})}function FB(e,t){return LB(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function IB(e,t,n){let{decrement:r,loopFocus:i,allowEscape:a,disabledIndices:o,minIndex:s,maxIndex:c}=n,l=()=>LB(e,{startingIndex:t,decrement:r,disabledIndices:o}),u,d=!1;if(!i)u=r?Math.max(s,l()):Math.min(c,l());else if(r?t<=s:t>=c){let n=r?-1:e.length;a&&t!==n?u=-1:(u=r?c:s,d=!0)}else u=l();return{index:NB(e,u)?-1:u,wrapped:d}}function LB(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&RB(e,a,r));return a}function RB(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!BB(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function zB(e){return e.visibility===`hidden`||e.visibility===`collapse`}function BB(e,t=e?v(e):null){return!e||!e.isConnected||!t||zB(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var VB=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function HB(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return oe(n)?n.host:null}function UB(e){for(let t of Array.from(e.children))if(d(t)===`summary`)return t;return null}function WB(e,t){let n=UB(t);return!!n&&(e===n||Qz(n,e))}function GB(e){let t=e?d(e):``;return e!=null&&e.matches(VB)&&(t!==`summary`||e.parentElement!=null&&d(e.parentElement)===`details`&&UB(e.parentElement)===e)&&(t!==`details`||UB(e)==null)&&(t!==`input`||e.type!==`hidden`)}function KB(e){if(!GB(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=HB(t)){let n=t!==e,r=d(t)===`slot`;if(t.hasAttribute(`inert`)||n&&d(t)===`details`&&!t.open&&!WB(e,t)||t.hasAttribute(`hidden`)||!r&&!qB(t,n))return!1}return!0}function qB(e,t){let n=v(e);return t?n.display!==`none`:BB(e,n)}function JB(e){let t=e.tabIndex;if(t<0){let t=d(e);if(t===`details`||t===`audio`||t===`video`||ae(e)&&e.isContentEditable)return 0}return t}function YB(e){if(d(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function XB(e,t){let n=YB(e);if(!n)return!0;let r=t.find(e=>{let t=YB(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=YB(e);return t?.name===n.name&&t.form===n.form})===n}function ZB(e){if(ae(e)&&d(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return ae(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function QB(e,t){ZB(e).forEach(e=>{GB(e)&&t.push(e),QB(e,t)})}function $B(e,t,n){ZB(e).forEach(e=>{ae(e)&&e.matches(t)&&n.push(e),$B(e,t,n)})}function eV(e){return KB(e)&&JB(e)>=0}function tV(e){let t=[];return QB(e,t),t.filter(KB)}function nV(e){let t=tV(e);return t.filter(e=>JB(e)>=0&&XB(e,t))}function rV(e,t){let n=nV(e),r=n.length;if(r===0)return;let i=Zz(aR(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function iV(e){return rV(aR(e).body,1)||e}function aV(e){return rV(aR(e).body,-1)||e}function oV(e,t,n){if(!e)return null;let r=[];QB(aR(e).body,r);let i=r.indexOf(e);if(i===-1)return null;let a=r.filter(KB);for(let e=1;e<r.length;e+=1){let o=r[(i+t*e+r.length)%r.length];if(!Qz(n,o)&&eV(o)&&XB(o,a))return o}return r[i]}function sV(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!Qz(n,r)}function cV(e){nV(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function lV(e){let t=[];$B(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function uV(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...uV(e,t.id,n)])}function dV(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function fV(e){return`data-base-ui-${e}`}var pV=0;function mV(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(pV);function a(){(!i||i())&&e?.focus({preventScroll:n})}if(r)return a(),ZF;let o=requestAnimationFrame(a);return pV=o,()=>{pV===o&&(cancelAnimationFrame(o),pV=0)}}var hV=`data-base-ui-inert`,gV=new WeakMap,_V=new WeakSet,vV=new WeakMap,yV=0;function bV(e){return e?oe(e)?e.host:bV(e.parentNode):null}var xV=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=bV(t);return e.contains(n)?n:null}).filter(e=>e!=null),SV=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},CV=(e,t,n)=>{let r=[],i=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{d(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function wV(e,t,n,{mark:r=!0}){let i=xV(t,e),a=r?CV(t,SV(i),new Set(i)):[],o=[],s=[];if(n){let e=xV(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);CV(t,SV(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(gV.get(e)||0)+1;gV.set(e,r),o.push(e),r===1&&n&&_V.add(e),n||e.setAttribute(`aria-hidden`,`true`)})}return r&&a.forEach(e=>{let t=(vV.get(e)||0)+1;vV.set(e,t),s.push(e),t===1&&e.setAttribute(hV,``)}),yV+=1,()=>{o.forEach(e=>{let t=(gV.get(e)||0)-1;gV.set(e,t),t||(_V.has(e)||e.removeAttribute(`aria-hidden`),_V.delete(e))}),r&&s.forEach(e=>{let t=(vV.get(e)||0)-1;vV.set(e,t),t||e.removeAttribute(hV)}),--yV,yV||(gV=new WeakMap,_V=new WeakSet,vV=new WeakMap)}}function TV(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=aR(e[0]).body;return wV(e,i,n,{mark:r})}var EV={style:{transition:`none`}},DV=`data-base-ui-click-trigger`,OV={fallbackAxisSide:`none`},kV={fallbackAxisSide:`end`},AV={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},jV=J.createContext(null),MV=()=>J.useContext(jV),NV=fV(`portal`);function PV(e={}){let{ref:t,container:n,componentProps:r=$F,elementProps:i}=e,a=Oz(),o=MV()?.portalNode,[s,c]=J.useState(null),[l,u]=J.useState(null),d=Z(e=>{e!==null&&u(e)}),f=J.useRef(null);Q(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}let e=(n&&(S(n)?n:n.current))??o??document.body;e==null?f.current&&(f.current=null,u(null),c(null)):f.current!==e&&(f.current=e,u(null),c(e))},[n,o]);let p=_I(`div`,r,{ref:[t,d],props:[{id:a,[NV]:``},i]}),m=s&&p?Wd.createPortal(p,s):null;return{node:l,nodeId:J.isValidElement(p)?p.props.id:void 0,subtree:m}}var FV=J.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:l,nodeId:u,subtree:d}=PV({container:o,ref:t,componentProps:e,elementProps:c}),f=J.useRef(null),p=J.useRef(null),m=J.useRef(null),h=J.useRef(null),[g,_]=J.useState(null),v=J.useRef(!1),y=g?.modal,b=g?.open,x=!!g&&!g.modal&&g.open&&!!l;J.useEffect(()=>{if(!l||y)return;function e(e){l&&e.relatedTarget&&sV(e)&&(e.type===`focusin`?v.current&&=(lV(l),!1):(cV(l),v.current=!0))}return EB(TB(l,`focusin`,e,!0),TB(l,`focusout`,e,!0))},[l,y]),Q(()=>{l&&b===!0&&v.current&&(lV(l),v.current=!1)},[b,l]);let S=J.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:l,setFocusManagerState:_}),[l]);return(0,Y.jsxs)(J.Fragment,{children:[d,(0,Y.jsxs)(jV.Provider,{value:S,children:[x&&l&&(0,Y.jsx)(MB,{"data-type":`outside`,ref:f,onFocus:e=>{sV(e,l)?m.current?.focus():aV(g?g.domReference:null)?.focus()}}),x&&l&&(0,Y.jsx)(`span`,{role:s,"aria-owns":u,style:AV}),l&&Wd.createPortal(a,l),x&&l&&(0,Y.jsx)(MB,{"data-type":`outside`,ref:p,onFocus:e=>{sV(e,l)?h.current?.focus():(iV(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,Nz(`focus-out`,e.nativeEvent)))}})]})]})});function IV(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var LV=class{nodesRef={current:[]};events=IV();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},RV=J.createContext(null),zV=J.createContext(null),BV=()=>J.useContext(RV)?.id||null,VV=e=>{let t=J.useContext(zV);return e??t};function HV(e){let t=Oz(),n=VV(e),r=BV();return Q(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function UV(e){let{children:t,id:n}=e,r=BV();return(0,Y.jsx)(RV.Provider,{value:J.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function WV(e){let{children:t,externalTree:n}=e,r=BF(()=>n??new LV).current;return(0,Y.jsx)(zV.Provider,{value:r,children:t})}function GV(e,t){let n=se(eB(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(qz(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var KV=20,qV=[];function JV(){qV=qV.filter(e=>e.deref()?.isConnected)}function YV(e){JV(),e&&d(e)!==`body`&&(qV.push(new WeakRef(e)),qV.length>KV&&(qV=qV.slice(-20)))}function XV(){return JV(),qV[qV.length-1]?.deref()}function ZV(e){return e?eV(e)?e:nV(e)[0]||e:null}function QV(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=tV(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return eV(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function $V(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,explicitReturnFocus:o,restoreFocus:s=!1,modal:c=!0,closeOnFocusOut:l=!0,openInteractionType:u=``,nextFocusableElement:f,previousFocusableElement:p,beforeContentFocusGuardRef:m,externalTree:h,getInsideElements:g}=e,_=t.useState(`open`),v=t.useState(`domReferenceElement`),y=t.useState(`floatingElement`),{events:b,dataRef:x}=t.context,S=Z(()=>x.current.floatingContext?.nodeId),C=i===!1,w=pB(v)&&C,T=DB(i),E=DB(a),D=DB(o),O=DB(u),k=DB(_),A=VV(h),j=MV(),M=J.useRef(!1),N=J.useRef(!1),P=J.useRef(!1),F=J.useRef(null),I=J.useRef(``),L=J.useRef(``),R=J.useRef(null),z=J.useRef(null),B=VF(R,m,j?.beforeInsideRef),ee=VF(z,j?.afterInsideRef),te=rL(),ne=rL(),re=zI(),ie=j!=null,V=hB(y),oe=Z((e=V)=>e?nV(e):[]),se=Z(()=>g?.().filter(e=>e!=null)??[]);J.useEffect(()=>{if(r||!c)return;function e(e){e.key===`Tab`&&Qz(V,Zz(aR(V)))&&oe().length===0&&!w&&Gz(e)}return TB(aR(V),`keydown`,e)},[r,V,c,w,oe]),J.useEffect(()=>{if(r||!_)return;let e=aR(V);function t(){P.current=!1}function n(e){let t=eB(e),n=se(),r=Qz(y,t)||Qz(v,t)||Qz(j?.portalNode,t)||n.some(e=>e===t||Qz(e,t));P.current=!r,L.current=e.pointerType||`keyboard`,$z(t,`[data-base-ui-click-trigger]`)&&(N.current=!0,ne.start(0,()=>{N.current=!1}))}function i(){L.current=`keyboard`}return EB(TB(e,`pointerdown`,n,!0),TB(e,`pointerup`,t,!0),TB(e,`pointercancel`,t,!0),TB(e,`keydown`,i,!0),t)},[r,y,v,V,_,j,ne,se]),J.useEffect(()=>{if(r||!l)return;let e=aR(V);function n(){N.current=!0,ne.start(0,()=>{N.current=!1})}function i(e){let t=eB(e);eV(t)&&(F.current=t)}function a(n){let r=n.relatedTarget,i=n.currentTarget,a=eB(n);c&&r==null&&a!=null&&Qz(y,a)&&YV(a),queueMicrotask(()=>{let o=S(),l=t.context.triggerElements,u=se(),d=r?.hasAttribute(fV(`focus-guard`))&&[R.current,z.current,j?.beforeInsideRef.current,j?.afterInsideRef.current,j?.beforeOutsideRef.current,j?.afterOutsideRef.current,BI(p),BI(f)].includes(r),m=!(Qz(v,r)||Qz(y,r)||Qz(r,y)||Qz(j?.portalNode,r)||u.some(e=>e===r||Qz(e,r))||l.hasMatchingElement(e=>Qz(e,r))||d||A&&(uV(A.nodesRef.current,o).find(e=>Qz(e.context?.elements.floating,r)||Qz(e.context?.elements.domReference,r))||dV(A.nodesRef.current,o).find(e=>[e.context?.elements.floating,hB(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(i===v&&V&&QV(V),s&&i!==v&&!BB(a)&&Zz(e)===e.body){if(ae(V)&&(V.focus(),s===`popup`)){re.request(()=>{V.focus()});return}let e=oe(),t=F.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||V;ae(n)&&n.focus()}x.current.insideReactTree?x.current.insideReactTree=!1:(w||!c)&&r&&m&&!N.current&&(w||r!==XV())&&(M.current=!0,t.setOpen(!1,Nz(LR,n)))})}function o(){P.current||(x.current.insideReactTree=!0,te.start(0,()=>{x.current.insideReactTree=!1}))}let u=ae(v)?v:null;if(y||u)return EB(u&&TB(u,`focusout`,a),u&&TB(u,`pointerdown`,n),y&&TB(y,`focusin`,i),y&&TB(y,`focusout`,a),y&&j&&TB(y,`focusout`,o,!0))},[r,v,y,V,c,A,j,t,l,s,oe,w,S,x,te,ne,re,f,p,se]),J.useEffect(()=>{if(r||!y||!_)return;let e=Array.from(j?.portalNode?.querySelectorAll(`[${fV(`portal`)}]`)||[]),t=(A?dV(A.nodesRef.current,S()):[]).find(e=>pB(e.context?.elements.domReference||null))?.context?.elements.domReference,n=TV([y,...e,R.current,z.current,j?.beforeOutsideRef.current,j?.afterOutsideRef.current,...se(),t,BI(p),BI(f),w?v:null].filter(e=>e!=null),{ariaHidden:c||w,mark:!1}),i=TV([y,...e].filter(e=>e!=null));return()=>{i(),n()}},[_,r,v,y,c,j,w,A,S,f,p,se]),Q(()=>{if(!_||r||!ae(V))return;I.current=``,L.current=``;let e=aR(V),t=Zz(e);queueMicrotask(()=>{let n=T.current,r=typeof n==`function`?n(O.current||``):n;if(r===void 0||r===!1||Qz(V,t))return;let i=null,a=()=>(i??=oe(V),i[0]||V),o;o=r===!0||r===null?a():BI(r),o||=a();let s=Qz(V,Zz(e)),c=x.current.openEvent,l=c?.type===`mousedown`&&qz(c);mV(o,{sync:l,preventScroll:o===V,shouldFocus(){if(!k.current)return!1;if(s)return!0;let t=Zz(e);return!(t!==o&&Qz(V,t))}})})},[r,_,V,oe,T,O,k,x]);let ce=J.useRef(null);Q(()=>{if(r||!V){ce.current=null;return}ce.current&&=(ce.current.cancelled=!0,null);let e=aR(V),t=Zz(e),n=O.current==null;YV(t);function i(e){if(e.open||(I.current=GV(e.nativeEvent,L.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(fV(`focus-guard`))||e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`)&&(M.current=!0),e.reason===`outside-press`){if(e.nested)M.current=!1;else if(qz(e.nativeEvent)||Jz(e.nativeEvent))M.current=!1;else{let e=!1;aR(V).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?M.current=!1:M.current=!0}}}b.on(`openchange`,i);function a(e){let r=E.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=v?.isConnected?v:null,o=t?.isConnected&&d(t)!==`body`?t:null,s=n?o||a:a||o;return s||=XV()||null,typeof i==`boolean`?s:BI(i)||s||null}return()=>{b.off(`openchange`,i);let t=Zz(e),n=se(),r=Qz(y,t)||n.some(e=>e===t||Qz(e,t))||A&&uV(A.nodesRef.current,S(),!1).some(e=>Qz(e.context?.elements.floating,t)),o=E.current,s=I.current,c=a(s),l={cancelled:!1};ce.current=l,queueMicrotask(()=>{ce.current===l&&(ce.current=null);let n=ZV(c),i=D.current??typeof o!=`boolean`;if(!l.cancelled&&o&&!M.current&&ae(n)&&(i||n===t||t===e.body||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}M.current=!1})}},[r,y,V,E,D,O,b,A,v,S,se]),Q(()=>{if(!mz||_||!y)return;let e=Zz(aR(y));ae(e)&&dB(e)&&Qz(y,e)&&e.blur()},[_,y]),Q(()=>{if(!r&&j)return j.setFocusManagerState({modal:c,closeOnFocusOut:l,open:_,onOpenChange:t.setOpen,domReference:v}),()=>{j.setFocusManagerState(null)}},[r,j,c,_,t,l,v]),Q(()=>{if(!r&&V)return QV(V),()=>{queueMicrotask(JV)}},[r,V]);let le=!r&&(!c||!w)&&(ie||c);return(0,Y.jsxs)(J.Fragment,{children:[le&&(0,Y.jsx)(MB,{"data-type":`inside`,ref:B,onFocus:e=>{if(c){let e=oe();mV(e[e.length-1])}else j?.portalNode&&(M.current=!1,sV(e,j.portalNode)?iV(v)?.focus():BI(p??j.beforeOutsideRef)?.focus())}}),n,le&&(0,Y.jsx)(MB,{"data-type":`inside`,ref:ee,onFocus:e=>{c?mV(oe()[0]):j?.portalNode&&(l&&(M.current=!0),sV(e,j.portalNode)?aV(v)?.focus():BI(f??j.afterOutsideRef)?.focus())}})]})}function eH(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=MR}=t,l=e.context.dataRef,u=J.useRef(void 0),d=zI(),f=rL(),p=J.useMemo(()=>{function t(t,n,r,i){let a=Nz(c,n,r);t&&i===`touch`&&s>0?f.start(s,()=>{e.setOpen(!0,a)}):e.setOpen(t,a)}function n(t,n,r){let a=l.current.openEvent,s=e.select(`domReferenceElement`)!==n;return t&&s||!t||!i?!0:a&&(typeof o==`function`?o():o)?!r(a.type):!1}return{onPointerDown(e){u.current=Yz(e.pointerType,!0)&&Jz(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(i){let o=u.current,s=i.nativeEvent,c=e.select(`open`);if(i.button!==0||r===`click`||Yz(o,!0)&&a)return;let l=n(c,i.currentTarget,e=>e===`click`||e===`mousedown`),f=eB(s),p=dB(f);if(p||o===`virtual`){t(l,s,p?f:i.currentTarget,o);return}let m=i.currentTarget;d.request(()=>{t(l,s,m,o)})},onClick(i){if(r===`mousedown-only`)return;let o=u.current;r===`mousedown`&&o?u.current=void 0:Yz(o,!0)&&a||t(n(e.select(`open`),i.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),i.nativeEvent,i.currentTarget,o)},onKeyDown(){u.current=void 0}}},[l,r,a,c,e,o,i,d,f,s]);return J.useMemo(()=>n?{reference:p}:$F,[n,p])}function tH(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,(!i||c)&&(d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function nH(e){return e!=null&&e.clientX!=null}function rH(e,t={}){let{enabled:n=!0,axis:r=`both`}=t,i=e.useState(`open`),a=e.useState(`floatingElement`),o=e.useState(`domReferenceElement`),s=e.context.dataRef,c=J.useRef(!1),l=J.useRef(null),[u,d]=J.useState(),[f,p]=J.useState([]),m=Z(t=>{e.set(`positionReference`,t)}),h=Z((t,n,i)=>{c.current||(!s.current.openEvent||nH(s.current.openEvent))&&e.set(`positionReference`,tH(i??o,{x:t,y:n,axis:r,dataRef:s,pointerType:u}))}),g=Z(e=>{i?l.current||(h(e.clientX,e.clientY,e.currentTarget),p([])):h(e.clientX,e.clientY,e.currentTarget)}),_=Yz(u)?a:i;J.useEffect(()=>{if(!n){m(o);return}if(!_)return;function e(){l.current?.(),l.current=null}let t=se(a);function r(t){let n=eB(t);Qz(a,n)?e():h(t.clientX,t.clientY)}return!s.current.openEvent||nH(s.current.openEvent)?l.current=TB(t,`mousemove`,r):m(o),e},[_,n,a,s,o,e,h,m,f]),J.useEffect(()=>()=>{e.set(`positionReference`,null)},[e]),J.useEffect(()=>{n&&!a&&(c.current=!1)},[n,a]),J.useEffect(()=>{!n&&i&&(c.current=!0)},[n,i]);let v=J.useMemo(()=>{function e(e){d(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:g,onMouseEnter:g}},[g]);return J.useMemo(()=>n?{reference:v,trigger:v}:{},[n,v])}function iH(){return!1}function aH(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function oH(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=iH,bubbles:s,externalTree:c}=t,l=e.useState(`open`),u=e.useState(`floatingElement`),{dataRef:d,events:f}=e.context,p=VV(c),m=Z(typeof i==`function`?i:()=>!1),h=typeof i==`function`?m:i,g=h!==!1,_=Z(()=>a),{escapeKey:y,outsidePress:b}=aH(s),x=J.useRef(!1),S=J.useRef(!1),C=J.useRef(!1),w=J.useRef(!1),T=J.useRef(!1),D=J.useRef(``),O=J.useRef(null),k=rL(),A=rL(),j=rL(),N=Z(()=>{A.clear(),d.current.insideReactTree=!1}),P=Z(e=>{let t=d.current.floatingContext?.nodeId;return(p?uV(p.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),F=Z(t=>lB(t,e.select(`floatingElement`))||lB(t,e.select(`domReferenceElement`))),I=Z(t=>{o()&&e.setOpen(!1,Nz(MR,t.nativeEvent))}),L=Z(t=>{if(!l||!n||!r||t.key!==`Escape`)return;let i=Kz(t)?t.nativeEvent:t;if(T.current||i.isComposing||!y&&P(`__escapeKeyBubbles`))return;let a=Nz(RR,i);e.setOpen(!1,a),a.isCanceled||t.preventDefault(),!y&&!a.isPropagationAllowed&&t.stopPropagation()}),z=Z(()=>{d.current.insideReactTree=!0,A.start(0,N)}),B=Z(t=>{if(!l||!n||t.button!==0)return;let r=eB(t.nativeEvent);Qz(e.select(`floatingElement`),r)&&(x.current||(x.current=!0,S.current=!1))}),ee=Z(e=>{l&&n&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&x.current&&(S.current=!0)});J.useEffect(()=>{function e(e){e.open||(w.current=!1)}return f.on(`openchange`,e),()=>{f.off(`openchange`,e)}},[f]),J.useEffect(()=>N,[N]),J.useEffect(()=>{if(!l||!n)return l||(w.current=!1,T.current=!1,D.current=``,O.current=null),N;d.current.__escapeKeyBubbles=y,d.current.__outsidePressBubbles=b;let t=new nL,i=aR(u);function a(){j.clear(),T.current=!0}function o(){T.current=!0,j.start(mz?5:0,()=>{T.current=!1})}function s(){C.current=!0,t.start(0,()=>{C.current=!1})}function c(){x.current=!1,S.current=!1}function f(){let e=D.current,t=e===`pen`||!e?`mouse`:e,n=_(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function m(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function A(e){let t=d.current.floatingContext?.nodeId,n=p&&uV(p.nodesRef.current,t).some(t=>lB(e,t.context?.elements.floating));return F(e)||n}function I(n){if(m(n)){n.type!==`click`&&!F(n)&&(t.clear(),C.current=!1),N();return}if(d.current.insideReactTree){N();return}let r=eB(n),i=`[${fV(`inert`)}]`,a=R(r)?r.getRootNode():null,o=Array.from((oe(a)?a:aR(e.select(`floatingElement`))).querySelectorAll(i)),s=e.context.triggerElements;if(r&&(s.hasElement(r)||s.hasMatchingElement(e=>Qz(e,r))))return;let c=R(r)?r:null;for(;c&&!M(c);){let e=E(c);if(M(e)||!R(e))break;c=e}if(!(o.length&&R(r)&&!uB(r)&&!Qz(r,e.select(`floatingElement`))&&o.every(e=>!Qz(c,e)))){if(ae(r)&&!(`touches`in n)){let e=M(r),t=v(r),i=/auto|scroll/,a=e||i.test(t.overflowX),o=e||i.test(t.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=t.direction===`rtl`,u=c&&(l?n.offsetX<=r.offsetWidth-r.clientWidth:n.offsetX>r.clientWidth),d=s&&n.offsetY>r.clientHeight;if(u||d)return}if(!A(n)){if(f()===`intentional`){if(n.detail!==0&&!qz(n)&&!w.current)return;if(C.current){t.clear(),C.current=!1;return}}typeof h==`function`&&!h(n)||P(`__outsidePressBubbles`)||(e.setOpen(!1,Nz(FR,n)),N())}}}function z(t){f()===`sloppy`&&t.pointerType!==`touch`&&e.select(`open`)&&n&&!F(t)&&I(t)}function B(t){if(f()!==`sloppy`||!e.select(`open`)||!n||F(t))return;let r=t.touches[0];r&&(O.current={startTime:Date.now(),startX:r.clientX,startY:r.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},k.start(1e3,()=>{O.current&&(O.current.dismissOnTouchEnd=!1,O.current.dismissOnMouseDown=!1)}))}function ee(e,t){let n=eB(e);if(!n)return;let r=TB(n,e.type,()=>{t(e),r()})}function te(e){D.current=`touch`,ee(e,B)}function ne(e){k.clear(),e.type===`pointerdown`&&(e.button===0&&(w.current=!0),D.current=e.pointerType),(e.type!==`mousedown`||!O.current||O.current.dismissOnMouseDown)&&ee(e,e=>{e.type===`pointerdown`?z(e):I(e)})}function re(e){if(e.type===`pointercancel`&&(w.current=!1),!x.current)return;let n=S.current;c(),f()===`intentional`&&(e.type===`pointercancel`?n&&s():A(e)||(n?s():(typeof h!=`function`||h(e))&&(t.clear(),C.current=!0,N())))}function ie(e){if(f()!==`sloppy`||!O.current||F(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-O.current.startX),r=Math.abs(t.clientY-O.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(O.current.dismissOnTouchEnd=!0),i>10&&(I(e),k.clear(),O.current=null)}function V(e){ee(e,ie)}function se(e){f()===`sloppy`&&O.current&&!F(e)&&(O.current.dismissOnTouchEnd&&I(e),k.clear(),O.current=null)}function ce(e){ee(e,se)}let le=EB(r&&EB(TB(i,`keydown`,L),TB(i,`compositionstart`,a),TB(i,`compositionend`,o)),g&&EB(TB(i,`click`,ne,!0),TB(i,`pointerdown`,ne,!0),TB(i,`pointerup`,re,!0),TB(i,`pointercancel`,re,!0),TB(i,`mousedown`,ne,!0),TB(i,`mouseup`,re,!0),TB(i,`touchstart`,te,{capture:!0,passive:!0}),TB(i,`touchmove`,V,{capture:!0,passive:!0}),TB(i,`touchend`,ce,{capture:!0,passive:!0})));return()=>{le(),t.clear(),c(),C.current=!1}},[d,u,r,g,h,l,n,y,b,L,N,_,P,F,p,e,k,j]);let te=J.useMemo(()=>({onKeyDown:L,onPointerDown:I,onClick:I}),[L,I]),ne=J.useMemo(()=>({onKeyDown:L,onPointerDown:ee,onMouseDown:ee,onClickCapture:z,onMouseDownCapture(e){z(),B(e)},onPointerDownCapture(e){z(),B(e)},onMouseUpCapture:z,onTouchEndCapture:z,onTouchMoveCapture:z}),[L,z,B,ee]);return J.useMemo(()=>n?{reference:te,floating:ne,trigger:te}:{},[n,te,ne])}function sH(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=o;return t.useSyncedValue(`floatingId`,i),Q(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};R(c)&&(e.domReferenceElement=c),r.state.positionReference===r.state.referenceElement&&(e.positionReference=c),r.update(e)},[s,i,c,l,r]),r.context.onOpenChange=u,r.context.nested=a,r}function cH(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=Z(i),{mounted:c,setMounted:l,transitionStatus:u}=ZI(t,!1,!1,o),d=!t&&r;Q(()=>{t&&s(!1)},[t,s]);let f=J.useRef(c),p=J.useRef(!1),m=wz(),h=()=>{f.current=!1,l(!1),a()};Q(()=>{f.current=c,p.current&&(p.current=!1,!t&&c&&h())});let g=Z(()=>{f.current&&(t?(p.current=!0,m()):h())});return qI({enabled:c&&!t&&!d,open:t,ref:n,onComplete(){t||g()}}),{mounted:c,transitionStatus:u,preventUnmountingOnClose:d,forceUnmount:g}}var lH={tabIndex:-1,[tB]:``};function uH(e){return t=>t!==`touch`||e.current}function dH(e,t=!1){let n=Oz(),r=BV()!=null,i=BF(()=>e(n,r)).current;return sH({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function fH({handle:e,store:t}){return Q(()=>e.attachStore(t),[e,t]),null}function pH(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function mH(e,t){let n=J.useRef(null);return Z(r=>{let i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;let a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),pH(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),pH(t))})}function hH(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);let a=n?.id??null,o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s,openedWithoutTrigger:t?n==null:e.openedWithoutTrigger}}function gH(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function _H(e,t,n,r={}){let i=n.reason,a=i===NR,o=t&&i===`trigger-focus`,s=!t&&(i===`trigger-press`||i===`escape-key`),c=gH(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);let l=()=>{let i=hH(e.state,t,n.trigger,c()),l={...r.extraState,...i};o?l.instantType=`focus`:s?l.instantType=`dismiss`:a&&(l.instantType=void 0),e.update(l)};a?Wd.flushSync(l):l()}function vH(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=mH(e,n),o=Z(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){let e={activeTriggerElement:t,...i?r:null};n.update(e)}else if(a==null&&i&&!n.state.openedWithoutTrigger){let i={activeTriggerId:e??null,activeTriggerElement:t,...r};n.update(i)}}),s=Z(e=>{a(e),e&&o(e)});return Q(()=>(s(t.current),()=>s(null)),[s,t,n,e]),Q(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function yH(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=J.useRef(null),i=e.useState(`open`);Q(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0),e.state.openedWithoutTrigger&&e.set(`openedWithoutTrigger`,!1);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&!e.state.openedWithoutTrigger&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=Nz(jR);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,e.useState(`triggerCount`),e.useState(`activeTriggerId`),e.useState(`activeTriggerElement`),n])}function bH(e,t,n,r){let{mounted:i,transitionStatus:a,forceUnmount:o}=cH({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState(`preventUnmountingOnClose`),setPreventUnmountOnClose:e=>t.set(`preventUnmountingOnClose`,e),animateInitialOpen:r,onUnmount(){t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}});return BF(()=>(t.set(`mounted`,i),null)),t.useSyncedValues({mounted:i,transitionStatus:a}),{forceUnmount:o,transitionStatus:a}}function xH(e,t){e.useSyncedValues(t),Q(()=>()=>{e.update({activeTriggerProps:$F,inactiveTriggerProps:$F,popupProps:$F})},[e])}function SH(e,t){Q(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),Q(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var CH=class{idMap=new Map;add(e,t){this.idMap.set(e,t)}delete(e){this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}},wH=n((e=>{var t=i();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),TH=n(((e,t)=>{t.exports=wH()})),EH=n((e=>{var t=i(),n=TH();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:r,o=n.useSyncExternalStore,s=t.useRef,c=t.useEffect,l=t.useMemo,u=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),DH=n(((e,t)=>{t.exports=EH()})),OH=[],kH=void 0;function AH(){return kH}function jH(e){OH.push(e)}function MH(e){let t=(t,n)=>{let r=BF(PH).current,i;try{kH=r;for(let e of OH)e.before(r);i=e(t,n);for(let e of OH)e.after(r);r.didInitialize=!0}finally{kH=void 0}return i};return t.displayName=e.displayName||e.name,t}function NH(e){return J.forwardRef(MH(e))}function PH(){return{didInitialize:!1}}var FH=TH(),IH=DH(),LH=JF(19)?BH:VH;function RH(e,t,n,r,i){return LH(e,t,n,r,i)}function zH(e,t,n,r,i){let a=J.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,FH.useSyncExternalStore)(e.subscribe,a,a)}jH({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,FH.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function BH(e,t,n,r,i){let a=AH();if(!a)return zH(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],s.store===e&&s.selector===t&&Object.is(s.a1,n)&&Object.is(s.a2,r)&&Object.is(s.a3,i)||(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function VH(e,t,n,r,i){return(0,IH.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var HH=class{static create(e){return new this(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return RH(this,e,t,n,r)}},UH=class extends HH{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){J.useDebugValue(e);let n=this;Q(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;Q(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;Q(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){J.useDebugValue(e);let n=this,r=t!==void 0;Q(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return J.useDebugValue(e),RH(this,this.selectors[e],t,n,r)}useContextCallback(e,t){J.useDebugValue(e);let n=Z(t??ZF);this.context[e]=n}useStateSetter(e){let t=J.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},WH={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},GH=class extends UH{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:IV(),nested:n,triggerElements:i},WH),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&Xz(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{this.syncOnly||this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function KH(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new GH({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:$F,inactiveTriggerProps:$F,popupProps:$F}}var qH=e=>e.triggerIdProp??e.activeTriggerId,JH=e=>e.openProp??e.open,YH=e=>(e.popupElement?.id??e.floatingId)||void 0;function XH(e,t){return t!==void 0&&JH(e)&&qH(e)===t}function ZH(e,t){return XH(e,t)?!0:t!==void 0&&JH(e)&&qH(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}var QH={open:JH,mounted:e=>e.mounted,transitionStatus:e=>JH(e)&&!e.mounted?`starting`:e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:qH,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:YH,isTriggerActive:(e,t)=>t!==void 0&&qH(e)===t,isOpenedByTrigger:(e,t)=>XH(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&qH(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>ZH(e,t)?YH(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function $H(e){let t=J.useCallback(t=>e===void 0?ZF:e.subscribeStore(t),[e]),n=J.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,FH.useSyncExternalStore)(t,n,()=>e?.serverStore)}function eU(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=Oz(),a=BV()!=null,o=BF(()=>new GH({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new CH,floatingId:i,syncOnly:!1,nested:a})).current;return Q(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=R(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}var tU=fz&&mz;function nU(e,t={}){let{enabled:n=!0,delay:r}=t,{events:i,dataRef:a}=e.context,o=J.useRef(!1),s=J.useRef(null),c=J.useRef(!0),l=rL();J.useEffect(()=>{let t=e.select(`domReferenceElement`);if(!n)return;let r=se(t);function i(){let t=e.select(`domReferenceElement`);!e.select(`open`)&&ae(t)&&t===Zz(aR(t))&&(o.current=!0,s.current=t)}function a(){c.current=!0}function l(){c.current=!1}return EB(TB(r,`blur`,i),tU&&TB(r,`keydown`,a,!0),tU&&TB(r,`pointerdown`,l,!0))},[e,n]),J.useEffect(()=>{if(!n)return;function t(t){if(t.reason===`trigger-press`||t.reason===`escape-key`){let t=e.select(`domReferenceElement`);R(t)&&(s.current=t,o.current=!0)}}return i.on(`openchange`,t),()=>{i.off(`openchange`,t)}},[i,n,e]);let u=J.useMemo(()=>{function t(){o.current=!1,s.current=null}return{onMouseLeave(){t()},onFocus(n){let i=n.currentTarget;if(o.current){if(s.current===i)return;t()}let a=eB(n.nativeEvent);if(R(a)){if(tU&&!n.relatedTarget){if(!c.current&&!dB(a))return}else if(!mB(a))return}let u=cB(n.relatedTarget,e.context.triggerElements),{nativeEvent:d,currentTarget:f}=n;e.select(`open`)&&u||!r?e.setOpen(!0,Nz(PR,d,f)):l.start(r,()=>{o.current||e.setOpen(!0,Nz(PR,d,f))})},onBlur(n){t();let r=n.relatedTarget,i=n.nativeEvent,o=R(r)&&r.hasAttribute(fV(`focus-guard`))&&r.getAttribute(`data-type`)===`outside`;l.start(0,()=>{let t=e.select(`domReferenceElement`),n=Zz(aR(t));!r&&n===t||Qz(a.current.floatingContext?.refs.floating.current,n)||Qz(t,n)||o||cB(r??n,e.context.triggerElements)||e.setOpen(!1,Nz(PR,i))})}}},[a,r,e,l]);return J.useMemo(()=>n?{reference:u,trigger:u}:{},[n,u])}var rU=class e{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new nL;restTimeout=new nL;handleCloseOptions=void 0;static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},iU=new WeakMap;function aU(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&iU.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),iU.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function oU(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=iU.get(n);a&&a!==e&&aU(a),aU(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,iU.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function sU(e){let t=e.context.dataRef.current,n=BF(()=>t.hoverInteractionState??rU.create()).current;return t.hoverInteractionState||=n,FI(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function cU(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=e.useState(`open`),o=e.useState(`floatingElement`),s=e.useState(`domReferenceElement`),{dataRef:c}=e.context,l=VV(),u=BV(),d=sU(e),f=rL(),p=Z(()=>yB(c.current.openEvent?.type,d.interactedInside)),m=Z(()=>bB(c.current.openEvent?.type)),h=Z(()=>{aU(d)});Q(()=>{a||(d.pointerType=void 0,d.restTimeoutPending=!1,d.interactedInside=!1,h())},[a,d,h]),J.useEffect(()=>h,[h]),Q(()=>{if(n&&a&&d.handleCloseOptions?.blockPointerEvents&&m()&&R(s)&&o){let e=s,t=o,n=aR(o),r=l?.nodesRef.current.find(e=>e.id===u)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=d.pointerEventsScopeElement===t?null:d.pointerEventsScopeElement,a=r===t?null:r,c=d.handleCloseOptions?.getScope?.()??i??a??$z(e,`[data-rootownerid]`)??n.body;return oU(d,{scopeElement:c,referenceElement:e,floatingElement:t}),()=>{h()}}},[n,a,s,o,d,m,l,u,h]),J.useEffect(()=>{if(!n)return;function t(){return!!(l&&u&&uV(l.nodesRef.current,u).length>0)}function a(t){let n=_B(r,`close`,d.pointerType),i=()=>{e.setOpen(!1,Nz(NR,t)),l?.events.emit(`floating.closed`,t)};n?d.openChangeTimeout.start(n,i):(d.openChangeTimeout.clear(),i())}function s(e){let t=eB(e);fB(t)?d.interactedInside=$z(t,`[aria-haspopup]`)!=null:d.interactedInside=!1}function g(){d.openChangeTimeout.clear(),f.clear(),l?.events.off(`floating.closed`,v),h()}function _(n){if(t()&&l){l.events.on(`floating.closed`,v);return}if(cB(n.relatedTarget,e.context.triggerElements))return;let r=c.current.floatingContext?.nodeId??i,o=n.relatedTarget;l&&r&&R(o)&&uV(l.nodesRef.current,r,!1).some(e=>Qz(e.context?.elements.floating,o))||(d.handler?d.handler(n):(h(),m()&&!p()&&a(n)))}function v(n){l&&u&&!t()&&f.start(0,()=>{l.events.off(`floating.closed`,v),e.setOpen(!1,Nz(NR,n)),l.events.emit(`floating.closed`,n)})}let y=o;return EB(y&&TB(y,`mouseenter`,g),y&&TB(y,`mouseleave`,_),y&&TB(y,`pointerdown`,s,!0),()=>{l?.events.off(`floating.closed`,v)})},[n,o,e,c,r,i,m,p,h,d,l,u,f])}var lU={current:null};function uU(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=lU,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p,guardStaleOpen:m=!1}=t,{dataRef:h,events:g}=e.context,_=VV(l),v=sU(e),y=J.useRef(!1),b=DB(i),x=DB(r),S=DB(o),C=DB(n),w=DB(p),T=DB(f),E=Z(()=>yB(h.current.openEvent?.type,v.interactedInside)),D=Z(()=>w.current?.()!==!1),O=Z((t,n,r)=>{let i=e.context.triggerElements;if(i.hasElement(n))return!t||!Qz(t,n);if(!R(r))return!1;let a=r;return i.hasMatchingElement(e=>Qz(e,a))&&(!t||!Qz(t,a))}),k=Z(()=>{v.handler&&=(aR(e.select(`domReferenceElement`)).removeEventListener(`mousemove`,v.handler),void 0)}),A=Z(()=>{aU(v)});return u&&(v.handleCloseOptions=i?.__options),J.useEffect(()=>k,[k]),J.useEffect(()=>{if(!n)return;function e(e){e.open?y.current=!1:(y.current=e.reason===NR,k(),v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return g.on(`openchange`,e),()=>{g.off(`openchange`,e)}},[n,g,v,k]),J.useEffect(()=>{if(!n)return;function t(t,n=!0){let r=_B(x.current,`close`,v.pointerType);r?v.openChangeTimeout.start(r,()=>{e.setOpen(!1,Nz(NR,t)),_?.events.emit(`floating.closed`,t)}):n&&(v.openChangeTimeout.clear(),e.setOpen(!1,Nz(NR,t)),_?.events.emit(`floating.closed`,t))}let r=c.current??(u?e.select(`domReferenceElement`):null);if(!R(r))return;function i(t){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,a&&!Yz(v.pointerType))return;let n=vB(S.current),r=_B(x.current,`open`,v.pointerType),i=eB(t),o=t.currentTarget??null,s=e.select(`domReferenceElement`),c=o;if(R(i)&&!e.context.triggerElements.hasElement(i)){for(let t of e.context.triggerElements.elements())if(Qz(t,i)){c=t;break}}R(o)&&R(s)&&!e.context.triggerElements.hasElement(o)&&Qz(o,s)&&(c=s);let l=c!=null&&O(s,c,i),u=e.select(`open`),d=T.current?.()??e.select(`transitionStatus`)===`ending`,f=!u&&d&&y.current,p=!l&&R(c)&&R(s)&&Qz(s,c)&&f,m=n>0&&!r,h=l&&(u||f)||p,g=!u||l;h?D()&&e.setOpen(!0,Nz(NR,t,c)):m||(r?v.openChangeTimeout.start(r,()=>{g&&D()&&e.setOpen(!0,Nz(NR,t,c))}):g&&D()&&e.setOpen(!0,Nz(NR,t,c)))}function o(n){if(E()){A();return}k();let r=aR(e.select(`domReferenceElement`));v.restTimeout.clear(),v.restTimeoutPending=!1;let i=h.current.floatingContext??d?.();if(!cB(n.relatedTarget,e.context.triggerElements)){if(b.current&&i){e.select(`open`)||v.openChangeTimeout.clear();let a=c.current;v.handler=b.current({...i,tree:_,x:n.clientX,y:n.clientY,onClose(){A(),k(),C.current&&!E()&&a===e.select(`domReferenceElement`)&&t(n,!0)}}),r.addEventListener(`mousemove`,v.handler),v.handler(n)}else v.pointerType===`touch`&&Qz(e.select(`floatingElement`),n.relatedTarget)||t(n)}}function l(e){Qz(r,e.relatedTarget)||(v.openChangeTimeout.clear(),v.restTimeout.clear(),v.restTimeoutPending=!1)}let f=m?TB(r,`mouseout`,l):void 0;return s?EB(TB(r,`mousemove`,i,{once:!0}),TB(r,`mouseenter`,i),TB(r,`mouseleave`,o),f):EB(TB(r,`mouseenter`,i),TB(r,`mouseleave`,o),f)},[k,A,h,x,e,n,b,v,u,O,E,a,s,S,c,_,C,d,T,D,m]),J.useMemo(()=>{if(!n)return;function t(e){v.pointerType=e.pointerType}return{onPointerDown:t,onPointerEnter:t,onMouseMove(t){let{nativeEvent:n}=t,r=t.currentTarget,i=e.select(`domReferenceElement`),o=e.select(`open`),s=O(i,r,t.target);if(a&&!Yz(v.pointerType))return;if(o&&s&&v.handleCloseOptions?.blockPointerEvents){let t=e.select(`floatingElement`);if(t){let e=v.handleCloseOptions?.getScope?.()??r.ownerDocument.body;oU(v,{scopeElement:e,referenceElement:r,floatingElement:t})}}let c=vB(S.current);if(o&&!s||c===0||!s&&v.restTimeoutPending&&t.movementX**2+t.movementY**2<2)return;v.restTimeout.clear();function l(){if(v.restTimeoutPending=!1,E())return;let t=e.select(`open`);!v.blockMouseMove&&(!t||s)&&D()&&e.setOpen(!0,Nz(NR,n,r))}v.pointerType===`touch`?Wd.flushSync(()=>{l()}):s&&o?l():(v.restTimeoutPending=!0,v.restTimeout.start(c,l))}}},[n,v,E,O,a,e,S,D])}function dU(e){return mz&&e.movementX===0&&e.movementY===0}function fU(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function pU(e,t){return fU(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function mU(e,t,n){return fU(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function hU(e,t,n){return fU(t,n?e===rB:e===iB,e===oB)}function gU(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===`Escape`:fU(t,n?e===iB:e===rB,e===aB)}function _U(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:p=!0,openOnArrowKeyDown:m=!0,disabledIndices:h=void 0,orientation:g=`vertical`,triggerOrientation:_=g,parentOrientation:v,id:y,resetOnPointerLeave:b=!0,externalTree:x,nestedReturnFocusRef:S,grid:C}=t,w=C!=null,T=e.useState(`open`),E=e.useState(`floatingElement`),D=e.useState(`domReferenceElement`),O=e.context.dataRef,k=hB(E),A=pB(D),j=DB(k),M=BV(),N=VV(x),P=J.useRef(f),F=J.useRef(o??-1),I=J.useRef(null),L=J.useRef(!0),R=Z(e=>{i(F.current===-1?null:F.current,e)}),z=J.useRef(!!E),B=J.useRef(T),ee=J.useRef(!1),te=J.useRef(!1),ne=J.useRef(null),re=DB(h),ie=DB(T),V=DB(o),oe=DB(b),se=zI(),ce=zI(),le=Z(()=>{se.cancel();function e(e){d||(ne.current=mV(e,{sync:ee.current,preventScroll:!0}))}let t=n.current[F.current],r=te.current;t&&e(t),(ee.current?e=>e():e=>se.request(e))(()=>{let i=n.current[F.current]||t;i&&(t||e(i),he&&(r||!L.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});Q(()=>{O.current.orientation=g},[O,g]),Q(()=>{T||(I.current=null),T&&f===`auto`||(P.current=f)},[T,f]),Q(()=>{a&&(T&&E?(F.current=o??-1,P.current&&o!=null&&(te.current=!0,R())):z.current&&(F.current=-1,R()))},[a,T,E,o,R]),Q(()=>{if(a){if(!T)ee.current=!1;else if(E){if(r==null){if(ee.current=!1,V.current!=null)return;if(z.current&&(F.current=-1,le()),(!B.current||!z.current)&&P.current&&(I.current!=null||P.current===!0&&I.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>ce.request(e):queueMicrotask)(t),e+=1):(F.current=I.current==null||mU(I.current,_,u)||l?PB(n):FB(n),I.current=null,R())};t()}}else NB(n.current,r)||(F.current=r,le(),te.current=!1)}}},[a,T,E,r,V,l,n,_,u,R,le,ce]),Q(()=>{if(!a||E||!N||d||!z.current)return;let e=N.nodesRef.current,t=e.find(e=>e.id===M)?.context?.elements.floating,n=Zz(aR(D??t??null)),r=e.some(e=>e.context&&Qz(e.context.elements.floating,n));t&&!r&&L.current&&t.focus({preventScroll:!0})},[a,E,D,N,M,d]),Q(()=>{B.current=T,z.current=!!E});let ue=r!=null,de=Z(e=>{if(!ie.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(F.current!==t||r!==t)&&(F.current=t,R(e))}),fe=Z(()=>v??N?.nodesRef.current.find(e=>e.id===M)?.context?.dataRef?.current.orientation),pe=Z(()=>PB(n,re.current)),me=Z(t=>{if(L.current=!1,ee.current=!0,t.which===229||!ie.current&&t.currentTarget===j.current)return;if(l&&gU(t.key,g,u,w)){pU(t.key,fe())||Gz(t),e.setOpen(!1,Nz(zR,t.nativeEvent));let n=S?.current??D;ae(n)&&n.focus();return}r!=null&&r!==F.current&&!NB(n.current,r)&&(F.current=r);let i=F.current,a=PB(n,h),o=FB(n,h);if(A||(t.key===`Home`&&(Gz(t),F.current=a,R(t)),t.key===`End`&&(Gz(t),F.current=o,R(t))),C!=null){let e=C(t,F.current,n,g,c,u,h,a,o);if(e!=null&&e!==F.current&&(F.current=e,R(t)),g===`both`)return}if(pU(t.key,g)){Gz(t);let e=Zz(t.currentTarget.ownerDocument);if(T&&!d&&Qz(t.currentTarget,e)&&!n.current.some(t=>t!=null&&Qz(t,e))){F.current=mU(t.key,g,u)?a:o,R(t),r===F.current&&le();return}let{index:l,wrapped:f}=IB(n.current,i,{decrement:!mU(t.key,g,u),loopFocus:c,allowEscape:s,disabledIndices:h,minIndex:a,maxIndex:o});f&&(ee.current=!1),F.current=l,R(t)}}),he=J.useMemo(()=>({onFocus(e){ee.current=!0,de(e)},onClick({currentTarget:e}){d||e.focus({preventScroll:!0})},onMouseMove(e){dU(e)||(ee.current=!0,te.current=!1,p&&de(e))},onPointerLeave(e){if(!ie.current||!L.current||e.pointerType===`touch`)return;ee.current=!0;let t=e.relatedTarget;if(p&&!n.current.includes(t)&&oe.current&&(ne.current?.(),ne.current=null,F.current=-1,R(e),!d)){let e=j.current,t=Zz(aR(e));e&&Qz(e,t)&&e.focus({preventScroll:!0})}}}),[de,ie,j,p,n,R,oe,d]),ge=J.useMemo(()=>d&&T&&ue&&{"aria-activedescendant":`${y}-${r}`},[d,T,ue,y,r]),_e=J.useMemo(()=>({...A?{}:ge,onKeyDown(t){if(t.key===`Tab`&&t.shiftKey&&T&&!d){let n=eB(t.nativeEvent);if(n&&!Qz(j.current,n))return;Gz(t);let r=Nz(LR,t.nativeEvent);e.setOpen(!1,r);let i=S?.current??D;!r.isCanceled&&ae(i)&&i.focus()}else me(t)},onPointerMove(e){dU(e)||(L.current=!0)}}),[ge,me,j,A,e,T,d,D,S]),ve=J.useMemo(()=>{function t(t){e.setOpen(!0,Nz(zR,t.nativeEvent,t.currentTarget))}function n(e){f===`auto`&&qz(e.nativeEvent)&&(P.current=!d)}function r(e){P.current=f,f===`auto`&&Jz(e.nativeEvent)&&(P.current=!0)}return{onKeyDown(n){let r=e.select(`open`);L.current=!1;let i=n.key.startsWith(`Arrow`),a=hU(n.key,fe(),u),o=pU(n.key,r?g:_),s=(l?a:o)||n.key===`Enter`||n.key.trim()===``;if(d&&r&&(!l||dB(n.currentTarget)))return me(n);if(r||m||!i){if(s){let e=pU(n.key,fe());I.current=l&&e?null:n.key}l?a&&(Gz(n),r?(F.current=pe(),R(n),d&&j.current?.focus()):t(n)):o&&(V.current!=null&&(F.current=V.current),Gz(n),!r&&m?t(n):me(n),r&&R(n))}},onFocus(t){t.target===t.currentTarget&&e.select(`open`)&&!d&&(F.current=-1,R(t))},onPointerDown:r,onPointerEnter:r,onMouseDown:n,onClick:n}},[me,f,pe,l,R,e,m,g,_,fe,u,V,d,j]),ye=J.useMemo(()=>({...ge,...ve}),[ge,ve]);return J.useMemo(()=>a?{reference:ye,floating:_e,item:he,trigger:ve}:{},[a,ye,_e,ve,he])}function vU(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:o,onTyping:s,enabled:c=!0,resetMs:l=750,selectedIndex:u=null}=t,d=Z(s),f=e.useState(`open`),p=rL(),m=J.useRef(``),h=J.useRef(u??i??-1),g=J.useRef(null),_=Z(e=>{function t(e){return r?.current[e]}function s(e){let n=t(e);return n&&!BB(n)||n?.matches(`:disabled`)?!1:o==null||!RB(QF,e,o)}function c(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t<e.length;t+=1){let n=(r+t)%e.length;if(e[n]?.toLowerCase().startsWith(i)&&s(n))return n}return-1}let _=n.current;if(m.current.length>0&&e.key===` `&&(Gz(e),d?.(!0)),m.current.length>0&&m.current[0]!==` `&&c(_,m.current)===-1&&e.key!==` `&&d?.(!1),_==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;f&&e.key!==` `&&(Gz(e),d?.(!0));let v=m.current===``;v&&(h.current=u??i??-1),_.every((e,t)=>e&&s(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&m.current===e.key&&(m.current=``,h.current=g.current),m.current+=e.key,p.start(l,()=>{m.current=``,h.current=g.current,d?.(!1)});let y=((v?u??i??-1:h.current)??0)+1,b=c(_,m.current,y);b===-1?e.key!==` `&&(m.current=``,d?.(!1)):(a?.(b,e),g.current=b)}),v=Z(t=>{let n=t.relatedTarget,r=e.select(`domReferenceElement`),i=e.select(`floatingElement`);Qz(r,n)||Qz(i,n)||(p.clear(),m.current=``,h.current=g.current,d?.(!1))});Q(()=>{(f||u===null)&&(p.clear(),g.current=null,m.current!==``&&(m.current=``,d?.(!1)))},[f,u,p,d]);let y=J.useMemo(()=>({onKeyDown:_,onBlur:v}),[_,v]);return J.useMemo(()=>c?{reference:y,floating:y}:{},[c,y])}var yU=.1,bU=yU*yU,xU=.5;function SU(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function CU(e,t,n,r,i,a,o,s,c,l){let u=!1;return SU(e,t,n,r,i,a)&&(u=!u),SU(e,t,i,a,o,s)&&(u=!u),SU(e,t,o,s,c,l)&&(u=!u),SU(e,t,c,l,n,r)&&(u=!u),u}function wU(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function TU(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function EU(e={}){let{blockPointerEvents:t=!1}=e,n=new nL,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*bU;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=eB(r),g=r.type===`mouseleave`,_=Qz(u,h),v=Qz(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&R(r.relatedTarget)&&Qz(u,r.relatedTarget))return;function y(){return!!(s&&uV(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=TU(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=TU(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=TU(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=TU(d,f,x.right-1,A,S.left+1,k)}if(j)return;if(l&&!wU(d,f,x)||!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?xU/2:xU*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+xU+1,o=C||T?S.bottom-xU:S.top,s=C?T?S.bottom-xU:S.top:S.bottom-xU;M=CU(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?xU/2:xU*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-xU,o=C||T?S.top+xU:S.bottom,s=C?T?S.top+xU:S.bottom:S.top+xU;M=CU(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?xU/2:xU*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+xU+1,o=w||E?S.right-xU:S.left,s=w?E?S.right-xU:S.left:S.right-xU;M=CU(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?xU/2:xU*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-xU,o=w||E?S.left+xU:S.right,s=w?E?S.left+xU:S.right:S.left+xU;M=CU(d,f,a,r,a,i,o,S.top,s,S.bottom);break}}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}var DU=J.createContext(void 0);function OU(e){let t=J.useContext(DU);if(t===void 0&&!e)throw Error(TI(69));return t}var kU=`ArrowUp`,AU=`ArrowDown`,jU=`ArrowLeft`,MU=`ArrowRight`,NU=new Set([kU,AU,jU,MU,`Home`,`End`]),PU=[`Shift`,`Control`,`Alt`,`Meta`];function FU(e){return ae(e)&&e.tagName===`INPUT`}function IU(e){return!!(FU(e)&&e.selectionStart!=null||ae(e)&&e.tagName===`TEXTAREA`)}function LU(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop,o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(o&&r!==`vertical`){let r=RU(e,t,`left`),a=zU(e),o=zU(t);n===`ltr`&&(r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight?i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight:r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft&&(i=r-o.scrollMarginLeft-a.scrollPaddingLeft)),n===`rtl`&&(r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft?i=r-o.scrollMarginLeft-a.scrollPaddingLeft:r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight&&(i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight))}if(s&&r!==`horizontal`){let n=RU(e,t,`top`),r=zU(e),i=zU(t);n-i.scrollMarginTop<e.scrollTop+r.scrollPaddingTop?a=n-i.scrollMarginTop-r.scrollPaddingTop:n+t.offsetHeight+i.scrollMarginBottom>e.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(a=n+t.offsetHeight+i.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:`auto`})}function RU(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function zU(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}function BU(e){return e===`starting`?EV:$F}var VU=J.createContext(void 0);function HU(){return J.useContext(VU)}function UU(e,t){let n=xI(e.render);if(J.isValidElement(n)){let e=n.props;if(Object.hasOwn(e,`id`))return e.id??``}return e.id??t}function WU(e,t,n){let r=UU(e,t),i=r===t?void 0:r;return[r,J.useCallback(e=>n?.(e?i:void 0),[i,n])]}function GU(e,t,n){let r=xI(e.render),i=J.isValidElement(r)?r.props:void 0,a=e[`aria-label`]??i?.[`aria-label`],o=e[`aria-labelledby`]??i?.[`aria-labelledby`];return o==null&&!a&&(o=t?t.id||void 0:n||void 0),o}var KU=J.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,id:o,initialFocus:s,...c}=e,{store:l,defaultFloatingId:u,setRenderedFloatingId:d,virtualFocus:f,orientation:p}=mR(),m=HU(),{side:h,align:g}=fR(),_=OU(!0)!=null,v=l.useState(`open`),y=l.useState(`transitionStatus`),b=l.useState(`popupProps`),x=l.useState(`mounted`),S=l.useState(`instantType`),C=l.useState(`activeTriggerElement`),w=l.useState(`parent`),T=l.useState(`lastOpenChangeReason`),E=l.useState(`rootId`),D=l.useState(`floatingRootContext`),O=l.useState(`floatingTreeRoot`),k=l.useState(`closeDelay`),A=l.useState(`hoverEnabled`),j=l.useState(`disabled`),M=l.useState(`openMethod`),N=l.useState(`activeTriggerId`),P=l.useState(`listElement`),[F,I]=WU(e,u,d),L=GU(e,C,N),R=w.type===`menu`?m:void 0,z=w.type===`context-menu`,B=s??w.type!==`menu`;s===void 0&&P&&w.type!==`menu`&&(B=()=>l.state.activeIndex===null&&P),qI({open:v,ref:l.context.popupRef,onComplete(){v&&l.context.onOpenChangeComplete?.(!0)}}),J.useEffect(()=>{function e(e){l.setOpen(!1,Nz(e.reason,e.domEvent))}return O.events.on(`close`,e),()=>{O.events.off(`close`,e)}},[O.events,l]),cU(D,{enabled:A&&!j&&!z&&w.type!==`menubar`,closeDelay:k});let ee=l.useStateSetter(`popupElement`),{parentVirtualFocusRef:te,handleFocus:ne}=(J.useContext(XR)?.useParentHandoff??JU)(l,w,v,f),re=_I(`div`,e,{state:{transitionStatus:y,side:h,align:g,open:v,nested:w.type===`menu`,instant:S},ref:[t,l.context.popupRef,ee,I],stateAttributesMapping:OR,props:[b,{id:F,...P?{role:`presentation`}:{role:`menu`,"aria-orientation":p===`horizontal`?`horizontal`:void 0,"aria-labelledby":L},onKeyDown(e){R?.onPopupKeyDown?.(e),_&&NU.has(e.key)&&e.stopPropagation()},onFocus:ne},BU(y),c,{"data-rootownerid":E}]}),ie=w.type===void 0||z;(C||w.type===`menubar`&&T!==`outside-press`)&&(ie=!0);let V=R?.getReturnElement??te;return(0,Y.jsx)($V,{context:D,openInteractionType:M,modal:z,disabled:!x,returnFocus:a??V??ie,explicitReturnFocus:a===void 0&&V?!1:void 0,initialFocus:B,restoreFocus:!0,getInsideElements:w.type===void 0?()=>[l.context.beforeTriggerFocusGuardRef.current]:void 0,externalTree:w.type===`menubar`?void 0:O,previousFocusableElement:C,nextFocusableElement:w.type===void 0?l.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:l.context.beforeContentFocusGuardRef,children:re})}),qU={parentVirtualFocusRef:void 0,handleFocus:void 0};function JU(){return qU}var YU=J.forwardRef(function(e,t){let n=ZR()?.Popup??KU;return(0,Y.jsx)(n,{...e,ref:t})}),XU=J.createContext(void 0);function ZU(){let e=J.useContext(XU);if(e===void 0)throw Error(TI(32));return e}var QU=J.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i,parent:a}=mR();if(!(i.useState(`mounted`)||n))return null;let o=a.type===`menu`||a.type===`menubar`?`group`:void 0;return(0,Y.jsx)(XU.Provider,{value:n,children:(0,Y.jsx)(FV,{ref:t,...r,portalOwnerRole:o})})});function $U(e){return JF(19)?e:e?`true`:void 0}function eW(e){let{nodeId:t,externalTree:n,rootContext:r}=e,i=r.useState(`referenceElement`),a=r.useState(`floatingElement`),o=r.useState(`domReferenceElement`),s=r.useState(`open`),l=r.useState(`floatingId`),[u,d]=J.useState(null),f=J.useRef(null),p=VV(n),m=J.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),h=c({...e,elements:{...m,...u&&{reference:u}}}),g=J.useCallback(e=>{let t=R(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;d(t),h.refs.setReference(t)},[h.refs]),_=J.useMemo(()=>({...h.refs,setPositionReference:g,domReference:f}),[h.refs,g]),v=J.useMemo(()=>({...h.elements,domReference:o}),[h.elements,o]),y=J.useMemo(()=>({...h,dataRef:r.context.dataRef,open:s,onOpenChange:r.setOpen,events:r.context.events,floatingId:l,refs:_,elements:v,nodeId:t,rootStore:r}),[h,_,v,t,r,s,l]);return Q(()=>{o&&(f.current=o)},[o]),Q(()=>{r.context.dataRef.current.floatingContext=y;let e=p?.nodesRef.current.find(e=>e.id===t);e&&(e.context=y)}),J.useMemo(()=>({...h,context:y,refs:_,elements:v,rootStore:r}),[h,_,v,y,r])}var tW=J.createContext(void 0);function nW(){return J.useContext(tW)?.direction??`ltr`}var rW=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=le(e,t)||{};if(l==null)return{};let d=F(u),f={x:n,y:r},p=O(i),m=te(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=s.floating[y]||a.floating[m],C=b/2-x/2,w=S/2-h[m]/2-1,E=Math.min(d[_],w),D=Math.min(d[v],w),k=E,A=S-h[m]-D,j=S/2-h[m]/2+C,M=P(k,j,A),N=!c.arrow&&T(i)!=null&&j!==M&&a.reference[m]/2-(j<k?E:D)-h[m]/2<0,I=N?j<k?j-k:j-A:0;return{[p]:f[p]+I,data:{[p]:M,centerOffset:j-M-I,...N&&{alignmentOffset:I}},reset:N}}}),iW=(e,t)=>{let{name:n,fn:r}=rW(e);return{name:n,fn:r,options:[e,t]}},aW={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0,o=await e.platform.detectOverflow(e,{elementContext:`reference`});return{data:{referenceHidden:o.top-n>=0||o.right-t>=0||o.bottom-n>=0||o.left-t>=0||a}}}},oW={sideX:`left`,sideY:`top`},sW=`--available-width`,cW=`--available-height`,lW=`--anchor-width`,uW=`--anchor-height`,dW=`--transform-origin`,fW=sW,pW=cW;function mW(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function hW(e,t,n){let{rects:r,placement:i}=e;return{side:mW(t,A(i),n),align:T(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function gW(e){return _W(e,eW)}function _W(e,t){let{anchor:n,positionMethod:r=`absolute`,side:i=`bottom`,sideOffset:a=0,align:s=`center`,alignOffset:c=0,collisionBoundary:l,collisionPadding:d=5,sticky:f=!1,arrowPadding:p=5,disableAnchorTracking:g=!1,inline:v,keepMounted:y=!1,floatingRootContext:b,mounted:x,collisionAvoidance:S,shift:C,nodeId:w,adaptiveOrigin:E,lazyFlip:D=!1,externalTree:O}=e,j=S.side||`flip`,M=S.align||`flip`,N=S.fallbackAxisSide||`end`,P=C?.crossAxis??!1,F=C?.rootBoundary,I=typeof n==`function`?n:void 0,L=Z(I),R=I?L:n,z=DB(n),B=DB(x),ee=nW()===`rtl`,[te,re]=J.useState(null);!x&&te!==null&&re(null);let ie=D===`placement`,V=te?A(te):null,ae=te&&ie?T(te)||`center`:null,oe=V||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":ee?`left`:`right`,"inline-start":ee?`right`:`left`}[i],ce=ae||s,le=ce===`center`?oe:`${oe}-${ce}`,ue=d;typeof ue==`number`?ue={top:ue,right:ue,bottom:ue,left:ue}:ue&&={top:ue.top||0,right:ue.right||0,bottom:ue.bottom||0,left:ue.left||0};let de=+(i===`bottom`),fe=+(i===`top`),pe=+(i===`right`),me=+(i===`left`),he={boundary:l===`clipping-ancestors`?`clippingAncestors`:l,padding:ue},ge=J.useRef(null),_e=DB(a),ve=DB(c),ye=typeof a==`function`?0:a,be=typeof c==`function`?0:c,xe=[];v&&xe.push(v),xe.push(o(e=>{let t=hW(e,i,ee),n=typeof _e.current==`function`?_e.current(t):_e.current,r=typeof ve.current==`function`?ve.current(t):ve.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[ye,be,ee,i]));let Se=M===`none`&&j!==`shift`,Ce=!Se&&(f||P||j===`shift`),we=j===`none`?null:m({...he,padding:{top:ue.top+1+de,right:ue.right+1+me,bottom:ue.bottom+1+fe,left:ue.left+1+pe},mainAxis:!P&&j===`flip`,crossAxis:M===`flip`&&`alignment`,fallbackAxisSideDirection:N}),Te=Se?null:u({...he,rootBoundary:F,mainAxis:M!==`none`,crossAxis:Ce,limiter:f||P?void 0:h(e=>{if(!ge.current)return{};let{width:t,height:n}=ge.current.getBoundingClientRect(),r=k(A(e.placement)),i=r===`y`?t:n,a=r===`y`?ue.left+ue.right:ue.top+ue.bottom;return{offset:i/2+a/2}})},[he,f,P,F,ue,M]);j===`shift`||M===`shift`||ce===`center`?xe.push(Te,we):xe.push(we,Te),xe.push(ne({...he,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!B.current)return;let i=e.style;i.setProperty(fW,`${t}px`),i.setProperty(pW,`${n}px`);let a=se(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(lW,`${u}px`),i.setProperty(uW,`${d}px`)}}),iW(e=>({element:ge.current||aR(e.elements.floating).createElement(`div`),padding:ge.current?p:0}),[p]),{name:`transformOrigin`,fn(e){let{elements:{floating:t},middlewareData:n,placement:r,platform:o,rects:s,y:c}=e,l=A(r),u=T(r),d=k(l)===`y`,f=ge.current,p=typeof a==`function`?a(hW(e,i,ee)):a,m;m=!f&&u&&Math.abs(d?n.shift?.x||0:n.shift?.y||0)<=1?u===`start`===(d&&o.isRTL?.(t)===!0)?`100%`:`0%`:`${(d?n.arrow?.x||0:n.arrow?.y||0)+(d?f?.clientWidth||0:f?.clientHeight||0)/2}px`;let h=l===`top`||l===`left`?`calc(100% + ${p}px)`:`${-p}px`;return Ce&&d&&Math.abs(n.shift?.y||0)>p&&(h=`${s.reference.y+s.reference.height/2-c}px`),t.style.setProperty(dW,d?`${m} ${h}`:`${h} ${m}`),{}}},aW,E),Q(()=>{!x&&b&&b.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[x,b]);let H=J.useMemo(()=>({ancestorScroll:!g,elementResize:!g&&typeof ResizeObserver<`u`,layoutShift:!g&&typeof IntersectionObserver<`u`}),[g]),{refs:Ee,elements:De,x:Oe,y:ke,middlewareData:Ae,update:je,placement:Me,context:Ne,isPositioned:Pe,floatingStyles:Fe}=t({rootContext:b,open:y?x:void 0,placement:le,middleware:xe,strategy:r,whileElementsMounted:y?void 0:(...e)=>_(...e,H),nodeId:w,externalTree:O}),{sideX:Ie,sideY:Le}=Ae.adaptiveOrigin||oW,Re=Pe?r:`fixed`,ze=J.useMemo(()=>{let e;return e=Pe?E?{position:Re,[Ie]:Oe,[Le]:ke}:{...Fe,position:Re}:{position:Re,top:0,left:0},e[fW]=`100vw`,e[pW]=`100vh`,Pe||(e.opacity=0),e},[E,Re,Ie,Oe,Le,ke,Fe,Pe]),U=J.useRef(null);Q(()=>{if(!x)return;let e=z.current,t=typeof e==`function`?e():e,n=(vW(t)?t.current:t)||null;n!==U.current&&(Ee.setPositionReference(n),U.current=n)},[x,Ee,R,z]),J.useEffect(()=>{if(!x)return;let e=z.current;typeof e!=`function`&&vW(e)&&e.current!==U.current&&(Ee.setPositionReference(e.current),U.current=e.current)},[x,Ee,R,z]),J.useEffect(()=>{if(y&&x&&De.reference&&De.floating)return _(De.reference,De.floating,je,H)},[y,x,De,je,H]);let Be=A(Me),Ve=mW(i,Be,ee),He=T(Me)||`center`,Ue=!!Ae.hide?.referenceHidden;Q(()=>{D&&x&&Pe&&(Be!==oe||ie&&He!==ce)&&re(Me)},[D,ie,x,Pe,Me,Be,He,oe,ce]);let We=J.useMemo(()=>({position:`absolute`,top:Ae.arrow?.y,left:Ae.arrow?.x}),[Ae.arrow]),Ge=Ae.arrow?.centerOffset!==0;return J.useMemo(()=>({positionerStyles:ze,arrowStyles:We,arrowRef:ge,arrowUncentered:Ge,side:Ve,align:He,physicalSide:Be,anchorHidden:Ue,refs:Ee,context:Ne,isPositioned:Pe,update:je}),[ze,We,ge,Ge,Ve,He,Be,Ue,Ee,Ne,Pe,je])}function vW(e){return e!=null&&`current`in e}function yW(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=Z(i),[,o]=J.useState(0),s=BF(xW).current,c=BF(bW).current,l=J.useRef(0),u=J.useRef(!0),d=J.useRef(null),f=J.useRef(null),p=Z(()=>{u.current||(u.current=!0,o(e=>e+1))}),m=Z((e,t)=>{c.set(e,t),p()}),h=Z(e=>{c.delete(e),p()}),g=Z(e=>{let t=new Map;return n.current.length=0,r&&(r.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),n.current[e.index]=e.element,r&&(r.current[e.index]=e.registration.label===void 0?e.registration.textRef?.current?.textContent??e.element.textContent:e.registration.label)}),l.current=n.current.length,t});function _(e){if(f.current?.disconnect(),f.current=null,typeof MutationObserver!=`function`||e.length<2)return;let t=new MutationObserver(n=>{if(!wW(n))return;let r=null;for(let n of e)if(n.isConnected){if(r&&TW(r,n)>0){t.disconnect(),p();return}r=n}});f.current=t;let n=new Set;for(let t=1;t<e.length;t+=1){let r=CW(e[t-1],e[t]);r&&n.add(r)}n.forEach(e=>t.observe(e,{childList:!0}))}let v=Z(()=>{let[e,t]=SW(c),n=g(e),r=d.current,i=!r||r.length!==e.length||e.some((e,t)=>{let n=r[t];return e.index!==n.index||e.element!==n.element||e.registration.index!==n.registration.index||e.registration.metadata!==n.registration.metadata});_(t),d.current=e,u.current=!1,i&&(s.forEach(e=>e(n)),a(n))});Q(()=>(!u.current&&d.current&&g(d.current),()=>{n.current=[],r&&(r.current=[])}),[n,r,g]),Q(()=>{u.current&&v()}),Q(()=>()=>{f.current?.disconnect(),u.current=!0},[]);let y=Z(e=>(s.add(e),()=>{s.delete(e)})),b=J.useMemo(()=>({register:m,unregister:h,subscribeMapChange:y,nextIndexRef:l}),[m,h,y,l]);return(0,Y.jsx)(xz.Provider,{value:b,children:t})}function bW(){return new Map}function xW(){return new Set}function SW(e){let t=new Set,n=[],r=[];e.forEach((e,i)=>{if(!i.isConnected)return;let a=e.index,o={index:a??-1,element:i,registration:e};a===null?r.push(o):a>=0&&(t.add(a),n.push(o))});let i=0;return r.sort((e,t)=>TW(e.element,t.element)),r.forEach(e=>{for(;t.has(i);)i+=1;e.index=i,n.push(e),i+=1}),t.size>0&&n.sort((e,t)=>e.index-t.index),[n,r.map(e=>e.element)]}function CW(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function wW(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}function TW(e,t){return e.nextElementSibling===t?-1:t.nextElementSibling===e?1:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}var EW=J.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,Y.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})});function DW(e){let{store:t,domReference:n,positionerElement:r,open:i}=e,a=J.useRef(null),o=J.useRef(null),s=KI(r);Q(()=>{i||(o.current?.abort(),o.current=null,t.state.instantType===`trigger-change`&&t.set(`instantType`,void 0))},[i,t]),Q(()=>{let e=n,r=a.current;if(e&&(a.current=e),!r||!e||e===r||!t.select(`open`))return;t.set(`instantType`,void 0);let i=new AbortController;return o.current=i,s(()=>{t.select(`open`)&&t.set(`instantType`,`trigger-change`)},i.signal),()=>{i.abort()}},[n,s,t])}function OW(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),_I(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},BU(r),i],stateAttributesMapping:DR})}var kW={},AW={},jW=``;function MW(e,t){return ee(e)?e:t}function NW(e,t,n){return/hidden|clip/.test(e.getComputedStyle(MW(t,n)).overflowY)}function PW(e){if(typeof document>`u`)return!1;let t=aR(e);return se(t).innerWidth-t.documentElement.clientWidth>0}function FW(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=aR(e),n=t.documentElement,r=t.body,i=MW(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function IW(e){let t=aR(e),n=t.documentElement,r=t.body,i=MW(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function LW(e){let t=aR(e),n=t.documentElement,r=t.body,i=se(n),a=0,o=0,s=!1,c=RI.create();if(mz&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,kW={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},jW=n.style.scrollBehavior,AW={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=MW(n,r);s=FW(e),s?(n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`):(Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`)}function u(){Object.assign(n.style,kW),Object.assign(r.style,AW),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=jW)}function d(){u(),c.request(l)}l();let f=TB(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var RW=new class{lockCount=0;restore=null;timeoutLock=nL.create();timeoutUnlock=nL.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=aR(e),n=t.documentElement,r=t.body,i=se(n);if(NW(i,n,r)){let t=new i.MutationObserver(()=>{NW(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=lz||!PW(e);this.restore=a?IW(e):LW(e)}};function zW(e=!0,t=null){Q(()=>{if(e)return RW.acquire(t)},[e,t])}var BW=20;function VW(e,t,n,r){let[i,a]=J.useState(!1);Q(()=>{if(!e||!t||n==null){a(!1);return}let r=aR(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-BW)},[e,t,n]),zW(e&&(!t||i),r)}var HW=J.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o,align:s,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=OV,style:g,..._}=e,{store:v,virtualFocus:y,syncHighlightedItem:b}=mR(),x=ZU(),S=AR(!0),C=v.useState(`parent`),w=v.useState(`floatingRootContext`),T=v.useState(`floatingTreeRoot`),E=v.useState(`mounted`),D=v.useState(`open`),O=v.useState(`modal`),k=v.useState(`openMethod`),A=v.useState(`activeTriggerElement`),j=v.useState(`transitionStatus`),M=v.useState(`positionerElement`),N=v.useState(`instantType`),P=v.useState(`adaptiveOrigin`),F=v.useState(`lastOpenChangeReason`),I=v.useState(`floatingNodeId`),L=v.useState(`floatingParentNodeId`),R=w.useState(`domReferenceElement`),z=n,B=c,ee=l,te=s,ne=h;C.type===`context-menu`&&(z=n??C.context?.anchor,te??=`start`,!o&&te!==`center`&&(ee=e.alignOffset??2,B=e.sideOffset??-5));let re=o,ie=te;C.type===`menu`?(re??=`inline-end`,ie??=`start`,ne=e.collisionAvoidance??kV):C.type===`menubar`&&(re??=C.context.orientation===`vertical`?`inline-end`:`bottom`,ie??=`start`);let V=C.type===`context-menu`,ae=gW({anchor:z,floatingRootContext:w,positionMethod:S?`fixed`:r,mounted:E,side:re,sideOffset:B,align:ie,alignOffset:ee,arrowPadding:V?0:f,collisionBoundary:u,collisionPadding:d,sticky:p,nodeId:I,keepMounted:x,disableAnchorTracking:m,collisionAvoidance:ne,shift:V?{crossAxis:!(`side`in ne&&ne.side===`flip`),rootBoundary:`layoutViewport`}:void 0,externalTree:T,adaptiveOrigin:P,lazyFlip:y?`placement`:!1});J.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===I&&v.set(`hoverEnabled`,!1),e.nodeId!==I&&e.parentNodeId===v.select(`floatingParentNodeId`)&&v.setOpen(!1,Nz(UR)))}return T.events.on(`menuopenchange`,e),()=>{T.events.off(`menuopenchange`,e)}},[v,T.events,I]),J.useEffect(()=>{if(v.select(`floatingParentNodeId`)==null)return;function e(e){if(e.open||e.nodeId!==v.select(`floatingParentNodeId`))return;let t=e.reason??`sibling-open`;v.setOpen(!1,Nz(t))}return T.events.on(`menuopenchange`,e),()=>{T.events.off(`menuopenchange`,e)}},[T.events,v]);let oe=rL();J.useEffect(()=>{D||oe.clear()},[D,oe]),J.useEffect(()=>{function e(e){if(D&&e.nodeId===v.select(`floatingParentNodeId`)){if(e.target&&A&&A!==e.target){let e=v.select(`closeDelay`);e>0?oe.isStarted()||oe.start(e,()=>{v.setOpen(!1,Nz(UR))}):v.setOpen(!1,Nz(UR))}else oe.clear()}}return T.events.on(`itemhover`,e),()=>{T.events.off(`itemhover`,e)}},[T.events,D,A,v,oe]),J.useEffect(()=>{let e={open:D,nodeId:I,parentNodeId:L,reason:v.select(`lastOpenChangeReason`)};T.events.emit(`menuopenchange`,e)},[T.events,D,v,I,L]),DW({store:v,domReference:R,positionerElement:M,open:D});let se={open:D,side:ae.side,align:ae.align,anchorHidden:ae.anchorHidden,nested:C.type===`menu`,instant:N},ce=C.type===`menubar`&&C.context.modal;VW(D&&(ce||O&&F!==`trigger-hover`),k===`touch`,M,A);let le=OW(e,se,{styles:ae.positionerStyles,transitionStatus:j,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!E,inert:!D}),ue=E&&C.type!==`menu`&&(C.type!==`menubar`&&O&&F!==`trigger-hover`||C.type===`menubar`&&C.context.modal),de=null;return C.type===`menubar`?de=C.context.contentElement:C.type===void 0&&(de=A),(0,Y.jsxs)(dR.Provider,{value:ae,children:[ue&&(0,Y.jsx)(EW,{ref:C.type===`context-menu`||C.type===`nested-context-menu`?C.context.internalBackdropRef:null,inert:$U(!D),cutout:de}),(0,Y.jsx)(UV,{id:I,children:(0,Y.jsx)(yW,{elementsRef:v.context.itemDomElements,labelsRef:v.context.itemLabels,onMapChange:b,children:le})})]})}),UW=J.createContext(null);function WW(e){let t=J.useContext(UW);if(t===null&&!e)throw Error(TI(5));return t}function GW(e){let t=J.useRef(``),n=J.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:J.useCallback(n=>{n.detail===0?e(n,`keyboard`):(`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``)},[e]),onPointerDown:n}}function KW(e,t){let n=J.useRef(e),r=Z(t);Q(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}function qW(e,t){let{onClick:n,onPointerDown:r}=GW(Z((n,r)=>{(typeof e==`function`?e():e)||t(r||(lz?`touch`:``))}));return J.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function JW(e){let[t,n]=J.useState(null),r=qW(e,n);return KW(e,t=>{t&&!e&&n(null)}),J.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}function YW(e){return e==null?jR:e.type.startsWith(`key`)?BR:e.type.startsWith(`mouse`)||e.type.startsWith(`pointer`)?VR:jR}var XW={...QH,disabled:e=>e.parent.type===`menubar`&&e.parent.context.disabled||e.disabled,modal:e=>(e.parent.type===void 0||e.parent.type===`context-menu`)&&(e.modal??!0),openMethod:e=>e.openMethod,keyboardOpen:e=>e.keyboardOpen,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>e.parent.type===`menu`?e.parent.store.select(`rootId`):e.parent.type===void 0?e.rootId:e.parent.context.rootId,activeIndex:e=>e.activeIndex,listElement:e=>e.listElement,triggerControlsId:(e,t)=>{let n=QH.triggerPopupId(e,t);return n?e.listElement?.id||n:void 0},filterTriggerProps:e=>e.filterTriggerProps,inputProps:e=>e.inputProps,webkitAriaSelected:(e,t)=>mz&&e.inputFocused&&t?!0:void 0,highlightedItemId:e=>e.highlightedItem?.id||void 0,isActive:(e,t)=>e.activeIndex===t,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType===`trigger-change`&&!QH.open(e)?void 0:e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>e.parent.type===`menu`?e.parent.store.select(`floatingTreeRoot`):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type===`menu`)return e.parent.store.select(`keyboardEventRelay`)}},ZW=class extends UH{constructor(e,t,n=!1){let r=new CH,i=$W(r,t,n,e);super(i,QW(r),XW),this.observe(`parent`,e=>{e.type===`menu`?this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef:e.type!==void 0&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef)})}subscribeToParentMenu(){let e=this.state.parent;if(e.type!==`menu`)return;let t=e.store.select(`rootId`),n=e.store.select(`floatingTreeRoot`),r=e.store.select(`keyboardEventRelay`);return e.store.subscribe(()=>{let i=e.store.select(`rootId`),a=e.store.select(`floatingTreeRoot`),o=e.store.select(`keyboardEventRelay`);(t!==i||n!==a||r!==o)&&(t=i,n=a,r=o,this.notifyAll())})}setOpen(e,t){this.state.floatingRootContext.context.events.emit(`setOpen`,{open:e,eventDetails:t})}setActiveIndex(e,t,n){if(this.state.activeIndex!==e){let r=(e===null?void 0:this.context.itemDomElements.current[e])===this.context.reportedItem;this.context.highlightReason=r?`none`:t,this.context.highlightEvent=r?void 0:n}this.set(`activeIndex`,e)}highlightItem(e,t,n){let r=this.context.itemDomElements.current.indexOf(e);r>-1&&this.setActiveIndex(r,t,n)}};function QW(e){return{positionerRef:J.createRef(),popupRef:J.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},highlightReason:`none`,highlightEvent:void 0,reportedItem:void 0,allowMouseUpTriggerRef:{current:!1},virtualFocusRef:void 0,triggerFocusTargetRef:J.createRef(),beforeTriggerFocusGuardRef:J.createRef(),beforeContentFocusGuardRef:J.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function $W(e,t,n=!1,r){return{...KH(e,t,n),disabled:!1,modal:!0,openMethod:null,keyboardOpen:!1,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,listElement:null,filterTriggerProps:$F,inputProps:$F,inputFocused:!1,highlightedItem:void 0,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new LV,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:$F,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...r}}var eG=J.createContext(null);function tG(e,t){return(e===`trigger-press`||e===`item-press`)&&t?.detail===0}function nG(e,t){return e===`list-navigation`||tG(e,t)}var rG=MH(function(e){let{children:t,open:n,onOpenChange:r,onOpenChangeComplete:i,onItemHighlighted:a,defaultOpen:o=!1,disabled:s=!1,modal:c,loopFocus:l=!0,orientation:u=`vertical`,actionsRef:d,closeParentOnEsc:f=!1,handle:p,triggerId:m,defaultTriggerId:h=null,highlightItemOnHover:g=!0,isSubmenu:_=!1,virtualFocus:v=!1,virtualFocusRef:y,allowEscape:b=!0,resetOnPointerLeave:x=!0}=e,S=AR(!0),C=mR(!0),w=WW(!0),T=C?.store,E=C?.virtualFocus??!1,D=J.useMemo(()=>_&&T?{type:`menu`,store:T}:w?{type:`menubar`,context:w}:S&&!T?{type:`context-menu`,context:S}:{type:void 0},[S,T,w,_]),O=kz(),k=kz(),[A,j]=J.useState(void 0),M=(A??k)||void 0,N=BV(),P=D.type===`menu`?D.store:void 0,F=(n??o)&&P?.state.transitionStatus===`starting`,I=BF(()=>F?P?.state.instantType:void 0).current,L=BF(()=>{let e=new ZW({open:o,openProp:n,activeTriggerId:h,triggerIdProp:m,parent:D,disabled:s,highlightItemOnHover:g,modal:D.type===void 0?c:void 0,rootId:O,instantType:I},M,N!=null);return e.context.virtualFocusRef=y,e}).current;L.useControlledProp(`openProp`,n),L.useControlledProp(`triggerIdProp`,m),L.useContextCallback(`onOpenChangeComplete`,i);let R=L.useState(`floatingTreeRoot`),z=HV(R),B=L.useState(`open`),ee=L.useState(`activeTriggerElement`),te=L.useState(`positionerElement`),ne=L.useState(`hoverEnabled`),re=L.useState(`disabled`),ie=L.useState(`lastOpenChangeReason`),V=L.useState(`parent`),ae=L.useState(`activeIndex`),oe=L.useState(`keyboardOpen`),se=L.useState(`payload`),ce=L.useState(`floatingParentNodeId`),le=J.useRef(null),ue=J.useRef(V.type!==`context-menu`),de=rL(),fe=J.useRef(!0),pe=rL(),me=ce!=null,{openMethod:he,triggerProps:ge}=JW(B);L.useSyncedValues({disabled:s,highlightItemOnHover:g,modal:V.type===void 0?c:void 0,openMethod:he,rootId:O}),yH(L);let{forceUnmount:_e,transitionStatus:ve}=bH(B,L,()=>{L.set(`allowMouseEnter`,!1)},F),ye=KI(L.context.popupRef);J.useEffect(()=>{if(I===void 0)return;let e=()=>{L.state.instantType===I&&L.set(`instantType`,void 0)};if(!B){e();return}if(ve!==void 0)return;if(L.context.popupRef.current==null){e();return}let t=new AbortController;return ye(e,t.signal),()=>{t.abort()}},[I,B,ve,ye,L]),Q(()=>{S&&!C?L.update({parent:{type:`context-menu`,context:S},floatingNodeId:z,floatingParentNodeId:N}):(C||!L.select(`activeTriggerElement`))&&L.update({floatingNodeId:z,floatingParentNodeId:N})},[S,C,z,N,ee,L]),J.useEffect(()=>{B||(le.current=null),V.type===`context-menu`&&(B?de.start(500,()=>{ue.current=!0}):(de.clear(),ue.current=!1))},[de,B,V.type]),Q(()=>{!B&&!ne&&L.set(`hoverEnabled`,!0)},[B,ne,L]);let be=Z((e,t)=>{let n=t.reason;if(!e&&!L.select(`open`)||B===e&&t.trigger===ee&&ie===n)return;let i=gH(t);if(!e&&t.trigger==null&&(t.trigger=ee??void 0),r?.(e,t),t.isCanceled)return;L.state.floatingRootContext.dispatchOpenChange(e,t);let a=t.event;if(e===!1&&n!==`item-press`&&a?.type===`click`&&a.pointerType===`touch`&&!fe.current)return;e&&n===`trigger-focus`?(fe.current=!1,pe.start(300,()=>{fe.current=!0})):(fe.current=!0,pe.clear());let o=!e&&(n===`escape-key`||n==null);le.current=t.event;let s=hH(L.state,e,t.trigger,i());s.openChangeReason=n,s.keyboardOpen=e&&nG(n,a),s.instantType=V.type===`menubar`&&(n===`trigger-focus`||n===`focus-out`||n===`trigger-hover`||n===`list-navigation`||n===`sibling-open`)?`group`:tG(n,a)?`click`:o?`dismiss`:void 0,L.update(s)}),xe=sH({popupStore:L,floatingRootContext:L.state.floatingRootContext,floatingId:M,nested:N!=null,onOpenChange:be}),Se=xe.context.events;Q(()=>{let e=({open:e,eventDetails:t})=>be(e,t);return Se.on(`setOpen`,e),()=>{Se?.off(`setOpen`,e)}},[Se,be]),Q(()=>L.subscribeToParentMenu(),[L]);let Ce=J.useCallback(()=>{L.setOpen(!1,Nz(qR))},[L]);J.useImperativeHandle(d,()=>({unmount:_e,close:Ce}),[_e,Ce]);let we;V.type===`context-menu`&&(we=V.context),J.useImperativeHandle(we?.positionerRef,()=>te,[te]),J.useImperativeHandle(we?.actionsRef,()=>({setOpen:be}),[be]);let Te=oH(xe,{enabled:!re,bubbles:{escapeKey:f&&V.type===`menu`},outsidePress(){return V.type!==`context-menu`||le.current?.type===`contextmenu`||ue.current},externalTree:me?R:void 0}),H=nW(),Ee=_U(xe,{enabled:!re,listRef:L.context.itemDomElements,activeIndex:ae,virtual:v,nested:V.type===`menubar`||!v&&V.type!==void 0,parentOrientation:V.type===`menubar`?V.context.orientation:void 0,loopFocus:l,focusItemOnOpen:v?oe:void 0,allowEscape:v&&l&&b,orientation:u,triggerOrientation:v?`vertical`:u,rtl:H===`rtl`,disabledIndices:QF,onNavigate(e,t){L.setActiveIndex(e,YW(t),t?.nativeEvent)},openOnArrowKeyDown:V.type!==`context-menu`&&!(v&&_),externalTree:!v&&me?R:void 0,nestedReturnFocusRef:P?.context.virtualFocusRef,focusItemOnHover:g,resetOnPointerLeave:x}),De=J.useCallback(e=>{L.context.typingRef.current=e},[L]),Oe=vU(xe,{enabled:!re&&!v,listRef:L.context.itemLabels,elementsRef:L.context.itemDomElements,activeIndex:ae,resetMs:500,onMatch:(e,t)=>{B&&e!==ae&&L.setActiveIndex(e,BR,t.nativeEvent)},onTyping:De}),ke=Z(a),Ae=J.useRef(-1),je=Z(()=>{let e=L.state.activeIndex,t=e===null?void 0:L.context.itemDomElements.current[e]??void 0;if(t?.isConnected===!1)return;let n=t===void 0?-1:e;if(Ae.current===n&&L.context.reportedItem===t)return;Ae.current=n,L.context.reportedItem=t,v&&L.set(`highlightedItem`,t);let{highlightReason:r,highlightEvent:i}=L.context;L.context.highlightReason=jR,L.context.highlightEvent=void 0,a&&ke(t,Pz(r,i,{label:t===void 0?void 0:L.context.itemLabels.current[n]??void 0}))});Q(()=>{je()},[ae,je]);let Me=J.useMemo(()=>{if(!v)return Ee.reference;if(!Ee.trigger)return $F;let{onFocus:e,...t}=Ee.trigger;return t},[v,Ee.reference,Ee.trigger]);L.useSyncedValue(`inputProps`,v?Ee.reference??$F:$F);let Ne=J.useMemo(()=>{let e=iI(Oe.reference,Me,Te.reference,{onMouseMove(){L.set(`allowMouseEnter`,!0)}},ge);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=B,e},[L,Oe.reference,Me,Te.reference,ge,B]),Pe=J.useMemo(()=>{let e=iI(Ee.trigger,Te.trigger,ge);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=!1,e},[Ee.trigger,Te.trigger,ge]);BF(()=>(L.update({inactiveTriggerProps:Pe}),null)),xH(L,{floatingRootContext:xe,activeTriggerProps:Ne,inactiveTriggerProps:Pe,popupProps:J.useMemo(()=>iI(lH,{onMouseMove(){L.set(`allowMouseEnter`,!0),V.type===`menu`&&L.set(`hoverEnabled`,!1)},onClick(){L.select(`hoverEnabled`)&&L.set(`hoverEnabled`,!1)},onKeyDown(e){let t=L.select(`keyboardEventRelay`);t&&!e.isPropagationStopped()&&t(e)}},Oe.floating,Ee.floating,Te.floating),[V.type,L,Oe.floating,Ee.floating,Te.floating]),itemProps:Ee.item??$F});let Fe=J.useMemo(()=>({store:L,parent:D,orientation:u,loopFocus:l,allowEscape:b,defaultFloatingId:k,setRenderedFloatingId:j,virtualFocus:v,parentVirtualFocus:E,syncHighlightedItem:je}),[L,D,u,l,b,k,v,E,je]),Ie=typeof t==`function`?t({payload:se}):t,Le=(0,Y.jsxs)(pR.Provider,{value:Fe,children:[p&&(0,Y.jsx)(fH,{handle:p,store:L}),Ie]});return(V.type===void 0||V.type===`context-menu`)&&(Le=(0,Y.jsx)(WV,{externalTree:R,children:Le})),Le});function iG(e){let t=J.useContext(eG);if(t===null)return(0,Y.jsx)(rG,{...e});let n=t.Root;return(0,Y.jsx)(eG.Provider,{value:null,children:(0,Y.jsx)(n,{...t.options,...e})})}var aG={};function oG(e){mR();let t=J.useContext(eG);if(t!==null){let n=t.SubmenuRoot;return(0,Y.jsx)(eG.Provider,{value:null,children:(0,Y.jsx)(n,{...t.options,...e})})}return(0,Y.jsx)(VU.Provider,{value:aG,children:(0,Y.jsx)(rG,{...e,isSubmenu:!0})})}var sG=5;function cG(e,t){let n=lG(t);return e.clientX>=n.left-sG&&e.clientX<=n.right+sG&&e.clientY>=n.top-sG&&e.clientY<=n.bottom+sG}function lG(e){let t=e.getBoundingClientRect(),n=se(e);if(gz)return t;let r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(r.content===`none`&&i.content===`none`)return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}function uG(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=rR(),{ref:i,index:a}=Cz(e),o=n===a,s=J.useRef(null),c=VF(i,s);return{compositeProps:{tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}},compositeRef:c,index:a}}function dG(e){let{render:t,className:n,style:r,state:i=$F,props:a=QF,refs:o=QF,metadata:s,stateAttributesMapping:c,tag:l=`div`,...u}=e,{compositeProps:d,compositeRef:f}=uG({metadata:s});return _I(l,e,{state:i,ref:[f,...o],props:[d,...a,u],stateAttributesMapping:c})}function fG(e){if(ae(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`);if(!M(e))return fG(E(e))}function pG(e,t){function n(n,r,i){let a=n.currentTarget;Wd.flushSync(()=>{e.setOpen(!1,Nz(LR,n.nativeEvent,a))}),oV(a.isConnected?a:t.current,r,i)?.focus()}function r(t){n(t,-1,e.select(`positionerElement`))}function i(t){let r=e.select(`positionerElement`);r&&sV(t,r)?e.context.beforeContentFocusGuardRef.current?.focus():n(t,1,r)}return{handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}function mG(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,i=J.useRef(!1);return J.useMemo(()=>t?{onMouseDown:e=>{(n===`open`&&!r||n===`close`&&r)&&(i.current=!0,aR(e.currentTarget).addEventListener(`click`,()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:$F,[t,n,r])}var hG=NH(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,id:s,openOnHover:c,delay:l=100,closeDelay:u=0,handle:d,payload:f,...p}=e,m=mR(!0),h=$H(d)??m?.store;if(!h)throw Error(TI(85));let g=kz(s),_=h.useState(`isTriggerActive`,g),v=h.useState(`floatingRootContext`),y=h.useState(`isOpenedByTrigger`,g),b=h.useState(`triggerControlsId`,g),x=J.useRef(null),S=_G(),C=rR(!0),w=VV(),T=J.useMemo(()=>w??new LV,[w]),{registerTrigger:E,isMountedByThisTrigger:D}=vH(g,x,h,{payload:f,closeDelay:u,parent:S,floatingTreeRoot:T,floatingNodeId:HV(T),floatingParentNodeId:BV(),keyboardEventRelay:C?.relayKeyboardEvent}),O=S.type===`menubar`,k=h.useState(`disabled`),A=a||k||O&&S.context.disabled,{getButtonProps:j,buttonRef:M}=sR({disabled:A,native:o});J.useEffect(()=>{!y&&S.type===void 0&&(h.context.allowMouseUpTriggerRef.current=!1)},[h,y,S.type]);let N=J.useRef(null),P=rL(),F=Z(e=>{if(!N.current)return;P.clear(),h.context.allowMouseUpTriggerRef.current=!1;let t=e.target;Qz(N.current,t)||Qz(h.select(`positionerElement`),t)||t===N.current||t!=null&&fG(t)===h.select(`rootId`)||cG(e,N.current)||T.events.emit(`close`,{domEvent:e,reason:HR})});J.useEffect(()=>{let e=aR(N.current);if(y&&h.select(`lastOpenChangeReason`)===`trigger-hover`)return e.addEventListener(`mouseup`,F,{once:!0}),()=>{e.removeEventListener(`mouseup`,F)}},[y,F,h]);let I=O&&S.context.hasSubmenuOpen,L=uU(v,{enabled:(c??I)&&!A&&(!O||I&&!D),handleClose:EU({blockPointerEvents:!O}),mouseOnly:!0,move:!1,restMs:S.type===void 0?l:void 0,delay:{close:u},triggerElementRef:x,externalTree:T,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),R=gG(y,h.select(`lastOpenChangeReason`)),z=eH(v,{enabled:!A,event:y&&O?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:S.type===void 0&&R}),B=nU(v,{enabled:!A&&I}),ee=mG({open:y,enabled:O,mouseDownAction:`open`}),te=J.useMemo(()=>iI(B.reference,z.reference),[B.reference,z.reference]),ne=h.useState(`triggerProps`,D),re=h.useState(`filterTriggerProps`),{handlePreFocusGuardFocus:ie,handleFocusTargetFocus:V}=pG(h,x),ae={disabled:A,open:y},oe=[N,t,M,E,x],se=[te,L??$F,ne,{"aria-haspopup":`menu`,"aria-controls":b,id:g,onMouseDown:e=>{h.select(`open`)||(P.start(200,()=>{h.context.allowMouseUpTriggerRef.current=!0}),aR(e.currentTarget).addEventListener(`mouseup`,F,{once:!0}))}},re,O?{role:`menuitem`}:{},ee,p,j],ce=_I(`button`,e,{enabled:!O,stateAttributesMapping:ER,state:ae,ref:oe,props:se});return O?(0,Y.jsx)(dG,{tag:`button`,render:n,className:r,style:i,state:ae,refs:oe,props:se,stateAttributesMapping:ER}):y?(0,Y.jsxs)(J.Fragment,{children:[(0,Y.jsx)(MB,{ref:h.context.beforeTriggerFocusGuardRef,onFocus:ie},`${g}-pre-focus-guard`),(0,Y.jsx)(J.Fragment,{children:ce},g),(0,Y.jsx)(MB,{ref:h.context.triggerFocusTargetRef,onFocus:V},`${g}-post-focus-guard`)]}):(0,Y.jsx)(J.Fragment,{children:ce},g)});function gG(e,t){let n=rL(),[r,i]=J.useState(!1);return Q(()=>{e&&t===`trigger-hover`?(i(!0),n.start(500,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function _G(){let e=WW(!0);return J.useMemo(()=>e?{type:`menubar`,context:e}:{type:void 0},[e])}function vG(e){let[t,n]=J.useState({current:e,previous:null});return Object.is(e,t.current)||n({current:e,previous:t.current}),t.previous}var yG=J.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return _I(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})});function bG(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var xG={"aria-expanded":void 0},SG=J.forwardRef(function(e,t){let{render:n,className:r,style:i,label:a,id:o,nativeButton:s=!1,openOnHover:c=!0,delay:l=100,closeDelay:u=0,disabled:d=!1,...f}=e,p=mR(!0);if(p?.parent.type!==`menu`)throw Error(TI(37));let m=fR(),h=HU(),{store:g,parentVirtualFocus:_}=p,v=p.parent.store,y=Cz({guess:!0,label:a}),b=kz(o),x=g.useState(`open`),S=J.useRef(!1),C=g.useState(`positionerElement`),w=g.useState(`floatingRootContext`),T=g.useState(`floatingTreeRoot`),E=g.useState(`triggerPopupId`,b),D=mH(b,g),O=Z(e=>{D(e);let t=g.select(`activeTriggerElement`);e!==null&&g.select(`open`)&&(t===e||g.select(`activeTriggerId`)==null)&&g.update({activeTriggerId:b??null,activeTriggerElement:e,closeDelay:u})}),k=J.useRef(null),A=J.useCallback(e=>{k.current=e,g.set(`activeTriggerElement`,e)},[g]);Q(()=>(O(k.current),()=>O(null)),[O,b,g]),Q(()=>{if(!x||!C)return;function e(e){eB(e)===g.context.beforeContentFocusGuardRef.current&&(S.current=e.relatedTarget===k.current)}return C.addEventListener(`focusout`,e,!0),()=>{S.current=!1,C.removeEventListener(`focusout`,e,!0)}},[x,C,g]),g.useSyncedValue(`closeDelay`,u);let j=g.useState(`disabled`),M=v.useState(`disabled`),N=d||j||M,P=v.useState(`itemProps`),F=v.useState(`isActive`,y.index),I=J.useMemo(()=>({type:`submenu-trigger`,setActive(e){v.select(`highlightItemOnHover`)&&v.setActiveIndex(y.index,VR,e)}}),[v,y.index]),{getItemProps:L,itemRef:R}=bz({closeOnClick:!1,disabled:N,highlighted:F,id:b,store:g,typingRef:v.context.typingRef,nativeButton:s,itemMetadata:I,nodeId:m?.context.nodeId}),z=uU(w,{enabled:g.useState(`hoverEnabled`)&&c&&!N,handleClose:EU({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:l,delay:{open:l,close:u},shouldOpen:l>0?()=>v.select(`allowMouseEnter`):void 0,triggerElementRef:k,externalTree:T,isClosing:()=>g.select(`transitionStatus`)===`ending`,guardStaleOpen:!0}),B=eH(w,{enabled:!N,event:`mousedown`,toggle:!0,ignoreMouse:c,stickIfOpen:c}).reference??$F,ee=g.useState(`triggerProps`,!0);delete ee.id;let te={disabled:N,highlighted:F,open:x},ne=g.useState(`openMethod`),re=g.useState(`lastOpenChangeReason`)===`list-navigation`||ne===`keyboard`,ie=x&&re&&hz;return _I(`div`,e,{state:te,stateAttributesMapping:TR,props:[B,z,ee,h?.onTriggerKeyDown?{onKeyDown:h.onTriggerKeyDown}:void 0,P,ie?xG:void 0,{"aria-controls":E,tabIndex:_||!(x||F)?-1:0,onFocus(e){g.select(`open`)&&S.current&&(S.current=!1,g.setOpen(!1,Nz(LR,e.nativeEvent)))},onBlur(){F&&v.setActiveIndex(null,jR)}},f,L],ref:[t,y.ref,R,O,A]})}),CG=J.forwardRef(function(e,t){let n=ez(e,t,`submenu-trigger`);if(!n.visible)return null;let r=n.props?iI(n.props,e):e;return(0,Y.jsx)(SG,{...r,ref:n.ref})});function wG(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function TG(e){return typeof e==`object`&&!!e&&Array.isArray(e.items)}function EG(e){return TG(e?.[0])}function DG(e){return EG(e)?e.flatMap(e=>e.items):e}function OG(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(EG(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function kG(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return wG(e)}function AG(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?wG(e.value):wG(e)}function jG(e,t,n){function r(){return kG(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??r();if(Array.isArray(t)){let n=DG(t);if(typeof e!=`object`||!e){let t=n.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=n.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function MG(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,Y.jsx)(J.Fragment,{children:jG(r,t,n)},i)),e),[])}var NG=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),PG=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),FG=e=>{let t=PG(e);return t.charAt(0).toUpperCase()+t.slice(1)},IG=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),LG=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0},RG={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},zG=(0,J.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,J.createElement)(`svg`,{ref:c,...RG,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:IG(`lucide`,i),...!a&&!LG(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,J.createElement)(e,t)),...Array.isArray(a)?a:[a]])),BG=(e,t)=>{let n=(0,J.forwardRef)(({className:n,...r},i)=>(0,J.createElement)(zG,{ref:i,iconNode:t,className:IG(`lucide-${NG(FG(e))}`,`lucide-${e}`,n),...r}));return n.displayName=FG(e),n},VG=BG(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),HG=BG(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),UG=BG(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),WG=BG(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),GG=`data-valid`,KG=`data-invalid`,qG={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},JG={disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},YG={valid(e){return e===null?null:e?{[GG]:``}:{[KG]:``}}},XG={invalid:void 0,name:void 0,validityData:{state:qG,errors:[],error:``,value:``,initialValue:null},setValidityData:ZF,disabled:void 0,setTouched:ZF,setDirty:ZF,setFilled:ZF,setFocused:ZF,focusOwnerRef:{current:void 0},validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:JG,registerFieldControl:ZF,validation:{getValidationProps:(e,t=$F)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:ZF,getInputControl:()=>null,commit:async()=>{},change:ZF}},ZG=J.createContext(XG);function QG(e=!0){let t=J.useContext(ZG);if(t.setValidityData===ZF&&!e)throw Error(TI(28));return t}var $G=J.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:ZF,validationMode:`onSubmit`,submitCountRef:{current:0}});function eK(){return J.useContext($G)}var tK=J.createContext({controlId:void 0,registerControlId:ZF,resetControlId:ZF,labelId:void 0,setLabelId:ZF,messageIds:[],setMessageIds:ZF,getDescriptionProps:e=>e});function nK(){return J.useContext(tK)}function rK(e={}){let{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:i,resetControlId:a}=nK(),o=kz(),s=BF(()=>Symbol()),c=J.useRef(!1),l=J.useRef(!1),u=Z(()=>{c.current&&i!==ZF&&(c.current=!1,i(s.current,void 0))});return Q(()=>{if(!n||i===ZF){u();return}let e;if(t!==void 0)l.current=!0,e=t;else if(l.current)e=o;else{a();return}e===void 0?u():(c.current=!0,i(s.current,e))},[t,n,i,a,o,s,u]),Q(()=>u,[u]),(n?r:void 0)??t??o}function iK(e,t,n){let{setFocused:r,focusOwnerRef:i}=QG(),a=Z(t=>{(t?!e:i.current===a)&&(i.current=t&&a,n?.(t),r(t))});return Q(()=>{let e=t.current;return e?.getRootNode()?.activeElement===e&&a(!0),()=>a(!1)},[e,t,a]),a}function aK(e,t,n,r,i=!0,a){let{registerFieldControl:o}=QG(),s=BF(()=>Symbol());Q(()=>{let c=s.current;i?o(c,{controlRef:e,getValue:r,id:t,name:a,value:n}):o(c,void 0)},[e,i,r,t,a,o,s,n]),Q(()=>{let e=s.current;return()=>{o(e,void 0)}},[o,s])}var oK=J.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,style:d,...f}=e,{state:p,name:m,disabled:h,setTouched:g,setDirty:_,validityData:v,setFilled:y,validationMode:b,validation:x}=QG(),{clearErrors:S,elementRef:C,submitCountRef:w}=eK(),T=h||s,E=m??a,D={...p,disabled:T},{labelId:O}=nK(),k=rK({id:i}),A=o!==void 0,j=o==null?void 0:String(o),M=Z(()=>x.inputRef.current?.value);aK(x.inputRef,k,j,M,!T,a),Q(()=>{let e=j??x.inputRef.current?.value;e!==void 0&&y(e!==``)},[j,l,x.inputRef,y]),KW(j,()=>{j!==void 0&&(S(E),_(j!==(v.initialValue??``)),x.change(j))});let N=J.useRef(null),P=iK(T,N),F=rL();return _I(`input`,e,{ref:[t,N],state:D,props:[{id:k,disabled:T,name:E,ref:x.inputRef,"aria-labelledby":O,autoFocus:u,...A?{value:o}:{defaultValue:l},onChange(e){let t=e.currentTarget.value,n=Nz(jR,e.nativeEvent);c?.(t,n),!A&&(_(t!==(v.initialValue??``)),y(t!==``),!e.nativeEvent.defaultPrevented&&!n.isCanceled&&(S(E),x.change(t)))},onFocus(){P(!0)},onBlur(e){if(g(!0),P(!1),b===`onBlur`){let t=e.currentTarget.value;x.commit(t),A&&queueMicrotask(()=>{let e=x.inputRef.current?.value;e!==void 0&&e!==t&&e!==(v.initialValue??``)&&x.commit(e)})}},onKeyDown(e){if(e.currentTarget.tagName===`INPUT`&&e.key===`Enter`){g(!0);let t=e.currentTarget.value,n=e.currentTarget.form;if(n&&n===C.current&&!e.defaultPrevented){let t=e.currentTarget,n=w.current;F.start(0,()=>{w.current===n&&x.commit(t.value)})}else x.commit(t)}}},f,e=>x.getValidationProps(T,e)],stateAttributesMapping:YG})}),sK=J.forwardRef(function(e,t){return(0,Y.jsx)(oK,{ref:t,...e})}),cK=J.createContext(void 0);function lK(e){let t=J.useContext(cK);if(t===void 0&&!e)throw Error(TI(47));return t}var uK={...QH,disabled:e=>e.disabled,instantType:e=>e.instantType===`trigger-change`&&!QH.open(e)?void 0:e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,isPressOpenedByTrigger:(e,t)=>e.openChangeReason===`trigger-press`&&QH.isOpenedByTrigger(e,t),isTouchPressOpen:(e,t)=>t&&e.openMethod===`touch`&&e.openChangeReason===`trigger-press`,hasTriggerFocusGuards:(e,t)=>QH.isOpenedByTrigger(e,t)&&!e.focusManagerModal,modal:e=>e.modal,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},dK=class extends UH{constructor(e,t,n){let r=new CH;super(fK(e,r,t,n),pK(r),uK)}setOpen=(e,t)=>{let n=t.reason===NR,r=t.reason===`trigger-press`&&t.event.detail===0,i=!e&&(t.reason===`escape-key`||t.reason==null),a=gH(t),o=this.select(`activeTriggerId`);if(!e&&t.reason===`close-press`&&t.trigger==null&&o!=null&&(t.trigger=this.context.triggerElements.getById(o)??this.select(`activeTriggerElement`)??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let s=()=>{let n=hH(this.state,e,t.trigger,a());n.openChangeReason=t.reason,this.update(n)};n?(this.context.stickIfOpen=!0,this.context.stickIfOpenTimeout.start(500,()=>{this.context.stickIfOpen=!1}),Wd.flushSync(s)):s();let c;r?c=`click`:i?c=`dismiss`:t.reason===`focus-out`&&(c=`focus`),this.set(`instantType`,c)}};function fK(e,t,n,r=!1){let i={...KH(t,n,r),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return i.open&&e?.mounted===void 0&&(i.mounted=!0),i}function pK(e){return{popupRef:J.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:J.createRef(),beforeTriggerFocusGuardRef:J.createRef(),beforeContentFocusGuardRef:J.createRef(),stickIfOpenTimeout:new nL,stickIfOpen:!0,triggerElements:e}}var mK=MH(function({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,modal:o=!1,handle:s,triggerId:c,defaultTriggerId:l=null}=e,u=gK(s,{modal:o,open:r,openProp:n,activeTriggerId:l,triggerIdProp:c});u.useControlledProp(`openProp`,n),u.useControlledProp(`triggerIdProp`,c);let d=u.useState(`open`),f=u.useState(`mounted`),p=u.useState(`payload`);u.useContextCallback(`onOpenChange`,i),u.useContextCallback(`onOpenChangeComplete`,a),SH(u,d),yH(u);let{forceUnmount:m}=bH(d,u,()=>{u.context.stickIfOpen=!0,u.set(`openChangeReason`,null)});u.useSyncedValues({modal:o}),J.useEffect(()=>{d||u.context.stickIfOpenTimeout.clear()},[u,d]),J.useImperativeHandle(e.actionsRef,()=>({unmount:m,close:()=>u.setOpen(!1,Nz(qR))}),[m,u]);let h=d||f||s!=null;return(0,Y.jsxs)(cK.Provider,{value:u,children:[s&&(0,Y.jsx)(fH,{handle:s,store:u}),h&&(0,Y.jsx)(_K,{store:u,modal:o}),typeof t==`function`?t({payload:p}):t]})});function hK(e){return lK(!0)?(0,Y.jsx)(mK,{props:e}):(0,Y.jsx)(WV,{children:(0,Y.jsx)(mK,{props:e})})}function gK(e,t){let n=dH((e,n)=>new dK(t,e,n));return J.useEffect(()=>n.context.stickIfOpenTimeout.disposeEffect(),[n]),n}function _K({store:e,modal:t}){let n=oH(e.useState(`floatingRootContext`),{outsidePressEvent:{mouse:t===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),r=n.reference,i=n.floating;return xH(e,{activeTriggerProps:r,inactiveTriggerProps:r,popupProps:i}),null}var vK=NH(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,handle:s,payload:c,openOnHover:l=!1,delay:u=300,closeDelay:d=0,id:f,...p}=e,m=lK(!0),h=$H(s)??m;if(!h)throw Error(TI(74));let g=kz(f),_=h.useState(`isTriggerActive`,g),v=h.useState(`floatingRootContext`),y=h.useState(`isOpenedByTrigger`,g),b=h.useState(`triggerPopupId`,g),x=J.useRef(null),{registerTrigger:S,isMountedByThisTrigger:C}=vH(g,x,h,{payload:c,disabled:a,openOnHover:l,closeDelay:d}),w=h.useState(`isPressOpenedByTrigger`,g),T=h.useState(`isTouchPressOpen`,l),E=h.useState(`hasTriggerFocusGuards`,g),D=uU(v,{enabled:!a&&l&&!T,mouseOnly:!0,move:!1,handleClose:EU(),restMs:u,delay:{close:d},triggerElementRef:x,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),O=eH(v,{stickIfOpen:Z(()=>h.context.stickIfOpen)}),k=qW(()=>h.select(`open`),e=>{h.set(`openMethod`,e)}),A=h.useState(`triggerProps`,C),{getButtonProps:j,buttonRef:M}=sR({disabled:a,native:o}),N={open(e){return w?ER.open(e):TR.open(e)}},{handlePreFocusGuardFocus:P,handleFocusTargetFocus:F}=pG(h,x),I=_I(`button`,e,{state:{disabled:a,open:y},ref:[M,t,S,x],props:[O.reference,D,A,k,{[DV]:``,id:g,"aria-haspopup":`dialog`,"aria-expanded":y,"aria-controls":b},p,j],stateAttributesMapping:N}),L=(0,Y.jsx)(J.Fragment,{children:I},g);return E?(0,Y.jsxs)(J.Fragment,{children:[(0,Y.jsx)(MB,{ref:h.context.beforeTriggerFocusGuardRef,onFocus:P}),L,(0,Y.jsx)(MB,{ref:h.context.triggerFocusTargetRef,onFocus:F})]}):L}),yK=J.createContext(void 0);function bK(){let e=J.useContext(yK);if(e===void 0)throw Error(TI(45));return e}var xK=J.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return lK().useState(`mounted`)||n?(0,Y.jsx)(yK.Provider,{value:n,children:(0,Y.jsx)(FV,{ref:t,...r})}):null}),SK=J.createContext(void 0);function CK(){let e=J.useContext(SK);if(!e)throw Error(TI(46));return e}var wK=J.forwardRef(function(e,t){let{render:n,className:r,style:i,anchor:a,positionMethod:o,side:s,align:c,sideOffset:l,alignOffset:u,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f,arrowPadding:p,sticky:m,disableAnchorTracking:h=!1,collisionAvoidance:g=kV,..._}=e,v=lK(),y=bK(),b=HV(),x=v.useState(`floatingRootContext`),S=v.useState(`mounted`),C=v.useState(`open`),w=v.useState(`openChangeReason`),T=v.useState(`activeTriggerElement`),E=v.useState(`modal`),D=v.useState(`openMethod`),O=v.useState(`positionerElement`),k=v.useState(`instantType`),A=v.useState(`transitionStatus`),j=gW({anchor:a,floatingRootContext:x,positionMethod:o,mounted:S,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:m,disableAnchorTracking:h,keepMounted:y,nodeId:b,collisionAvoidance:g,adaptiveOrigin:v.useState(`adaptiveOrigin`)});DW({store:v,domReference:x.useState(`domReferenceElement`),positionerElement:O,open:C});let M=E===!0&&w!==`trigger-hover`;VW(C&&M,D===`touch`,O,T);let N=v.useStateSetter(`positionerElement`),P=OW(e,{open:C,side:j.side,align:j.align,anchorHidden:j.anchorHidden,instant:k},{styles:j.positionerStyles,transitionStatus:A,props:_,refs:[t,N],hidden:!S,inert:!C});return(0,Y.jsxs)(SK.Provider,{value:j,children:[S&&M&&(0,Y.jsx)(EW,{inert:$U(!C),cutout:T}),(0,Y.jsx)(UV,{id:b,children:P})]})}),TK=J.createContext(void 0);function EK(){let[e,t]=J.useState(0),n=Z(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:J.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}var DK=J.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=lK(),l=CK(),u=OU(!0)!=null,{context:d,hasClosePart:f}=EK(),p=c.useState(`open`),m=c.useState(`openMethod`),h=c.useState(`instantType`),g=c.useState(`transitionStatus`),_=c.useState(`popupProps`),v=c.useState(`titleElementId`),y=c.useState(`descriptionElementId`),b=c.useState(`modal`),x=c.useState(`mounted`),S=c.useState(`openChangeReason`),C=c.useState(`activeTriggerElement`),w=c.useState(`floatingRootContext`),T=w.useState(`floatingId`),E=c.useState(`disabled`),D=c.useState(`openOnHover`),O=c.useState(`closeDelay`);qI({open:p,ref:c.context.popupRef,onComplete(){p&&c.context.onOpenChangeComplete?.(!0)}}),cU(w,{enabled:D&&!E,closeDelay:O});let k=a===void 0?uH(c.context.popupRef):a,A=b!==!1&&f;c.useSyncedValue(`focusManagerModal`,A);let j=c.useStateSetter(`popupElement`),M=_I(`div`,e,{state:{open:p,side:l.side,align:l.align,instant:h,transitionStatus:g},ref:[t,c.context.popupRef,j],props:[_,{id:T,role:`dialog`,...lH,"aria-labelledby":v,"aria-describedby":y,onKeyDown(e){u&&NU.has(e.key)&&e.stopPropagation()}},BU(g),s],stateAttributesMapping:OR});return(0,Y.jsx)($V,{context:w,openInteractionType:m,modal:A,disabled:!x||S===`trigger-hover`,initialFocus:k,returnFocus:o,restoreFocus:`popup`,getInsideElements:()=>[c.context.beforeTriggerFocusGuardRef.current],previousFocusableElement:ae(C)?C:void 0,nextFocusableElement:c.context.triggerFocusTargetRef,beforeContentFocusGuardRef:c.context.beforeContentFocusGuardRef,children:(0,Y.jsx)(TK.Provider,{value:d,children:M})})});function OK(e){let t=J.useRef(!0);t.current&&(t.current=!1,e())}var kK=J.createContext(void 0),AK=J.createContext(void 0);function jK(){let e=J.useContext(kK);if(e===void 0)throw Error(TI(60));return e}function MK(){let e=J.useContext(AK);if(e===void 0)throw Error(TI(61));return e}function NK(e,t,n=Object.is){let{length:r}=e;if(r!==t.length)return!1;for(let i=0;i<r;i+=1)if(!n(e[i],t[i]))return!1;return!0}var PK=(e,t)=>Object.is(e,t);function FK(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function IK(e,t,n){return Array.isArray(e)&&Array.isArray(t)?!NK(e,t,(e,t)=>FK(e,t,n)):e!==t}function LK(e,t,n){return e?e.some(e=>e!==void 0&&FK(t,e,n)):!1}function RK(e,t,n){return e?e.findIndex(e=>e!==void 0&&FK(e,t,n)):-1}function zK(e,t){if(t!==PK)return n=>LK(e,n,t);let n=new Set(e);return n.delete(void 0),t=>n.has(t)&&(t!==0||e.some(e=>Object.is(t,e)))}function BK(e,t,n,r){let i=r&&Array.isArray(t)?e.findIndex(zK(t,n)):RK(e,t,n);return i===-1?null:i}function VK(e,t,n,r,i,a){return LK(r,t,i)?a!=null&&e>a&&LK(r,n[a],i)?a:e:e===a?BK(n,r,i,!0):a}function HK(e,t,n){return e.filter(e=>!FK(t,e,n))}var UK={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,multiple:e=>e.multiple,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,highlightItemOnHover:e=>e.highlightItemOnHover,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:AG(t,r)!==``},hasNullItemLabel:(e,t)=>t?OG(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(e=>FK(t,e,n)):FK(t,r,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,itemRoot:e=>e.itemRoot,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function WK(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}function GK(e,t){return Math.max(0,e-t)}function KK(e,t){if(t<=0)return 0;let n=WK(e,0,t),r=n,i=t-n,a=r<=1,o=i<=1;return a&&o?r<=i?0:t:a?0:o?t:n}function qK(e){let{id:t,value:n,defaultValue:r=null,onValueChange:i,open:a,defaultOpen:o=!1,onOpenChange:s,name:c,form:l,autoComplete:u,disabled:d=!1,readOnly:f=!1,required:p=!1,modal:m=!0,actionsRef:h,inputRef:g,onOpenChangeComplete:_,items:v,multiple:y=!1,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S=PK,highlightItemOnHover:C=!0,children:w}=e,{clearErrors:T}=eK(),{setDirty:E,setTouched:D,setFocused:O,validityData:k,setFilled:A,name:j,disabled:M,validation:N,validationMode:P}=QG(),F=rK({id:t}),I=M||d,L=j??c,[R,z]=YR({controlled:n,default:y?r??QF:r,name:`Select`,state:`value`}),[B,ee]=YR({controlled:a,default:o,name:`Select`,state:`open`}),te=J.useRef([]),ne=J.useRef([]),re=J.useRef(null),ie=J.useRef(null),V=J.useRef(0),ae=J.useRef(null),oe=J.useRef([]),se=J.useRef(!1),ce=J.useRef(null),le=J.useRef(null),ue=J.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),de=J.useRef(!1),fe=J.useRef(R),{openMethod:pe,triggerProps:me}=JW(B),he=BF(()=>new UH({id:F,labelId:void 0,modal:m,multiple:y,disabled:I,readOnly:f,required:p,highlightItemOnHover:C,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S,value:R,open:B,mounted:B,transitionStatus:void 0,items:v,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:$F,triggerProps:$F,itemRoot:{props:$F,multiple:y,disabled:I,readOnly:f,isItemEqualToValue:S},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:ZF,setOpen:ZF,handleScrollArrowVisibility:ZF,onOpenChangeComplete:ZF,listRef:te,popupRef:re,scrollHandlerRef:ie,scrollArrowsMountedCountRef:V,valueRef:ae,valuesRef:oe,labelsRef:ne,typingRef:se,selectionRef:ue,firstItemTextRef:ce,selectedItemTextRef:le,alignItemWithTriggerActiveRef:de,initialValueRef:fe},UK)).current,[ge,_e]=J.useState(!1),{mounted:ve,transitionStatus:ye,forceUnmount:be}=cH({open:B,ref:re,preventUnmountOnClose:ge,setPreventUnmountOnClose:_e,onUnmount(){he.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),_?.(!1)}}),xe=he.useState(`activeIndex`),Se=he.useState(`selectedIndex`),Ce=he.useState(`triggerElement`),we=he.useState(`positionerElement`),Te=vG(pe),H=pe??Te,Ee=J.useMemo(()=>y?``:AG(R,x),[y,R,x]),De=J.useMemo(()=>y&&Array.isArray(R)?R.map(e=>AG(e,x)):AG(R,x),[y,R,x]);aK(DB(Ce),F,R,Z(()=>De),!I,c);let Oe=y?Array.isArray(R)&&R.length>0:R!=null&&Ee!==``;Q(()=>{A(Oe)},[Oe,A]),Q(function(){let e=BK(oe.current,R,S,y);e===null&&(le.current=null),!B&&he.set(`selectedIndex`,e)},[y,B,R,S,he]),KW(R,()=>{T(L),E(IK(R,k.initialValue,S)),N.change(R)});let ke=Z((e,t)=>{let n=t,r=gH(n);s?.(e,n),!t.isCanceled&&(e||_e(r()),ee(e),e||t.reason!==`focus-out`&&t.reason!==`outside-press`||(D(!0),O(!1),P===`onBlur`&&N.commit(R)))});J.useImperativeHandle(h,()=>({unmount:be,close:()=>{he.state.open&&ke(!1,Nz(qR))}}),[be,ke,he]);let Ae=Z((e,t)=>{i?.(e,t),!t.isCanceled&&z(e)}),je=Z(e=>{let t=GK(e.scrollHeight,e.clientHeight),n=KK(e.scrollTop,t),r=n>0,i=n<t;he.set(`scrollUpArrowVisible`,r),he.set(`scrollDownArrowVisible`,i)}),Me=eU({open:B,onOpenChange:ke,elements:{reference:Ce,floating:we}}),Ne=eH(Me,{enabled:!I,event:`mousedown`}),Pe=oH(Me),Fe=_U(Me,{enabled:!I,listRef:te,activeIndex:xe,selectedIndex:Se,disabledIndices:QF,onNavigate(e){(e!==null||B)&&he.set(`activeIndex`,e)},focusItemOnHover:C}),Ie=vU(Me,{enabled:!I&&(B||!f&&!y),listRef:ne,activeIndex:xe,selectedIndex:Se,disabledIndices:e=>bG(te.current[e]),onMatch(e){B?he.set(`activeIndex`,e):Ae(oe.current[e],Nz(jR))},onTyping(e){se.current=e}}),Le=J.useMemo(()=>iI(Ie.reference,Fe.reference,Pe.reference,Ne.reference,me),[Ne.reference,Ie.reference,Fe.reference,Pe.reference,me]),Re=J.useMemo(()=>iI(lH,Ie.floating,Fe.floating,Pe.floating),[Ie.floating,Fe.floating,Pe.floating]),ze=Fe.item??$F,U=J.useMemo(()=>({props:ze,multiple:y,disabled:I,readOnly:f,isItemEqualToValue:S}),[ze,y,I,f,S]);he.useContextCallback(`setValue`,Ae),he.useContextCallback(`setOpen`,ke),he.useContextCallback(`handleScrollArrowVisibility`,je),he.useContextCallback(`onOpenChangeComplete`,_),OK(()=>{he.update({popupProps:Re,triggerProps:Le,itemRoot:U})}),he.useSyncedValues({id:F,modal:m,multiple:y,disabled:I,readOnly:f,required:p,highlightItemOnHover:C,value:R,open:B,mounted:ve,transitionStatus:ye,popupProps:Re,triggerProps:Le,itemRoot:U,items:v,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S,openMethod:H});let Be=VF(g,N.inputRef),Ve=y?void 0:L,He=J.useMemo(()=>!y||!Array.isArray(R)||!L?null:R.map(e=>{let t=AG(e,x);return(0,Y.jsx)(`input`,{type:`hidden`,form:l,name:L,value:t,disabled:I},t)}),[y,R,l,L,x,I]);return(0,Y.jsxs)(kK.Provider,{value:he,children:[(0,Y.jsx)(AK.Provider,{value:Me,children:w}),(0,Y.jsx)(`input`,{...N.getValidationProps(I,{onFocus(){he.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||I||f)return;let t=e.currentTarget.value,n=Nz(jR,e.nativeEvent);function r(){if(y)return;let e=t.toLowerCase(),r=oe.current.findIndex(t=>AG(t,x).toLowerCase()===e||kG(t,b).toLowerCase()===e);r===-1&&(r=oe.current.findIndex((t,n)=>{let r=ne.current[n];return r!=null&&r.toLowerCase()===e}));let i=oe.current[r];i!=null&&Ae(i,n)}he.set(`forceMount`,!0),queueMicrotask(r)}}),id:F&&Ve==null?`${F}-hidden-input`:void 0,form:l,name:Ve,autoComplete:u,value:Ee,disabled:I,required:p&&!(y&&Oe),readOnly:f,ref:Be,style:L?jB:AB,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),He]})}function JK(e,t){return e??t}var YK=`data-popup-side`,XK=400,ZK={...ER,...YG,popupSide:e=>e?{[YK]:e}:null,value:()=>null},QK=J.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{setTouched:l,validationMode:u,validation:d,state:f,disabled:p}=QG(),{labelId:m}=nK(),h=jK(),g=h.useState(`readOnly`),_=h.useState(`required`),v=h.useState(`disabled`),y=p||v||a,b=h.useState(`open`),x=h.useState(`mounted`),S=h.useState(`value`),C=h.useState(`triggerProps`),w=h.useState(`positionerElement`),T=h.useState(`listElement`),E=h.useState(`popupSide`),D=h.useState(`id`),O=h.useState(`labelId`),k=h.useState(`hasSelectedValue`),A=x&&w?E:null,j=i??D,M=JK(m,O);rK({id:i});let N=DB(w),P=J.useRef(null),F=iK(y,P),{getButtonProps:I,buttonRef:L}=sR({disabled:y,native:o}),R=h.useStateSetter(`triggerElement`),z=rL(),B=rL(),ee=rL();J.useEffect(()=>{if(b)return ee.start(XK,()=>{h.context.selectionRef.current.allowUnselectedMouseUp=!0,h.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{ee.clear()};h.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},B.clear()},[b,h,B,ee]);let te=iI(C,{id:j,role:`combobox`,"aria-expanded":b,"aria-haspopup":`listbox`,"aria-controls":b?T?.id??hB(w)?.id:void 0,"aria-labelledby":M,"aria-readonly":g||void 0,"aria-required":_||void 0,tabIndex:y?-1:0,onFocus(e){F(!0),b&&h.context.alignItemWithTriggerActiveRef.current&&h.context.setOpen(!1,Nz(jR,e.nativeEvent)),z.start(0,()=>{h.set(`forceMount`,!0)})},onBlur(e){Qz(w,e.relatedTarget)||(l(!0),F(!1),u===`onBlur`&&d.commit(S))},onMouseDown(e){if(b)return;let t=aR(e.currentTarget);function n(e){if(!P.current)return;let t=e.target;Qz(P.current,t)||Qz(N.current,t)||cG(e,P.current)||h.context.setOpen(!1,Nz(HR,e))}B.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},c,I),ne=d.getValidationProps(y,te);ne.role=`combobox`;let re={...f,open:b,disabled:y,value:S,readOnly:g,popupSide:A,placeholder:!k};return _I(`button`,e,{ref:[t,P,L,R],state:re,stateAttributesMapping:ZK,props:ne})}),$K={value:()=>null},eq=J.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,c=jK(),l=c.useState(`value`),u=c.useState(`items`),d=c.useState(`itemToStringLabel`),f=c.useState(`hasSelectedValue`),p=!f&&a!=null&&i==null,m=c.useState(`hasNullItemLabel`,p),h={value:l,placeholder:!f},g=null;return g=typeof i==`function`?i(l):i??(p&&!m?a:Array.isArray(l)?MG(l,u,d):jG(l,u,d)),_I(`span`,e,{state:h,ref:[t,c.context.valueRef],props:[{children:g},s],stateAttributesMapping:$K})}),tq=J.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return _I(`span`,e,{state:{open:jK().useState(`open`)},ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:TR})}),nq=J.forwardRef(function(e,t){let n=jK(),r=n.useState(`mounted`),i=n.useState(`forceMount`);return r||i?(0,Y.jsx)(FV,{ref:t,...e}):null}),rq=J.createContext(void 0);function iq(){let e=J.useContext(rq);if(!e)throw Error(TI(59));return e}function aq(e,t){e&&Object.assign(e.style,t)}var oq={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},sq={position:`fixed`},cq=J.forwardRef(function(e,t){let{anchor:n,className:r,render:i,positionMethod:a,side:o,align:s,sideOffset:c,alignOffset:l,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f,sticky:p,disableAnchorTracking:m,alignItemWithTrigger:h=!0,collisionAvoidance:g=OV,style:_,...v}=e,y=jK(),b=MK(),x=y.useState(`open`),S=y.useState(`mounted`),C=y.useState(`modal`),w=y.useState(`value`),T=y.useState(`openMethod`),E=y.useState(`positionerElement`),D=y.useState(`triggerElement`),O=y.useState(`isItemEqualToValue`),k=y.useState(`transitionStatus`),A=J.useRef(null),j=J.useRef(null),[M,N]=J.useState(h),P=S&&M&&T!==`touch`;!S&&M!==h&&N(h),J.useImperativeHandle(y.context.alignItemWithTriggerActiveRef,()=>P),VW((P||C)&&x,T===`touch`,E,D);let F=gW({anchor:n,floatingRootContext:b,positionMethod:a,mounted:S,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m??P,collisionAvoidance:g,keepMounted:!0}),I=P?`none`:F.side,L=P?sq:F.positionerStyles,R={open:x,side:I,align:F.align,anchorHidden:F.anchorHidden};Q(()=>{y.set(`popupSide`,F.side)},[y,F.side]);let z=OW(e,R,{styles:L,transitionStatus:k,props:v,refs:[t,y.useStateSetter(`positionerElement`)],hidden:!S,inert:!x}),B=J.useRef(0),ee=Z(e=>{if(y.context.valuesRef.current.length===0)return;let t=B.current;B.current=e.size;let n=Nz(jR);if(t!==0&&!y.state.multiple&&w!==null&&RK(y.context.valuesRef.current,w,O)===-1){let e=y.context.initialValueRef.current,t=e!=null&&RK(y.context.valuesRef.current,e,O)!==-1?e:null;y.context.setValue(t,n),t===null&&(y.set(`selectedIndex`,null),y.context.selectedItemTextRef.current=null)}if(t!==0&&y.state.multiple&&Array.isArray(w)){let e=w.filter(e=>RK(y.context.valuesRef.current,e,O)!==-1);e.length!==w.length&&(y.context.setValue(e,n),e.length===0&&(y.set(`selectedIndex`,null),y.context.selectedItemTextRef.current=null))}if(x&&P){y.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};aq(E,e),aq(y.context.popupRef.current,e)}}),te=J.useMemo(()=>({...F,side:I,alignItemWithTriggerActive:P,setControlledAlignItemWithTrigger:N,scrollUpArrowRef:A,scrollDownArrowRef:j}),[F,I,P,N]);return(0,Y.jsx)(yW,{elementsRef:y.context.listRef,labelsRef:y.context.labelsRef,onMapChange:ee,children:(0,Y.jsxs)(rq.Provider,{value:te,children:[S&&C&&(0,Y.jsx)(EW,{inert:$U(!x),cutout:D}),z]})})}),lq=`base-ui-disable-scrollbar`,uq={className:lq,getElement(e){return(0,Y.jsx)(`style`,{nonce:e,href:lq,precedence:`base-ui:low`,children:`.${lq}{scrollbar-width:none}.${lq}::-webkit-scrollbar{display:none}`})}},dq=J.createContext(void 0),fq={disableStyleElements:!1};function pq(){return J.useContext(dq)??fq}var mq=`--transform-origin`,hq={...DR,...XI},gq=J.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,s=jK(),c=s.useState(`multiple`),l=s.useState(`readOnly`),u=s.useState(`highlightItemOnHover`),d=MK(),{side:f,align:p,alignItemWithTriggerActive:m,isPositioned:h,setControlledAlignItemWithTrigger:g}=iq(),_=OU(!0)!=null,v=nW(),{nonce:y,disableStyleElements:b}=pq(),x=s.useState(`id`),S=s.useState(`open`),C=s.useState(`openMethod`),w=s.useState(`mounted`),T=s.useState(`popupProps`),E=s.useState(`transitionStatus`),D=s.useState(`triggerElement`),O=s.useState(`positionerElement`),k=s.useState(`listElement`),A=J.useRef(!1),j=J.useRef(!1),M=J.useRef({}),N=zI(),P=Z(e=>{if(!O||!s.context.popupRef.current||!j.current)return;let t=O.style.top===`0px`,n=O.style.bottom===`0px`;if(A.current||!m||!t&&!n){s.context.handleScrollArrowVisibility(e);return}let r=yq(O),i=bq(O.getBoundingClientRect().height,`y`,r),a=aR(O),o=se(O),c=o.getComputedStyle(O),l=parseFloat(c.marginTop),u=parseFloat(c.marginBottom),d=_q(o.getComputedStyle(s.context.popupRef.current)),f=Math.min(a.documentElement.clientHeight-l-u,d),p=e.scrollTop,h=vq(e),g=null,_=e=>{O.style.height=`${e}px`},v=t?h-p:p,y=Math.min(i+v,f);if(v<=1){let n=WK(v,0,f-i);n>0&&_(i+n),e.scrollTop=t?h:0,f-(i+n)<=1&&(A.current=!0),s.context.handleScrollArrowVisibility(e);return}f-y>1?g=t?1/0:0:n&&p<h&&(g=p-(v-(i+v-f)));let b=Math.ceil(y);if(b!==0&&_(b),g!=null){let t=WK(g,0,vq(e));Math.abs(e.scrollTop-t)>1&&(e.scrollTop=t)}b>=f-1&&(A.current=!0),s.context.handleScrollArrowVisibility(e)});J.useImperativeHandle(s.context.scrollHandlerRef,()=>P,[P]),qI({open:S,ref:s.context.popupRef,onComplete(){S&&s.context.onOpenChangeComplete(!0)}});let F={open:S,transitionStatus:E,side:f,align:p};Q(()=>{O&&s.context.popupRef.current&&!Object.keys(M.current).length&&(M.current={top:O.style.top||`0`,left:O.style.left||`0`,right:O.style.right,height:O.style.height,bottom:O.style.bottom,minHeight:O.style.minHeight,maxHeight:O.style.maxHeight,marginTop:O.style.marginTop,marginBottom:O.style.marginBottom})},[s,O]),Q(()=>{S||m||(j.current=!1,A.current=!1,aq(O,M.current))},[S,m,O]),Q(()=>{let e=s.context.popupRef.current;if(!S||!D||!O||!e||m&&!h||s.state.transitionStatus===`ending`)return;if(j.current=!0,e.style.removeProperty(mq),!m){N.request(()=>s.context.handleScrollArrowVisibility(k||e));return}let t=Cq(e);try{let t=s.context.selectedItemTextRef.current;t?.isConnected||(t=!s.select(`hasSelectedValue`)&&s.context.firstItemTextRef.current?.isConnected?s.context.firstItemTextRef.current:null);let n=s.context.valueRef.current,r=se(O),i=r.getComputedStyle(O),a=r.getComputedStyle(e),o=aR(D),c=yq(D),l=xq(D.getBoundingClientRect(),c),d=xq(O.getBoundingClientRect(),c),f=l.height,p=k||e,m=p.scrollHeight,h=parseFloat(a.borderBottomWidth),_=parseFloat(i.marginTop)||10,y=parseFloat(i.marginBottom)||10,b=parseFloat(i.minHeight)||100,x=_q(a),S=o.documentElement.clientHeight-_-y,C=o.documentElement.clientWidth,w=S-l.bottom+f,T,E=v===`rtl`?l.right-d.width:l.left,j=0;if(t&&n){let e=xq(n.getBoundingClientRect(),c);T=xq(t.getBoundingClientRect(),c),E=d.left+(v===`rtl`?e.right-T.right:e.left-T.left);let r=e.top-l.top+e.height/2;j=T.top-d.top+T.height/2-r}let N=w+j+y+h,P=Math.min(S,N),F=S-_-y,I=N-P,L=C-5;O.style.left=`${WK(E,5,L-d.width)}px`,O.style.height=`${P}px`,O.style.maxHeight=`none`,O.style.marginTop=`${_}px`,O.style.marginBottom=`${y}px`,e.style.height=`100%`;let R=vq(p),z=I>=R-1;z&&(P=Math.min(S,d.height)-(I-R));let B=l.top<20||l.bottom>S-20||Math.ceil(P)+1<Math.min(m,b),ee=(r.visualViewport?.scale??1)!==1&&mz;if(B||ee){aq(O,M.current),g(!1);return}let te=Math.max(b,P);if(z){let e=Math.max(0,S-N);O.style.top=d.height>=F?`0`:`${e}px`,O.style.height=`${P}px`,p.scrollTop=vq(p)}else O.style.bottom=`0`,p.scrollTop=I;if(T){let t=d.top,n=d.height,r=T.top+T.height/2,i=WK(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(mq,`50% ${i}%`)}(te===S||P>=x)&&(A.current=!0),s.context.handleScrollArrowVisibility(p),u&&s.state.selectedIndex===null&&s.state.activeIndex===null&&s.context.listRef.current[0]!=null&&s.set(`activeIndex`,0)}finally{t()}},[s,S,O,D,m,g,N,k,u,v,h]),J.useEffect(()=>{if(!m||!O||!S)return;let e=se(O);function t(e){s.context.setOpen(!1,Nz(JR,e))}return TB(e,`resize`,t)},[s,m,O,S]);let I={...k?{role:`presentation`}:{role:`listbox`,"aria-multiselectable":c||void 0,"aria-readonly":l||void 0,id:`${x}-list`},onKeyDown(e){_&&NU.has(e.key)&&e.stopPropagation()},onScroll(e){k||P(e.currentTarget)},...m&&{style:k?{height:`100%`}:oq},className:!k&&m?uq.className:void 0},L=_I(`div`,e,{ref:[t,s.context.popupRef],state:F,stateAttributesMapping:hq,props:[T,I,BU(E),o]});return(0,Y.jsxs)(J.Fragment,{children:[!b&&uq.getElement(y),(0,Y.jsx)($V,{context:d,modal:!1,disabled:!w,openInteractionType:C,returnFocus:a,restoreFocus:!0,children:L})]})});function _q(e){let t=e.maxHeight;return t.endsWith(`px`)&&parseFloat(t)||1/0}function vq(e){return GK(e.scrollHeight,e.clientHeight)}function yq(e){return g.getScale(e)}function bq(e,t,n){return e/n[t]}function xq(e,t){return y({x:bq(e.x,`x`,t),y:bq(e.y,`y`,t),width:bq(e.width,`x`,t),height:bq(e.height,`y`,t)})}var Sq=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function Cq(e){let{style:t}=e,n={};for(let[e,r]of Sq)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of Sq){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var wq=J.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=jK(),s=o.useState(`multiple`),c=o.useState(`readOnly`),{alignItemWithTriggerActive:l}=iq(),u=o.useState(`hasScrollArrows`),d=o.useState(`openMethod`),f={id:`${o.useState(`id`)}-list`,role:`listbox`,"aria-multiselectable":s||void 0,"aria-readonly":c||void 0,onScroll(e){o.context.scrollHandlerRef.current?.(e.currentTarget)},...l&&{style:oq},className:u&&d!==`touch`?uq.className:void 0};return _I(`div`,e,{ref:[t,o.useStateSetter(`listElement`)],props:[f,a]})}),Tq=J.createContext(void 0);function Eq(){let e=J.useContext(Tq);if(!e)throw Error(TI(57));return e}var Dq=J.memo(J.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a=null,label:o,disabled:s=!1,nativeButton:c=!1,...l}=e,u=J.useRef(null),d=Cz({guess:!0,label:o,textRef:u}),f=jK(),{props:p,multiple:m,disabled:h,readOnly:g,isItemEqualToValue:_}=f.useState(`itemRoot`),v=h||s,y=f.useState(`isActive`,d.index),b=f.useState(`open`),x=f.useState(`isSelected`,a),S=f.useState(`isSelectedByFocus`,d.index),C=d.index,w=J.useRef(null);Q(()=>{let e=f.context.valuesRef.current;return e[C]=a,()=>{delete e[C]}},[C,a,f]),Q(()=>{let e=f.state.value,t=f.state.selectedIndex,n=t,r;m&&Array.isArray(e)?(n=VK(C,a,f.context.valuesRef.current,e,_,t),r=n===C,C===t&&!r&&(f.context.selectedItemTextRef.current=null)):(r=e!==void 0&&FK(a,e,_),r&&(n=C)),f.set(`selectedIndex`,n),r&&u.current&&(f.context.selectedItemTextRef.current=u.current)},[C,m,_,f,a]);let T=J.useRef(`mouse`),E=J.useRef(!1),{getButtonProps:D,buttonRef:O}=sR({disabled:v,focusableWhenDisabled:!0,native:c,composite:!0}),k={disabled:v,selected:x,highlighted:y};function A(e){if(h||g)return;let t=f.state.value;if(m){let n=Array.isArray(t)?t:[],r=x?HK(n,a,_):[...n,a];f.context.setValue(r,Nz(IR,e))}else f.context.setValue(a,Nz(IR,e)),f.context.setOpen(!1,Nz(IR,e))}function j(){f.context.selectionRef.current.dragY=0}let M={role:`option`,"aria-selected":x,tabIndex:b&&y?0:-1,onKeyDown(e){f.set(`activeIndex`,C),e.key===` `&&f.context.typingRef.current&&e.preventDefault()},onClick(e){let t=T.current!==`touch`,n=e.nativeEvent.pointerType,r=t&&qz(e.nativeEvent)&&(n!==void 0||y),i=t&&!r&&!E.current;E.current=!1,!(v||i)&&A(e.nativeEvent)},onPointerEnter(e){T.current=e.pointerType},onPointerMove(e){if(e.pointerType===`mouse`&&e.buttons===1){let t=f.context.selectionRef.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){T.current=e.pointerType,E.current=!0,j()},onMouseUp(){if(j(),v||T.current===`touch`||E.current)return;let e=!f.context.selectionRef.current.allowSelectedMouseUp&&x,t=!f.context.selectionRef.current.allowUnselectedMouseUp&&!x;e||t||(E.current=!0,w.current?.click(),E.current=!1)}},N=_I(`div`,e,{ref:[O,t,d.ref,w],state:k,props:[p,M,l,D]}),P=J.useMemo(()=>({selected:x,index:C,textRef:u,selectedByFocus:S}),[x,C,u,S]);return(0,Y.jsx)(Tq.Provider,{value:P,children:N})})),Oq=J.memo(J.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a,selected:o,...s}=e,c=J.useRef(null),{transitionStatus:l,setMounted:u}=ZI(o),d=_I(`span`,e,{ref:[t,c],state:{selected:o,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},s],stateAttributesMapping:XI});return qI({batch:!0,enabled:!o,open:o,ref:c,onComplete(){o||u(!1)}}),d})),kq=J.forwardRef(function(e,t){let{selected:n}=Eq();return e.keepMounted||n?(0,Y.jsx)(Oq,{...e,selected:n,ref:t}):null}),Aq=J.memo(J.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i}=Eq(),a=jK(),{render:o,className:s,style:c,...l}=e;return _I(`div`,e,{ref:[J.useCallback(e=>{e&&(n===0&&(a.context.firstItemTextRef.current=e),i&&(a.context.selectedItemTextRef.current=e))},[a,n,i]),t,r],props:l})})),jq=J.forwardRef(function(e,t){let{render:n,className:r,style:i,direction:a,keepMounted:o,...s}=e,c=a===`up`,l=jK(),{side:u,scrollDownArrowRef:d,scrollUpArrowRef:f}=iq(),p=c?`scrollUpArrowVisible`:`scrollDownArrowVisible`,m=l.useState(p),h=l.useState(`openMethod`),g=m&&h!==`touch`,_=rL(),v=c?f:d,{mounted:y,transitionStatus:b,setMounted:x}=ZI(g);Q(()=>(l.context.scrollArrowsMountedCountRef.current+=1,l.set(`hasScrollArrows`,!0),()=>{l.context.scrollArrowsMountedCountRef.current=Math.max(0,l.context.scrollArrowsMountedCountRef.current-1),l.context.scrollArrowsMountedCountRef.current===0&&l.set(`hasScrollArrows`,!1)}),[l]),qI({open:g,ref:v,onComplete(){g||x(!1)}});let S=_I(`div`,e,{ref:[t,v],state:{direction:a,visible:g,side:u,transitionStatus:b},props:[{"aria-hidden":!0,children:c?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||_.isStarted())return;l.set(`activeIndex`,null);function t(){let e=l.state.listElement??l.context.popupRef.current;if(!e)return;l.set(`activeIndex`,null),l.context.handleScrollArrowVisibility(e);let n=GK(e.scrollHeight,e.clientHeight),r=KK(e.scrollTop,n),i=r===(c?0:n),a=l.context.listRef.current;if(r!==e.scrollTop&&(e.scrollTop=r),i)_.clear();else{if(a.length>0){let t=v.current?.offsetHeight||0;e.scrollTop=Mq(a,c,r,e.clientHeight,t,n)}_.start(40,t)}}_.start(40,t)},onMouseLeave(){_.clear()}},s],stateAttributesMapping:XI});return y||o?S:null});function Mq(e,t,n,r,i,a){if(t){let t=0,r=n+i-1;for(let n=0;n<e.length;n+=1){let i=e[n];if(i&&i.offsetTop>=r){t=n;break}}let o=Math.max(0,t-1),s=e[o];return o<t&&s?KK(s.offsetTop-i,a):0}let o=e.length-1,s=n+r-i+1;for(let t=0;t<e.length;t+=1){let n=e[t];if(n&&n.offsetTop+n.offsetHeight>s){o=Math.max(0,t-1);break}}let c=Math.min(e.length-1,o+1),l=e[c];return c>o&&l?KK(l.offsetTop+l.offsetHeight-r+i,a):a}var Nq=J.forwardRef(function(e,t){return(0,Y.jsx)(jq,{...e,ref:t,direction:`down`})}),Pq=J.forwardRef(function(e,t){return(0,Y.jsx)(jq,{...e,ref:t,direction:`up`})}),Fq=J.createContext(void 0);function Iq(){let e=J.useContext(Fq);if(e===void 0)throw Error(TI(64));return e}var Lq=`data-activation-direction`,Rq={tabActivationDirection:e=>({[Lq]:e})},zq=J.forwardRef(function(e,t){let{className:n,defaultValue:r=0,onValueChange:i,orientation:a=`horizontal`,render:o,value:s,style:c,...l}=e,u=e.defaultValue!==void 0,d=J.useRef([]),[f,p]=J.useState(()=>new Map),[m,h]=YR({controlled:s,default:r,name:`Tabs`,state:`value`}),g=s!==void 0,[_,v]=J.useState(()=>new Map),y=J.useRef(void 0),b=J.useCallback(e=>Bq(_,e),[_]),[x,S]=J.useState(()=>({previousValue:m,tabActivationDirection:`none`})),{previousValue:C,tabActivationDirection:w}=x,T=w,E=!1;C!==m&&(T=Vq(C,m,a,_),E=C!=null&&m!=null&&b(m)==null);let D=E?C:m,O=C!==D||w!==T;Q(()=>{O&&S({previousValue:D,tabActivationDirection:T})},[D,O,T]);let k=Z((e,t)=>{t.activationDirection=Vq(m,e,a,_),i?.(e,t),!t.isCanceled&&h(()=>e)}),A=Z((e,t)=>{i?.(e,Nz(t,void 0,void 0,{activationDirection:`none`}))}),j=Z((e,t)=>(p(n=>{let r=new Map(n);return r.set(e,t),r}),()=>{p(n=>{if(n.get(e)!==t)return n;let r=new Map(n);return r.delete(e),r})})),M=J.useCallback(e=>f.get(e),[f]),N=J.useCallback(e=>{for(let t of _.values())if(e===t.value)return t.id},[_]),P=J.useMemo(()=>({getTabElementBySelectedValue:b,getTabIdByPanelValue:N,getTabPanelIdByValue:M,onValueChange:k,orientation:a,registerMountedTabPanel:j,setTabMap:v,tabActivationDirection:T,value:m}),[b,N,M,k,a,j,v,T,m]),F=J.useMemo(()=>{for(let e of _.values())if(e.value===m)return e},[_,m]),I=J.useMemo(()=>{for(let e of _.values())if(!e.disabled)return e.value},[_]),L=J.useRef(!u),R=J.useRef(r),z=J.useRef(u),B=J.useRef(!1);Q(()=>{if(g)return;function e(e,t){h(()=>e),S({previousValue:e,tabActivationDirection:`none`}),A(e,t),L.current=!1}if(_.size===0){B.current&&m!==null&&!y.current?.isConnected&&e(null,GR);return}B.current=!0,y.current=_.keys().next().value;let t=F?.disabled,n=F==null&&m!==null;if(!t&&m===R.current&&(z.current=!1),z.current&&t&&m===R.current)return;let r=L.current;if(t||n){let n=I??null;if(m===n){L.current=!1;return}let i=GR;r?i=KR:t&&(i=WR),e(n,i)}else r&&F!=null&&(A(m,KR),L.current=!1)},[I,g,A,F,h,_,m]);let ee=_I(`div`,e,{state:{orientation:a,tabActivationDirection:T},ref:t,props:l,stateAttributesMapping:Rq});return(0,Y.jsx)(Fq.Provider,{value:P,children:(0,Y.jsx)(yW,{elementsRef:d,children:ee})})});function Bq(e,t){for(let[n,r]of e.entries())if(t===r.value)return n;return null}function Vq(e,t,n,r){if(e==null||t==null)return`none`;let[i,a,o]=n===`horizontal`?[`left`,`left`,`right`]:[`top`,`up`,`down`],s=Bq(r,e),c=Bq(r,t);if(s==null||c==null)return s!==c&&(typeof e==`number`||typeof e==`string`)&&typeof e==typeof t?t>e?o:a:`none`;let l=s.getBoundingClientRect()[i],u=c.getBoundingClientRect()[i];return u<l?a:u>l?o:`none`}var Hq=`data-composite-item-active`,Uq=J.createContext(void 0);function Wq(){let e=J.useContext(Uq);if(e===void 0)throw Error(TI(65));return e}var Gq=J.forwardRef(function(e,t){let{className:n,disabled:r=!1,render:i,value:a,id:o,nativeButton:s=!0,style:c,...l}=e,{value:u,getTabPanelIdByValue:d,onValueChange:f,orientation:p,tabActivationDirection:m}=Iq(),{activateOnFocus:h,registerTabResizeObserverElement:g,tabsListElement:_}=Wq(),{highlightedIndex:v,onHighlightedIndexChange:y}=rR(),b=kz(o),{compositeProps:x,compositeRef:S,index:C}=uG({metadata:J.useMemo(()=>({disabled:r,id:b,value:a}),[r,b,a])}),w=a===u,T=J.useRef(!1),E=J.useRef(null),D=Z(e=>{E.current?.(),E.current=e?g(e):null});Q(()=>{if(T.current){T.current=!1;return}if(!(w&&C>-1&&v!==C))return;let e=_;if(e!=null){let t=Zz(aR(e));if(t&&Qz(e,t))return}r||y(C)},[w,C,v,y,r,_]);let{getButtonProps:O,buttonRef:k}=sR({disabled:r,native:s,focusableWhenDisabled:!0}),A=d(a),j=J.useRef(!1),M=J.useRef(!1);function N(e){f(a,Nz(jR,e.nativeEvent,void 0,{activationDirection:`none`}))}function P(e){w||r||N(e)}function F(e){w||r||h&&(!j.current||M.current)&&N(e)}function I(e){if(w||r)return;j.current=!0,M.current=e.button===0;let t=aR(e.currentTarget);function n(){j.current=!1,M.current=!1,t.removeEventListener(`pointerup`,n),t.removeEventListener(`pointercancel`,n)}t.addEventListener(`pointerup`,n),t.addEventListener(`pointercancel`,n)}return _I(`button`,e,{state:{disabled:r,active:w,orientation:p,tabActivationDirection:m},ref:[t,k,S,D],props:[x,{role:`tab`,"aria-controls":A,"aria-selected":w,id:b,onClick:P,onFocus:F,onPointerDown:I,[Hq]:w?``:void 0,onKeyDownCapture(){T.current=!0}},l,O],stateAttributesMapping:Rq})}),Kq=`data-index`,qq={...Rq,...XI},Jq=J.forwardRef(function(e,t){let{className:n,value:r,render:i,keepMounted:a=!1,style:o,...s}=e,{value:c,getTabIdByPanelValue:l,orientation:u,tabActivationDirection:d,registerMountedTabPanel:f}=Iq(),p=kz(),{ref:m,index:h}=Cz(),g=r===c,{mounted:_,transitionStatus:v,setMounted:y}=ZI(g),b=!_,x=l(r),S={hidden:b,orientation:u,tabActivationDirection:d,transitionStatus:v},C=J.useRef(null),w=_I(`div`,e,{state:S,ref:[t,m,C],props:[{"aria-labelledby":x,hidden:b,id:p,role:`tabpanel`,tabIndex:g?0:-1,inert:$U(!g),[Kq]:h},s],stateAttributesMapping:qq});return qI({open:g,ref:C,onComplete(){g||y(!1)}}),Q(()=>{if(!(p==null||b&&!a))return f(r,p)},[b,a,r,p,f]),a||_?w:null});function Yq(e){let{loopFocus:t=!0,orientation:n=`both`,grid:r,onLoop:i,direction:a,highlightedIndex:o,onHighlightedIndexChange:s,rootRef:c,enableHomeAndEndKeys:l=!1,stopEventPropagation:u,disabledIndices:d,modifierKeys:f=QF}=e,[p,m]=J.useState(0),h=r!=null,g=J.useRef(null),_=VF(g,c),v=J.useRef([]),y=J.useRef(!1),b=J.useRef(null),x=o??p,S=Z((e,t=!1)=>{if(b.current=v.current[e]??null,(s??m)(e),t){let t=v.current[e];LU(g.current,t,a,n)}}),C=Z(e=>{if(e.size===0)return;if(y.current){let e=v.current,t=e.indexOf(b.current);if(t===-1){let t=e[x];!t||RB(e,x,d)?S(Xq(e,d)):b.current=t}else t!==x&&S(t);return}y.current=!0;let t=Array.from(e.keys()),r=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,i=r?e.get(r)?.index??-1:-1;if(i!==-1)S(i);else if(RB(t,x,d)){let e=LB(t,{disabledIndices:d});NB(t,e)||S(e)}LU(g.current,r,a,n)});Q(()=>{if(d==null||o!=null||!y.current)return;let e=v.current;if(RB(e,x,d)){let t=LB(e,{disabledIndices:d});NB(e,t)||S(t)}},[d,o,x,v,S]);let w=Z((e,t,n)=>i?i(e,t,n,v):n),T=Z(e=>{let o=e.key===`Home`||e.key===`End`;if(!NU.has(e.key)||!l&&o||Zq(e,f)||!g.current)return;let s=a===`rtl`,c=s?jU:MU,p=s?MU:jU,m=n===`vertical`?AU:c,_=n===`vertical`?kU:p,y=eB(e.nativeEvent);if(y!=null&&IU(y)&&!bG(y)){let t=y.selectionStart,n=y.selectionEnd,r=y.value;if(t==null||e.shiftKey||t!==n||e.key!==_&&t<r.length||e.key!==m&&t>0)return}let b=x,C=PB(v,d),T=FB(v,d);r!=null&&(b=r({disabledIndices:d,elementsRef:v,event:e,highlightedIndex:x,loopFocus:t,maxIndex:T,minIndex:C,onLoop:w,orientation:n,rtl:s}));let E=n!==`vertical`&&e.key===c||n!==`horizontal`&&e.key===`ArrowDown`,D=n!==`vertical`&&e.key===p||n!==`horizontal`&&e.key===`ArrowUp`;l&&(e.key===`Home`?b=C:e.key===`End`&&(b=T)),b===x&&(E||D)&&(t&&b===T&&E?(b=C,i&&(b=i(e,x,b,v))):t&&b===C&&D?(b=T,i&&(b=i(e,x,b,v))):b=LB(v.current,{startingIndex:b,decrement:D,disabledIndices:d})),b!==x&&!NB(v.current,b)&&(u&&e.stopPropagation(),(h||o||E||D)&&e.preventDefault(),S(b,!0),queueMicrotask(()=>{v.current[b]?.focus()}))});return{props:{ref:_,onFocus(e){let t=g.current,n=eB(e.nativeEvent);t&&n!=null&&IU(n)&&n.setSelectionRange(0,n.value.length)},onKeyDown:T},highlightedIndex:x,onHighlightedIndexChange:S,elementsRef:v,onMapChange:C,relayKeyboardEvent:T}}function Xq(e,t){let n=-1;for(let r=0;r<e.length;r+=1){let i=e[r];if(i&&!RB(e,r,t)){if(i.hasAttribute(`data-composite-item-active`))return r;n===-1&&(n=r)}}return Math.max(n,0)}function Zq(e,t){for(let n of PU)if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function Qq(e){let{render:t,className:n,style:r,refs:i=QF,props:a=QF,state:o=$F,stateAttributesMapping:s,highlightedIndex:c,onHighlightedIndexChange:l,orientation:u,grid:d,loopFocus:f,onLoop:p,enableHomeAndEndKeys:m,onMapChange:h,stopEventPropagation:g=!0,rootRef:_,disabledIndices:v,modifierKeys:y,highlightItemOnHover:b=!1,tag:x=`div`,...S}=e,{props:C,highlightedIndex:w,onHighlightedIndexChange:T,elementsRef:E,onMapChange:D,relayKeyboardEvent:O}=Yq({grid:d,loopFocus:f,onLoop:p,orientation:u,highlightedIndex:c,onHighlightedIndexChange:l,rootRef:_,stopEventPropagation:g,enableHomeAndEndKeys:m,direction:nW(),disabledIndices:v,modifierKeys:y}),k=_I(x,e,{state:o,ref:i,props:[C,...a,S],stateAttributesMapping:s}),A=J.useMemo(()=>({highlightedIndex:w,onHighlightedIndexChange:T,highlightItemOnHover:b,relayKeyboardEvent:O}),[w,T,b,O]);return(0,Y.jsx)(nR.Provider,{value:A,children:(0,Y.jsx)(yW,{elementsRef:E,onMapChange:e=>{h?.(e),D(e)},children:k})})}var $q=J.forwardRef(function(e,t){let{activateOnFocus:n=!1,className:r,loopFocus:i=!0,render:a,style:o,...s}=e,{orientation:c,setTabMap:l,tabActivationDirection:u}=Iq(),[d,f]=J.useState(0),[p,m]=J.useState(null),h=J.useRef(new Set),g=J.useRef(new Set),_=J.useRef(null);Q(()=>{if(typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{h.current.forEach(e=>{e()})});return _.current=e,p&&e.observe(p),g.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),_.current=null}},[p]);let v=Z(e=>(h.current.add(e),()=>{h.current.delete(e)})),y=Z(e=>(g.current.add(e),_.current?.observe(e),()=>{g.current.delete(e),_.current?.unobserve(e)})),b={orientation:c,tabActivationDirection:u},x={"aria-orientation":c===`vertical`?`vertical`:void 0,role:`tablist`},S=J.useMemo(()=>({activateOnFocus:n,registerIndicatorUpdateListener:v,registerTabResizeObserverElement:y,tabsListElement:p}),[n,v,y,p]);return(0,Y.jsx)(Uq.Provider,{value:S,children:(0,Y.jsx)(Qq,{render:a,className:r,style:o,state:b,refs:[t,m],props:[x,s],stateAttributesMapping:Rq,highlightedIndex:d,enableHomeAndEndKeys:!0,loopFocus:i,orientation:c,onHighlightedIndexChange:f,onMapChange:l,disabledIndices:QF})})}),eJ=J.createContext(void 0);function tJ(){return J.useContext(eJ)}var nJ=J.forwardRef(function(e,t){let{className:n,defaultPressed:r=!1,disabled:i=!1,form:a,onPressedChange:o,pressed:s,render:c,type:l,value:u,nativeButton:d=!0,style:f,...p}=e,m=kz(u||void 0),h=tJ(),g=h?.value??[],_=(i||h?.disabled)??!1,[v,y]=YR({controlled:h?m!==void 0&&g.indexOf(m)>-1:s,default:r,name:`Toggle`,state:`pressed`}),{getButtonProps:b,buttonRef:x}=sR({disabled:_,native:d}),S={disabled:_,pressed:v},C=[x,t],w=[{"aria-pressed":v,onClick(e){let t=!v,n=Nz(jR,e.nativeEvent);o?.(t,n),!n.isCanceled&&(m&&h?.setGroupValue?.(m,t,n),!n.isCanceled&&y(t))}},p,b],T=_I(`button`,e,{enabled:!h,state:S,ref:C,props:w}),E=J.useMemo(()=>({disabled:_,focusableWhenDisabled:!1}),[_]);return h?(0,Y.jsx)(dG,{tag:`button`,render:c,className:n,style:f,metadata:E,state:S,refs:C,props:w}):T}),rJ=J.createContext(void 0);function iJ(e){let t=J.useContext(rJ);if(t===void 0&&!e)throw Error(TI(72));return t}var aJ={...QH,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,appliedTriggerProps:(e,t)=>t?e.activeTriggerProps:void 0,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},oJ=class extends UH{constructor(e,t,n){let r=new CH;super(sJ(e,r,t,n),cJ(r),aJ)}setOpen=(e,t)=>{_H(this,e,t,{extraState:{openChangeReason:t.reason}})};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,Nz(MR,e))}};function sJ(e,t,n,r=!1){return{...KH(t,n,r),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function cJ(e){return{popupRef:J.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}var lJ=MH(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=dH((e,t)=>new oJ({open:n,openProp:r,activeTriggerId:d,triggerIdProp:u},e,t));p.useControlledProp(`openProp`,r),p.useControlledProp(`triggerIdProp`,u),p.useContextCallback(`onOpenChange`,s),p.useContextCallback(`onOpenChangeComplete`,c);let m=p.useState(`open`),h=!t&&m,g=p.useState(`activeTriggerId`),_=p.useState(`mounted`),v=p.useState(`payload`);p.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i,disabled:t}),yH(p,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:y,transitionStatus:b}=bH(h,p),x=p.useState(`isInstantPhase`),S=p.useState(`instantType`),C=p.useState(`lastOpenChangeReason`),w=J.useRef(null);Q(()=>{m&&t&&p.setOpen(!1,Nz(WR))},[m,t,p]),Q(()=>{b===`ending`&&C===`none`||b!==`ending`&&x?(S!==`delay`&&(w.current=S),p.set(`instantType`,`delay`)):w.current!==null&&(p.set(`instantType`,w.current),w.current=null)},[b,x,C,S,p]),Q(()=>{h&&(g??p.set(`payload`,void 0))},[p,g,h]),J.useImperativeHandle(o,()=>({unmount:y,close:()=>p.setOpen(!1,Nz(qR))}),[y,p]);let T=h||_||!t&&a!==`none`;return(0,Y.jsxs)(rJ.Provider,{value:p,children:[l&&(0,Y.jsx)(fH,{handle:l,store:p}),T&&(0,Y.jsx)(uJ,{store:p,disabled:t,trackCursorAxis:a}),typeof f==`function`?f({payload:v}):f]})});function uJ({store:e,disabled:t,trackCursorAxis:n}){let r=e.useState(`floatingRootContext`),i=oH(r,{enabled:!t,referencePress:()=>e.select(`closeOnClick`)}),a=rH(r,{enabled:!t&&n!==`none`,axis:n===`none`?void 0:n}),o=J.useMemo(()=>iI(a.reference,i.reference),[a.reference,i.reference]);return xH(e,{activeTriggerProps:o,inactiveTriggerProps:o,popupProps:i.floating??$F}),null}var dJ=J.createContext(void 0);function fJ(){return J.useContext(dJ)}var pJ=`data-base-ui-tooltip-trigger`;function mJ(e){let t=eB(e);return R(t)?t:null}var hJ=NH(function(e,t){let{render:n,className:r,style:i,handle:a,payload:o,disabled:s,delay:c,closeOnClick:l=!0,closeDelay:u,id:d,...f}=e,p=iJ(!0),m=$H(a)??p;if(!m)throw Error(TI(82));let h=kz(d),g=m.useState(`isTriggerActive`,h),_=m.useState(`isOpenedByTrigger`,h),v=m.useState(`floatingRootContext`),y=J.useRef(null),b=u??0,{registerTrigger:x,isMountedByThisTrigger:S}=vH(h,y,m,{payload:o,closeOnClick:l,closeDelay:b}),C=fJ(),{activeIdRef:w,delayRef:T,isInstantPhase:E,hasProvider:D}=wB(v,{open:_}),O=sU(v);m.useSyncedValue(`isInstantPhase`,E);let k=m.useState(`disabled`),A=s??k,j=DB(A),M=m.useState(`trackCursorAxis`),N=m.useState(`disableHoverablePopup`),P=J.useRef(!1),F=rL(),I=J.useRef(void 0);function L(){return D&&w.current!=null?0:c??C??600}function R(e){let t=y.current;if(!t||!e)return!1;let n=$z(e,`[${pJ}]`);return n!==null&&n!==t&&Qz(t,n)}function z(e){let t=R(e);return P.current=t,t&&(O.openChangeTimeout.clear(),O.restTimeout.clear(),O.restTimeoutPending=!1,F.clear()),t}let B=uU(v,{enabled:!A,mouseOnly:!0,move:!1,handleClose:!N&&M!==`both`?EU():null,restMs:L,delay(){return u==null&&D?{close:_B(T.current,`close`)}:{close:b}},triggerElementRef:y,isActiveTrigger:g,isClosing:()=>m.select(`transitionStatus`)===`ending`,shouldOpen(){return!P.current}}),ee=nU(v,{enabled:!A}).reference,te=e=>{let t=P.current,n=mJ(e),r=z(n),i=y.current,a=i&&n&&Qz(i,n);if(r&&m.select(`open`)&&m.select(`lastOpenChangeReason`)===`trigger-hover`)m.setOpen(!1,Nz(NR,e));else if(t&&!r&&a&&!j.current&&!m.select(`open`)&&i&&Yz(I.current)){let t=()=>{P.current||j.current||m.select(`open`)||m.setOpen(!0,Nz(NR,e,i))},n=L();n===0?(F.clear(),t()):F.start(n,t)}},ne=m.useState(`appliedTriggerProps`,S||M!==`none`);return _I(`button`,e,{state:{open:_},ref:[t,x,y],props:[B,ee,ne,{onMouseOver(e){te(e.nativeEvent)},onFocus(e){R(mJ(e.nativeEvent))&&e.preventBaseUIHandler()},onMouseLeave(){P.current=!1,F.clear(),I.current=void 0},onPointerEnter(e){I.current=e.pointerType},onPointerDown(e){I.current=e.pointerType,m.set(`closeOnClick`,l),l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},onClick(e){l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},id:h,[sB]:A?``:void 0,[pJ]:A?void 0:``},f],stateAttributesMapping:TR})}),gJ=J.createContext(void 0);function _J(){let e=J.useContext(gJ);if(e===void 0)throw Error(TI(70));return e}var vJ=J.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{node:c,subtree:l}=PV({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,Y.jsxs)(J.Fragment,{children:[l,c&&Wd.createPortal(n,c)]})}),yJ=J.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return iJ().useState(`mounted`)||n?(0,Y.jsx)(gJ.Provider,{value:n,children:(0,Y.jsx)(vJ,{ref:t,...r})}):null}),bJ=J.createContext(void 0);function xJ(){let e=J.useContext(bJ);if(e===void 0)throw Error(TI(71));return e}var SJ=J.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`top`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=kV,style:g,..._}=e,v=iJ(),y=_J(),b=v.useState(`open`),x=v.useState(`mounted`),S=v.useState(`trackCursorAxis`),C=v.useState(`disableHoverablePopup`),w=v.useState(`floatingRootContext`),T=v.useState(`instantType`),E=v.useState(`transitionStatus`),D=gW({anchor:i,positionMethod:a,floatingRootContext:w,mounted:x,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:m,keepMounted:y,collisionAvoidance:h,adaptiveOrigin:v.useState(`adaptiveOrigin`)}),O=OW(e,J.useMemo(()=>({open:b,side:D.side,align:D.align,anchorHidden:D.anchorHidden,instant:S===`none`?T:`tracking-cursor`}),[b,D.side,D.align,D.anchorHidden,S,T]),{styles:D.positionerStyles,transitionStatus:E,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!x,inert:!b||S===`both`||C});return(0,Y.jsx)(bJ.Provider,{value:D,children:O})}),CJ=J.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=iJ(),{side:s,align:c}=xJ(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`),m=o.useState(`disabled`),h=o.useState(`closeDelay`);qI({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),cU(p,{enabled:!m,closeDelay:h});let g=o.useStateSetter(`popupElement`);return _I(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,g],props:[lH,f,BU(d),a],stateAttributesMapping:OR})}),wJ=J.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=iJ(),{arrowRef:s,side:c,align:l,arrowUncentered:u,arrowStyles:d}=xJ();return _I(`div`,e,{state:{open:o.useState(`open`),side:c,align:l,uncentered:u,instant:o.useState(`instantType`)},ref:[t,s],props:[{style:d,"aria-hidden":!0},a],stateAttributesMapping:DR})}),TJ=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=J.useMemo(()=>({open:t,close:n}),[t,n]);return(0,Y.jsx)(dJ.Provider,{value:t,children:(0,Y.jsx)(CB,{delay:i,timeoutMs:r,children:e.children})})},EJ=e=>{let{children:t,onSubmit:n,submitButton:r,...i}=e;return Rb(i),(0,Y.jsxs)(`form`,{className:`bn-form`,onSubmit:e=>{e.preventDefault(),n?.()},children:[t,r===`none`?null:r]})};function $(...e){return eR(l(e))}function DJ({className:e,size:t=`default`,...n}){return(0,Y.jsx)(kI,{"data-slot":`avatar`,"data-size":t,className:$(`group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten`,e),...n})}function OJ({className:e,...t}){return(0,Y.jsx)(eL,{"data-slot":`avatar-image`,className:$(`aspect-square size-full rounded-full object-cover`,e),...t})}function kJ({className:e,...t}){return(0,Y.jsx)(iL,{"data-slot":`avatar-fallback`,className:$(`flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs`,e),...t})}var AJ=re(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function jJ({className:e,variant:t=`default`,render:n,...r}){return tR({defaultTagName:`span`,props:iI({className:$(AJ({variant:t}),e)},r),render:n,state:{slot:`badge`,variant:t}})}var MJ=re(`group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5`,lg:`h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-9`,"icon-xs":`size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md`,"icon-lg":`size-10`}},defaultVariants:{variant:`default`,size:`default`}});function NJ({className:e,variant:t=`default`,size:n=`default`,...r}){return(0,Y.jsx)(uR,{"data-slot":`button`,className:$(MJ({variant:t,size:n,className:e})),...r})}function PJ({className:e,size:t=`default`,...n}){return(0,Y.jsx)(`div`,{"data-slot":`card`,"data-size":t,className:$(`group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl`,e),...n})}function FJ({className:e,...t}){return(0,Y.jsx)(`div`,{"data-slot":`card-content`,className:$(`px-(--card-spacing)`,e),...t})}function IJ({...e}){return(0,Y.jsx)(iG,{"data-slot":`dropdown-menu`,...e})}function LJ({...e}){return(0,Y.jsx)(hG,{"data-slot":`dropdown-menu-trigger`,...e})}function RJ({align:e=`start`,alignOffset:t=0,side:n=`bottom`,sideOffset:r=4,className:i,container:a,...o}){return(0,Y.jsx)(QU,{container:a,children:(0,Y.jsx)(HW,{className:`isolate z-50 outline-none`,align:e,alignOffset:t,side:n,sideOffset:r,children:(0,Y.jsx)(YU,{"data-slot":`dropdown-menu-content`,className:$(`z-50 max-h-(--available-height) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95`,i),...o})})})}function zJ({...e}){return(0,Y.jsx)(Vz,{"data-slot":`dropdown-menu-group`,...e})}function BJ({className:e,inset:t,...n}){return(0,Y.jsx)(Hz,{"data-slot":`dropdown-menu-label`,"data-inset":t,className:$(`px-2 py-1.5 text-xs font-medium text-muted-foreground data-inset:pl-8`,e),...n})}function VJ({className:e,inset:t,variant:n=`default`,...r}){return(0,Y.jsx)(Wz,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:$(`group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive`,e),...r})}function HJ({...e}){return(0,Y.jsx)(oG,{"data-slot":`dropdown-menu-sub`,...e})}function UJ({className:e,inset:t,children:n,...r}){return(0,Y.jsxs)(CG,{"data-slot":`dropdown-menu-sub-trigger`,"data-inset":t,className:$(`flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r,children:[n,(0,Y.jsx)(UG,{className:`ml-auto`})]})}function WJ({align:e=`start`,alignOffset:t=-3,side:n=`right`,sideOffset:r=0,className:i,...a}){return(0,Y.jsx)(RJ,{"data-slot":`dropdown-menu-sub-content`,className:$(`w-auto min-w-[96px] rounded-md bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,i),align:e,alignOffset:t,side:n,sideOffset:r,...a})}function GJ({className:e,children:t,checked:n,inset:r,...i}){return(0,Y.jsxs)(Iz,{"data-slot":`dropdown-menu-checkbox-item`,"data-inset":r,className:$(`relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),checked:n,...i,children:[(0,Y.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex items-center justify-center`,"data-slot":`dropdown-menu-checkbox-item-indicator`,children:(0,Y.jsx)(Lz,{children:(0,Y.jsx)(VG,{})})}),t]})}function KJ({className:e,...t}){return(0,Y.jsx)(yG,{"data-slot":`dropdown-menu-separator`,className:$(`-mx-1 my-1 h-px bg-border`,e),...t})}function qJ({className:e,type:t,...n}){return(0,Y.jsx)(sK,{type:t,"data-slot":`input`,className:$(`h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...n})}function JJ({className:e,...t}){return(0,Y.jsx)(`label`,{"data-slot":`label`,className:$(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}function YJ({...e}){return(0,Y.jsx)(hK,{"data-slot":`popover`,...e})}function XJ({...e}){return(0,Y.jsx)(vK,{"data-slot":`popover-trigger`,...e})}function ZJ({className:e,align:t=`center`,alignOffset:n=0,side:r=`bottom`,sideOffset:i=4,container:a,...o}){return(0,Y.jsx)(xK,{container:a,children:(0,Y.jsx)(wK,{align:t,alignOffset:n,side:r,sideOffset:i,className:`isolate z-50`,children:(0,Y.jsx)(DK,{"data-slot":`popover-content`,className:$(`z-50 flex w-72 origin-(--transform-origin) flex-col gap-4 rounded-md bg-popover p-4 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...o})})})}var QJ=qK;function $J({className:e,...t}){return(0,Y.jsx)(eq,{"data-slot":`select-value`,className:$(`flex flex-1 text-left`,e),...t})}function eY({className:e,size:t=`default`,children:n,...r}){return(0,Y.jsxs)(QK,{"data-slot":`select-trigger`,"data-size":t,className:$(`flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r,children:[n,(0,Y.jsx)(tq,{render:(0,Y.jsx)(HG,{className:`text-muted-foreground pointer-events-none size-4`})})]})}function tY({className:e,children:t,side:n=`bottom`,sideOffset:r=4,align:i=`center`,alignOffset:a=0,alignItemWithTrigger:o=!0,container:s,...c}){return(0,Y.jsx)(nq,{container:s,children:(0,Y.jsx)(cq,{side:n,sideOffset:r,align:i,alignOffset:a,alignItemWithTrigger:o,className:`isolate z-50`,children:(0,Y.jsxs)(gq,{"data-slot":`select-content`,"data-align-trigger":o,className:$(`relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...c,children:[(0,Y.jsx)(rY,{}),(0,Y.jsx)(wq,{children:t}),(0,Y.jsx)(iY,{})]})})})}function nY({className:e,children:t,...n}){return(0,Y.jsxs)(Dq,{"data-slot":`select-item`,className:$(`relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,Y.jsx)(Aq,{className:`flex flex-1 shrink-0 gap-2 whitespace-nowrap`,children:t}),(0,Y.jsx)(kq,{render:(0,Y.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`}),children:(0,Y.jsx)(VG,{className:`pointer-events-none`})})]})}function rY({className:e,...t}){return(0,Y.jsx)(Pq,{"data-slot":`select-scroll-up-button`,className:$(`top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,Y.jsx)(WG,{})})}function iY({className:e,...t}){return(0,Y.jsx)(Nq,{"data-slot":`select-scroll-down-button`,className:$(`bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,Y.jsx)(HG,{})})}function aY({className:e,...t}){return(0,Y.jsx)(`div`,{"data-slot":`skeleton`,className:$(`animate-pulse rounded-md bg-muted`,e),...t})}function oY({className:e,orientation:t=`horizontal`,...n}){return(0,Y.jsx)(zq,{"data-slot":`tabs`,"data-orientation":t,className:$(`group/tabs flex gap-2 data-[orientation=horizontal]:flex-col`,e),...n})}var sY=re(`group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none`,{variants:{variant:{default:`bg-muted`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}});function cY({className:e,variant:t=`default`,...n}){return(0,Y.jsx)($q,{"data-slot":`tabs-list`,"data-variant":t,className:$(sY({variant:t}),e),...n})}function lY({className:e,...t}){return(0,Y.jsx)(Gq,{"data-slot":`tabs-trigger`,className:$(`relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent`,`data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100`,e),...t})}function uY({className:e,...t}){return(0,Y.jsx)(Jq,{"data-slot":`tabs-content`,className:$(`flex-1 text-sm outline-none`,e),...t})}var dY=re(`group/toggle inline-flex items-center justify-center gap-1 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-transparent`,outline:`border border-input bg-transparent shadow-xs hover:bg-muted`},size:{default:`h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,sm:`h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5`,lg:`h-10 min-w-10 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`}},defaultVariants:{variant:`default`,size:`default`}});function fY({className:e,variant:t=`default`,size:n=`default`,...r}){return(0,Y.jsx)(nJ,{"data-slot":`toggle`,className:$(dY({variant:t,size:n,className:e})),...r})}function pY({delay:e=0,...t}){return(0,Y.jsx)(TJ,{"data-slot":`tooltip-provider`,delay:e,...t})}function mY({...e}){return(0,Y.jsx)(lJ,{"data-slot":`tooltip`,...e})}function hY({...e}){return(0,Y.jsx)(hJ,{"data-slot":`tooltip-trigger`,...e})}function gY({className:e,side:t=`top`,sideOffset:n=4,align:r=`center`,alignOffset:i=0,children:a,container:o,...s}){return(0,Y.jsx)(yJ,{container:o,children:(0,Y.jsx)(SJ,{align:r,alignOffset:i,side:t,sideOffset:n,className:`isolate z-50`,children:(0,Y.jsxs)(CJ,{"data-slot":`tooltip-content`,className:$(`z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...s,children:[a,(0,Y.jsx)(wJ,{className:`bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5`})]})})})}var _Y={Avatar:{Avatar:DJ,AvatarFallback:kJ,AvatarImage:OJ},Badge:{Badge:jJ},Button:{Button:NJ},Card:{Card:PJ,CardContent:FJ},DropdownMenu:{DropdownMenu:IJ,DropdownMenuCheckboxItem:GJ,DropdownMenuContent:RJ,DropdownMenuGroup:zJ,DropdownMenuItem:VJ,DropdownMenuLabel:BJ,DropdownMenuSeparator:KJ,DropdownMenuSub:HJ,DropdownMenuSubContent:WJ,DropdownMenuSubTrigger:UJ,DropdownMenuTrigger:LJ},Input:{Input:qJ},Label:{Label:JJ},Popover:{Popover:YJ,PopoverContent:ZJ,PopoverTrigger:XJ},Select:{Select:QJ,SelectContent:tY,SelectItem:nY,SelectTrigger:eY,SelectValue:$J},Skeleton:{Skeleton:aY},Tabs:{Tabs:oY,TabsContent:uY,TabsList:cY,TabsTrigger:lY},Toggle:{Toggle:fY},Tooltip:{Tooltip:mY,TooltipContent:gY,TooltipProvider:pY,TooltipTrigger:hY}},vY=(0,J.createContext)(void 0);function yY(){return(0,J.useContext)(vY)}var bY=(0,J.forwardRef)((e,t)=>{let{className:n,name:r,label:i,variant:a,icon:o,value:s,autoFocus:c,placeholder:l,disabled:u,onKeyDown:d,onChange:f,autoComplete:p,"aria-activedescendant":m,rightSection:h,...g}=e;Rb(g);let _=LF([MF(c),t]),v=yY();return(0,Y.jsxs)(`div`,{className:$(n,`border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50`,`text-foreground items-center gap-2`),children:[o,(0,Y.jsxs)(`div`,{className:`flex-1`,children:[i&&(0,Y.jsx)(v.Label.Label,{htmlFor:i,children:i}),(0,Y.jsx)(v.Input.Input,{className:$(n,`h-auto border-none p-0`),id:i,name:r,placeholder:l,disabled:u,value:s,onKeyDown:d,onChange:f,ref:_,"aria-activedescendant":m})]}),h]})});function xY(e){return e?{onFocusCapture(e){let t=e.relatedTarget;t instanceof HTMLElement&&!e.currentTarget.contains(t)&&t.focus({preventScroll:!0})}}:{}}var SY=(0,J.createContext)({portalElement:null,preventFocusOnOpen:!1}),CY=e=>{let{children:t,onOpenChange:n,position:r,portalElement:i,preventFocusOnOpen:a,sub:o,...s}=e;Rb(s);let c=yY(),l={portalElement:i,preventFocusOnOpen:a??!1};return o?(0,Y.jsx)(c.DropdownMenu.DropdownMenuSub,{onOpenChange:n,children:(0,Y.jsx)(SY.Provider,{value:l,children:t})}):(0,Y.jsx)(c.DropdownMenu.DropdownMenu,{modal:!1,onOpenChange:n,children:(0,Y.jsx)(SY.Provider,{value:l,children:t})})},wY=e=>{let{children:t,sub:n,...r}=e;Rb(r);let i=yY();return n?(0,Y.jsx)(i.DropdownMenu.DropdownMenuSubTrigger,{children:t}):(0,Y.jsx)(i.DropdownMenu.DropdownMenuTrigger,{render:t})},TY=(0,J.forwardRef)((e,t)=>{let{className:n,children:r,sub:i,...a}=e;Rb(a);let o=yY(),{portalElement:s,preventFocusOnOpen:c}=(0,J.useContext)(SY);return i?(0,Y.jsx)(o.DropdownMenu.DropdownMenuSubContent,{className:n,container:s,ref:t,children:r}):(0,Y.jsx)(o.DropdownMenu.DropdownMenuContent,{className:n,container:s,ref:t,...xY(c),children:r})}),EY=(0,J.forwardRef)((e,t)=>{let{className:n,children:r,icon:i,checked:a,subTrigger:o,onClick:s,...c}=e;Rb(c);let l=yY();return o?(0,Y.jsxs)(Y.Fragment,{children:[i,r]}):a===void 0?(0,Y.jsxs)(l.DropdownMenu.DropdownMenuItem,{className:n,ref:t,onClick:s,onMouseDown:RF,...c,children:[i,r,o&&(0,Y.jsx)(UG,{className:`ml-auto h-4 w-4`})]}):(0,Y.jsxs)(l.DropdownMenu.DropdownMenuCheckboxItem,{className:$(n,`gap-1`,a?``:`px-2`),ref:t,checked:a,onClick:s,onMouseDown:RF,...c,children:[i,r]})}),DY=(0,J.forwardRef)((e,t)=>{let{className:n,...r}=e;Rb(r);let i=yY();return(0,Y.jsx)(i.DropdownMenu.DropdownMenuSeparator,{className:n,ref:t})}),OY=(0,J.forwardRef)((e,t)=>{let{className:n,children:r,...i}=e;Rb(i);let a=yY();return(0,Y.jsx)(a.DropdownMenu.DropdownMenuGroup,{children:(0,Y.jsx)(a.DropdownMenu.DropdownMenuLabel,{className:n,ref:t,children:r})})}),kY=(0,J.forwardRef)((e,t)=>{let{className:n,children:r,icon:i,onClick:a,onDragEnd:o,onDragStart:s,draggable:c,label:l,...u}=e;Rb(u,!1);let d=yY();return(0,Y.jsxs)(d.Button.Button,{variant:`ghost`,className:$(n,`text-gray-400`),ref:t,"aria-label":l,onClick:a,onDragStart:s,onDragEnd:o,draggable:c,...u,children:[i,r]})}),AY=(0,J.forwardRef)((e,t)=>{let{className:n,tabs:r,defaultOpenTab:i,openTab:a,setOpenTab:o,loading:s,...c}=e;Rb(c);let l=yY();return(0,Y.jsxs)(l.Tabs.Tabs,{className:$(n,`bg-popover max-w-screen rounded-lg p-2`),ref:t,value:a,defaultValue:i,onValueChange:o,children:[(0,Y.jsx)(l.Tabs.TabsList,{children:r.map(e=>(0,Y.jsx)(l.Tabs.TabsTrigger,{value:e.name,children:e.name},e.name))}),r.map(e=>(0,Y.jsx)(l.Tabs.TabsContent,{value:e.name,children:(0,Y.jsx)(l.Card.Card,{children:(0,Y.jsx)(l.Card.CardContent,{className:`p-4`,children:e.tabPanel})})},e.name))]})}),jY=(0,J.forwardRef)((e,t)=>{let{className:n,children:r,...i}=e;return Rb(i),(0,Y.jsx)(`div`,{className:$(n,`flex flex-col items-start justify-center gap-2`),ref:t,children:r})}),MY=(0,J.forwardRef)((e,t)=>{let{className:n,value:r,placeholder:i,onKeyDown:a,onChange:o,...s}=e;Rb(s);let c=yY();return(0,Y.jsx)(c.Input.Input,{"data-test":`embed-input`,className:$(n,`w-80 max-w-full`),ref:t,value:r,placeholder:i,onKeyDown:a,onChange:o})}),NY=(0,J.createContext)(null),PY=e=>{let{children:t,open:n,onOpenChange:r,position:i,portalElement:a,...o}=e;Rb(o);let s=yY();return(0,Y.jsx)(s.Popover.Popover,{open:n,onOpenChange:r,children:(0,Y.jsx)(NY.Provider,{value:a,children:t})})},FY=(0,J.forwardRef)((e,t)=>{let{children:n,...r}=e;Rb(r);let i=yY();return(0,Y.jsx)(i.Popover.PopoverTrigger,{ref:t,render:n})}),IY=(0,J.forwardRef)((e,t)=>{let{className:n,variant:r,children:i,...a}=e;Rb(a);let o=yY(),s=(0,J.useContext)(NY);return(0,Y.jsx)(o.Popover.PopoverContent,{sideOffset:8,container:s,initialFocus:!1,className:$(n,`flex flex-col gap-2`,r===`panel-popover`?`w-fit max-w-none border-none p-0 shadow-none`:``),ref:t,children:i})}),LY=(0,J.forwardRef)((e,t)=>{let{className:n,children:r,...i}=e;return Rb(i,!1),(0,Y.jsx)(`div`,{className:n,ref:t,...i,children:r})}),RY=(0,J.forwardRef)((e,t)=>{let{className:n,children:r,icon:i,onClick:a,onDragEnd:o,onDragStart:s,draggable:c,label:l,...u}=e;Rb(u,!1);let d=yY();return(0,Y.jsxs)(d.Button.Button,{variant:`ghost`,className:$(n,`text-gray-400`),ref:t,"aria-label":l,onClick:a,onDragStart:s,onDragEnd:o,draggable:c,...u,children:[i,r]})}),zY=(0,J.forwardRef)((e,t)=>{let{className:n,children:r,id:i,columns:a,...o}=e;return Rb(o),(0,Y.jsx)(`div`,{className:$(`bg-popover text-popover-foreground z-50 min-w-32 overflow-x-hidden overflow-y-auto rounded-md p-1 shadow-md ring-1 ring-foreground/10`,`grid`,n),style:{gridTemplateColumns:`repeat(${a}, 1fr)`},ref:t,id:i,role:`grid`,children:r})}),BY=(0,J.forwardRef)((e,t)=>{let{className:n,children:r,columns:i,...a}=e;return Rb(a),(0,Y.jsx)(`div`,{className:n,style:{gridColumn:`1 / ${i+1}`},ref:t,children:r})}),VY=(0,J.forwardRef)((e,t)=>{let{className:n,children:r,id:i,...a}=e;return Rb(a),(0,Y.jsx)(`div`,{id:i,role:`listbox`,className:$(`bg-popover text-popover-foreground z-50 min-w-32 overflow-x-hidden overflow-y-auto rounded-md p-1 shadow-md ring-1 ring-foreground/10`,n),ref:t,children:r})}),HY=(0,J.forwardRef)((e,t)=>{let{className:n,children:r,...i}=e;return Rb(i),(0,Y.jsx)(`div`,{className:$(`focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*=text-])]:text-muted-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled]:pointer-events-none data-[inset]:pl-8 data-[disabled]:opacity-50 [&_svg:not([class*=size-])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,`hover:bg-accent hover:text-accent-foreground data-[variant=destructive]:hover:bg-destructive/10 dark:data-[variant=destructive]:hover:bg-destructive/20 data-[variant=destructive]:hover:text-destructive`,`aria-selected:bg-accent aria-selected:text-accent-foreground data-[variant=destructive]:aria-selected:bg-destructive/10 dark:data-[variant=destructive]:aria-selected:bg-destructive/20 data-[variant=destructive]:aria-selected:text-destructive`,n),ref:t,children:(0,Y.jsx)(`div`,{children:r})})}),UY=(0,J.forwardRef)((e,t)=>{let n=yY(),{className:r,item:i,isSelected:a,onClick:o,id:s,...c}=e;Rb(c);let l=(0,J.useRef)(null);return(0,J.useEffect)(()=>{!l.current||!a||FF(l.current,l.current.closest(`.bn-suggestion-menu, #ai-suggestion-menu`))!==`none`&&l.current.scrollIntoView({block:`nearest`})},[a]),(0,Y.jsxs)(`div`,{className:$(`focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*=text-])]:text-muted-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled]:pointer-events-none data-[inset]:pl-8 data-[disabled]:opacity-50 [&_svg:not([class*=size-])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,`hover:bg-accent hover:text-accent-foreground data-[variant=destructive]:hover:bg-destructive/10 dark:data-[variant=destructive]:hover:bg-destructive/20 data-[variant=destructive]:hover:text-destructive`,`aria-selected:bg-accent aria-selected:text-accent-foreground data-[variant=destructive]:aria-selected:bg-destructive/10 dark:data-[variant=destructive]:aria-selected:bg-destructive/20 data-[variant=destructive]:aria-selected:text-destructive`,e.item.size===`small`?`gap-3 py-1`:``,r),"data-highlighted":!0,ref:IF([t,l]),id:s,onMouseDown:e=>e.preventDefault(),onClick:o,role:`option`,"aria-selected":a||void 0,children:[i.icon&&(0,Y.jsx)(`div`,{className:$(`p-3`,e.item.size===`small`?`p-0`:``,r),"data-position":`left`,children:i.icon}),(0,Y.jsxs)(`div`,{className:`flex-1`,children:[(0,Y.jsx)(`div`,{className:$(`text-base`,e.item.size===`small`?`text-sm`:``,r),children:i.title}),(0,Y.jsx)(`div`,{className:$(`text-xs`,e.item.size===`small`?`hidden`:``,r),children:i.subtext})]}),i.badge&&(0,Y.jsx)(`div`,{"data-position":`right`,className:`text-xs`,children:(0,Y.jsx)(n.Badge.Badge,{variant:`secondary`,children:i.badge})})]})}),WY=(0,J.forwardRef)((e,t)=>{let{className:n,children:r,...i}=e;return Rb(i),(0,Y.jsx)(`div`,{className:$(`px-2 py-1.5 text-sm font-medium data-[inset]:pl-8`,n),ref:t,children:r})}),GY=(0,J.forwardRef)((e,t)=>{let{className:n,...r}=e;return Rb(r),(0,Y.jsx)(`div`,{className:$(n,`animate-spin`),ref:t,children:(0,Y.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`1em`,viewBox:`0 -960 960 960`,width:`1em`,fill:`#e8eaed`,children:(0,Y.jsx)(`path`,{d:`M480-80q-82 0-155-31.5t-127.5-86Q143-252 111.5-325T80-480q0-83 31.5-155.5t86-127Q252-817 325-848.5T480-880q17 0 28.5 11.5T520-840q0 17-11.5 28.5T480-800q-133 0-226.5 93.5T160-480q0 133 93.5 226.5T480-160q133 0 226.5-93.5T800-480q0-17 11.5-28.5T840-520q17 0 28.5 11.5T880-480q0 82-31.5 155t-86 127.5q-54.5 54.5-127 86T480-80Z`})})})}),KY=(0,J.forwardRef)((e,t)=>{let{className:n,markClassName:r,backgroundColor:i,children:a,...o}=e;return Rb(o),(0,Y.jsx)(`span`,{className:$(n,r),style:r?void 0:{backgroundColor:i},ref:t,children:a})}),qY=(0,J.forwardRef)((e,t)=>{let{className:n,children:r,onMouseDown:i,onClick:a,...o}=e;Rb(o,!1);let s=yY();return(0,Y.jsx)(s.Button.Button,{variant:`ghost`,className:$(n,`h-full w-full p-0 text-gray-400`,n?.includes(`extend-button-add-remove-columns`)?`ml-1`:`mt-1`,n?.includes(`extend-button-editing`)?`bg-accent text-accent-foreground`:``),ref:t,onClick:a,onMouseDown:i,...o,children:r})}),JY=(0,J.forwardRef)((e,t)=>{let{className:n,children:r,draggable:i,onDragStart:a,onDragEnd:o,style:s,label:c,...l}=e;Rb(l,!1);let u=yY();return(0,Y.jsx)(u.Button.Button,{variant:`ghost`,className:$(n,`h-fit w-fit p-0 text-gray-400`),ref:t,"aria-label":c,draggable:i,onDragStart:a,onDragEnd:o,style:s,...l,children:r})}),YY=(0,J.forwardRef)((e,t)=>{let{className:n,children:r,onMouseEnter:i,onMouseLeave:a,variant:o,...s}=e;Rb(s);let c=yY();return(0,Y.jsx)(c.Tooltip.TooltipProvider,{delay:0,children:(0,Y.jsx)(`div`,{className:$(n,`bg-popover text-popover-foreground flex h-fit gap-1 rounded-lg border p-1 shadow-md`,o===`action-toolbar`?`w-fit`:``),ref:t,onMouseEnter:i,onMouseLeave:a,children:r})})}),XY=(0,J.forwardRef)((e,t)=>{let{className:n,children:r,mainTooltip:i,secondaryTooltip:a,icon:o,isSelected:s,isDisabled:c,onClick:l,label:u,variant:d,onMouseDown:f,...p}=e;Rb(p,!1);let m=yY(),h=PA(),g=e=>{RF(e),f?.(e)},_=s===void 0?(0,Y.jsxs)(m.Button.Button,{className:$(n,d===`compact`?`h-6 min-w-6 p-0`:``),variant:`ghost`,size:d===`compact`?`sm`:`default`,disabled:c,onClick:l,ref:t,"aria-label":u,...p,onMouseDown:g,children:[o,r]}):(0,Y.jsxs)(m.Toggle.Toggle,{className:$(n,`aria-expanded:bg-accent aria-expanded:text-accent-foreground`,d===`compact`?`h-6 min-w-6 p-0`:``),size:d===`compact`?`sm`:`default`,"aria-label":u,onClick:l,pressed:s,disabled:c,ref:t,...p,onMouseDown:g,children:[o,r]});return(0,Y.jsxs)(m.Tooltip.Tooltip,{children:[(0,Y.jsx)(m.Tooltip.TooltipTrigger,{render:_}),(0,Y.jsxs)(m.Tooltip.TooltipContent,{container:h,className:`flex flex-col items-center whitespace-pre-wrap`,children:[(0,Y.jsx)(`span`,{children:i}),a&&(0,Y.jsx)(`span`,{children:a})]})]})}),ZY=(0,J.forwardRef)((e,t)=>{let{className:n,items:r,isDisabled:i,portalElement:a,preventFocusOnOpen:o,...s}=e;Rb(s);let c=yY(),l=e=>(0,Y.jsxs)(`div`,{className:`flex items-center gap-1`,children:[e.icon,e.text]}),u=r.filter(e=>e.isSelected)[0];return u?(0,Y.jsxs)(c.Select.Select,{value:u.text,onValueChange:e=>r.find(t=>t.text===e).onClick?.(),disabled:i,children:[(0,Y.jsx)(c.Select.SelectTrigger,{className:`border-none`,onMouseDown:RF,children:(0,Y.jsx)(c.Select.SelectValue,{})}),(0,Y.jsx)(c.Select.SelectContent,{className:n,container:a,alignItemWithTrigger:!1,ref:t,...xY(o??!1),children:r.map(e=>(0,Y.jsx)(c.Select.SelectItem,{disabled:e.isDisabled,value:e.text,onMouseDown:RF,children:(0,Y.jsx)(l,{...e})},e.text))})]}):null}),QY=(0,J.forwardRef)((e,t)=>{let{className:n,children:r,selected:i,headerText:a,onFocus:o,onBlur:s,tabIndex:c,...l}=e;Rb(l);let u=yY();return(0,Y.jsxs)(u.Card.Card,{className:$(n,`w-[300px]`,i?`bg-accent text-accent-foreground`:``),onFocus:o,onBlur:s,tabIndex:c,ref:t,children:[a&&(0,Y.jsx)(`div`,{className:`px-4 pt-4 text-sm italic`,children:a}),r]})}),$Y=(0,J.forwardRef)((e,t)=>{let{className:n,children:r,...i}=e;return Rb(i),(0,Y.jsx)(`div`,{className:$(n,`p-4`,n?.includes(`thread-comments`)?`flex flex-col gap-6 border-b`:``),ref:t,children:r})}),eX=(0,J.forwardRef)((e,t)=>{let{className:n,children:r,...i}=e;Rb(i,!1);let a=yY();return(0,Y.jsx)(a.Button.Button,{className:$(n,`text-foreground w-fit bg-transparent p-0 hover:bg-transparent`),ref:t,children:r})}),tX=(0,J.forwardRef)((e,t)=>{let{authorInfo:n,timeString:r,edited:i,...a}=e,o=KA();Rb(a,!1);let s=yY();return n===`loading`?(0,Y.jsxs)(`div`,{className:`flex flex-row flex-nowrap items-center gap-4`,children:[(0,Y.jsx)(s.Skeleton.Skeleton,{className:`size-7 animate-pulse rounded-full bg-neutral-400`}),(0,Y.jsx)(s.Skeleton.Skeleton,{className:`h-3 w-32 animate-pulse rounded-full bg-neutral-400`})]}):(0,Y.jsxs)(`div`,{className:`flex flex-row flex-nowrap items-center gap-4`,children:[(0,Y.jsxs)(s.Avatar.Avatar,{children:[(0,Y.jsx)(s.Avatar.AvatarImage,{src:n.avatarUrl,alt:n.username,className:`h-7 rounded-full`}),(0,Y.jsx)(s.Avatar.AvatarFallback,{children:n.username[0]})]}),(0,Y.jsxs)(`div`,{className:`flex flex-row flex-nowrap items-center gap-2`,children:[(0,Y.jsx)(`span`,{className:`text-sm font-bold`,children:n.username}),(0,Y.jsxs)(`span`,{className:`text-xs`,children:[r,` `,i&&`(${o.comments.edited})`]})]})]})}),nX=(0,J.forwardRef)((e,t)=>{let{className:n,showActions:r,authorInfo:i,timeString:a,actions:o,edited:s,emojiPickerOpen:c,children:l,...u}=e;Rb(u);let[d,f]=(0,J.useState)(!1),{focused:p,ref:m}=PF(),h=o&&(r===!0||r===void 0||r===`hover`&&d||p||c);return(0,Y.jsxs)(`div`,{ref:t,className:$(n,`relative flex flex-col gap-2`),onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),children:[h?(0,Y.jsx)(`div`,{className:`absolute top-0 right-0 z-10`,ref:m,children:o}):null,(0,Y.jsx)(tX,{...e}),l]})}),rX=(0,J.forwardRef)((e,t)=>{let{className:n,onFocus:r,onBlur:i,autoFocus:a,editor:o,editable:s,...c}=e;Rb(c);let l=yA();return(0,Y.jsx)(mX,{autoFocus:a,className:$(n,``),theme:l?.colorSchemePreference,editor:e.editor,sideMenu:!1,slashMenu:!1,tableHandles:!1,filePanel:!1,formattingToolbar:!1,editable:s,ref:t,onFocus:r,onBlur:i,children:(0,Y.jsx)(qN,{formattingToolbar:iX})})}),iX=()=>{let e=PN([]).filter(e=>e.key!==`nestBlockButton`&&e.key!==`unnestBlockButton`);return(0,Y.jsx)(FN,{blockTypeSelectItems:[],children:e})},aX=(0,J.forwardRef)((e,t)=>{let{className:n,text:r,icon:i,isSelected:a,mainTooltip:o,secondaryTooltip:s,onClick:c,onMouseEnter:l,...u}=e;Rb(u,!1);let d=yY(),f=PA(),p=(0,Y.jsxs)(d.Button.Button,{variant:a?`secondary`:`outline`,className:$(n,`flex h-7 items-center gap-1 rounded-full px-2.5`),onClick:c,onMouseEnter:l,ref:t,children:[(0,Y.jsx)(`span`,{children:i}),(0,Y.jsx)(`span`,{children:r})]});return o?(0,Y.jsxs)(d.Tooltip.Tooltip,{children:[(0,Y.jsx)(d.Tooltip.TooltipTrigger,{render:p}),(0,Y.jsxs)(d.Tooltip.TooltipContent,{container:f,className:`flex flex-col items-center whitespace-pre-wrap`,children:[(0,Y.jsx)(`span`,{children:o}),s&&(0,Y.jsx)(`span`,{children:s})]})]}):p}),oX=(0,J.forwardRef)((e,t)=>{let{className:n,children:r,...i}=e;Rb(i);let a=yY();return(0,Y.jsx)(a.Tooltip.TooltipProvider,{delay:0,children:(0,Y.jsx)(`div`,{className:$(n,`flex w-full flex-row flex-wrap gap-1`),ref:t,children:r})})}),sX=(0,J.forwardRef)((e,t)=>{let{className:n,children:r,...i}=e;return Rb(i,!1),(0,Y.jsx)(`div`,{className:$(n),ref:t,children:r})}),cX=(0,J.forwardRef)((e,t)=>{let{className:n,selected:r,comparing:i,onClick:a,actions:o,children:s,...c}=e;Rb(c,!1);let l=yY();return(0,Y.jsxs)(l.Card.Card,{className:$(n,r?`selected`:``,i?`comparing`:``,`gap-0 rounded-lg py-0 shadow-none`),onClick:a,ref:t,children:[s,o&&(0,Y.jsx)(`div`,{className:`bn-snapshot-menu`,onClick:e=>e.stopPropagation(),children:o})]})}),lX=(0,J.forwardRef)((e,t)=>{let{className:n,children:r,type:i,onClick:a,label:o,...s}=e;Rb(s);let c=yY();return(0,Y.jsx)(c.Button.Button,{type:i,className:n,"aria-label":o,ref:t,onClick:a,children:r})}),uX=(0,J.forwardRef)((e,t)=>{let{className:n,accept:r,value:i,placeholder:a,onChange:o,...s}=e;Rb(s);let c=yY();return(0,Y.jsx)(c.Input.Input,{type:`file`,className:n,ref:t,accept:r,value:i?i.name:void 0,onChange:async e=>o?.(e.target.files[0]),placeholder:a})}),dX=(0,J.forwardRef)((e,t)=>{let{className:n,isSelected:r,onClick:i,item:a,id:o,...s}=e;Rb(s);let c=(0,J.useRef)(null);return(0,J.useEffect)(()=>{!c.current||!r||FF(c.current,c.current.closest(`.bn-grid-suggestion-menu`))!==`none`&&c.current.scrollIntoView({block:`nearest`})},[r]),(0,Y.jsx)(`div`,{className:$(`focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*=text-])]:text-muted-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm p-2 text-sm data-[disabled]:pointer-events-none data-[inset]:pl-8 data-[disabled]:opacity-50 [&_svg:not([class*=size-])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,`hover:bg-accent hover:text-accent-foreground data-[variant=destructive]:hover:bg-destructive/10 dark:data-[variant=destructive]:hover:bg-destructive/20 data-[variant=destructive]:hover:text-destructive`,`aria-selected:bg-accent aria-selected:text-accent-foreground data-[variant=destructive]:aria-selected:bg-destructive/10 dark:data-[variant=destructive]:aria-selected:bg-destructive/20 data-[variant=destructive]:aria-selected:text-destructive`,`text-base!`,n),ref:IF([t,c]),id:o,role:`option`,onClick:i,"aria-selected":r||void 0,children:a.icon})}),fX=(0,J.forwardRef)((e,t)=>{let{className:n,children:r,columns:i,...a}=e;return Rb(a),(0,Y.jsx)(`div`,{className:n,style:{gridColumn:`1 / ${i+1}`},ref:t,children:r})}),pX={FormattingToolbar:{Root:YY,Button:XY,Select:ZY},FilePanel:{Root:AY,Button:lX,FileInput:uX,TabPanel:jY,TextInput:MY},LinkToolbar:{Root:YY,Button:XY,Select:ZY},SideMenu:{Root:LY,Button:RY},SuggestionMenu:{Root:VY,Item:UY,EmptyItem:HY,Label:WY,Loader:GY},GridSuggestionMenu:{Root:zY,Item:dX,EmptyItem:BY,Loader:fX},TableHandle:{Root:JY,ExtendButton:qY},Comments:{Comment:nX,Editor:rX,Card:QY,CardSection:$Y,ExpandSectionsPrompt:eX},Versioning:{Sidebar:sX,Snapshot:cX},AttributionTooltip:{Root:KY},Generic:{Badge:{Root:aX,Group:oX},Toolbar:{Root:YY,Button:XY,Select:ZY},Form:{Root:EJ,TextInput:bY},Menu:{Root:CY,Trigger:wY,Dropdown:TY,Divider:DY,Label:OY,Item:EY,Button:kY},Popover:{Root:PY,Trigger:FY,Content:IY}}},mX=e=>{let{className:t,shadCNComponents:n,...r}=e,i=(0,J.useMemo)(()=>({..._Y,...n}),[n]);return(0,Y.jsx)(vY.Provider,{value:i,children:(0,Y.jsx)(WA.Provider,{value:pX,children:(0,Y.jsx)(oF,{className:Vb(`bn-shadcn`,t||``),...r})})})},hX=`default`,gX=`💡`,_X={paragraph:`paragraph`,heading:`heading`,bullet:`bulletListItem`,numbered:`numberedListItem`,check:`checkListItem`,toggle:`toggleListItem`,quote:`quote`};function vX(e){let t=[];for(let n of e){let e=n.styles,r={type:`text`,text:n.text,styles:{...e.bold?{bold:!0}:{},...e.italic?{italic:!0}:{},...e.underline?{underline:!0}:{},...e.strike?{strike:!0}:{},...e.code?{code:!0}:{},...e.color===void 0?{}:{textColor:e.color},...e.background===void 0?{}:{backgroundColor:e.background}}};if(n.href===void 0){t.push(r);continue}let i=t.at(-1);i?.type===`link`&&i.href===n.href?i.content.push(r):t.push({type:`link`,href:n.href,content:[r]})}return t}var yX=e=>({textAlignment:e?.align??`left`,textColor:e?.color??hX,backgroundColor:e?.background??hX});function bX(e){let t={...e};delete t.children;let n=JSON.stringify(t),r=2166136261;for(let e=0;e<n.length;e++)r=Math.imul(r^n.charCodeAt(e),16777619)>>>0;return r.toString(36)}function xX(e){let t=new Map,n=(e,r)=>e.map((e,i)=>{let a=r[i];if(!a)return e;let o=bX(a),s=t.get(o)??0;t.set(o,s+1);let c=`children`in a?a.children??[]:[];return{...e,id:`d${o}${s===0?``:`-${String(s)}`}`,...e.children?{children:n(e.children,c)}:{}}});return n(SX(e),e)}function SX(e){return e.map(e=>{switch(e.type){case`paragraph`:case`bullet`:case`toggle`:case`quote`:case`heading`:case`numbered`:case`check`:return{type:_X[e.type]??`paragraph`,props:{...yX(e.look),...e.type===`heading`?{level:e.level,isToggleable:e.toggle===!0}:{},...e.type===`numbered`&&e.start!==void 0?{start:e.start}:{},...e.type===`check`?{checked:e.checked}:{}},content:vX(e.content),children:SX(e.children??[])};case`callout`:return{type:`callout`,props:{icon:e.icon??`💡`,textColor:e.look?.color??hX,backgroundColor:e.look?.background??hX},content:vX(e.content),children:SX(e.children??[])};case`code`:return{type:`codeBlock`,props:{language:e.language??`text`},content:[{type:`text`,text:e.code,styles:{}}]};case`image`:return{type:`image`,props:{url:e.src,name:e.alt??``,caption:e.caption??``,textAlignment:e.align??`left`,...e.width===void 0?{}:{previewWidth:e.width}}};case`table`:return{type:`table`,content:{type:`tableContent`,headerRows:e.head===`none`||e.head===`column`?0:1,headerCols:+(e.head===`column`||e.head===`both`),columnWidths:Array.from({length:Math.max(0,...e.rows.map(e=>e.length))},(t,n)=>e.widths?.[n]??void 0),rows:e.rows.map(e=>({cells:e.map(e=>vX(e))}))}};case`divider`:return{type:`divider`};case`embed`:case`source`:return{type:`embed`,props:{source:e.source}}}})}var CX=(e,t)=>JSON.stringify(e,Object.keys(e).sort())===JSON.stringify(t,Object.keys(t).sort());function wX(e){if(typeof e==`string`)return e===``?[]:[{text:e,styles:{}}];if(!Array.isArray(e))return[];let t=[],n=(e,n,r)=>{if(e===``)return;let i=t.at(-1);i&&i.href===r&&CX(i.styles,n)?i.text+=e:t.push({text:e,styles:n,...r===void 0?{}:{href:r}})},r=(e,t)=>{if(e.text===``)return;let r=e.styles,i=typeof r.textColor==`string`?r.textColor:hX,a=typeof r.backgroundColor==`string`?r.backgroundColor:hX,o={...r.bold===!0?{bold:!0}:{},...r.italic===!0?{italic:!0}:{},...r.underline===!0?{underline:!0}:{},...r.strike===!0?{strike:!0}:{},...r.code===!0?{code:!0}:{},...i===hX?{}:{color:i},...a===hX?{}:{background:a}};n(e.text,o,t)};for(let t of e)if(t.type===`text`)r(t);else for(let e of t.content)r(e,t.href);return du(t)}function TX(e){let t=e?.textAlignment,n=e?.textColor,r=e?.backgroundColor,i={...t===`center`||t===`right`||t===`justify`?{align:t}:{},...typeof n==`string`&&n!==hX?{color:n}:{},...typeof r==`string`&&r!==hX?{background:r}:{}};return Object.keys(i).length>0?{look:i}:{}}var EX=e=>{let t=OX(e.children??[]);return t.length>0?{children:t}:{}},DX=e=>e===2||e===3||e===4||e===5||e===6?e:1;function OX(e){let t=[];for(let n of e){let e=n.props??{};switch(n.type){case`paragraph`:t.push({type:`paragraph`,...TX(e),content:wX(n.content),...EX(n)});break;case`heading`:t.push({type:`heading`,level:DX(e.level),...e.isToggleable===!0?{toggle:!0}:{},...TX(e),content:wX(n.content),...EX(n)});break;case`bulletListItem`:t.push({type:`bullet`,...TX(e),content:wX(n.content),...EX(n)});break;case`numberedListItem`:{let r=e.start;t.push({type:`numbered`,...typeof r==`number`?{start:r}:{},...TX(e),content:wX(n.content),...EX(n)});break}case`checkListItem`:t.push({type:`check`,checked:e.checked===!0,...TX(e),content:wX(n.content),...EX(n)});break;case`toggleListItem`:t.push({type:`toggle`,...TX(e),content:wX(n.content),...EX(n)});break;case`quote`:t.push({type:`quote`,...TX(e),content:wX(n.content),...EX(n)});break;case`callout`:{let r=e.icon,i=TX(e);t.push({type:`callout`,...typeof r==`string`&&r!==``&&r!==`💡`?{icon:r}:{},...i.look?.color!==void 0||i.look?.background!==void 0?{look:{...i.look.color===void 0?{}:{color:i.look.color},...i.look.background===void 0?{}:{background:i.look.background}}}:{},content:wX(n.content),...EX(n)});break}case`codeBlock`:{let r=e.language;t.push({type:`code`,...typeof r==`string`&&r!==``&&r!==`text`?{language:r}:{},code:wX(n.content).map(e=>e.text).join(``)});break}case`image`:{let n=e.url,r=e.name,i=e.caption;if(typeof n!=`string`||n===``)break;let a=e.previewWidth,o=e.textAlignment;t.push({type:`image`,src:n,...typeof r==`string`&&r!==``?{alt:r}:{},...typeof i==`string`&&i!==``?{caption:i}:{},...typeof a==`number`&&a>0?{width:Math.round(a)}:{},...o===`center`||o===`right`?{align:o}:{}});break}case`table`:{let e=n.content;if(e===void 0||typeof e==`string`||Array.isArray(e))break;let r=(e.headerRows??0)>0,i=(e.headerCols??0)>0,a=(e.columnWidths??[]).map(e=>typeof e==`number`&&e>0?Math.round(e):null);t.push({type:`table`,rows:e.rows.map(e=>e.cells.map(e=>wX(Array.isArray(e)?e:e.content))),...r&&i?{head:`both`}:i?{head:`column`}:r?{}:{head:`none`},...a.some(e=>e!==null)?{widths:a}:{}});break}case`divider`:t.push({type:`divider`});break;case`embed`:{let n=e.source;typeof n==`string`&&n!==``&&t.push({type:`embed`,source:n});break}}}return t.map((e,n)=>{if(e.type!==`numbered`||e.start!==1||t[n-1]?.type===`numbered`)return e;let r={...e};return delete r.start,r})}var kX=40,AX=5;function jX(e,t,n=0){if(t===``)return;let r=t.slice(0,kX),i=e.indexOf(r);for(let t=0;t<n&&i>=0;t++)i=e.indexOf(r,i+r.length);return i<0?void 0:e.slice(0,i).split(`
224
- `).length}function MX(e){let t=document.createRange();t.selectNodeContents(e);let n=[...t.getClientRects()];return n.length>0?n:[e.getBoundingClientRect()]}function NX(e,t,n,r){let i=[],a=new Map;for(let o of e.querySelectorAll(`.bn-block-content`)){let e=o.textContent.trim(),s=a.get(e)??0;if(a.set(e,s+1),!MX(o).some(e=>ue(t,e)))continue;let c=jX(r,e,s);if(i.push({name:`the block`,source:{path:n,...c===void 0?{}:{line:c}},...e===``?{}:{text:e}}),i.length===AX)break}return i}function PX(e){let{children:t,...n}=e;return delete n.id,{...n,...t?{children:t.map(PX)}:{}}}var FX=e=>Array.isArray(e.content)?e.content.map(e=>e.type===`text`?e.text:e.content.map(e=>e.text).join(``)).join(``):``;function IX(e){let t=e.getSelection()?.blocks??[];return t.length>0?t:[e.getTextCursorPosition().block]}var LX=`.doc-scroll, .doc-body, .doc-column, .doc-title-row, .bn-container`,RX=`.doc-slash-menu, .bn-suggestion-menu, .bn-grid-suggestion-menu`;function zX(e,t){let n=document.createRange();n.selectNodeContents(e);let r=Array.from(n.getClientRects()),i=r[0];if(!i)return!0;let a=window.getSelection(),o=a&&a.rangeCount>0?a.getRangeAt(0).getClientRects()[0]:void 0;return o?o.top-i.top<i.height*.6:t||r.every(e=>Math.abs(e.top-i.top)<4)}function BX(e,t,n={}){let{onActions:r,onTitle:i}=n;(0,J.useEffect)(()=>{let n=t.current;if(!n)return;let a=e._tiptapEditor.view,o=a.dom,s=()=>{let t=window.getSelection();if(!t?.focusNode||!t.anchorNode||a.composing)return;let n=e=>o.contains(e)&&(e instanceof Element?e:e.parentElement)?.closest(`.bn-inline-content`)!=null;if(!n(t.focusNode)||!n(t.anchorNode))return;let r=a.state.selection;if(r.toJSON().type===`text`)try{let n=a.posAtDOM(t.anchorNode,t.anchorOffset),i=a.posAtDOM(t.focusNode,t.focusOffset);if(n===r.anchor&&i===r.head)return;e._tiptapEditor.commands.setTextSelection({from:Math.min(n,i),to:Math.max(n,i)})}catch{}},c=(t,n)=>{try{if(t!==n)return e.setSelection(t,n),!0;let r=o.querySelector(`.bn-block-outer[data-id="${CSS.escape(t)}"] .bn-inline-content`);return r?(e._tiptapEditor.commands.setTextSelection({from:a.posAtDOM(r,0),to:a.posAtDOM(r,r.childNodes.length)}),!0):!1}catch{return!1}},l=t=>{if(t.isComposing)return;s();let n=t.metaKey||t.ctrlKey;if(i&&!n&&!t.shiftKey&&!t.altKey&&(t.key===`ArrowUp`||t.key===`Backspace`)&&!document.querySelector(RX)){let n=e.getTextCursorPosition().block,r=e.document[0],s=a.state.selection,c=r?.id!==void 0&&n.id===r.id?o.querySelector(`.bn-block-outer[data-id="${CSS.escape(r.id)}"] .bn-inline-content`):null;if(r?.id!==void 0&&c&&s.anchor===s.head&&s.toJSON().type===`text`){let o=s.head===a.posAtDOM(c,0);if(t.key===`ArrowUp`&&zX(c,o)){t.preventDefault(),t.stopPropagation(),i();return}if(t.key===`Backspace`&&o&&n.type===`paragraph`&&(n.children?.length??0)===0){t.preventDefault(),t.stopPropagation();let a=FX(n);e.document.length>1?e.removeBlocks([r.id]):a!==``&&e.updateBlock(r.id,{type:`paragraph`,content:[]}),i(a);return}}}if(t.key===` `&&!n&&!t.altKey){let n=e.getTextCursorPosition().block;if(n.type===`paragraph`&&n.id!==void 0&&FX(n)===`"`&&(n.children?.length??0)===0){t.preventDefault(),t.stopPropagation(),e.updateBlock(n.id,{type:`quote`,content:[]});return}if(n.type===`paragraph`&&n.id!==void 0&&FX(n)===`>`&&(n.children?.length??0)===0){t.preventDefault(),t.stopPropagation();try{window.localStorage.setItem(`toggle-${n.id}`,`true`)}catch{}e.updateBlock(n.id,{type:`toggleListItem`,content:[]})}}else if(t.key===`Enter`&&!n&&!t.shiftKey&&!t.altKey){let n=e.getTextCursorPosition().block,r=n.type===`toggleListItem`||n.type===`heading`&&n.props?.isToggleable===!0,i=n.type===`callout`;if(!r&&!i||n.id===void 0||FX(n)===``)return;let s=o.querySelector(`.bn-block-outer[data-id="${CSS.escape(n.id)}"]`),c=i||s?.querySelector(`.bn-toggle-wrapper`)?.getAttribute(`data-show-children`)===`true`,l=s?.querySelector(`.bn-inline-content`),u=a.state.selection;if(!c||!l||u.anchor!==u.head||u.head!==a.posAtDOM(l,l.childNodes.length))return;t.preventDefault(),t.stopPropagation();let d=n.children?.[0];d?.id===void 0?e.updateBlock(n.id,{type:n.type,children:[{type:`paragraph`}]}):e.insertBlocks([{type:`paragraph`}],d.id,`before`);let f=e.getBlock(n.id)?.children?.[0];f?.id!==void 0&&e.setTextCursorPosition(f.id,`start`)}else if(t.key===`Escape`&&!n&&!document.querySelector(RX)){let n=e.getTextCursorPosition().block;(e.getSelection()?.blocks??[]).length===0&&n.id!==void 0&&c(n.id,n.id)&&t.preventDefault()}else if(n&&!t.shiftKey&&!t.altKey&&t.key===`d`){let n=IX(e),r=n.at(-1);if(r?.id===void 0)return;t.preventDefault(),t.stopPropagation(),e.insertBlocks(n.map(PX),r.id,`after`)}else if(n&&!t.shiftKey&&!t.altKey&&t.key===`/`){let n=e.getTextCursorPosition().block;if(n.id===void 0||!r)return;t.preventDefault(),t.stopPropagation(),r(n.id)}},u=()=>Array.from(o.querySelectorAll(`:scope > .bn-block-group > .bn-block-outer`)).map(e=>({id:e.getAttribute(`data-id`)??``,box:e.getBoundingClientRect()})),d=(t,n)=>{let r=u(),a=r.at(-1);if(!a){e.focus();return}if(i&&r[0]&&n<r[0].box.top){i();return}let o=r.find(e=>n>=e.box.top&&n<=e.box.bottom),s=o??(n<(r[0]?.box.top??0)?r[0]:a);if(s){try{e.setTextCursorPosition(s.id,o&&t<s.box.left?`start`:`end`)}catch{}e.focus()}},f,p=e=>{if(!f)return;let t=e.clientX-f.x,n=e.clientY-f.y;if(!f.box&&Math.hypot(t,n)<6)return;f.box||(f.box=document.createElement(`div`),f.box.className=`doc-marquee`,document.body.append(f.box));let r=Math.min(f.y,e.clientY),i=Math.max(f.y,e.clientY);Object.assign(f.box.style,{left:`${String(Math.min(f.x,e.clientX))}px`,top:`${String(r)}px`,width:`${String(Math.abs(t))}px`,height:`${String(Math.abs(n))}px`});let a=u().filter(e=>e.box.bottom>=r&&e.box.top<=i),o=a[0],s=a.at(-1);o&&s&&c(o.id,s.id)},m=t=>{let n=f;f=void 0,window.removeEventListener(`mousemove`,p),window.removeEventListener(`mouseup`,m),n?.box?(n.box.remove(),e.focus()):n&&d(t.clientX,t.clientY)},h=e=>{if(e.button!==0)return;let t=e.target;t&&!o.contains(t)&&t.matches(LX)&&(e.preventDefault(),f={x:e.clientX,y:e.clientY,box:void 0},window.addEventListener(`mousemove`,p),window.addEventListener(`mouseup`,m))};return o.addEventListener(`keydown`,l,!0),n.addEventListener(`mousedown`,h),()=>{o.removeEventListener(`keydown`,l,!0),n.removeEventListener(`mousedown`,h),window.removeEventListener(`mousemove`,p),window.removeEventListener(`mouseup`,m),f?.box?.remove()}},[e,r,i,t])}var VX=/^([a-z][a-z0-9+.-]*:|\/\/|#)/i;function HX(e,t){let n=e.split(`/`).filter(Boolean),r=t.split(`/`).filter(Boolean),i=0;for(;i<n.length&&i<r.length-1&&n[i]===r[i];)i++;let a=n.slice(i).map(()=>`..`),o=[...a,...r.slice(i)].join(`/`);return a.length===0?`./${o}`:o}var UX=e=>e.slice(0,Math.max(0,e.lastIndexOf(`/`))),WX=e=>e.slice(e.lastIndexOf(`/`)+1);function GX(e,t){if(VX.test(t))return;let n=t.split(/[?#]/)[0]??``,r;try{r=decodeURIComponent(n)}catch{return}let i=[];for(let t of`${e}/${r}`.split(`/`))if(t!==``&&t!==`.`){if(t!==`..`)i.push(t);else if(i.pop()===void 0)return}return i.length===0?void 0:i.join(`/`)}function KX(e,t){let n=UX(e);return t.filter(t=>t.entry!==e).map(e=>({title:e.title??WX(e.dir),href:HX(n,e.entry),kind:e.kind,place:e.dir}))}function qX(e,t,n){let r=GX(UX(e),t);if(r!==void 0)return n.find(e=>e.entry===r||e.dir===r)?.entry??r}var JX=[`gray`,`brown`,`red`,`orange`,`yellow`,`green`,`blue`,`purple`,`pink`],YX=[{key:`paragraph`,icon:Lt,aliases:[`text`,`p`,`正文`,`文字`,`段落`],block:{type:`paragraph`}},{key:`heading1`,hint:`#`,icon:Ot,aliases:[`h1`,`title`,`标题`,`一级`],block:{type:`heading`,props:{level:1}}},{key:`heading2`,hint:`##`,icon:kt,aliases:[`h2`,`标题`,`二级`],block:{type:`heading`,props:{level:2}}},{key:`heading3`,hint:`###`,icon:At,aliases:[`h3`,`标题`,`三级`],block:{type:`heading`,props:{level:3}}},{key:`bullet`,hint:`-`,icon:dt,aliases:[`ul`,`list`,`bullet`,`列表`,`无序`],block:{type:`bulletListItem`}},{key:`numbered`,hint:`1.`,icon:$e,aliases:[`ol`,`list`,`number`,`列表`,`有序`,`编号`],block:{type:`numberedListItem`}},{key:`check`,hint:`[]`,icon:Pt,aliases:[`todo`,`task`,`checkbox`,`待办`,`任务`,`清单`],block:{type:`checkListItem`}},{key:`toggle`,hint:`>`,icon:Nt,aliases:[`fold`,`collapse`,`折叠`,`展开`],block:{type:`toggleListItem`}},{key:`quote`,hint:`"`,icon:Rt,aliases:[`blockquote`,`引用`],block:{type:`quote`}},{key:`callout`,icon:jt,aliases:[`note`,`tip`,`warning`,`提示`,`注意`,`标注`],block:{type:`callout`}},{key:`code`,hint:"```",icon:Dt,aliases:[`pre`,`代码`],block:{type:`codeBlock`}},{key:`divider`,hint:`---`,icon:yt,aliases:[`hr`,`line`,`rule`,`分隔`,`横线`],block:{type:`divider`}},{key:`table`,icon:at,aliases:[`grid`,`表格`],block:{type:`table`,content:{type:`tableContent`,rows:[{cells:[[],[],[]]},{cells:[[],[],[]]}]}}},{key:`image`,icon:We,aliases:[`picture`,`photo`,`img`,`图片`,`照片`],block:{type:`image`}}],XX=[`paragraph`,`heading1`,`heading2`,`heading3`,`bullet`,`numbered`,`check`,`toggle`,`quote`,`callout`];function ZX(e){let t=YX.find(t=>t.key===e);return t&&XX.includes(e)?t.block:void 0}function QX(e,t){let n=t.trim().toLowerCase(),r=e=>e.title.toLowerCase().includes(n)||e.key.includes(n)||e.aliases.some(e=>e.toLowerCase().includes(n)),i=YX.map(t=>({...t,title:e.blocks[t.key]}));if(n===``)return i;let a=XX.flatMap(t=>{let n=YX.find(e=>e.key===t);return n?.block?[{key:`turn:${t}`,title:`${e.turnInto} ${e.blocks[t]}`,icon:n.icon,aliases:[`turn`,`转换`,`变成`,e.turnInto],update:n.block}]:[]}),o=JX.flatMap(t=>[{key:`color:text:${t}`,title:`${e.colorNames[t]} ${e.text}`,icon:It,aliases:[t,`color`,`颜色`,e.colorNames[t]],update:{type:``,props:{textColor:t}}},{key:`color:background:${t}`,title:`${e.colorNames[t]} ${e.background}`,icon:It,aliases:[t,`background`,`背景`,e.colorNames[t]],update:{type:``,props:{backgroundColor:t}}}]),s=[...a,...o].filter(e=>e.aliases.some(e=>e.toLowerCase().startsWith(n))||e.title.toLowerCase().startsWith(n));return[...i.filter(r),...s]}function $X(){let e=bA();return t=>{if(t.block){XC(e,t.block);return}if(!t.update)return;let n=e.getTextCursorPosition().block,{type:r,...i}=t.update;e.updateBlock(n,{...r===``?{}:{type:r},...i})}}var eZ={doc:Ft,video:wt,slides:bt,sheet:Bt,scenery:Ct,model:xt,website:Et},tZ=8;function nZ(e,t){let n=t.trim().toLowerCase();return e.filter(e=>n===``||e.title.toLowerCase().includes(n)||e.place.toLowerCase().includes(n)).slice(0,tZ).map(e=>({key:`link:${e.href}`,title:e.title,hint:e.place,icon:eZ[e.kind],aliases:[]}))}function rZ({items:e,selectedIndex:t,onItemClick:n,empty:r,testId:i=`doc-slash-menu`}){let a=(0,J.useRef)(null),[o,s]=(0,J.useState)(),[c,l]=(0,J.useState)(t);c!==t&&(l(t),s(void 0));let u=o??t,d=(0,J.useRef)(n);return(0,J.useEffect)(()=>{d.current=n}),(0,J.useEffect)(()=>{if(o===void 0)return;let t=e[o],n=e=>{e.key===`Enter`&&t&&(e.preventDefault(),e.stopImmediatePropagation(),d.current?.(t))};return window.addEventListener(`keydown`,n,!0),()=>{window.removeEventListener(`keydown`,n,!0)}},[o,e]),(0,J.useEffect)(()=>{a.current?.querySelector(`[aria-selected="true"]`)?.scrollIntoView({block:`nearest`})},[t]),(0,Y.jsx)(`div`,{ref:a,role:`listbox`,"data-testid":i,className:`doc-menu doc-slash-menu`,children:e.length===0?(0,Y.jsx)(`p`,{className:`doc-menu-empty`,children:r}):e.map((e,t)=>{let r=e.icon;return(0,Y.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":t===u,"data-item":e.key,className:`doc-menu-item`,onMouseMove:()=>{o!==t&&s(t)},onMouseDown:e=>{e.preventDefault()},onClick:()=>{n?.(e)},children:[(0,Y.jsx)(r,{size:16,"aria-hidden":!0,className:`doc-menu-icon`}),(0,Y.jsx)(`span`,{className:`doc-menu-title`,children:e.title}),e.hint!==void 0&&(0,Y.jsx)(`span`,{className:`doc-menu-hint`,"aria-hidden":!0,children:e.hint})]},e.key)})})}var iZ=[{value:`left`,icon:ge},{value:`center`,icon:he},{value:`right`,icon:me},{value:`justify`,icon:pt}];function aZ({names:e}){let t=bA(),n=GA(),r=PA(),i=OA({editor:t,selector:({editor:e})=>{let t=e.getTextCursorPosition().block,n=t.props?.textAlignment;return typeof n==`string`?`${n}:${t.content===void 0?`placed`:`text`}`:void 0}});if(!n||i===void 0)return null;let[a,o]=i.split(`:`),s=iZ.filter(({value:e})=>o===`text`||e!==`justify`),c=s.find(e=>e.value===a)?.icon??ge,l=e[a??`left`];return(0,Y.jsxs)(n.Generic.Menu.Root,{position:`bottom-start`,portalElement:r,preventFocusOnOpen:!0,children:[(0,Y.jsx)(n.Generic.Menu.Trigger,{children:(0,Y.jsx)(n.FormattingToolbar.Button,{className:`doc-align-button`,label:l,mainTooltip:l,children:(0,Y.jsx)(c,{size:15,"aria-hidden":!0})})}),(0,Y.jsx)(n.Generic.Menu.Dropdown,{className:`bn-menu-dropdown doc-align-menu`,children:s.map(({value:r,icon:i})=>(0,Y.jsx)(n.Generic.Menu.Item,{className:`bn-menu-item`,icon:(0,Y.jsx)(i,{size:15,"aria-hidden":!0}),checked:a===r,onClick:()=>{let e=t.getSelection()?.blocks??[t.getTextCursorPosition().block];for(let n of e)t.updateBlock(n,{props:{textAlignment:r}})},children:e[r]},r))})]})}function oZ({aligns:e}){return(0,Y.jsxs)(FN,{children:[(0,Y.jsx)(CN,{},`type`),(0,Y.jsx)(rN,{basicTextStyle:`bold`},`bold`),(0,Y.jsx)(rN,{basicTextStyle:`italic`},`italic`),(0,Y.jsx)(rN,{basicTextStyle:`underline`},`underline`),(0,Y.jsx)(rN,{basicTextStyle:`strike`},`strike`),(0,Y.jsx)(rN,{basicTextStyle:`code`},`code`),(0,Y.jsx)(uN,{},`color`),(0,Y.jsx)(hN,{},`link`),(0,Y.jsx)(aZ,{names:e},`align`)]})}function sZ({strings:e,onActions:t}){let n=bA(),r=GA(),i=TA(qT,{selector:e=>e?.block});return!r||!i?null:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(r.Generic.Menu.Item,{className:`bn-menu-item`,onClick:()=>{i.id!==void 0&&t(i.id)},children:[(0,Y.jsx)(zt,{size:15,"aria-hidden":!0}),e.turnInto,`…`]}),(0,Y.jsxs)(r.Generic.Menu.Item,{className:`bn-menu-item`,onClick:()=>{i.id!==void 0&&n.insertBlocks([PX(i)],i.id,`after`)},children:[(0,Y.jsx)(st,{size:15,"aria-hidden":!0}),e.duplicate]})]})}function cZ({label:e}){let t=bA(),n=GA(),r=TA(qT,{selector:e=>e?.block});return!n||!r?null:(0,Y.jsxs)(n.Generic.Menu.Item,{className:`bn-menu-item doc-menu-danger`,onClick:()=>{let e=t.getSelection()?.blocks;t.removeBlocks(e?.some(e=>e.id===r.id)?e:[r])},children:[(0,Y.jsx)(Je,{size:15,"aria-hidden":!0}),e]})}function lZ({strings:e,onActions:t,...n}){return(0,Y.jsx)(lP,{...n,dragHandleMenu:()=>(0,Y.jsxs)(sP,{children:[(0,Y.jsx)(sZ,{strings:e,onActions:t}),(0,Y.jsxs)(rP,{children:[(0,Y.jsx)(It,{size:15,"aria-hidden":!0}),e.colors]}),(0,Y.jsx)(cZ,{label:e.remove})]})})}function uZ({actions:e,placeholder:t,empty:n,at:r,onClose:i}){let[a,o]=(0,J.useState)(``),[s,c]=(0,J.useState)(0),l=(0,J.useRef)(null),u=a.trim().toLowerCase(),d=e.filter(e=>u===``||e.title.toLowerCase().includes(u)||(e.group??``).toLowerCase().includes(u)||e.key.includes(u)),f=Math.min(s,Math.max(0,d.length-1));return(0,J.useEffect)(()=>{l.current?.querySelector(`[aria-selected="true"]`)?.scrollIntoView({block:`nearest`})},[f,a]),(0,Y.jsxs)(`div`,{className:`doc-actions`,style:{left:r.x,top:r.y},"data-testid":`doc-actions`,onMouseDown:e=>{e.stopPropagation()},children:[(0,Y.jsx)(`input`,{autoFocus:!0,value:a,placeholder:t,"aria-label":t,className:`doc-actions-find`,onChange:e=>{o(e.target.value),c(0)},onBlur:i,onKeyDown:e=>{if(e.key===`Escape`&&i(),e.key===`ArrowDown`&&(e.preventDefault(),c(Math.min(f+1,d.length-1))),e.key===`ArrowUp`&&(e.preventDefault(),c(Math.max(f-1,0))),e.key===`Enter`){e.preventDefault();let t=d[f];i(),t?.run()}}}),(0,Y.jsx)(`div`,{ref:l,role:`listbox`,className:`doc-menu doc-actions-list`,children:d.length===0?(0,Y.jsx)(`p`,{className:`doc-menu-empty`,children:n}):d.map((e,t)=>{let n=e.icon,r=e.group!==void 0&&d[t-1]?.group!==e.group;return(0,Y.jsxs)(`div`,{children:[r?(0,Y.jsx)(`p`,{className:`doc-menu-group`,children:e.group}):null,(0,Y.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":t===f,"data-item":e.key,className:`doc-menu-item`,onMouseDown:e=>{e.preventDefault()},onClick:()=>{i(),e.run()},children:[(0,Y.jsx)(n,{size:16,"aria-hidden":!0,className:`doc-menu-icon`}),(0,Y.jsx)(`span`,{className:`doc-menu-title`,children:e.title})]})]},e.key)})})]})}function dZ(e){return YX.find(t=>t.key===e)?.icon??Lt}function fZ(e){return typeof e==`string`?e:Array.isArray(e)?e.map(e=>e.type===`text`?e.text:e.content.map(e=>e.text).join(``)).join(``):``}function pZ(e){let t=[];for(let n of e){let e=n.props?.level;if(n.type!==`heading`||typeof e!=`number`||e>3||n.id===void 0)continue;let r=fZ(n.content).trim();r!==``&&t.push({id:n.id,level:e,text:r})}return t}function mZ({entries:e,label:t,scroller:n,onGo:r}){let[i,a]=(0,J.useState)();return(0,J.useEffect)(()=>{let t=n.current;if(!t)return;let r=()=>{let n=t.getBoundingClientRect().top+96,r;for(let i of e){let e=t.querySelector(`.bn-block-outer[data-id="${CSS.escape(i.id)}"]`);if(e){if(e.getBoundingClientRect().top<=n)r=i.id;else break}}a(r??e[0]?.id)};return r(),t.addEventListener(`scroll`,r,{passive:!0}),()=>{t.removeEventListener(`scroll`,r)}},[e,n]),e.length<3?null:(0,Y.jsxs)(`nav`,{"aria-label":t,className:`doc-outline`,"data-testid":`doc-outline`,children:[(0,Y.jsx)(`p`,{className:`doc-outline-label`,children:t}),e.map(e=>(0,Y.jsx)(`button`,{type:`button`,"data-level":e.level,"aria-current":i===e.id?`location`:void 0,className:`doc-outline-item`,onClick:()=>{r(e.id)},children:e.text},e.id))]})}var hZ=(0,J.createContext)(void 0);function gZ(e){let t=(/^<\s*([A-Za-z][\w.]*)/.exec(e.trim())?.[1]??``).replace(/([a-z0-9])([A-Z])/g,`$1 $2`).toLowerCase();return t.charAt(0).toUpperCase()+t.slice(1)}function _Z({source:e}){let t=(0,J.useContext)(hZ);return(0,Y.jsxs)(`div`,{contentEditable:!1,"data-doc-embed":``,className:`doc-embed`,children:[(0,Y.jsx)(Vt,{size:18,"aria-hidden":!0}),(0,Y.jsx)(`span`,{className:`doc-embed-name`,children:gZ(e)}),(0,Y.jsx)(`span`,{className:`doc-embed-note`,children:t?.embed})]})}var vZ=fF({type:`embed`,propSchema:{source:{default:``}},content:`none`},{render:e=>(0,Y.jsx)(_Z,{source:e.block.props.source})}),yZ=[gX,`ℹ️`,`⚠️`,`❗`,`✅`,`📌`],bZ=fF({type:`callout`,propSchema:{icon:{default:gX},textColor:{default:`default`},backgroundColor:{default:`default`}},content:`inline`},{render:e=>(0,Y.jsxs)(`div`,{className:`doc-callout`,"data-doc-callout":``,children:[(0,Y.jsx)(`button`,{type:`button`,contentEditable:!1,className:`doc-callout-icon`,"aria-label":e.block.props.icon,onMouseDown:e=>{e.preventDefault()},onClick:()=>{let t=yZ.indexOf(e.block.props.icon);e.editor.updateBlock(e.block,{props:{icon:yZ[(t+1)%yZ.length]??`💡`}})},children:e.block.props.icon}),(0,Y.jsx)(`div`,{className:`doc-callout-text`,ref:e.contentRef})]})}),xZ=new Set([`audio`,`video`,`file`]),SZ=Object.fromEntries(Object.entries($C).filter(([e])=>!xZ.has(e))),CZ=aw.create({blockSpecs:{...SZ,embed:vZ(),callout:bZ()}});function wZ(e,t){let n=t.blocks,r=e.slash_menu,i=(e,t)=>({[e]:{...r[e],title:t}});return{...e,slash_menu:{...r,...i(`paragraph`,n.paragraph),...i(`heading`,n.heading1),...i(`heading_2`,n.heading2),...i(`heading_3`,n.heading3),...i(`bullet_list`,n.bullet),...i(`numbered_list`,n.numbered),...i(`check_list`,n.check),...i(`toggle_list`,n.toggle),...i(`quote`,n.quote),...i(`code_block`,n.code),...i(`table`,n.table),...i(`image`,n.image),...i(`divider`,n.divider)},placeholders:{...e.placeholders,default:t.placeholder,heading:t.heading}}}function TZ(e){let t=e[0];return e.length===1&&t?.type===`paragraph`&&t.content.every(e=>e.text===``)&&t.look===void 0&&(t.children?.length??0)===0}var EZ=e=>`doc-toggles:${e}`;function DZ(e){return typeof e!=`object`||!e||Array.isArray(e)?{}:Object.fromEntries(Object.entries(e).filter(e=>typeof e[1]==`boolean`))}var OZ=e=>e.type===`toggleListItem`||e.type===`heading`&&e.props?.isToggleable===!0;function*kZ(e){for(let t of e)yield t,yield*kZ(t.children??[])}function AZ(e,t){for(let n of kZ(e)){if(!OZ(n)||n.id===void 0)continue;let e=t[n.id.slice(1).replace(/-\d+$/,``)];if(e!==void 0)try{window.localStorage.setItem(`toggle-${n.id}`,String(e))}catch{return}}}function jZ(e,t){let n={};for(let r of kZ(e)){if(!OZ(r)||r.id===void 0)continue;let e=OX([r])[0];e&&(n[bX(e)]=t?.querySelector(`.bn-block-outer[data-id="${CSS.escape(r.id)}"] .bn-toggle-wrapper`)?.getAttribute(`data-show-children`)===`true`)}return n}var MZ=30,NZ=8,PZ=AP;function FZ({words:e}){let t=$X(),n=(0,J.useCallback)(t=>(0,Y.jsx)(rZ,{...t,empty:e.nothing}),[e.nothing]);return(0,Y.jsx)(PZ,{triggerCharacter:`/`,getItems:t=>Promise.resolve(QX(e,t)),suggestionMenuComponent:n,onItemClick:e=>{t(e)}})}function IZ({links:e,empty:t}){let n=bA(),r=(0,J.useCallback)(e=>(0,Y.jsx)(rZ,{...e,empty:t,testId:`doc-mention-menu`}),[t]),i=(0,J.useRef)([]);return(0,Y.jsx)(PZ,{triggerCharacter:`@`,shouldOpen:e=>{let t=e.selection.$from,n=t.parent.textBetween(0,t.parentOffset).replace(/@$/,``);return!/[A-Za-z0-9._-]$/.test(n)},getItems:async t=>(i.current=await e(),nZ(i.current,t)),suggestionMenuComponent:r,onItemClick:e=>{let t=i.current.find(t=>`link:${t.href}`===e.key);t&&n.insertInlineContent([{type:`link`,href:t.href,content:t.title},` `])}})}function LZ(e){let t=e instanceof Element?e:e?.contextElement;if(!t)return 0;let n=t.getBoundingClientRect().top,r=t.querySelector(`.bn-inline-content`);if(r){let e=document.createRange();e.selectNodeContents(r);let t=e.getClientRects()[0]??r.getBoundingClientRect();return t.top+t.height/2-n-MZ/2}let i=(t.querySelector(`.bn-block-content`)??t).getBoundingClientRect();return i.top-n+Math.max(0,Math.min(i.height,54)/2-MZ/2)}async function RZ(e){let t=new Uint8Array(await e.arrayBuffer()),n=``;for(let e=0;e<t.length;e+=32768)n+=String.fromCharCode(...t.subarray(e,e+32768));return btoa(n)}function zZ({path:e,file:t,toggles:n,words:r,context:i,autoFocus:a,className:s,onUnreadable:c}){let l=I(),u=UX(e),[d]=(0,J.useState)(()=>new Mu(t.text)),[f]=(0,J.useState)(()=>yu(d.shown())),p=JA({schema:CZ,dictionary:wZ(Eu(i.locale),r),tables:{headers:!0},...f.body.length>0?{initialContent:(()=>{let e=xX(f.body);return AZ(e,n),e})()}:{},uploadFile:async e=>{let t=await l[`files/upload`]({dir:u,name:e.name,data:await RZ(e)});return HX(u,t.path)},resolveFileUrl:async e=>{let t=GX(u,e);return t===void 0?e:(await l[`files/url`]({path:t})).url}},[d]),m=p,h=(0,J.useRef)(null);b({freeze:()=>Promise.resolve({key:`${e}@${String(t.text.length)}@${String(Math.round(h.current?.scrollTop??0))}`,what:`The doc ${e}`,source:{path:e}}),locate:n=>Promise.resolve(NX(document,n,e,t.text))});let[g,_]=(0,J.useState)(t.state);(0,J.useEffect)(()=>t.onState(_),[t]);let[v,y]=(0,J.useState)(()=>pZ(m.document)),[x,S]=(0,J.useState)(()=>({block:f.title,value:bu(f.title)})),C=(0,J.useRef)(x),w=(0,J.useRef)(null),T=(0,J.useCallback)((e,t)=>{C.current={block:e,value:t},S(C.current)},[]),E=(0,J.useCallback)(()=>{let e=OX(m.document),t=TZ(e)&&!TZ(yu(d.shown()).body);return Su(C.current.block,t?[]:e)},[m,d]),O=(0,J.useCallback)(e=>e<0?void 0:d.lineOf(e+ +!!yu(d.shown()).title),[d]),k=(0,J.useCallback)(()=>m.document.map(e=>({id:e.id??``,model:OX([e])[0]})),[m]),A=(0,J.useCallback)(e=>{let{title:t,body:n}=yu(e),r=bu(t),i=C.current.value;T(t,i.replace(/\s+/g,` `).trim()===r?i:r);let a=k().filter(e=>e.model!==void 0),o=TZ(a.map(e=>e.model)),s=ce(o?[]:a.map(e=>e.model),n,mu);m.transact(e=>{e.setMeta(`addToHistory`,!1);for(let e of s){let t=a.slice(e.at,e.at+e.remove).map(e=>e.id),n=SX(e.insert);if(o){let e=a[0];e&&n.length>0&&m.replaceBlocks([e.id],n)}else if(t.length>0)m.replaceBlocks(t,n);else if(n.length>0){let t=a[e.at],r=a.at(-1)??k().at(-1);t?m.insertBlocks(n,t.id,`before`):r&&m.insertBlocks(n,r.id,`after`)}}})},[m,T,k]),M=(0,J.useCallback)(e=>{let t=d.incoming(e,E());d.unreadable?c(e):t&&A(t)},[E,d,c,A]),N=(0,J.useRef)({held:E,take:M});(0,J.useLayoutEffect)(()=>{N.current={held:E,take:M}},[E,M]),(0,J.useLayoutEffect)(()=>(t.attach({save:e=>(d.adopt(e),d.unreadable?void 0:d.textFor(N.current.held())),take:(e,t)=>{d.adopt(t),N.current.take(e)}}),()=>{if(t.state!==`unsaved`||d.unreadable)return;let e;try{e=N.current.held()}catch{return}t.attach({save:t=>(d.adopt(t),d.unreadable?void 0:d.textFor(e)),take:()=>void 0}),t.flush()}),[t,d]);let P=(0,J.useRef)(JSON.stringify(n)),F=(0,J.useCallback)(()=>{let t=jZ(m.document,h.current),n=JSON.stringify(t);n!==P.current&&(P.current=n,l[`storage/set`]({key:EZ(e),value:Object.keys(t).length===0?null:t}).catch(()=>void 0))},[m,l,e]),L=(0,J.useCallback)(()=>{y(pZ(m.document)),F(),t.edited()},[t,m,F]),R=(0,J.useCallback)(e=>{let t=e.replace(/\n/g,` `);T(xu(C.current.block,t),t),L()},[L,T]);(0,J.useLayoutEffect)(()=>{let e=w.current;if(!e)return;let t=()=>{e.style.height=`0`,e.style.height=`${String(e.scrollHeight)}px`};t();let n=new ResizeObserver(t);return e.parentElement&&n.observe(e.parentElement),()=>{n.disconnect()}},[x.value]);let ee=(0,J.useCallback)(e=>{let t=m.document[0];if(t?.id===void 0)return;let n=t.id;e===void 0||e===``&&TZ(OX([t]))||(m.insertBlocks([{type:`paragraph`,content:e===``?[]:[{type:`text`,text:e,styles:{}}]}],t.id,`before`),n=m.document[0]?.id??t.id);try{p.setTextCursorPosition(n,`start`)}catch{}p.focus()},[p,m]),te=(0,J.useCallback)(e=>{let t=w.current;if(!t)return;let n=C.current.value.length;e!==void 0&&e!==``&&R(C.current.value+e),t.focus(),requestAnimationFrame(()=>{t.setSelectionRange(n,n)})},[R]),[ne]=(0,J.useState)(a);(0,J.useEffect)(()=>{if(!ne)return;let e=requestAnimationFrame(()=>{C.current.value.trim()===``?te():ee()});return()=>{cancelAnimationFrame(e)}},[ne,ee,te]);let re=(0,J.useCallback)(e=>{if(e.nativeEvent.isComposing)return;let t=e.currentTarget;if(e.key===`Enter`){e.preventDefault();let n=t.value.slice(t.selectionEnd);n!==``&&R(t.value.slice(0,t.selectionStart)),ee(n);return}let n=parseFloat(getComputedStyle(t).lineHeight)||0,r=t.selectionEnd===t.value.length||t.scrollHeight<n*1.5;(e.key===`ArrowDown`&&r||e.key===`Tab`&&!e.shiftKey)&&(e.preventDefault(),ee())},[R,ee]),ie=(0,J.useRef)([]),V=(0,J.useCallback)(async()=>{try{ie.current=(await D(l,`project/items`,{})).items}catch{}return ie.current},[l]);(0,J.useEffect)(()=>{V()},[V]);let ae=(0,J.useCallback)(async()=>KX(e,await V()),[V,e]);(0,J.useEffect)(()=>{let t=h.current;if(!t)return;let n=e=>{if(e.button!==0)return;let t=e.target?.closest(`.bn-editor a[href]`)?.getAttribute(`href`);return t!=null&&t!==``&&!VX.test(t)?t:void 0},r=e=>{n(e)!==void 0&&(e.preventDefault(),e.stopPropagation())},i=t=>{let r=n(t);r!==void 0&&(t.preventDefault(),t.stopPropagation(),V().then(t=>{let n=qX(e,r,t);n!==void 0&&l[`items/open`]({target:{type:`file`,path:n}}).catch(()=>void 0)}))};return t.addEventListener(`mousedown`,r,!0),t.addEventListener(`mouseup`,r,!0),t.addEventListener(`click`,i,!0),()=>{t.removeEventListener(`mousedown`,r,!0),t.removeEventListener(`mouseup`,r,!0),t.removeEventListener(`click`,i,!0)}},[l,V,e]),(0,J.useEffect)(()=>{let e=h.current;if(!e)return;let t=e=>{e.target?.closest(`.bn-toggle-button`)&&F()};return e.addEventListener(`click`,t),()=>{e.removeEventListener(`click`,t)}},[F]);let oe=(0,J.useCallback)(()=>(0,Y.jsx)(oZ,{aligns:r.aligns}),[r.aligns]),[se,le]=(0,J.useState)(),ue=(0,J.useCallback)(e=>{let t=h.current?.querySelector(`.bn-block-outer[data-id="${CSS.escape(e)}"]`),n=h.current?.closest(`.doc-sheet`);if(!t||!n)return;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();le({id:e,at:{x:Math.max(8,r.left-i.left),y:Math.min(r.top-i.top+28,i.height-320)}})},[]);BX(p,h,(0,J.useMemo)(()=>({onActions:ue,onTitle:te}),[ue,te]));let pe=(0,J.useMemo)(()=>{let t=se?.id;if(t===void 0)return[];let n=()=>{let e=m.getSelection()?.blocks??[],n=m.document.find(e=>e.id===t);return e.some(e=>e.id===t)?e:n?[n]:[]};return[...XX.flatMap(e=>{let t=ZX(e);return t?[{key:`turn:${e}`,title:r.blocks[e],icon:dZ(e),group:r.turnInto,run:()=>{for(let e of n())e.id!==void 0&&m.updateBlock(e.id,t)}}]:[]}),{key:`duplicate`,title:r.duplicate,icon:st,run:()=>{let e=n(),t=e.at(-1);t?.id!==void 0&&m.insertBlocks(e.map(PX),t.id,`after`)}},{key:`place`,title:r.copyPlace,icon:Mt,run:()=>{let n=O(m.document.findIndex(e=>e.id===t));navigator.clipboard.writeText(n===void 0?e:`${e}:${String(n)}`).catch(()=>void 0)}},{key:`delete`,title:r.remove,icon:Je,run:()=>{m.removeBlocks(n().flatMap(e=>e.id===void 0?[]:[e.id]))}}]},[se,m,O,e,r]),me=(0,J.useCallback)(e=>(0,Y.jsx)(lZ,{...e,strings:r,onActions:ue}),[ue,r]),he=(0,J.useMemo)(()=>({useFloatingOptions:{middleware:[o(({elements:e})=>({mainAxis:NZ,crossAxis:LZ(e.reference)}))]}}),[]),ge=(0,J.useCallback)(e=>{h.current?.querySelector(`.bn-block-outer[data-id="${CSS.escape(e)}"]`)?.scrollIntoView({block:`start`,behavior:`smooth`})},[]),_e=x.block?.type===`heading`?x.block.look?.align:void 0,ve=i.readOnly===!0,{ask:ye}=z();return(0,Y.jsx)(`div`,{className:s,"data-testid":`doc-editor`,"data-state":g,"data-read-only":ve?``:void 0,lang:j[B(i.locale)],onKeyDownCapture:ve?e=>{fe(e.nativeEvent)&&ye()}:void 0,onPasteCapture:ve?ye:void 0,onDropCapture:ve?ye:void 0,children:(0,Y.jsxs)(`div`,{className:`doc-sheet`,children:[(0,Y.jsx)(de,{saved:{state:g}}),se!==void 0&&(0,Y.jsx)(uZ,{actions:pe,placeholder:r.find,empty:r.nothing,at:se.at,onClose:()=>{le(void 0)}}),(0,Y.jsx)(`div`,{className:`doc-scroll`,ref:h,children:(0,Y.jsxs)(`div`,{className:`doc-body`,children:[(0,Y.jsxs)(`div`,{className:`doc-column`,children:[(0,Y.jsx)(`div`,{className:`doc-title-row`,children:(0,Y.jsx)(`textarea`,{ref:w,className:`doc-title`,"data-testid":`doc-title-field`,rows:1,value:x.value,placeholder:r.untitled,"aria-label":r.title,readOnly:ve,style:_e?{textAlign:_e}:void 0,onChange:e=>{R(e.target.value)},onKeyDown:re})}),(0,Y.jsxs)(mX,{editor:p,editable:!ve,theme:i.theme,formattingToolbar:!1,slashMenu:!1,sideMenu:!1,onChange:L,children:[(0,Y.jsx)(qN,{formattingToolbar:oe}),(0,Y.jsx)(FZ,{words:r}),(0,Y.jsx)(IZ,{links:ae,empty:r.nothingToLink}),(0,Y.jsx)(dP,{sideMenu:me,floatingUIOptions:he})]})]}),(0,Y.jsx)(mZ,{entries:v,label:r.outline,scroller:h,onGo:ge})]})})]})})}function BZ(e){let t=I(),n=ie(),r=e.path??n?.item.entry,i=Tu.of(n?.locale),[a,o]=(0,J.useState)(),[s,c]=(0,J.useState)(),[l,u]=(0,J.useState)(),[d,f]=(0,J.useState)(0);(0,J.useEffect)(()=>{if(r===void 0)return;let e=!0,n;return Promise.all([pe.open(t,r),(e=>t[`storage/get`]({key:e}).then(e=>e.value,()=>null))(EZ(r))]).then(([t,i])=>{n=t,e?(o({path:r,file:t,toggles:DZ(i)}),u(ju(Bl(t.text))?t.text:void 0),c(void 0)):t.close()},t=>{e&&c(t instanceof Error?t.message:``)}),()=>{e=!1,n?.close()}},[t,r]);let p=a?.file;(0,J.useEffect)(()=>{p&&l!==void 0&&p.attach({save:()=>void 0,take:e=>{ju(Bl(e))?u(e):(u(void 0),f(e=>e+1))}})},[p,l]);let m=`doc-page${e.bare===!0?` doc-bare`:``} ${e.className??``}`,h=j[B(n?.locale)];return s===void 0?!a||!n||a.path!==r?(0,Y.jsx)(`div`,{className:m,lang:h,children:(0,Y.jsx)(`div`,{className:`doc-sheet`,children:(0,Y.jsx)(`p`,{className:`doc-message`,children:i.loading})})}):l===void 0?(0,Y.jsx)(hZ.Provider,{value:i,children:(0,Y.jsx)(zZ,{path:r,file:a.file,toggles:a.toggles,words:i,context:n,autoFocus:e.autoFocus??!1,className:m,onUnreadable:u},`${r}:${String(d)}`)}):(0,Y.jsx)(VZ,{className:m,text:l,words:i,lang:h}):(0,Y.jsx)(`div`,{className:m,lang:h,children:(0,Y.jsx)(`div`,{className:`doc-sheet`,children:(0,Y.jsx)(`p`,{role:`alert`,className:`doc-message doc-message-problem`,children:s})})})}function VZ({className:e,text:t,words:n,lang:r}){let i=Bl(t).problems[0]?.message;return(0,Y.jsx)(`div`,{className:e,lang:r,children:(0,Y.jsx)(`div`,{className:`doc-sheet`,children:(0,Y.jsxs)(`div`,{className:`doc-scroll doc-unreadable`,"data-testid":`doc-unreadable`,children:[(0,Y.jsx)(`p`,{className:`doc-message`,children:n.unreadable}),(0,Y.jsx)(`p`,{className:`doc-message doc-message-problem`,children:i}),(0,Y.jsx)(`pre`,{children:t})]})})})}export{BZ as DocEditor};